Previous Up Next

Chapter 3  Example 3: delay in algorithm

From the principal window, choose File / Save as and save your third application under your tutorial folder with the name example3.

3.1  Definition of the operations input, output, and calc

Create a sensor input, an actuator output, and the function calc, like in the Examples 1 and 2. (cf. 1.1.3 and calcul1 in 2.1)

3.2  Definition of the delay

To create the calcPrec delay:

3.3  Definition of the algorithm with delay

Create an algorithm algorithmMain. Create a reference in1 to the definition input, a reference calc to the definition calc, a reference out1 to the definition output, and a reference calcPrec<0;1> to the definition calcPrec. Create dependences between the references.

The algorithm looks like the figure 3.1.


Figure 3.1: Algorithm of the Example 3

From the principal window, choose File / Close. In the dialog window, click on the Save button.


Previous Up Next