05-07-2007 10:32 PM
05-09-2007 08:51 AM - edited 05-09-2007 08:51 AM
Thank you for posting to the NI Discussion Forums.
What method are you using to output the digital signals? Are you using waveform generation so the outputs can be hardware timed? If so, I invite you to check out the M Series User Manual located at:
M Series User Manual
I found pages starting at 6-5 very helpful. A few passages that may be helpful are:
"You can generate digital waveforms on the Port 0 DIO lines. The DO waveform generation FIFO stores the digital samples. M Series devices have a DMA controller dedicated to moving data from the system memory to the DO waveform generation FIFO. The DAQ device moves samples from the FIFO to the DIO terminals on each rising or falling edge of a clock signal, do/SampleClock. You can configure each DIO signal to be an input, a static output, or a digital waveform generation output." So, all digital signals will be moved to all lines of Port 0 at the same time if you provide all lines data. This also points out that do/SampleClock is the clock that controls this output.
In regards to question 3, "Use the DO Sample Clock (do/SampleClock) signal to update the DO terminals with the next sample from the DO waveform generation FIFO. M Series devices do not have the ability to divide down a timebase to produce an internal DO Sample Clock for digital waveform generation. Therefore, you must route an external signal or one of many internal signals from another subsystem to be the DO Sample Clock."
Finally, refer to page 6-4 for an answer to question #2.
If you wish to know how to program this in LabVIEW, I would invite you to look at our Example Finder. This can be accessed by clicking on Help>>Find Examples when on the Front Panel or Block Diagram. Here you will see a directory structure of examples. Please click on Hardware Input and Output>>DAQmx>>Digital Measurements or Digital Generation. There are a lot of great examples here that will help get you started.
Let me know if there is anything else we can do for you. Have a great day!
Message Edited by Brian F. on 05-09-2007 08:51 AM
05-09-2007 04:47 PM
05-10-2007 03:04 PM - edited 05-10-2007 03:04 PM
Message Edited by Brian F. on 05-10-2007 03:04 PM
05-10-2007 03:19 PM
05-11-2007 11:37 AM
09-03-2010 07:54 AM
Although this topic is long time ago, I hope it is still active.
My question is: can I create 2 digital outputs (port0/line0, and port0/line1:5), write 2 different waveform patterns(line0 is configured by sampling clock AO, line1:5 is configured by sampling clock AI)?
If yes, how could I do it? (I got the error message -50103 with the writing of second digital output).
Thanks a lot.
09-07-2010 12:13 PM
What device are you using? With most of our devices, you will not be able to use two different timing engines (AI and AO) with your two digital tasks. I am guessing that is the reason you received this error message. Why do you need to use both the AO and AI timing engines?
09-08-2010 06:03 AM
I use usb-6259.
I want to continuously acquire signals from AI, which is connected to a multiplexer. Therefore, I used 5 digital outputs to control this multiplexer and synchronized them to the AI sampling clock.
In the mean time, I want to send some waveform from AO, which should be started at certain delay with AI and can be repeated after certain time. The AO is connected to a switch, which will be closed and opened following certain shape of AO. For example: it will be closed for 400 us and opened for 10s if the waveform signal from AO last for 400 us and is repeated after 10s.
If it is not possible to configure two digital output timings, can I use counter to generate this slow signal?
09-09-2010 12:06 PM
With your device, you will not be able to use the AO sample clock and the AI sample clock with some of the digital lines used by the same port. You would have to use the same sample clock source for both tasks.
You can use a counter to generate the signal, and depending on the turn-on voltage that your switch requires, it may be the preferred method for your application. You can use a Counter Output Pulse Time task to specify the high and low times of your signal. If you are using LabVIEW, check out the Gen Dig Pulse Train VIs located in the NI Example Finder (Hardware Input and Output»DAQmx»Generating Digital Pulses). This will give you an idea of how to set up your counters to generate digital pulses.