LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Writing to DIO ports and only getting 2 instead of 5 volts

Ok, I'm running a bunch of Write to Digital Lines and/or Port writes in a loop, which I have done before sucessfully, but this time, the output from any of the lines in the ports never goes above 2 volts, instead of going near 5 where it should be.

At first I thought that maybe it was because the ports were reconfiguring between each iteration and setting things back to zero too quickly for it to build up to 5 volts, but I've tried to stop that and either can't stop it or that isn't the problem.

My DAQ card is a PCI-6025E.
0 Kudos
Message 1 of 8
(3,459 Views)
1. What's connected to the DAQ? Are you just measuring the voltage off of a breakout box or is it wired into something. If you put too high a load on the board, that can yank it down. These cards only put out a few mA.
2. In MAX (Measurement & Automation Explorer), run the test panels for the DIOs and measure the voltage output to determine if it's software or other.
3. Use the online diagnostic to check your board:
http://www.ni.com/support/selftest/default.htm
or download a diagnostic:
http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=B45EACE3DCD356A4E034080020E74861&p_node=DZ52334&p_source=external
4. If the above fail, post your vi and we'll see what's up.


2006 Ultimate LabVIEW G-eek.

0 Kudos
Message 2 of 8
(3,459 Views)
I have a stepper motor connected to the DAQ. I have written programs that move it in the past, but this particular one has more loops and it may just be that I'm putting too much load on the board, I don't know. That could very well be, as the lines all put out 5V from MAX or if I just run a VI with a single Port Write in it.

I'll attach two versions of the code (which are probably frighteningly ugly examples of Labview progamming, as I'm just learning as I go). The code works great to get the motor to move a specified number of steps, but since I'm not getting enough voltage, I can't turn on the direction pin of the motor driver to change directions.

The version of the code that uses the port write insead of the write to digital line works a bi
t better, as the motor looks like it's TRYING to move in the other direction.

Does the problem come from using these commands in the loop?

(In case you're wondering, I'm not using the DAQ counter to control the motor since we have 10 motors and not enough counters, so i had to come up with alternate means).

Ok, it's not letting me attach my files...I'll post this and try again.
0 Kudos
Message 3 of 8
(3,459 Views)
trying to upload files again
Download All
0 Kudos
Message 4 of 8
(3,459 Views)
Things get very messy when Reading and Writting to Digital Lines at the same time... especially if you don't have ANY sequencing:)
One alternative is to just use an Analog Input channel for the Read DIO part and make a case for when it reads above 2.5 V (essentially making it a binary read).
Or you can try the attached vi, which seems to work on my hardware. Don't forget to configure MAX!


2006 Ultimate LabVIEW G-eek.

Message 5 of 8
(3,459 Views)
Thanks, but the stepper.vi file doesn't want to open ("cannot load VI resource"). I'll work on the analog stuff and let you know how it turns out.
0 Kudos
Message 6 of 8
(3,459 Views)
YES! It worked, words cannot express my gratitude!! Haha.
0 Kudos
Message 7 of 8
(3,459 Views)
Yes, but beer and stars can:)
Cheers!


2006 Ultimate LabVIEW G-eek.

0 Kudos
Message 8 of 8
(3,459 Views)