Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Interval clock error 10840

I am attempting to synchronize a waveform with a short duty cycle that is generated using AO on a DAQ6115 PXI module, to samples taken using AI on the same card. I want to generate many repetitions of the waveform and process the AI data for each repetition before the next repetition is inititiated. I have been successful by completely resetting, (re)configuring, and (re)starting the AO for each repetition. For that trial, I use the AIStart signal to trigger the AO waveform. I would like to use the regeneration capability of the AO and simply trigger each repetition by triggering the Interval Clock. I have routed the AIScan signal to the RTSI0 line using the RouteSignal command. But when I attempt to set the AO Interval clock to:

.IntervalClock.ClockSourceType = cwaoRTSILoToHiCS
.IntervalClock.ClockSourceSignal = "RTSI0",
then upon executing the .Configure call I get an "Error 10840 - Configuring Interval Clock - The contents of the driver file was changed between accesses to the driver." I have been unable to find out much about this error or about the Interval Clock for that matter. What would be the recommended way to most efficiently trigger simultaneous waveform generation and signal sampling?

The source code supporting this question is attached.
0 Kudos
Message 1 of 2
(2,626 Views)
Dave,

Your approach is very good and it would be working but for one small detail, you probably want to use Update clock instead of Interval clock.

Some suggestions:

- Although theoretically you can route any signal to RTSI and read it back from the same pin, I would recommend that you use PFI pins as these temporary signal nodes. Route your ScanStart signal to PFI7.

- Instead of setting the Interval clock, set the Update Clock of your Analog Output to PFI7.

I attach a project I just created that does this. It basically uses the Scan Clock (ScanStart) as the Update Clock of the Analog Output operation. The AO operation is left as a continuous, regenerative operation, but since its clock is external it only outputs data when the acquisition run
s (and the Scan clock exists.

The interval clock is a very interesting feature that allows you to specify an initial delay for the waveform generation. One requirement is that on-board regeneration must be allowed. Refer to the Measurement Studio Reference Help for more information on the Interval clock for AO (National Instruments -> Measurement Studio -> Help -> Measurement Studio Reference).

I hope this helps,

Alejandro Asenjo
Applications Engineer
National Instruments
0 Kudos
Message 2 of 2
(2,626 Views)