LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Selecting a particular bit from Boolean array

Solved!
Go to solution
I am using Labview to prepare a HMI to use with AB CompactLogix PLC. The problem faced by me is I am unable to select a particular bit ( say to connect it with a button , TRUE/FALSE type ) from a boolean array. All I can do is get a particular tag data( Double integer type )  from PLC through OPC and convert that data to boolean array. The array can be represented by a series of 32 buttons ( as I am using a 32 input fields type input card of the PLC ) . But say I want to access only the 4th bit of the boolean array and turn on/off a LED based on its output. How to do that ? Please help !
--- Anirban Hazra
Electrical Engineering Student
4th year , B.Tech
Netaji Subhash Engineering College
Kolkata , India
0 Kudos
Message 1 of 2
(3,038 Views)
Solution
Accepted by topic author Anirban1987

Leave the datatype as a U32 and use the following code:

 

 Example_VI_BD.png

 

The 1 should be of type U32.

This should do.

Play around with this idea, also explore the OR and XOR actions on U32.

 

Ton 

 

 

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
Message 2 of 2
(3,025 Views)