LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Time on X Axis of Wavefrom chart

Solved!
Go to solution

Hello Experts,

 

I am trying to read a .txt file and plot the 2 columns in the text file on 2 wavefrom charts. I am not using waveform charts because I am trying to modify an existing VI only by replacing the DAQ Assistant with ReadfromTextFile. 

 

At present, I am able to read both channels of data from the text file and plot it. The X axis shows the sample number of the data. Instead of sample number I need the time (0-6 seconds) on the x axis. The data in the file are sampled at 800 Hz. 

 

I have attached my present VI and sample txt file. Let me know if I need to clairfy my question. 

 

Thank you

 

 

Download All
0 Kudos
Message 1 of 5
(3,003 Views)
Solution
Accepted by topic author Neuropotential

Edit the properties of the chart so that the dT of the charts is 1/800.

 

You read in a 2-D waveform which has no timing information associated.  Charts default to a dT of 1.  By way of the chart's property dialog box, it is the setting for the X-scale called multiplier.

 

You'd be better off not doing all the conversion to the dynamic data type and just wire in the arrays after you've indexed them.

Message Edited by Ravens Fan on 03-29-2010 11:15 PM
Message 2 of 5
(2,995 Views)

Thank you for your reply.

 

The multiplier solution worked. 

 

The split signal automatically converted to dynamic data type. I used split because I wanted 2 waveform graphs, so that I can independently control the property of each graph if required. 

0 Kudos
Message 3 of 5
(2,985 Views)

Use Index Array instead.  Stretch the bottom border down to get two outputs.

 

I'm not sure if your data is in rows or columns, so you'd need to wire a zero to either the first output's row index, or its column index.  No blue express VI's needed then or split signal function.

Message 4 of 5
(2,981 Views)
Got it. Thanks Again
0 Kudos
Message 5 of 5
(2,977 Views)