Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

trigger AI with AO of the same device???

Is it possible (and meaningfully) to trigger a DAQ (AI) with a signal that was generated by the same device (PCI-6023), in order to get a precise timestamp of the beginning of the data acquisition??

hans
0 Kudos
Message 1 of 3
(2,968 Views)
Hans,

You can easily compute the time of each acquired point when you use hardware timing for your acquisition. In these cases, you can compute the time that a particular point was taken using (start_time + (1 / input_frequency) * index), where index is the number of the point since the beginning (starting with zero).

However, if an external clock is used, or if the input is irregular, a counter can be used to count an accurate timebase (usually provided by the board) and provide the time that the point was taken.

The analog input circuitry generates a pulse on the STARTSCAN signal (PFI 7) each time that a scan of data (i.e. one point from each of the channels in the channel list) is acquired. This signal can be routed to the gate of the counter, whi
ch, if it is doing buffered counting, will latch the counter's value at each rising edge of the gate, corresponding to the beginning of each scan. The time of the point will be (start_time + (counter_value / clock_frequency).

Please note that the accuracy of this method is limited by the accuracy with which the start time can be determined. In order to provide better resolution than the Windows clock, you will probably want to start your acquisition using a trigger. The time that the trigger occurred can be measured (or controlled) with an external device.

When using LabVIEW:
Call Route Signal with "signal name" = "PFI 7" (8), "signal source" = "SCANCLOCK" (30), and then call Counter Set Attribute with "attribute ID" = "gate selection" (2), "attribute value type" = "PFI n" (36), and "attribute value number" = 7.

When using NI-DAQ:
Call Select_Signal to route ND_IN_SCAN_START to ND_PFI_7. The call GPCTR_Change_Parameter, with paramID = ND_GATE and paramValue = ND_PFI_7.

G
ood luck with your application!
0 Kudos
Message 2 of 3
(2,968 Views)
Hello Annette,

I have a DCF77-PCI-card which generates a short impulse at the beginnig of each second. Can I use this signal as a external clock?

hans
0 Kudos
Message 3 of 3
(2,968 Views)