06-24-2021 05:04 PM
I am trying to generate a DC voltage to control an actuator (0-3V).
Basically, when receiving a trigger signal, the board will generate a steady 0V; then for the next trigger signal, it will generate 0.1V and so on until it reaches 3V and then it will start over from 0V.
The trigger signals are roughly 5~10 Hz, and connected to port PFI6.
I was trying to find a function to see if the program is triggered or not and if it is, the voltage will increase by 0.1V. But, I can't find such a function.
I am not pretty sure how to construct the code now. I would appreciate hearing any thought on this. Thanks.
Solved! Go to Solution.
06-24-2021 06:45 PM
Since you just need a stable DC value for each trigger, I would suggest you to use the trigger signal as sample clock and write a waveform where each sample value corresponds to the trigger in order.
This way, DAQ will iterate through each sample in the waveform for each trigger signal.
06-24-2021 07:04 PM
An example implementation of my suggested idea. I don't know if this actually works but as per my understanding, it should and might require some level of debug to get it working.
06-25-2021 09:30 AM
There is no issue to run the program. It works really well and the output is exactly what I want. Thank you so much!