LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Get x-axis value (time) of waveform chart

Solved!
Go to solution

Hi,

 

I am plotting some temperatures (multiple plots) on a waveform chart. I would like to save the actual value of a

plot (temperature:y scale and time: x scale), when pressing a button, to a spreadsheet file. So in the spreadsheet

I would have the temperature and the time value, at the point when I pressed the button.

I can get the temperature easily by the property node value, unbundle the cluster and save the respective value to a spreadsheet. But how to get

the time value at that temperature point. 

I know the time value must be also there, because I am saving the whole dataset to a measuring file and then I can display 

it in a graph. 

 

Cheers Patrick

0 Kudos
Message 1 of 10
(13,482 Views)
Solution
Accepted by topic author pat777

Considering a Chart is evenly spread on the X-axis so the X-distance between 2 points is the same every where.

 

What you could do is create a property node and determine the min. and max range of the X-axis.  and you know the number of points of your array(history).

 

That way it's really easy do determine the times 😉

Kind regards,

- Bjorn -

Have fun using LabVIEW... and if you like my answer, please pay me back in Kudo's 😉
LabVIEW 5.1 - LabVIEW 2012
Message 2 of 10
(13,480 Views)

I like Bjorn's idea! That is probably a better way of handling this. Howver, if you want to keep things simple, have your DAQ task return a waveform... even if it is only return single temperature values. Normally waveforms are reserved for higher speed acquisitions, when the data task returns larges areas of values. But, in this instance they may be very useful, as the waveform datatype includes bit value and a time stamp.

 

Please see the attached screen captures and .vi.

 

FrontPanel.jpg

 

BlockDiagram.jpg

 

 

Now you have programatic access to the temperature and time values, which can be easily saved to disk when you hit a save button on your front panel. Also, this idea is easy to scale for multichannel DAQ.

 

Hope this has been useful.

Best wishes,

Rich Roberts
Senior Marketing Engineer, National Instruments
Connect on LinkedIn: https://www.linkedin.com/in/richard-roberts-4176a27b/
0 Kudos
Message 3 of 10
(13,458 Views)

Hi Bjorn,

 

Thanks for your answer.

 

Actually, in my case it is sufficient to use the property node:max range x axis.

My plot range is 100 sec, but I am logging the time every three minute so my max range is updating with the chart.

In case I want to plot some before the first 100 sec are over I use the size of the history array, divided by my sampling rate, e.g..

10 per sec.

 

Thanks again and Best Regards

 

Patrick

0 Kudos
Message 4 of 10
(13,424 Views)

Hi Rich, 

 

Thanks for your answer but I already had Bjorns idea implemented, so I did not tried out yours.

 

Cheers

 

Patrick

0 Kudos
Message 5 of 10
(13,422 Views)

Anytime Patrick,  glad I could help

Kind regards,

- Bjorn -

Have fun using LabVIEW... and if you like my answer, please pay me back in Kudo's 😉
LabVIEW 5.1 - LabVIEW 2012
0 Kudos
Message 6 of 10
(13,421 Views)

Hi:

 

I have a waveform which has Y-axis as Amplitude and X-Axis as Time.

Now since we are using an ultrasound sensor for plotting the waveforms i need to see distance on X-Axis and Voltage Amplitude on Y-Axis.

 

Can anyone suggest how we can do this in LabVIEW 8.6.

 

Thanks

Dhananjay

0 Kudos
Message 7 of 10
(12,230 Views)

[edit: posted in error]

----------------------------------------------------------------------------------------------------------------------------
"If anyone needs me, I'll be in the Angry Dome!"


0 Kudos
Message 8 of 10
(12,225 Views)

Is there a version for LabView 8.2?

0 Kudos
Message 9 of 10
(12,098 Views)

Do you mean a version of RER's posted VI?

 

If so, then you can post a request for a downconvert to 8.2 in the Version Conversion board

 

-CC

----------------------------------------------------------------------------------------------------------------------------
"If anyone needs me, I'll be in the Angry Dome!"


0 Kudos
Message 10 of 10
(12,093 Views)