LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can a waveform graph be used without for loop

i would like to know if a waveform graph can be used without a for loop and if so, how? I tried using a while loop only, but the reading becomes too fast.
can someone advise
0 Kudos
Message 1 of 4
(2,874 Views)
Dear nebb,

first of all, graph is usually an offline plot of the acquired data but to use it as an online display u need to use build arrays in for/while loop which keeps on adding new points & plots in waveform graph.

I am including a vi which incorporates a while loop in which by using build array, points keep on increasing & simultaneously they are plotted in the waveform graph.

Using for or while loop, it has no concern with speed. it depends on the code inside the loop which makes them faster or slower.

For making slow readings, you can put some delay inside while looping.

Hope this works. YOur feedbacks are welcome.

Best Regards,
Nirmal Sharma
India
0 Kudos
Message 2 of 4
(2,874 Views)
> i would like to know if a waveform graph can be used without a for
> loop and if so, how? I tried using a while loop only, but the reading
> becomes too fast.
> can someone advise

A waveform graph requires an array or waveform datatype, and it doesn't
actually matter how these are constructed -- array builder, for loop, or
while loop.

Just guessing, you might want to look at using a chart within your while
loop. The chart keeps historical data and adds individual points or
additional array/waveform segments to it. This gives your eye more data
to look at. Graphs by comparison clear each time they are given new data.

Greg McKaskle
0 Kudos
Message 3 of 4
(2,874 Views)
Hi nebb,

For loop or while loop dosent matter. You might want to put "wait until ms" inside your while/for loop. That will reduce your sampling rate, become slower.

Best Regerds,
Alex
0 Kudos
Message 4 of 4
(2,874 Views)