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 namedtop_do_inputs()
, if the Single polling rate is selected, or in two functions namedtop_do_high_inputs()
andtop_do_low_inputs()
, if the Double polling rate is selected. In case of two polling rates, each input signal is handled only in one oftop_do_high_inputs()
ortop_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 fortop_do_high_inputs()
, the other fortop_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.
●
●
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.