Can I change the value of an AIO/DIO RTDB variable while a test is running?
Question
Can I change the value of an AIO/DIO RTDB variable while a test is running?
Answer
If an AIO/DIO point is shared between two models, you can only probe/measure the current signal value. The rationale relates to the fact that each model reads from and writes to the CVT table. The upstream model will overwrite any change you make to the shared CVT variable to influence a downstream model.
On the other hand, suppose a point is of the type AIO/DIO, but it is really used as either an AI/DI and is not shared between two models. Here, you can change the value of this variable to influence downstream behaviour.
To better understand the CVT/ALT concept, see this video.
For changing the value of AIO/DIO RTDB variables that are shared between two models, use one of the following workarounds:
- Insert logic into the upstream model to modify the outputs based on your criteria
- Use AI/AO or DI/DO pairs between models, with an RTDB-Item Copy pseudo-device connecting the two. That is, create SW_Out_upstream (AO) in the upstream model, and SW_Out_downstream (AI) in the downstream model. In the Control Center, add an RTDB-Item Copy device using the IO Devices tab. Then, map SW_OUT_upstream to SW_OUT_downstream. You can modify the AO/AI signal as needed. For information about the RTDB Item Copy, see this documentation.