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: 

How to transfer data between two parallel loops with different timing periods

Solved!
Go to solution

Due to hardware limitations, the timing cyclic of the data collection cycle is about 50 Hz. The control cycle requires a timing cycle of about 500 Hz to control the actuator. How to transfer data between two loops? When the data collection cycle cannot generate enough data, the data of the previous sampling point can be maintained.

0 Kudos
Message 1 of 6
(996 Views)
Solution
Accepted by topic author REDJ

I would probably use a Global Variable to store the latest reading.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 6
(970 Views)
Solution
Accepted by topic author REDJ

Perhaps a Notifier and the Get Notifier Status function? But I guess a global would do the same thing, and arguably more compactly...

Is it correct that you only want the latest value, and that precise synchronization isn't a concern?

If not, can you clarify what data you're needing to transfer?


GCentral
0 Kudos
Message 4 of 6
(913 Views)

Yes, I only need to get the latest data from the data acquisition loop. However, in fact, since the period of the control loop is smaller than that of the data acquisition loop(As shown in  Figure), I hope that the data acquisition loop will continue to provide the control loop with the data of the previous sampling point before the latest data is available.

0 Kudos
Message 5 of 6
(899 Views)

Thank you, I will try your suggestion.

0 Kudos
Message 6 of 6
(892 Views)