We have a few RT Boxes used as Hardware-In-the-Loop and would like to use them to measure response time of our attached Controls PCB.
For example, we want to measure the response time for overvoltage protection.
Ideally we would like to send a rising voltage signal through an AnalogOut pin to our MCU. When a defined voltage threshold is crossed, we start a Timer. Then we wait for a response on a DigitalIn pin and stop the Timer. Then, we store the time interval to be recalled using a data capture block to return said signal via XML-RPC to Python.
I failed implementing this in any intelligent way. How to I implement timers, stopwatches, cycle counters or similar?
Thanks!I have attached an example file trying to show what we wanted to do. The triggered data capture blocks are not performing as we would love to. (Ideally record the number of samples defined once triggered, and said data stored until it is called, with a time stamp/cycle number when this block was triggered)
PLECS Sandbox.plecs (18.3 KB)