06-16-2021 08:06 PM
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.
Solved! Go to Solution.
06-16-2021 09:22 PM
I would probably use a Global Variable to store the latest reading.
06-17-2021 12:46 AM
06-17-2021 08:40 PM
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?
06-18-2021 12:19 AM
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.
06-18-2021 12:27 AM
Thank you, I will try your suggestion.