Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQ continuously and trigger datalogging from front panel, and datalog at different rate from DAQ acquisition

Hi,

 

I would like to acquire data continuosly from DAQ at a rate of 1 sample per sec. The data will be displayed online real-time with indicators.

The front panel will have a control for the user to click to activate datalogging. Once clicked, the data from DAQ should be written to a file (can be opened by Excel) at a rate of 1 sample per min. The DAQ contains 4 channels. So it should write the values from the 4 channels at the same time. I also need to write to the file the time at which these readings were taken.

 

I have found the method to datalog every 60 secs using "Write to measurement file". But I have trouble writing the time data.. I tried clicking the "x-column" but it is not the real time that is written. Instead it goes like 0, 60, 120... And I am not sure how to do the "datalog activate" part. Pls help!!!

0 Kudos
Message 1 of 3
(3,143 Views)

These are the 2 methods I am trying.

1) The first one writes only every 60 secs. Cant get the time written correctly

2) The second one tries to extract the required data to write to file from the array that stores all the data values.

Both does not seem to work when I added the Event structure. Is there other method of controlling the datalogging?

Thanks in advance!!!

 

Download All
0 Kudos
Message 2 of 3
(3,141 Views)

The Write to Measurement File has a fixed format where it writes the start time in the header and then uses relative time in the column. This data is certainly useable but if you want absolute time in the column, you will have to use a different function. The Export Waveforms to Spreadsheet File writes absolute time if I recall. Otherwise, you can create your own time array and use the Write to Spreadsheet File.

 

Your code also shows a lack of understanding of the event structure. Simplest for you would to probably use the Elapsed Time function with the Boolean output of that wired to a case structure. Place the file write code inside.

0 Kudos
Message 3 of 3
(3,131 Views)