LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to continuously plot data?

I am trying to plot data that is being acquired from an LVDT and a thermistor, but in my VI, apparently the waveforms plot a single value every time a new data point is acquired. The rate at which data from each instrument is being acquired depends on how often the thermistor sends data, hence the case structure determining when the DAQ device and serial port are being read...the data is essentially being overwritten so the waveforms don't show the "history" of data that I'd like to see. I've attached my code; I suspect that something in the overall structure is wrong, but this is what successfully eliminated framing errors I had reading the COM serial port. Could someone please give a tip or two to a student scrambling to finish her project on time? Thank you so much.

(By the way, I intend to eventually use subVIs to clean this up, but for now, I'm just trying to get the waveforms plotting correctly so please bear with me on the mess)
0 Kudos
Message 1 of 10
(3,788 Views)


@hyenah wrote:
I am trying to plot data that is being acquired from an LVDT and a thermistor, but in my VI, apparently the waveforms plot a single value every time a new data point is acquired. The rate at which data from each instrument is being acquired depends on how often the thermistor sends data, hence the case structure determining when the DAQ device and serial port are being read...the data is essentially being overwritten so the waveforms don't show the "history" of data that I'd like to see. I've attached my code; I suspect that something in the overall structure is wrong, but this is what successfully eliminated framing errors I had reading the COM serial port. Could someone please give a tip or two to a student scrambling to finish her project on time?

Where is the code ?!

I think you have to use a while loop to continuously plot the data & a shift register to show the "history" of data...

Try this out or post your code here for more help.

- Partha ( CLD until Oct 2027 🙂 )
Message 2 of 10
(3,781 Views)
Hi hzenah,
What u need is to use shift register as to see history of the data points in your plot. U can find plenty of examples in the previosu discussions just look for the keyword "'shift register or history of plot"" in the forum..
0 Kudos
Message 3 of 10
(3,782 Views)
Sorry about not attaching the code properly; I'm not sure what happened.

As for shift registers, I thought about that but in my situation, I need them from a case structure, or something like that, and I'm not sure how that would work.

Message Edited by hyenah on 05-31-2007 03:59 AM

0 Kudos
Message 4 of 10
(3,780 Views)

Note: Put the charts inside your True case stucture

Also, since you are using charts, you do not need the 'Build array' function. Just assign a large enough ' Chart history length' value and that should do ( this you do be right clicking on chart in front panel and selecting that option from  the drop down menu)

Also look at this sample vi to understand how to plot acquired single data points on Graphs and charts

Any further doubts, do ask

Regards,

Dev

Message 5 of 10
(3,772 Views)

Sorry, missed attaching the vi

Here you go

Regards,

Dev

0 Kudos
Message 6 of 10
(3,771 Views)

Dev,

Can you attach the VI in  7.1 ?

love,

lvlover

0 Kudos
Message 7 of 10
(3,741 Views)
Message 8 of 10
(3,699 Views)

Hi Dev,

When I tried to run your VI, I got the Insane Object error. I ve to click OK, then it runs as usual. If I change the Wait time, it aooears twice.

In 7.1...

Can you try it out on your side if it is happening pmly in 7.1 ?

Please see the attached screenshot of the Insane Object error.

- Partha ( CLD until Oct 2027 🙂 )
Message 9 of 10
(3,686 Views)

Partha,

It seems to work fine out here

Let's see if our friend 'lvlover' also experiences the same problem

Regards,

Dev

0 Kudos
Message 10 of 10
(3,673 Views)