LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to plot contour using time stamp

Hello,

 

I need help on the following:

 

I acquire size distribution data each minute from a particle counter. I would like to plot the data as a contour plot using time stamp on the x-axis, the size bins on the y-axis and the 2D data on the z-axis. I cannot get the contour functionality in LV 2011 to accept the time stamp format. I did change the format of the x-axis to "absolute time" but it still doesn't work, see simplified diagram below.

 

Any advice on reformatting a time stamp to something the contour plot understands??!?

 

Thanks a lot,

 

Claus

 

 

0 Kudos
Message 1 of 7
(3,225 Views)

Its hard to tell by looking at the image if the issue is...

 

Timestamps

 

or

 

Helper needs an array.

 

If it just time stamps then I would subtract off the start time and use a Dbl instead of the time stamp.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 7
(3,217 Views)

Its hard to tell by looking at the image if the issue is...

 

Timestamps

 

or

 

Helper needs an array.

 

If it just time stamps then I would subtract off the start time and use a Dbl instead of the time stamp.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 3 of 7
(3,217 Views)

Hi Ben,

 

Thanks for your advice. It's a good first approximation, however I need the specific time the data was acquired for a comparison against other relevant data. Your suggestion was to subtract the start time but I then need to add the same number of seconds to get the right time. And this turns it into a time stamp again. 🙂

 

Kind regards,

 

Claus

0 Kudos
Message 4 of 7
(3,211 Views)

Hi Mogensen!

 

You could use the "To Double Precision Float" vi to convert the timestamp to a double prescion number as mentioned in this forum post "time stamp to number function". As mentioned in that forum, the number is based on the LabVIEW epoch date so you can use it to compare values taken at a specific time.

 


Milan
0 Kudos
Message 5 of 7
(3,192 Views)

@milan R wrote:

Hi Mogensen!

 

You could use the "To Double Precision Float" vi to convert the timestamp to a double prescion number as mentioned in this forum post "time stamp to number function". As mentioned in that forum, the number is based on the LabVIEW epoch date so you can use it to compare values taken at a specific time.

 


 

I can't look right now but will that work?

 

I thought the 3D stuff was single and the magnitude of the time stamp would swamp the difference in time stamps.

 

Just thinking out loud.

 

Ben

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 6 of 7
(3,181 Views)

Hi Ben!

 

I made a quick example and the effect you mention is readily apparent; the magnitude of the timestamps makes the difference in data sets difficult to distinguish. I also tried setting the bounds of the x-axis of the plot, but the precision of the values seems too low to get samples collected close together distributed easily on the chart.

 

Mogensen, is it not possible to use the constant difference just when plotting the data? It seems like keeping the timestamps in the plot this far after the year 1904 might require another solution.

 


Milan
0 Kudos
Message 7 of 7
(3,154 Views)