LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Event/Trigger Reference Mark in Data File

 

I am logging data from several sensors before and after a trigger (an event) occurs. Each sensor will have it's own data file with a timestamp by each recorded measurement. The timestamp and measurement are in separate columns. The period of time logging the data before the trigger and after the trigger varies. Starting the data logging and stopping the data logging will be determined by the operator. It is anticipated the data logging may be up to an entire day. The trigger would have only occurred once.  Therefore, I do not need the trigger to start or stop the data logging, rather I need to mark in the data file when the reference trigger occurred.  The event will trigger an input on one channel of the NI-9402 module.

 

Examples on NI's website focus around starting or stopping the data logging when a trigger occurs. This example:

Finite Analog Voltage Acquisition with Digital Start & Reference Trigger

 

is very helpful, but it discusses how to add a cursor to the graphs when the event occurred. I need the reference trigger to be marked in the data file.

 

The data file format will be a .txt file.  Are there any examples I am unable to find as to how to mark in a data file when a reference trigger occurred?

 

 

Using:

Windows 7

LabVIEW 2010 SP1

NI-cDAQ 9174

NI 9402 - one channel for the trigger

0 Kudos
Message 1 of 2
(2,080 Views)

There is no such a thing like a mark in the text file with columns of values. You have to write it yourself.

Possible marks:

1) specific value that can be never read from the sensor recorded in the data column - you will search for it when you read data.

2) additional info file, holding different information about experiment (including your reference moment)

3) comments in the end or middle of the file.

etc)...

I do not know how you store your data (once or in real-time, how fast, how much) and what solution will be the best in your case.

0 Kudos
Message 2 of 2
(2,073 Views)