RSLogix 5k question

I didn't think those instructions worked with the BOOL datatype
When I had to do use BOOL arrays I ended up having to write subroutines to handle shifting, clearing, copying etc. Used a loop to step through each bit.
 
Last edited:
words

I believe as long as you consider your array of bools as words, the cop or ffl should work. (It does on the plc5.)
 
i generally use a MOV function moving a 0 to the word that you wish to zero or if you want to do specific bits of a word under given conditions then use a MVM
 
If you are using an array of boolean data types because you have a need for indirect addressing, you will probably have to reset the hard way. If not, I would recommend using an array of some custom data types. I think that COP instructions work on these.

$
 
I am Sorry, but is there a reason to use a boolean Array ???

I allways use a normal DINT and use then the 32 Bits as Bits.
 
Kudos to Money4Nothing, that actually works.

Simply create a UDT that contains a bool array of whatever length you need. Create two tags of that UDT type. Leave one populated with zeros. When you need to clear, COP the empty one to the working one.

UDT name bool128 as an array of 128 bools. (I named the element bool128 too)
my_boolarray as type bool128.
empty_boolarray as type bool128.

COP empty_boolarray my_boolarray 1

Should do the trick.


The tagname may look a little odd...

Instead of my_boolarray[0], you get something like my_boolarray.bool128[0].
 
I went back and looked at an application I did using COP to populate a bool array. It was indeed an array of bools, but in a UDT. I used DINTS to fill it and the destination was a bool array, but it was a UDT bool array.

Sorry, My bad.

RSL
 

Similar Topics

Oh, I hope someone can help! I have one little problem holding me up from studying this weekend. I'm using Rslogix micro starter light, it's a...
Replies
7
Views
2,991
So I have a PID loop on an 1756-L61 running V17 software just for background. Also the PID PV is a pressure transmitter and the CV is speed sent...
Replies
1
Views
894
Hello Please Help, I want to use a FSC instruction that will scan 20 DINT arrays. If the arrays are greater than 1000 display the value. How do I...
Replies
4
Views
1,765
Hey all, I just joined today. Not sure if this question is in the right place or if anyone has asked it before. I am monitoring a machine from...
Replies
2
Views
1,445
Note, I have NO experience with RSLogix products. Never done anything beyond installing the software for others. Please forgive me for my...
Replies
9
Views
4,635
Back
Top Bottom