Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Syncronizing Digital Output and Analog Input

I am trying to control an external multiplexer (ADG726) using the digital output.  Meanwhile I need to sample the Analog Input after every **2** digital outputs.  These two tasks obviously need to be syncronized.  While this is running, I am also generating a sine wave using the analog output.  This does not have to be syncronized to the above two operations.  This is being written in LabView 8.0 using a NIDAQ 6281.

I have this working outputting only 1 digital output (same clock frequency), but I need to double the frequency of the digital output.  I've tried using the Timebase divisor but it doesn't look like I can use these two clocks as source/destinations (I found this in the Measurement & Automation Explorer connection graph).  I'm sure that there is a way to allow the digital to be the master clock and divide down for the analog input clock but I don't know how to do it (this is my first VI in labview!!!).

If I am doing anything else incorrectly/improperly, I'd appreciate the feedback.

Thanks in advance,
Drew

0 Kudos
Message 1 of 5
(3,605 Views)
This is my attempt to do the above that doesn't work due to the clock routing.


0 Kudos
Message 2 of 5
(3,597 Views)
After doing some more research, it seems like I need to use some sort of counter.

Also after thinking about things, it wouldn't hurt to build some margin into the settling time since the digital output can run so much faster than the analog input.

What about some kind of waveform like the attachment.

The analog input will be running at 250ksps, the digital output is running at 5x.

0 Kudos
Message 3 of 5
(3,589 Views)
 Hi SuperSnake,

I took a look at your VI and modified the AI Timing section a bit to make it work. Its setup to use a Counter output (routed internally) as the sample clock. I'm attaching this and the counter output pulse VI (from the LabVIEW example library) to this VI.

Please take a look at it and let me know if it doesn't fit your needs.

Take a look at the Multi-Function-Synch-AI-Read Dig Chan.VI for inspiration of sharing a sample clock.

Have a great evening,

Best regards

MatthewW
Applications Engineer
National Instruments

Message Edited by Matthew W on 07-26-2007 10:36 PM

Download All
0 Kudos
Message 4 of 5
(3,562 Views)
Sorry, could you post a screenshot or a labview 8 file?  I haven't upgraded to 8.2 yet.

Thanks again,
Drew

0 Kudos
Message 5 of 5
(3,556 Views)