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 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,609 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,603 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,599 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,594 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,587 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,585 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,581 Views)