Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Ni damx log file has no time stamp for data

How do I add this to the file? It has only the start time of the acquisitoin listed for each input channel but I am seeing no option to add a column to the log for the time data point was collected. Either in real or absolute time. Any idea on how to add this?

0 Kudos
Message 1 of 26
(4,695 Views)

As a post processing, you can add a Time channel to your file.  You have the time that the acquisition started and you know the sample rate.  From there, it is just a matter of adding the sample time to the previous sample's time.


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
0 Kudos
Message 2 of 26
(4,692 Views)

How can I add anything to the file though to timestamp when events occur? It is collectign 10 samples at a rate of 50Hz, I will never be able to mark down manually the moment where an event occurs and sync it with the actual data stream. the only way I can think to do this is to have another file being written of just time stamps, wire a button to it and every time i hit the button it puts a mark by the current time stamp. My only concern is having a second file write will slow my program down too much since I am both recording 16 channels and displaying them simulataneously.

0 Kudos
Message 3 of 26
(4,689 Views)

A simple text file that only gets written to when an event occurs will not add much processing.


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
0 Kudos
Message 4 of 26
(4,685 Views)

What I am going to do for this then is wire a button to a true false case where when hit it writes the time to a txt file along with a number for that event and counts up every time that the button is pressed.

 

Would I put this in the same while loop as my graphing of the data? Is there ever a circumstance where I want two things to run simultaneously and put them in separate while loops?

 

 

0 Kudos
Message 5 of 26
(4,681 Views)

I usually keep my user interface in a seperate loop.  I would therefore just register the button's value change event in my event structure to save the timestamp of the "event".


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
0 Kudos
Message 6 of 26
(4,678 Views)

What do you mean register the button change in the event structure?

0 Kudos
Message 7 of 26
(4,675 Views)

I configure an event case in my event structure for handling the button's value change event.


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
0 Kudos
Message 8 of 26
(4,673 Views)

@labview12110 wrote:

How can I add anything to the file though to timestamp when events occur? It is collectign 10 samples at a rate of 50Hz, I will never be able to mark down manually the moment where an event occurs and sync it with the actual data stream. the only way I can think to do this is to have another file being written of just time stamps, wire a button to it and every time i hit the button it puts a mark by the current time stamp. My only concern is having a second file write will slow my program down too much since I am both recording 16 channels and displaying them simulataneously.


With DAQmx you can configure the task to log to a TDMS File if you select DAQmx Read (Nch N sample 1D Waveform) youll get all the timing data you want.

 

Event detection (Something happend that you saw in the data like a threshold was crossed) can easilly be added to the file as an event by writing to the Group "Events"


"Should be" isn't "Is" -Jay
0 Kudos
Message 9 of 26
(4,663 Views)

I have it set up that way but I am not getting the time stamps. I get the header sheet which lists when the channel was started for colletction, then the group name sheet for that run which has all my channel names at the top and all the data below that. BUt no time column. what are you referring to?

0 Kudos
Message 10 of 26
(4,661 Views)