LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading time stamp and displaying on X-axis on XY graph


@qhunter wrote:
It would be ok with me to have 6 digits of precision. I am logging data every 60 seconds. So decimal point does not come into picture for my timestamp.


I wasn't talking about decimal digits, but total number of significant digits. Your timestamps have 10 significant digits and SGL will not be able to correctly represent the values. You need DBL.

For example, if I put the number 3187610220 into a DBL control, then change it to SGL, the result is 3187615232. You can easily see that only the first 6 digits are correct. The mantissa of SGL is only 22 bits, not good enough for your timestamp data.

I don't quite understand the desired function of your MultiSensors program. Is the boolean array supposed to act as radio button (only one active at any given time) of do you want to be able to display multiple traces at the same time.
0 Kudos
Message 11 of 20
(3,130 Views)
A much better way to get to a timestamp from Excel format is to parse the individual fields into integers (hours, minutes, seconds, etc), then use the Date/Time To Seconds primitive to convert to a timestamp. If you have fractional seconds, use the integer part in the first conversion, convert the fractional part to a double and add it to the timestamp you got with the first conversion. For example, you have a timestamp of format HH:MM:SS.FFF (e.g. 11:31:26.233). Use the Scan From String with format string “%d:%d:%f” to get integer hours and minutes and double seconds. Split seconds into integer and fraction parts with the Quotient and Remainder primitive. Then combine them. See the attached example (LV 7.1). You need to have valid month, day, and year values for the conversion to occur. The cluster used was created as a constant from the Date/Time To Seconds input.
0 Kudos
Message 12 of 20
(3,118 Views)
Hi Altenbach,
Now I understand what you meant to say about DBL concept. My incorrect display on X-axis is possibly because of this. In my project, I am trying to read the data of various temperature sensors. I want to have a multiple plot of the different sensors at the same time. I want to select multiple number of sensors at same time( I mean no. of sensors selected at a time CAN BE more than ONE) I require multiple sensor selection at one time. I want to display them on a XY graph with timestamp. timestamp will remain same for all the senors. I have around 11 temperature sensors.

Also in the same VI, I would like to have to indicators(kind of warning) for 'Under Temp' and 'Over Temp' whose limits are set by the 'Under Limit' knob and 'Over Temp' knob on front panel. I want to set the limit for each sensor individually. I am unable to do this. I was able to do it for one sensor only, but I think what I have done is wrong. If you colud please help me out with this that would be really great. I have been trying hard to do this since long time but with little success.
My rest of the VI have multiple functions.
1) Taking the state(deployed:1 or undeployed:0) of antennas.
2) Taking battery voltage reading(0-20V).
3) Magentometer reading for 3 axis.

Here in this part of my VI you will notice that I have given a delay of 1000ms for each value to be read. I want to give the same delay while I am reading the temperature values. I am unable to do this even.

If you could please help me in my project that would be really good.
I am including all my file for your reference. All the datafiles are for reference and they do not indicate the actual values. I generated them for my working purpose only!!

Thanks in advance,

Regards,

Ratnesh
0 Kudos
Message 13 of 20
(3,106 Views)
Hi DFGray,
Thanks very much for all your time and efforts. I really appreciate that.

Regards,

Ratnesh
0 Kudos
Message 14 of 20
(3,104 Views)
Hi Altenbach,
If you please reply to my query at your earliest convenience because deadline for my project is fast approaching and I am unable to figure out how to find a solution to my problem. I am scared too!! Please help!!
you can mail me at ratnesh_titu@yahoo.co.in

Thanks in advance,

qhunter
0 Kudos
Message 15 of 20
(3,091 Views)

Can someone help me?

I'm trying to obtain, on the same graph, two axis with differentes show of the same time. on the first axis i want to show absolute time in format HH:MM:SS, and i'm able to do.

In the second axis i would like to see the elapsed time in seconds since the beginning of the graph. Like this

      19:40:00                   19:42:00                       19:44:00

                                          time

             0                            120                                 240

                                  elapsed time (sec)

 

I tried to subtract from the second axis start point the beginning of the first but i'm not obtaining what i need.

Thank You in advance for your help.

Greetings

 

 

 

 

0 Kudos
Message 16 of 20
(2,897 Views)
 
0 Kudos
Message 17 of 20
(2,896 Views)
In the future, you should probably start a new thread so your question will get the attention it deserves.

It is relatively easy to do what you want to do.
  1. Create a Waveform Graph and duplicate the X-axis (pop up on the X axis and choos Duplicate).  Change the labels to what you want.
  2. Use either the waveform datatype or the t0,dt,Y cluster data format for the input to the graph.  Waveform is probably easier.  Wire this to the graph.
  3. Now that the graph "knows" the input has timing information, pop up on the graph display area and unselect Ignore Timestamp.  Both your X axes should change to a time format.
  4. Pop up on one of the axes and choose Formatting...  When the dialog comes up, choose SI for the data format instead of Absolute Time.  Relative Time should also work.
That should do it.  Let us know if you have further problems.
0 Kudos
Message 18 of 20
(2,883 Views)

This is an exemple, simplified, of what i'm trying to do. I don't know what i'm doing wrong but it doesn't work. Have All the plots to be linked with only one of the axis?

ThankYou for your help

 

0 Kudos
Message 19 of 20
(2,880 Views)
Interesting.  When I tried this, I used the waveform datatype.  You used the cluster format.  It works with the waveform datatype.  It doesn't work with the cluster format.  Change your data to an array of waveforms, all attached to the time formatted axis (like you currently have it), and it will work.
0 Kudos
Message 20 of 20
(2,863 Views)