Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

How to put 2 Numeric Control on same I/O Port (for a PCI-DIO-96)

I'm a beginner in Labview. I want to put two Numeric Control (in hex mode) on the same port: the first will control the 4 first line (bit 0-3) and the second the 4 last line (4-7). I can with only one Numeric control. Is someone can help-me (have an example ).

0 Kudos
Message 1 of 5
(3,526 Views)
Hi Jean,

You are right in recognizing that LabVIEW can only write one numeric to a write command.  What that means is that you have to have a way to convert your first number to the first 4 bits of the port and the second number to the last 4 bits of the port.  As with anything in programming there are a lot of ways that you can do any one thing.  This is the way that I chose to give it a try:


I'm definitely not an expert on the most efficient ways to do programming, but this definitely works.  This should work just fine for you though as long as you're not trying to do anything really high speed.  If it doesn't work, then you can dry to use some bit shifting or binary math to find a more efficient way than converting everything to a Boolean Array.  As is though, this should work just fine.

Regards,

Message Edited by Otis on 08-29-2005 04:27 PM

Message 2 of 5
(3,517 Views)
I built yours VI, but an connecting error appair between the Built Array and the Boolean Array: THIS WIRE CONNECTS TO A POLYMORPHIC THAT CANNOT ACCEPT THIS DATATYPE. If I insert your VI, it work well. Why?  (your example work well but I need to find how to replace the numeric indicator by my DAQ Assistant (for the PCI-DIO-96)



0 Kudos
Message 3 of 5
(3,505 Views)
Hello Jeanv,

Please post your code and we can take a look at what the difference is between your code and Otis's!
Eric
DE For Life!
0 Kudos
Message 4 of 5
(3,495 Views)
Thanks, but I found my problem (by myself, GOOD!!!). I known ince the beginner that I need to concatenate two DATA but I never fond how in the help. But when I saw your diagram (that it was similar to mine), I found it when I right click the output of the build array. It' an beginner error. So many thanks.

Message 5 of 5
(3,475 Views)