address an array bool omorn cx-programmer

Tommycai

Member
Join Date
Aug 2011
Location
KY
Posts
120
I am setting a bit from an array of bool if something happens that will create a fault ( cylinder does not make a certain position when output is triggered).

I set the bool value from array say fault[3], well my array is fault[100] how can i move zeros into the entire array or reset the entire array?

If an acknowledge button is pressed I want to move 0 into every array address. is this possible without having to do a rung for each address?
 
I am setting a
W200.00 Faults[0]
W200.01 Faults[1]

I want to move a zero, or reset these values when pressing the acknowledge button.

If the air pressure is not ok then W200.01 will be set
and when the operator presses the acknowledge button it will reset all the array values.

I think I got the BSET to work I just needed to use the word addressing the array of bool thanks.

Is there a comparison of array for bool values? I see that <> uses only UINT,UDINT,INT,DINT

Thanks for the help
 
Last edited:
If you are only working with those two bits, I would write two separate rungs, one for each bit.

The BSET instruction would reset all 16 bits in the word.

Hope this will help.
 
There is a bit counter (BCNT) that might do what you are looking for. It will give you the total number of bits that are ON.
There is also the MCMP instruction, but it's a bit tricky to use.
If you need to do a full compare you will probably have to use several <> instructions.
 
Last edited:

Similar Topics

I'm sorry is this is a FAQ but most indirect addressing samples I have found deal with bytes & words. I have come from an SLC500 background and...
Replies
12
Views
13,941
Hi, I wanted to ask is there a way to have a visibility expression use the IP address of the HMI (Dynics, not PV) to show certain elements? The...
Replies
3
Views
167
Hello. I have a few machines that use Kinetix 300 (each machine has two drives). Both drives on one of the machine keep losing IP address. They...
Replies
2
Views
93
Hi Guys, Is it okay to have Redundancy ControlLogix Processor IP address set to DHCP? I had Static IP address on it but removed it via RSLinx...
Replies
3
Views
226
Hi everybody, I have DELTA PLC DVP-32ES and I have make a simple project in WPLSoft. using the input X0 to switch ON the output Y0 and using the...
Replies
0
Views
154
Back
Top Bottom