03-05-2010 03:57 PM
I programmed USB-6251 board to generate finite pulse trains on digital start trigger similar to the example http://decibel.ni.com/content/docs/DOC-4131, the difference being that I use DO to output byte arrays of the same length as the finite counter pulse train.
I am reading CO.PulseDone property to make sure that train went through before sending new DO data, and the behavior of this property is odd - once out of every 50-100 cycles it would not show the "TRUE" state at all, even though I could clearly see the pulse train on the scope. Moreover, if I slow the program down, i.e. via "highlight execution", it always read "FALSE". It seems like it stays TRUE for short period of time right after train is complete, and if there's any delay in the software, it misses it?
03-08-2010 10:31 AM
Hi Fedor,
I reviewed the example and I see a couple of different things that could be going wrong. Would it be possible for you to post your code? I think you may want to use, the DAQmx Wait Until Done VI instead of reading that property. Regardless, if you post your code I would be happy to look at it to see if I could help.
Regards,
03-08-2010 11:45 AM
Here's a sample sub vi. It uses counter 0 to output 83 pulses on a rising edge of the PFI15 line. Port 0 is configured to use the counter as a DO clock. It works for 30-80 cycles, than it gets stuck on the while loop inside the for loop.
03-09-2010 01:54 PM
Hi Fedor,
I noticed that your data array to output is 100 x 83 bytes in size. I may need more explanation about what you are trying to do so maybe I can suggest the best way to accomplish it.
Regards,
03-09-2010 02:49 PM
Dusting,
The code is just for demonstration of the problem I encountered with the CO.PulseDone property.
What I am trying to to is to issue 83 bytes from the port0, do a measurement (not shown in the code, since it's not relevant), then go to the next cycle and issue next 83 bytes. I was trying to use CO.PulseDone property to make sure the counter finished with the pulse train and ready to receive the next trigger.
100x83 array is to make the for loop repeat 100 times with different data packets for testing
03-10-2010 06:42 PM
03-11-2010 03:11 PM
Fedor,
I'm able to have the Wait Until Done execute on my system after a trigger is received and the pulses have completed generation. I do have a problem getting the way your data is setup to output in the manner your're expecting. Do you receive errors from those VIs if you run in highlight execution mode?
Regards,