Desktop version

Home arrow Computer Science arrow Real-Time and Distributed Real-Time Systems: Theory and Applications

The TrueTime Send and Receive Blocks

Figure 5.21a shows TrueTime Send block parameters associated with the sensor node used in the simulation presented in Figure 5.18. The block is always triggered. The corresponding Receive block parameters associated with the receiver block of the controller is shown in Figure 5.21b.

The TrueTime Send block is always triggered. For the NCS shown in Figure 5.18, the trigger chosen is a rising edge. Thus the sensor node in Figure 5.18 is triggered at the frequency of the Sensor Trigger. The Receive block can be programmed to generate a trigger, for example, the TrueTime Receive block associated with the controller in the NCS shown in Figure 5.18. The controller in the NCS of Figure 5.18 is an event-triggered controller and the Computational delay block actually simulates the delay spent in controller computation, which then triggers a send from the controller to the actuator.

FIGURE 5.21

(a) TrueTime Send block. (b) TrueTime Receive block.

The TrueTime Kernel Block

The dialog box corresponding to the TrueTime Kernel block is shown in Figure 5.22.

The significance of the nonobvious fields are explained as follows:

Init function—Defines the name of an M-file or a MEX file where the initialization code is stored.

Battery—It is an optional parameter that can be used if device is battery-powered.

Clock drift and clock offset—Defines value of time difference from standard time. When the clock drift is set to 0.01 it means that the device local time will run 1% faster than real-time. Clock offset sets time offset from the first run of the simulation.

 
Source
< Prev   CONTENTS   Source   Next >

Related topics