LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using multiple DIO write nodes for USB-8451

Hello,

I have been having problems using the DIO write nodes (for USB-8451) in the Labview programming environment. I am trying to use multiple DIO lines to complete some control tasks as the data is being sent via SPI. However, it seems when I use both lines P0.0 and P0.1 on the USB-8451, line P0.0 does not work. I have attached a copy of my program to this message along with a short test file for reading. Any suggestions would be appreciated. Thanks.

Andre
Download All
0 Kudos
Message 1 of 3
(3,158 Views)
Howdy Andre,

The organization of the forum is kind of vague regarding USB-8451/I2C/SPI questions, so I wanted to go ahead and first mention real quick that I2C/SPI usually posts to the CAN & DeviceNet forum. Of course, even if they're posted to the LV forum, they'll still get to the appropriate team. You'll just get a quicker response by posting in CAN & DNet!

Regarding your question, the DIOLineDirectionMap input to the NI-845x Device Property Node takes an integer. That integer is the integer representation of a boolean array that represents the DIOLineDirection of your device's DIO lines. As you know NI-845x contains 8 DIO lines, P0.0 through P0.7. Each individual line can be represented as a boolean inside a larger eight-element boolean array, which represents the whole port.

I've attached an example Digital Line Write_LV8mod.vi that hopefully illustrates this idea. I created it by modifying the example Digital Line Write.vi (found in the NI Example Finder under Hardware Input and Output»I2C and SPI»DIO Basic) and to write digital output to multiple lines.

I hope this helps! Please let us know if this answered your question or if there's anything else we can do to help!
Warm regards,

pBerg
0 Kudos
Message 2 of 3
(3,129 Views)
Thank you very much, the program appears to work well and will be very useful in my design.

Andre
0 Kudos
Message 3 of 3
(3,108 Views)