LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

can I use "DAQmx Timing (change detection)" to drive AO generation?

According to the Labview Help (v8), the "DAQmx Timing (Change Detection)" instance "configures the task to acquire samples on the rising and/or falling edges...."  Does this imply that I cannot use "DAQmx Timing (Change Detection)" for driving an AO generation task?  I have an application that would be significantly easier if I could drive the AO task to output progressive samples on both the rising and falling edges of a timing signal that I route from a "CO Pulse Time" task (that happens to have unequal high & low times).  Thanks!
[Labview 8; DAQmx 8; USB-6251]
0 Kudos
Message 1 of 5
(2,954 Views)
What you could do would be to setup a separate tasks for your digital input and analog generation and use the the change detection from the digital line as the timing source for the analog generation.

Basically, setup a digital input task (create channel, timing VI, start task, clear task).  Set the DAQmx Timing VI to Change Detection, select the timing signal line for your source and follow the instructions in the help on how to set it up for rising and falling edge.  You just need to start the task; you don't actually need to read anything.

Next setup an analog output task and for the DAQmx Timing VI, set it to Sample Clock.  What you will do here is use a DAQmx Terminal Constant and set it to /(Your device)/ChangeDetectionEvent.  This should now use the rising and falling edges found by the change detection as the sample clock for your analog analog generation.  Just make sure you wire your VI so that the digital task starts first.

Hope this helps!

Adam W
National Instruments
0 Kudos
Message 2 of 5
(2,939 Views)
Hi Adam,
Thanks for the reply.  I have been trying to implement your suggestions, but I am running into a problem.  As I mentioned in my original post, I would like to define the high-low timing via a "CO Pulse Time" task that would ultimately drive the AO pulse train.  So I first setup a CO Pulse Time task, and then started to setup a DI task with Change Detection Timing.  However, I can't seem to figure out how to route the output from the CO task (which, according to my read of the help documentation, defaults to PFI12) to the rising/falling edge physical channel inputs on the DI's Timing VI (which only list dev/port/line channels).  Am I missing something obvious?  Thanks again.
0 Kudos
Message 3 of 5
(2,933 Views)
As a follow-up question, can you have more than one task with Change Detection enabled (with the change detection occurring on different DI ports/lines)?  If not, then I don't think the approach we've been discussing is going to be possible, since I already have Change Detection configured for a different task in this VI.  Hmph!
0 Kudos
Message 4 of 5
(2,929 Views)
Unfortunately you are correct.  You can only have one change detection enabled at a time.  Looks like you'll have to use the rising or falling edge, or approach the other task you are using change detection on in a different way.

As far as the routing questions go, for future reference, you can check in Measurement and Automation Explorer and see if your two terminals can be routed internally.  Just click on your device in MAX and then click the Device Routes tab at the bottom.  The green squares can be directly routed internally.  You can use the DAQmx Connect Terminals VI to achieve this.  If the square is not green, you may need to physically connect the terminals externally.

Regards,

Adam W
National Instruments


0 Kudos
Message 5 of 5
(2,914 Views)