LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Changing loop rate (frequency)

Hi,

 

When I run the program, the loop rate will automatically be set to its own value, how do I change the loop rate to 10 Hz and fixed at that wanted frequency?

I am not using DAQ for my data, I am using LINX.

 

Thank you. 

 

Construction 1.png

0 Kudos
Message 1 of 3
(482 Views)

Loop execute as fast as the content of the loop executes, if you need to speed the loop, find out the components slowing down and optimize.

 

Things to improve,

  • Use Read N Analog Channels version of the LINX instead of 1 channel at a time
  • Use Producer consumer architecture to decouple the data acquisition and logging pieces
Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 2 of 3
(452 Views)

A While Loop runs as fast as the slowest component (where "component" might mean "everything in the Loop connected by wires").  In your VI, you have three such "components" -- all the stuff wired together, the function connected to "Loop Rate" indicator, and the Stop control wired to the While Stop icon.  You can "slow it down" by putting, say, a "Wait until next ms multiple" function in there and wiring the desired Loop Time (for example, if you wire 100, the loop will run at 10 Hz, or slower).  

 

Bob Schor

0 Kudos
Message 3 of 3
(447 Views)