Hi alex,
@alex8624 wrote:
I'm trying to do a trigger with a high of 1000ms; I tried to do it in 2 different ways but none of them works and I cant understand why. the signal stays in "high" for a lot more than 1000ms.
First loop with "Boolean" control: why do you need to copy the value of the "Boolean" control to a local variable of that control???
Does that loop really needs more than 1s to switch Mod1/DO0 to TRUE and back to FALSE?
On those other loops using "Mod1/DO3": you access that DIO pin in two different loops! This can affect execution times…
You also try to set that DO pin in a SCTL set to spin at 40MHz: does that loop really run that fast? Most IO nodes don't execute so fast!!!
This loop could be simplified to this:
When "cam trigger" stays TRUE (for more than 40M iterations) then this loop still spins so fast you will not recognize the one single tick when the DO is set to FALSE…
Btw. did you read the specs of your DO module? Do you know (for sure!) which update/sample rates are allowed for the DO pins?
It's a rather "sloooowww" module, so the 40MHz-SCTL is pure nonsense!
Best regards,
GerdW
using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019