Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Can one card have multiple external clock signals used for DO??

Hi, 

 

I thought I knew how the M-Series cards worked, but now I'm not so sure. 

 

Can you specify an external clock signal for a digital output which is different from another digital output's external clock signal? I tried via the Timing.vi supplied in the NI-DAQmx library, but I received: 'Error -50103': Resource is reserved. The resource it seems to be talking about is the sample clock source.

 

Also, I tried to have different DO tasks using the same external clock signal (again, each one used Timing.vi to configure the signal), and I got the same error. Can M-Series boards only perform one hardware-timed DO task at a time? 

0 Kudos
Message 1 of 4
(3,898 Views)

Hi acmap,

 

Generally, the DIO channels for an M-series board only allow you to use one external clocking source at a time. You can typically only have one hardware-timed task per subsystem (AI, AO, DIO, Counter).  However, there may be some ways that you can do this in coding to use the fastest sample clock between the two as your external clock and do a little 'signal conditioning' to only pick out every X number of points for the channel that you're wanting to use the slower clock or something similar.  That assumes that your faster sample rate is a multiple of the secondary rate, however, to do this cleanly.

 

Specifically, which M-Series card are you using?  Also, what sample clock rates are you trying to use here?

Regards,
Austin S.

National Instruments
Academic Field Engineer
0 Kudos
Message 2 of 4
(3,881 Views)

We do have the 6533 and 6534 cards which can allow you to use two timing engines.  This is on a per port basis, however.  For example, Ports 1 and 2 could be outputting at one rate and ports 3 and 4 could be outputting at a second rate.

 

What application do you need different sample rates for?

 

Jon S

Applications Engineer
National Instruments
0 Kudos
Message 3 of 4
(3,840 Views)

Several digital waveform signals are used in my project for controlling valves at roughly ms-level timing, or are using quadrature encoders as external clock frequencies to open/close valves synchronously with an encoder output (ie, have a pulse waveform n samples long, and controls a valve or whatever as a function of position. After the quadrature encoder goes past n ticks, the pulse waveform has been completely outputted). Since the different valves each are controlled by a different digital port, I was hoping I could have separate clocks so that each valve could be controlled truly independently (this wasn`t required, but useful and potentially easier to deal with later on in the code development).  

 

It's okay, anyway--I found out about the different port clocks available on typical M Series cards from the manual a little while before the first reply, and I redid my own code accordingly. Everything should work fine now. I didn't accept any solutions yet because I wanted to see if anyone would post something interesting or different (maybe using triggers) which could bypass the independent clock limitation. Also the 6533/4 card information is interesting. 

 

Related topic:

On a related note (I'm pretty sure I asked NI tech support this but it's nice to get a second opinion), are there any requirements in uniformity for an external clock signal? Right now I'm just assuming that the external clock (again: in this case a quadrature encoder)'s maximum frequency cannot come near the actual sampling frequency of the port--ie, if it takes .01 us for the digital port to acquire a sample (the 'convert time', I think it's called?), our clock can't go nearly that fast. Other than that, are there are no constraints on the external clock signal? 

 

Sorry for going off-topic like this. I'll be happy to end the discussion here if this clutters the forum at all. 

 

Thanks for the help. 

0 Kudos
Message 4 of 4
(3,835 Views)