From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Bar plotting assistance please

Solved!
Go to solution

Hi

I've spent quite some time on this and really could use some help please. I've looked at the real time plot in help, searched the forum, but the examples don't have enough similarity for me to modify from.

 

The attached vi is a waveform chart (with bars) which I am using to show a single value read from a text file. The value in the text file will update once every half hour (from a datalogger), for a total of 10 hours (20 values)

 

I would like to see each point plotted on the chart from left to right with a spacing in between. The value in the text file will increase (never decrease) so the resultant plot of bars would look like a staircase (albiet with different step heights). The process will continue with a small break in between file update periods and therefore previous data points (bars) need to be kept (and available by slider, which I can code easily enough).

 

Would somebody show me how this might be acheived?

 

Thanks in anticipation

 

Ray

 

Download All
0 Kudos
Message 1 of 5
(2,407 Views)

It is very late here in UK, I was just going to sleep! So forgive me if this is totally wrong, but I have had a go.....

Michael

Message 2 of 5
(2,397 Views)

Thanks RiversDaddy

 

it looks good. I'll give it a good test and let you know.

 

My best approach was to save each new arriving data point into the text file with append, and then redraw all the points to the chart. Seemed a bit messy to me and smacked of bad coding form.

 

Thanks again

Ray

0 Kudos
Message 3 of 5
(2,391 Views)
Solution
Accepted by topic author rayclout

Hi Ray,

 

Here are a couple of examples.

 

The first - Bar chart mod - uses a feed back node to see if an item has been added to the data file.

 

You might consider using a graph as in the second example - Bar Graph. With a graph you can change the number of data points by redimensioning the waveform array. In this example a shift register is used to allow only inserting new values in the array.

 

steve

--------------------------------------------------------------------------------------------------------------------------
Help the forum when you get help. Click the "Solution?" icon on the reply that answers your
question. Give "Kudos" to replies that help.
--------------------------------------------------------------------------------------------------------------------------
Download All
Message 4 of 5
(2,363 Views)

Hi Steve

Both solutions are more than suitable for me, but I like the idea of using the shift reigsters, so I'm going to build the second style into my applications.

 

Thanks mate....really appreciate your assistance.

 

regards

Ray

0 Kudos
Message 5 of 5
(2,331 Views)