Target Requirements : Describing Signal Mapping to I/O Cards : Signal Mapping to I/O: Semantics

Signal Mapping to I/O: Semantics

There are two issues here: one is inputs, the other outputs.

Inputs:

Whenever a signal is mapped to an input port it is regarded in a function named top_do_inputs(), if the Single polling rate is selected, or in two functions named top_do_high_inputs() and top_do_low_inputs(), if the Double polling rate is selected. In case of two polling rates, each input signal is handled only in one of top_do_high_inputs() or top_do_low_inputs() according to the polling rate specified in the card definition file:

All input signals whose polling rate is lower than the high polling rate is handled in the top_do_low_inputs()function.

Others, whose polling rate is larger or equal to the high polling rate, are handled in the top_do_high_inputs() function. Those functions are started from separate tasks (one for top_do_high_inputs(), the other for top_do_high_inputs() in case of two polling rates, and one task in case of single polling rate). The new values are in effect in the following step.

Outputs:

There are three categories of data items:

Whenever a non-Double Buffered element is assigned with a value, a call to the output device is done immediately.

Whenever a Static Double Buffered element is assigned with a value, a call to the output device is done at the end of the current step. The call will be from the generated code, near the place where it swaps the next/current values. In order to trace the writing event, a flag will be added to the generated code, near the definition of the current/next variables.

Whenever a Dynamic Double Buffered element is assigned with a value, a call to the output device is done at the end of the current step from the update() function inside of RT library.