FieldPoint Family

Showing results for 
Search instead for 
Did you mean: 

writing parallel signals to digital I/O



I'm trying to interface with a controller that reads in a 4 bit signal through 4 channels of a PXI board.  I'm generating the 4 bit signal with a cFP-DIO-550.  The problem arises from the fact that the PXI board is reading its 4 bits in parallel and responding to a change in the state of any one bit by performing the action associated with that 4 bit number, but my DIO board is writing each channel sequentially.  Eg:  I want to send the binary number 1110 to the controller.  The DIO-550 output as seen by the PXI board looks like this "1000...1100...1110" over some time step.  This results in the controller going first to the "1000" state, then the "1100" state, and finally the "1110" state that I wanted. 


Is there a way to simultaneously turn on multiple channels of the DIO-550?

0 Kudos
Message 1 of 5

I just tried creating an item in MAX that containted the four output lines that I want to write to, but wiring that to the FP write VI did absolutely nothing.  I tried writing an array of four boolean values, then a single boolean, but neither attempt successfully turned on any of the channels.


I found this post, which sounds like a similar problem to what I'm having.  Tried the method that worked for Keney, but it did not work for me.

Message Edited by testingHotAir on 02-25-2009 02:29 PM
Message Edited by testingHotAir on 02-25-2009 02:29 PM
Message Edited by testingHotAir on 02-25-2009 02:30 PM
0 Kudos
Message 2 of 5

Try this:

Instead of treating the the outputs as discrete booleans, you can write to all of your output channels as an integer.

(Actually, to be more precise, the FP Write (polymorphic) VI accepts a DBL).


You're on the right track with creating a FieldPoint item for just the four outputs you need.  Now, use the FP Write to send the number representing the bits you want turned on.  In your example, assuming the 4 bits are channels 3210, and you want 1110, send the value 14 to your item.


If the outputs you want to control are different, you'll have to determine the value for each bit.

(e.g. if the outputs are channels 7654, the output in binary is 1110 0000, or decimal 224. 


Good luck! 

0 Kudos
Message 3 of 5

Thanks for the reply, Eagle.


I noticed in MAX that the channel data type is "2-byte uint" which I assume is the U8 constant data type.  Tried wiring that in to the output and got no response from the module.  Did I use the correct data type?

0 Kudos
Message 4 of 5
The DIO-550 is capable of outputting multiple channels from one I/O point.  When you are looking at the IAK file in MAX notice the addresses of different input and output channels.  The output channels start at 0100, 0200, 0400.....  This is the address of the bank in HEX.  To turn on a specific channel, we need to give the decimal value that corresponds to the HEX address of the channel we are specifying.
Item Name        Address (HEX)          Value (Decimal value to turn the digital line to high)
Out 0                         0100                              256
Out 1                         0200                              512
Out 2                         0400                              1024
Out 3                         0800                              2048
Out 4                         1000                              4096
Out 5                         2000                              8192
Out 6                         4000                              16384
Out 7                         8000                              32768
If you created an I/O point with channels 0-3 and you wanted channel 0 & 1 high and 2 & 3 low you would need to specify a value of 256+512=768

Jon S.
National Instruments
LabVIEW NXG Product Owner
0 Kudos
Message 5 of 5