SignalExpress

cancel
Showing results for 
Search instead for 
Did you mean: 

Hardware timing of digital output in Signalexpress using USB-6225

Solved!
Go to solution

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

pylibnidaqmx
0 Kudos
Message 1 of 6
(7,039 Views)

Hi Thijs, 

 

Can't you just change your sample clock to Internal?

 

 

forum.png

Jesse Dennis
Engineer
INTP
0 Kudos
Message 2 of 6
(7,030 Views)

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.

0 Kudos
Message 3 of 6
(7,026 Views)

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.

 

Jesse Dennis
Engineer
INTP
0 Kudos
Message 4 of 6
(7,023 Views)
Solution
Accepted by topic author Thijs Lanckriet

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? 

 

Jesse Dennis
Engineer
INTP
0 Kudos
Message 5 of 6
(7,021 Views)

Hey,

 

That seems to have solved the problem.


Thanks!

0 Kudos
Message 6 of 6
(7,003 Views)