09-15-2011 08:33 AM
Hi,
In order to send synch pulses to external instruments, I'm trying to send TTL pulses using my NI USB-6225 and Signalexpress. I added two steps (see attached project):
-Create digital signal
-DAQmx Generate (digital signal) -> continuous samples
However, I can only use the PFI channels as a clock source. Is there a way to use the internal clock of the instrument to time the digital output? So far, the only way I've been able to actually generate an output signal is using software timing by using Sweep. If I run the project as it is in attachment, I get the following error:
"Possible Reason(s):
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"
I guess that this is because there's nothing connected to the PFI port. Is there any way to use the internal clock?
Thank you,
Thijs
pylibnidaqmxSolved! Go to Solution.
09-16-2011 08:56 AM
Hi Thijs,
Can't you just change your sample clock to Internal?
09-16-2011 11:17 AM
Odd enough, I can't. I get an error when i start to run the program that an external clock must be select the application.
09-16-2011 12:26 PM
That is odd,
I was able to reproduce the situation on a simulated USB-6221 but the actual code runs fine on a USB-5353. There is some property that is not supported for this particular device, it isn't a bug in software but I don't have a good explaination of what is going on at the moment. You should be able to get around this by creating a counter task and reading form PFI12 for your task. I will look through the 6221 manual and see why this is happening.
09-16-2011 12:48 PM
Alright,
The manual talks about this point specifically. The DO task can't create it's own sample clock, You need to provide it with one. You can use any of the sample clocks in the other AI or AO tasks however. There also are ways to route this clock internally but I don't think Signal Express supports that functionality. Reading from PFI 12 is probably your best bet.
There is also this thread that might be helpful to you.
http://www.ni.com/pdf/manuals/371022k.pdf
I can't help but notice the python library in your signature. Have you been developing/using python with daqmx?
09-20-2011 05:12 AM
Hey,
That seems to have solved the problem.
Thanks!