LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why are shift registers are so slow

 
 
 
It is a plain 2D and is converted into a matrix before I save it.  Thanks for pointing that out. Don't have the code with me but my question is what can in general cause such delays while saving data (memory? )If this is a known issue in labview, and what can be done (adding shift register already helped but it is not enough to keep the vi running at 1000 hz without causing parallel processes to slow down). 
 
Thanks in advance for your help 
 
Mostra testo citato
0 Kudos
Message 11 of 17
(707 Views)

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???)

0 Kudos
Message 12 of 17
(692 Views)

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?

0 Kudos
Message 13 of 17
(680 Views)

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.

0 Kudos
Message 14 of 17
(646 Views)

I have to ask: If everything works at 200 Hz, why do you need to run it at 1000 Hz?

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 15 of 17
(639 Views)

@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?

ram.PNG

0 Kudos
Message 16 of 17
(630 Views)

@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.

 

  • Show us your code!!!
  • What is the datatype of the points? How are they represented in the UDP message? (flat binary, formatted, etc.)
  • How do you define the 1000Hz loop speed? (wait, timed loop, etc.)
  • How do you measure the actual loop rate?
  • What else is using the network?
  • UDP does not guarantee delivery. How do you deal with missing packets (ignore? wait forever?)
  • Is this wired or wifi? What is the network speed?
  • Are the messages fixed size?
  • Are all participants on the same subnet or is routing involved?
  • What is on the other end of the communication? What are the specifications of that device?
  • What else is running on the computer (windows update, etc.)
  • What is the processor and RAM (#of cores, etc.) and OS?
  • ...
  • ... so... many... questions. ....

 


@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.

 

0 Kudos
Message 17 of 17
(609 Views)