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.
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.
06-20-2014 08:43 AM
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?
06-20-2014 09:23 AM
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.
06-20-2014 09:43 AM
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.
06-20-2014 10:04 AM
A simple text file that only gets written to when an event occurs will not add much processing.
06-20-2014 10:27 AM
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?
06-20-2014 10:36 AM
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".
06-20-2014 10:50 AM
What do you mean register the button change in the event structure?
06-20-2014 10:56 AM
I configure an event case in my event structure for handling the button's value change event.
06-20-2014 12:30 PM
@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"
06-20-2014 12:34 PM
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?