From 11:00 PM CST Friday, Feb 14th - 6:30 PM CST Saturday, Feb 15th, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

6008 DAQ digital input

I am using the NI USB-6008 DAQ device. I need to have digital pins 2 and 3 each send out 5V. I have one executable that sends out 5V from pin 2 and another executable that sends out 5V from pin 3. However, when I run both executables at the same time, each pin only outputs 2.5V. Could someone please explain me why this is occurring? Thanks
0 Kudos
Message 1 of 9
(4,210 Views)
Hi Primesh-

Can you tell me more about how you're controlling the outputs and how you're measuring their voltage levels?

In testing with my USB-600x, I have seen that the levels are maintained at ~5V outputs for logic high regardless of how many outputs I am driving. If you have access to LabVIEW, the USB-600x Interactive Control VI can be very helpful. This is found under Start>Programs>National Instruments>DAQmx Base>Examples>LabVIEW 7.1.

I have looped the digital outputs to available input pins and measured the levels using the USB-600x itself and have seen good results. Please let me know if you are still having problems.

Tom W
National Instruments
Tom W
National Instruments
Message 2 of 9
(4,189 Views)
ModelA.vi is coded so that when a user turns a switch, pin 0 of the digital I/O port is turned on/off. ModelB.vi is coded the same way except that when the user moves the switch, pin 1 of the digital I/O port is turned on/off. When each program is executed separately, the corresponding pin outputs 5V. However, if I run both programs simultaneously, the maximum output voltage it sends is 2.5V. I tried to look at some mxbase examples of interfacing with the 6008, but I still cannot get both pins to output 5V at the same time. I've attached both modelA and modelB vi(s) to this post. Can you please inform me of what I am doing wrong? Thanks
0 Kudos
Message 3 of 9
(4,183 Views)
Hi Primesh-

I couldn't find the VIs you mentioned in the zip file you posted. The "Untitled1.vi" gives me an idea of what you're trying to do though.

You will not be able to run separate VIs to output to the lines in the port because the DAQmx Base Write VI writes only in hexadecimal port format. In other words, when you try to write to two different lines you are actually writing to the port twice.

Your best bet would be to write to the port as shown in the Write Dig Port.vi example in C:\Program Files\National Instruments\LabVIEW 7.1\examples\daqmxbase\Dynamic\dio on your local hard drive.

Please let me know if you're still seeing the voltage output level problem when running this example. If so, please let me know how you're measuring the voltage and what you are sourcing when the outputs are high.

Regards,
Tom W
National Instruments
Message 4 of 9
(4,173 Views)
Primesh, Tom,

If each VI is writing about an equal amount of time, I suspect that the 2.5 volts is the average of a square wave with a 5 V amplitude.

Lynn
Message 5 of 9
(4,167 Views)
Lynn-

This is an interesting thought and may be the root of the problem. This makes it even more interesting to see how Primesh is measuring the output levels.

Digital output in DAQmx Base is sort of unclear in indicating that the entire port is written with each operation, so if you were writing 0b00000001 and 0b00000010 in succession then the two outputs would appear as quasi-square waves. This idea reinforces the concept that it is important to only write to the device from one app at a time.

Thanks for your input Lynn!

Regards,
Tom W
National Instruments
Message 6 of 9
(4,164 Views)