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: 

lv fpga - wait express vi slows down other loops?

Solved!
Go to solution

Hello all, 

 

I have a question about using the Wait Express vi in Labview FPGA. I use 2 loops, one that changes data, the other one logs this data by sending it to a FIFO. In the first loop, I change the value of a variable called 'CurrentWfmFast?' from true to false. After this, I use the Wait Express vi to wait a couple of microseconds so the program does not change this value back to true immediately. In the second loop, I log the data to a FIFO to send it to the host.

 

If I now plot the variable in the host.vi, it seems that the value of the 'CurrentWfmFast?' has changed AFTER the Wait Express vi instead of before (see attachment).  If I change the 'Wait (us) Pos Stable' to for example 60000, the value of 'CurrentWfmFast?' changes after 60000 us... How is this possible? Does the Wait Express vi influence other while loops? 

 

Thank you in advance,

 

Best regards,
Dries

 

code-fpga.png

output-host.png

 

0 Kudos
Message 1 of 5
(2,480 Views)

Hello Dries,

 

Is it possible to share your project?

 

I see that you're waiting for an occurance in the second loop, but I don't see it defined anywhere?

It would also be nice to see all the cases and check what is happening.

Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
0 Kudos
Message 2 of 5
(2,464 Views)
Solution
Accepted by topic author LVD

I finally figured it out myself. Before the 'CurrentWfmFast?' value is changed from true to false, the wait already executed once. So that is why the value did not change immediately. Instead of 1 wait, there are 2, this was my error. 

I know this was difficult (or impossible) for you to figure this out without the whole project, but thanks anyway for looking at it. If I need any more help, I will post the whole VI or project.

 

Best regards,

Dries

0 Kudos
Message 3 of 5
(2,454 Views)

Thanks for the feedback!

 

Good luck with the further programming!

 

If you're relatively new to programming in LabVIEW FPGA, then it can also be a good idea to go through these slides:

http://zone.ni.com/devzone/cda/tut/p/id/3555

Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
0 Kudos
Message 4 of 5
(2,442 Views)

Thanks for the feedback!

 

Good luck with the further programming!

 

If you're relatively new to programming in LabVIEW FPGA, then it can also be a good idea to go through these slides:

http://zone.ni.com/devzone/cda/tut/p/id/3555

Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
0 Kudos
Message 5 of 5
(2,442 Views)