If students (or anyone else) want to add additional functions to the control, it's best implemented in the VeriStand interface first and later included in the Control&Safety model. This makes debugging much easier and the code can be adapted faster. Once the code is functional, it can be integrated into the model.
If you want to use the model, set the bool input to "true":
You can then use the VI template to create your code:
- Read signals from the testbed:
Any input signals required for the control can be specified here.
Enter the specific paths in the string array. The "GetMultipleChannelValues" block will then read the signals and create an array. You can then translate the signals into the read / calc clusters (see 7 in Conversion) if you want to. - Send signals to the testbed:
The control models should have an option to give directly inputs to them. The name of these signals can be defined in the string array for the "SetMultipleChannelValues" block. The Safety model will check if the signals are within their boundries and send them to the testbed. - New control code:
Add a SubVI here that defines the control code.
Common errors
Sometimes the "GetMultipleChannelValues" / "SetMultipleChannelValues" creates an error code. Often this is due to one of the following errors:
- Typo in the channel path
- Space at the end of the channel path
- New line at the end of the channel path
- Empty element in the channel path array