LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Real-time Charts.vi

I would like to know how the strip chart in the real-time charts.vi was created, as i would like to create something similar. from an output culster how do you produce a similar chart to the one in this example vi.
thanks
0 Kudos
Message 1 of 9
(4,412 Views)
It's basically just the standard chart. The plot colors and line styles are different than the default and autoscaling of the x and y axes are turned off but that's about it. To create the property nodes that are used for the x axis, you just right click on a chart and select Create Property Node.
0 Kudos
Message 2 of 9
(4,400 Views)

what i mean is how is this chart created from an output cluster and how does the real time plotting of the graph work. I know how the chart gets one value and plots it straight away becauses the other chart options in labview plot at the end.

thanks.

0 Kudos
Message 3 of 9
(4,395 Views)
i have sorted the issue i was having.
0 Kudos
Message 4 of 9
(4,389 Views)

The chart is created by dropping a waveform chart onto the front panel and wiring your cluster to it.Smiley Wink

All waveform charts update with a single point as soon as the data is written to it. It's the waveform graph that requires a complete array to be wired to it. The only thing that makes this a "real-time" chart is that the x axis is displaying the actual time of the acquisition. This is done by first setting the x axis for relative time (X Scale>Formatting), writing the current time to the chart's XScale.Offset property, and the delay time to the Xscale.Multiplier property. If you turn on Context Help and move your mouse over the VI's icon, you get the description of what the VI is doing.

0 Kudos
Message 5 of 9
(4,390 Views)

Hiii, Dennis

           As shown in the Real-Time chart the real time data, i want same as shown in that, i want the data at the gap of 10 ms, now the problem is as in the Real-Time chart, my vi is not showing the current time and date, it shows the Date:1/1/1904 and time is ....., which is not right, so what could be the problem?

Thanks,

Nishant

Message Edited by Nishant on 03-05-2006 11:00 PM

Message 6 of 9
(4,330 Views)
Well, as I mentioned before, you have to write the "current time to the chart's XScale.Offset property". Are you doing this? What type of data are you acquiring and from what?
0 Kudos
Message 7 of 9
(4,299 Views)

Hiii, Dennis,

               Actually you are right, i have dont that thing and i am getting what i want for the real-time, but i am still not getting what i want, when i am reading the history data into the waveform chart, i am taking the sine wave with some amplitude from the function generator, and giving itto the LabVIEW through PCI card, and storing it to the csv files through LabVIEW with time stamping into it at the precision of miliseconds, when i am reading those stored datas from the file, i am not getting the exact data at the specified time, means if one record 5.486 is stored at 4:16:19:355, i wont get it at time 4:16:19:355 on the graph, i am getting it at the 4:16:23:145, approx, so what i should do to read it on time, i am reading both timestamp and data from the excel file, at a time onto the waveform chart, so suggest what i should do to read it correctly, here i am attaching both, my vi and excel file, run the vi, select the excel file, ive given and see the waveform chart named waveform out of all other waveforms, it will give you an idea.

Thanks,

Nishant

Download All
Message 8 of 9
(4,292 Views)

I don't quite understand the purpose of recalculating the time value over and over again in the while loop and constantly setting the offset in the while loop as well. I've attached a program that reads the file all at once and graphs it. It also gets the start date/time once and uses that to set the graphs's Xscale.Offset once. If your time data in the file had enough resolution, that could also be calculated instead of providing that as a control or constant (the .00295 value).

Also, changing the seconds itme in the date time rec cluster to DBL doesn't do anything. It gets converted to an integer by the Date/time To Seconds functiona anyway. The correct thing to do is to separate out the millisecond portion and add that to the date/time as I've done.

The attachment uses a VI called Read Strings From Spreadsheet File. You can create this VI yourself by editing Read From Spreadsheet File to handle string data. The instructions for doing this are on the block diagram.

0 Kudos
Message 9 of 9
(4,278 Views)