LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

XY graph with time axis

Solved!
Go to solution

Hi,

 

I have attached a sample vi in zip format and subvis.zip. In this vi, I have an output waveform which I obtained after any run. I have circled this output waveform in red in "waveform.jpg".

 

Now, what I want to do is;

 

I want to change the x-axis of waveform (red circled in the "waveform.jpg" to real time scale ( but only in seconds) like that given in the attachement (second figure).

 

I have tried lots of things, but do not achieve.

 

Please help me!

 

0 Kudos
Message 1 of 10
(3,888 Views)

Hi

I think you need to pay attention to the type of graph. A chart has an offset and multiplier properties you need to take care : multiplier is the value between the points in time, offset is an offset for the zero. For an XY graph you need to wire the time (which I get usually from the time express vi, /homer mode on : Doh 🙂 ).

Look into the lv exemples, there are several.

n

0 Kudos
Message 2 of 10
(3,871 Views)

Hi,

 

Could you confirm which type of graph you are attempting to do this with? Your VIs indicate that you are using waveforms but your title says XY graph.

 

Thank you,

 

Lynn

National Instruments
Senior Systems Engineer
0 Kudos
Message 3 of 10
(3,839 Views)

Hi,

I run the program and take 5000 data which forms a sinusoidal waveform. The output as can be seen from the figure gives the number of run on the x-axis. But, I want to convert the x-axis to time in seconds, like that I showed with the arrow indicated in the new attached file. thanks..

0 Kudos
Message 4 of 10
(3,817 Views)

Hi mechen,

 

The best way to do this is as  nitad54448 stated above.  You must be tracking the time like you track the data and then plot the data vs. time.  To plot data vs. time you will need to either use the inherent time signal coming along with the data (i.e. waveform data type or signal data type) in a Waveform Chart or you must track the time in an array and then plot data vs. time using an XY graph using a VI such as the Get Date/Time in Seconds VI.

 

Lynn

 

 

National Instruments
Senior Systems Engineer
0 Kudos
Message 5 of 10
(3,792 Views)
Solution
Accepted by mechen

Mech,

 

In your graph propertied, go to 'Scales'. In your Time (x-Axis), under scaling factors, enter 0.001 in the multiplier section.

 

Regards,

 

Lucither.

------------------------------------------------------------------------------------------------------
"Everything should be made as simple as possible but no simpler"
Message 6 of 10
(3,757 Views)

hi

have you read my previous message ? if so, have you checked the multiply and offset properties (for chart) ?

N

Message 7 of 10
(3,750 Views)

Hi nitad and Lucither,

I have read your previous message. But, I will be not in the laboratory for three days. I will try your suggestions and send the feedback when I do this. Thanks for your replies.

 

Regards,

 

0 Kudos
Message 8 of 10
(3,736 Views)

Hi Lucither,

Now, it is ok when I have used the multiplier 0,01 because I have used the scan rate 100. Thanks alot..

0 Kudos
Message 9 of 10
(3,694 Views)

Hi nitad,

Now, it is ok when I have used the multiplier 0,01 because I have used the scan rate 100. Thanks alot..

0 Kudos
Message 10 of 10
(3,692 Views)