ControlLogix FLL for Boolean

R_C

Member
Join Date
Apr 2005
Posts
93
I have a tag dimensioned BOOL[1024]. Is there an instruction that will copy a 1 or 0 for a set length to a BOOL tags? Like fill BOOL[600] with 0 for length of 100.
 
Hi

Not sure of 1 instruction but I would normally use dints and not bools.
If I was to do this I would use indirect addressing and then you could set to 1 or set all to 0 in one line of code.

I am not at my pc at the moment but if you need an example just reply I could post it


Donnchadh
 
It is an existing program. The BOOL array was already in use and I am stuck with it do to bits used in an HMI application also.
 
I don't think you would necessarily need a UDT for this. Just create a BOOL array equal in length to the BOOL array you are currently using, call it BOOL_Null.
If you are using v20 Logix5k software and firmware, then make the Null array a constant. This will insure the array stays filled with 0's.
Then if you want to "clear" the bits 500-599 of the existing array, then just COP BOOL_Null[0] BOOL[500] 100.
Disclaimer: I haven't tried this in Logix5k, so I'm not 100% about using the COP instruction on a BOOL array, but I don't see why it shouldn't work.
 
One possible way might be to use a FOR instruction to call a routine a number of times depending on the number of boolean bits you want to write 1 to.

In the routine use an unconditional OTE to write 1 to the tags with the help of indirect addressing i.e,the OTE address should look like:

Tag

I should be the DINT type tag which you have used in the "Index" operand of the FOR instruction.

Similarly you can use a FOR to call a routine to write zeroes.Execute only one FOR instruction at a time to avoid both of them writing opposite values to the same address.
 
I’ve got it working with a CTU, ADD and Indirect address to the bit position of the BOOL on an unlatch instruction. I just thought there would be a cleaner way to do it. Thanks for all the suggestion.
 
Hi Anirban Hazra,

I'm new in PLC world and I'd like to know how can I make a FOR instruction on RsLogix 500?
I'm using a Micrologix 1400
 

Similar Topics

Why does the controllogix redundancy modules use a single mode fiber vs multimode fiber?
Replies
1
Views
86
Hello, I have two 16 point input cards and 1 16 point output card showing module faulted on my IO tree in Logix Designer. The fault code is...
Replies
7
Views
215
Hello, My associate and I are trying to sync up two ControlLogix racks (7-slot chassis) with identical modules. We are able to see the secondary...
Replies
4
Views
196
Trying to setup a message read via Ethernet. I have the path setup as 1, 1, 2, 192.168.66.10 I get an error code 1, ext err 315. I am beating...
Replies
9
Views
233
I have a redundant ControlLogix being set up. This program reads a value from a remote site which happens to be SLC PLC. Rockwell mentions SLC...
Replies
2
Views
96
Back
Top Bottom