04-04-2023 11:13 AM - edited 04-04-2023 11:43 AM
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.
04-04-2023 12:42 PM - edited 04-04-2023 12:43 PM
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,
04-04-2023 12:45 PM
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