06-19-2020 10:52 AM
06-19-2020 12:51 PM - edited 06-19-2020 06:35 PM
Where does the "data gathering online" occur and how does it eventually end up in the array?
(So you have a loop that is slow and it also has a shift register. Why do you blame the innocent shift register???)
06-19-2020 03:28 PM
Trying to loop at 1 kHz exactly on Windows will not be possible; Windows just doesn't guarantee that kind of timing. What exactly are you trying to do? What is dictating the 1 kHz requirement?
06-20-2020 02:51 AM
I am controlling the position of a motion platform by sending udp packets which contain current position for each degree of freedom. I have three vis
1. Send position. For correct working, udp packets must be sent at 1000 hz
2. Receive current position and status of the platform. Here positions are saved into a shared variable, let's call it DOF.
Also running at 1000 hz
3. Save DOF. Here I initialize an array of a certain size (108000x7), and concatenate the new position value with a shift register.
Observations:
a)I savethe whole file only at the end of the motion ( just once)
b) if vi 3 runs at 200 hz everything works
c) if vi 3 runs at 1000 hz and i ask only to save 20000 datapoints, it works
d) if vi 3 runs at 1000 hz and i ask to save the whole file it slows down, so also vis 1 and 2 slow down and the platform stops.
06-20-2020 03:18 AM
I have to ask: If everything works at 200 Hz, why do you need to run it at 1000 Hz?
06-20-2020 05:36 AM
@antonella86 wrote:
..
b) if vi 3 runs at 200 hz everything works
c) if vi 3 runs at 1000 hz and i ask only to save 20000 datapoints, it works
d) if vi 3 runs at 1000 hz and i ask to save the whole file it slows down, so also vis 1 and 2 slow down and the platform stops.
are you running out of ram?
06-20-2020 11:01 AM
@antonella86 wrote:
I am controlling the position of a motion platform by sending udp packets which contain current position for each degree of freedom. I have three vis ...
LabVIEW is a graphical programming language and there is no way to see architectural and programming problems from a list of generic descriptions. Hardware can make minor differences. Coding skills can make orders of magnitude differences.
@antonella86 wrote:3. Here I initialize an array of a certain size (108000x7), and concatenate the new position value with a shift register.
A shift register does not "concatenate" anything and "concatenation" is not the correct operation to keep a data structure at a fixed size. Obviously we have a language problem that again can be solved by attaching a VI.