From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

fpga digital trigger 1000ms of high

goodmorning! 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.

I attach the vi.

0 Kudos
Message 1 of 3
(920 Views)

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
0 Kudos
Message 2 of 3
(872 Views)

yes you are absolutely right, I didnt thought about that... I took out the local variable and it still doesn't stay in high for 1000ms. when I try to simulate it, it goes True and then false really fast.

0 Kudos
Message 3 of 3
(864 Views)