LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

FPGA Timed Loop - Set dt

Solved!
Go to solution

Whenever I try to use a Timed Loop in LabVIEW FPGA, it doesn't give me the normal options to set the "dt" instance.  It works fine when I'm using timed loops on a Host VI, but not on the FPGA Target side.

 

This is what I see:

 

fpgatimedloop.png

 

It shows the default clock as expected, but whenever I try to set another property, the only one available is the error:

 

menu.png

 

Does anyone know how to set the "dt" timing parameter for a loop like this?  Thanks in advance! 🙂

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If someone helped you out, please select their post as the solution and/or give them Kudos!
0 Kudos
Message 1 of 7
(2,612 Views)

Hi Asthma,

 

on the FPGA that loop has a different name: SCTL aka Single Cycle Timed Loop!

 

Please read the LabVIEW help for that loop structure!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 7
(2,606 Views)

Where can the SCTL be found?  This is the only timed structure I can find anywhere on the pallette.  (If its not clear enough, I'm quite new to FPGA.  I also am in the process of transitioning to 2013 from 2009 so its a bit different 😛 )

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If someone helped you out, please select their post as the solution and/or give them Kudos!
0 Kudos
Message 3 of 7
(2,602 Views)

Hi Asthma,

 

the SCTL (on FPGA) looks like the TWL (on PC/Realtime), we are talking about the very same structure.

BUT: on the FPGA that loop behaves different than you are used to from PC/RT!

 

Read the help!

Go through FPGA basics found here (basics, paragraph 6)…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 7
(2,597 Views)

That video was quite informative.  Perhaps I have the wrong structure in mind then.  My goal is to repeat a loop, say 10000 times at exactly 2 kHz.  What would be the best approach to make this happen on the FPGA?

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If someone helped you out, please select their post as the solution and/or give them Kudos!
0 Kudos
Message 5 of 7
(2,590 Views)
Solution
Accepted by topic author MrHappyAsthma

Hi Asthma,

 

use a FOR loop with a Wait(FPGA) in it…

 

Basics: Whenever you need to iterate for a given number of cycles you should use a FOR loop.

Basics: When your loop needs timing put a Wait in the loop…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 6 of 7
(2,588 Views)

Will do!  Thank you for the help and sorry for the confusion.  FPGA is quite a bit different than traditional LabVIEW on Windows.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If someone helped you out, please select their post as the solution and/or give them Kudos!
0 Kudos
Message 7 of 7
(2,584 Views)