Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

How to synchronize waveform graphs and data logging with TDMS pause in NI-DAQmx ?

I am using a PXIe-6376 DAQ card to control a laser experiment. The card generates a periodic waveform as a ramp to tune a laser (AO). Different laser beams are then synchronously detected on multiple channels (AI). The acquisition occurs at reasonable high rates, which led us using the TDMS file format for simultaneous log and read. Since the laser should be continuously scanned, but data have to be registered only for selected periods, at quite high rates (about 4000 data points per millisecond), we thought implementing the DAQmx read property "Logging:pause" according to the example given by TDMS Logging with Pause Logging. Accordingly, our vi Laser_AcqControl_v1 (see also the attached picture Diagram.png), first configures the hardware and a loop then checks continuously wether the acquisition should be logged to a file or not.

There are two caveats however, and I wonder if these might not be overcome using some of the read property options. The first is that the laser tuning signal displayed as a yellow trace on the graph (see Graph panel).png is arbitrarily displaced after each start of the program. It would be nice if the display could be synchronised with the AO so that the phase on the wafers graph display stays constant.

The same holds for the acquired data in the TDMS files. When we press the start Logging ? button on the graph panel, logging occurs for a preselected time period (Acquisition time). Presently the data is written to file once the start logging button sets the DAQmx read property Logging.pause to False. However this can occur at any instance and the file stream starts at whatever point on the waveform. Is there a simple way to start the file streaming always at the begin of the ramp using the functionality implemented in DAQmx ? 

Download All
0 Kudos
Message 1 of 1
(2,165 Views)