From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Save Time from a waveformchart

Hello everyone,

 

I want to save the timestamp of my measurements. With my actuall programm I can save the Y data (Stromstärke) of the waveformchart (see apendix) with a spreadsheet file.  How can I save the equivalent X data (Time) in the same file, so I can get the following form "Stromstärke, Time", saved for each measurement?

 

Thanks for any Help!

 

Cheers

Jay

Download All
0 Kudos
Message 1 of 4
(1,928 Views)

Hi Jay,

 

waveform charts don't handle any "Time" on their X axis, they just count samples.

So you could just use the loop iterator and scale it's value with your dt loop setting.

 

Btw. using a TimedWhileLoop on a WIndows target is nonsense. It's also nonsense to use FileIO functions in a timed loop…

 

Out of interest: which CAN device do you use and which CANopen functions library?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 4
(1,925 Views)

@GerdW wrote:

waveform charts don't handle any "Time" on their X axis, they just count samples.


If you write waveforms to the chart, the T0 (and dt) of each waveform you write is in the history.

 

But with what the OP has, I would just use Build Waveform.  Y is obviously the data.  T0 is the timestamp that is already in there.  Just need to fill in dt with whatever the sample rate is.  Then use Export Waveforms To Spreadsheet File which will write the timestamp for each element.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 3 of 4
(1,899 Views)

Hey Gerd,

 

thanks for your quick response!

 

I am have a PXI-8531 and I am using an analogue Transmitter Modul (Transmitter-Modul: http://www.microcontrol.net/fileadmin/maindownload/manual/hb_mcan_trs_v2r00_de.pdf), which supports CANopen.

 

Actually I am new to Labview and I don t know what makes sense in the programm. I used a TimedWhileLoop like in the examples for CANopen. What type of loop and type of file would you consider?

 

Does another way exist? Thats only the data of 1 Modul and I must connect 8 together. I must be able to know which data was send in which timestamp from every Modul. So I am no sure if using the loop iterator and scaling it will solve the problem.

 

Cheers

Jay

0 Kudos
Message 4 of 4
(1,890 Views)