LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to plot a waveform graph outside for loop?

Hi everyone,
 
I'm having the same problem with two VI.
 
In the first program, I'm aquiring two signals, force and emg as in voltage with 500 sampling rate. I want to aquire 60 seconds of the signal but for some reason i cant do that. I tried putting it in a FOR loop that will acquire 5 seconds after another but the problem is that I want to display the complete output in a waveform graph but i dont know how to do that.
 
The second program have almost the same problem but it's dealing with one signal only with the same sampling rate and time. I want to display the whole signal in one waveform graph with the correct timing.
 
 
 
Can someone help me please it's urgent.
 
 
I've attached both programs
Download All
0 Kudos
Message 1 of 12
(4,737 Views)

Hi ,

 

You can use queue facility wherin you can acquire data as much as you want and later plot them after dequing the same data one by one.

Regards

Sarita

Message 2 of 12
(4,730 Views)
Hi Sarita,
 
Can you please explain more? am not familiar with this option in LabVIEW.
 
Thanks
0 Kudos
Message 3 of 12
(4,725 Views)
I read that if I used shift registers and build arrays or append waveform I can have the complete signal plotted on the waveform graph. Can anyone explain to me how can I do that with my VIs?
0 Kudos
Message 4 of 12
(4,701 Views)
 
Can someone please tell me what type of array icon shown in this image?
 
Thank you
0 Kudos
Message 5 of 12
(4,700 Views)

Why don't you try the attached. It uses a shift register and the Append Waveforms function.

Also, how large is your monitor. Your front panel and diagram are huge. A rule of thumb is to keep the diagram to one screen and not have to do a lot of scrolling. The same is true of the front panel. If you really need that many indicators, you might want to think about placing them on different pages of a tab control. Try to keep your wires straight too.

Message 6 of 12
(4,690 Views)

Hi Dennis,

 

The attached worked but it didnt show the whole signal, it scrolled with each itteration. The plot output at the end of the loop is for the last 5 seconds. also, the Y-axis is shown in 1000s not 60 seconds. Is there a way to overcome that?

 

I'm new to LabView that's why my vi is kind of a mess. Thanks for the advice i will try doing so.

0 Kudos
Message 7 of 12
(4,689 Views)
Hi,
 
 
now i get how the vi is working, it's plotting the maximum voltage of each itteration against the number of the itteration. How can i plot it against real time?
0 Kudos
Message 8 of 12
(4,680 Views)

I don't see any 'scrolling' on the graph. I see 5 seconds worth of data, the the next gets appended, etc. Do you really mean the chart. I didn't do anything with that because you said you wanted a graph. You can initialize the chart by right clicking on it and selecting Create>Property Node. Right click on the property node and select Properties>History. Right click on the property node again and select Change to Write. Right click on the input and select Create>Control. Move this to the left of the for loop and wire the error out of the property node to the edge of the for loop. It should look like the picture below.

To change the x axis, right click on the graph/chart and select Properties. Go to the Scales tab and select the X Axis. In the Scaling Factors box, you can enter a value to scale the axis.

Message 9 of 12
(4,679 Views)
it's working perfectly now, but still the x-axis is from 0-34000. I tried adjusting the x-axis 0-60 but it's not working.
 
As for the other vi (emg+force) how can I apply the shift register to the graph as it plots two signals in it?
 
 
Thanks alot
0 Kudos
Message 10 of 12
(4,675 Views)