Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmxWaitUntilDone() function shows time out error.

I'm using NIDAQmx C++ libray to output digital signal through PCI-6534 digital card. The digital signal is position data and it is used to move the piezo scanner. I have written the code using the finite digital output example with external clock. I attached the part of my code.

 

To output the varying position data by user input, DAQmxWrite, DAQmxStartTask, DAQmxWaitUntilTaskDone and DAQmxStopTask functions are called in a while loop. When I run the codethe scanner works well as I expected. Howeverfrequently, I notice that DAQmxWaitUntilDone function doesn't complete and eventually times out making the scanner halt, even though the digital signal transfer is not finished. This is error message.

 

Measurements: Wait Until Done did not indicate that the task was done within the specified timeout.

Increase the timeout, check the program, and make sure connections for external timing and triggering are in place.
Task Name: _unnamedTask<1>

 

I searched this error and found the related notes on Labview application in the NI support webpage. This is the link. http://digital.ni.com/public.nsf/allkb/EAA2CB9EC5236E3E862570D7008021F0

The note says that I need to provide one additional sample clock pulse beyond the number of samples for the acquisition/generation operation.

 

But I cannot understad the underline and how to provide one additional clock pulse in my c++ application.

 

I look forward to seeing many replies on my problem.

 

 

 

 

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

Hey sunuk,

 

One thing that you can try is to reduce your number of samples to generate to something like 4992 and see if you still get the timeout. If your clock is outputting 5000 pulses into the 6534, then you will get those extra clock cycles to output the 4992 samples. See what happens when you try this. 

 

Is the clock coming from your device a continuous running clock, or does it stop at some point? Also, it looks like you are setting up a trigger to start the generation, so have you checked to see if the trigger does indeed come in when the timeout occurs? How many samples are output when the timeout occurs? 

 

Is the data you are writing changing constantly? I would assume so, because you would be sending it new positions, but just checking. You set up the clock (which is external?) to be 20 MHz, but how fast is your trigger coming into the 6534?

 

With a little troubleshooting on your setup, we should be able to figure out what is going on. Let us know how things are going. Thanks, and have a great day.

 

Regards,

DJ L.

0 Kudos
Message 2 of 3
(3,505 Views)

Hi

 I wan to move my scanner  in three dimsionion   can you tell what tpye of code i need just to control the piezo scaner using labview. 

 

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