When an operator or script modifies an input variable, the CVT table gets modified and the values read from the input device get rerouted to the alternate value table (ALT). Thus, the source of the data can be changed without the model needing to be aware of it. This is used as a fault injection mechanism to check the response of the unit under test under faulty conditions.
The alternate value is viewable in RT Viewer and in HMI Display. See Get/Set Value Tab (Upper Right Pane), Variable Control Buttons, and y Vs Time Plot.
When an input RTDB variable is modified by an operator using RT Viewer or HMI Display, the operator flag associated with that variable is set. RT Viewer can be used to clear this flag, rerouting data from the input device back to the CVT. See Get/Set Value Tab (Upper Right Pane).
When an input RTDB variable is modified by a script program (see Scripts...), the alternate flag associated with that variable is set. RT Viewer can be used to clear this flag, rerouting data from the input device back to the CVT. See Get/Set Value Tab (Upper Right Pane).
If either the operator flag or the alternate flag is set, data read from the input device will be written to the alternate table. If both are clear, data read from the input device will be written to the current value table.
CVT value, alternate value, and flags can also be accessed programmatically via the SimWB API to generate fault injection into the model. Typically the SimWB user script is written specifically for that purpose.
Current Value Table | Modification of an Output Variable |