03-26-2012 03:33 PM
Hello all,
I want some suggestion on how to do this.
I have set the system definition up for one of the signals like so Model Output1 --> user channel1 --> PXI FPGA AO1
Usually, the model output has controls the FPGA output. However, I want to override the output signal to some other value to test some faults. I tried to override it in stimulus profile editor, but it would not work (for obvious reasons). I am wondering what I can do to override the signal value other than removing the mapping from the Model Output1 to user channel1 every time I want to test that fault.
Thanks.
Solved! Go to Solution.
03-26-2012 10:43 PM
Great question!
If you are using the new Stimulus Profile Editor in VeriStand 2011, you can perform software fault insertion from a real-time sequence using a special set of functions, fault and clearfault. The fault function allows you to enable a software fault a specific parameter mapped to a system definition channel (provided it's faultable) to a specified value. This will override any source mappings that channel might have. To clear the software fault, call the clearfault on the function.
You can call these built-in functions directly from an Expression. Here is some detailed help on these and other built-in functions you can call in a sequence.
For instance, imagine you have the following sequence and the parameter ao0 is mapped to the system definition channel PXI FPGA AO0. This sequence when run would fault the PXI FPGA AO0 channel to the value -10.0, wait 5 seconds, and then clear the fault on AO0. While the fault is active, any mappings are overridden, and any attempt to set the faulted channel from the workspace will fail as well. When the fault is cleared, any source mappings will take affect again.
IMPORTANT NOTE: There is a bug in VeriStand 2011 that prevents a real-time sequence from fully faulting a channel if no other channels are currently faulted in the system. The workaround is to open the Software Fault Manager tool from the workspace and fault some dummy channel, like an unused User Channel, before running your sequence.