Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


This is a demonstration on how to set-up a web-interface to a control
system implemented using As you'll notice
this is possible in a few lines of code, because the usage of
Javascript for implementing the gui-part and ORTD for the 
real-time part including the UDP-communication allows an efficient
formulation of the algorithms.
UDPio.sce is a sample ORTD-simulation and webappUDP.js the nodejs program
that connects to this simulation. Further, it provides a web-interface 
accessible via http://localhost:8090/mainAuto.html .

The template for the web-interface is stored in html/mainAuto.html.

The files used in this example are:

- UDPio.sce is a sample ORTD-simulation that simulates an osicillator
            and a communication interface to node.js using UDPio
- webappUDP.js is the node.js program that connects to this simulation 
               via an UDP-interface and provides a web-interface on port 8090.
- Different templates for the html-page are stored in html/main*.html.

- UDPio.ipar and UDPio.rpar are the compiled ORTD-programm files.
- PacketFramework.sce The file that implements the packet framework.
                      This will was also integrated into ORTD at Rev. 495

To make this example working:

- The installation of node.js ( and its package manager
  npm is required. 
- Then, the "" node.js-package of node.js 
  is required that can be installed with "npm". To do this, call the 
  following commmand from the directory that contains webappUDP.js:

 $ cd webinterface
 $ npm install

- To start the set-up, two services / processes are required to run
  at the same time:

the ORTD-simulation is started by running

 $ sh

and the node.js part by
 $ cd webinterface
 $ node webappUDP.js 

The order doesn't matter and it is also possible to start / stop each
service, which is one advantage of using stateless UDP-communication.

- Finally, point your browser to http://localhost:8090/mainAuto.html .
You can’t perform that action at this time.