RsLogix 5000 BIT compare help needed.

bawlenger

Member
Join Date
Jan 2019
Location
Sydney
Posts
7
Hey there,


I'm trying to compare the amount of counts in any 5 minute period.


What I'm doing so far is when each count is made true, a binary 1 is moved into a DINT array with a BSL command. If the count is not true then a 0 is moved into the array with the BSL.


Then, I'm using a MVM mask to only output the 5 least significant bits of that array into a final DINT array.


I would like to compare the final DINT array to see if there is 3 counts in the 5 minute period (though not specifically next to each other).


Is there a way to 'count' the amount of true bits in an array?
 
Sweet. That was my initial solution but I figured there was a far more elegant one haha.
Good to know I’m on the right track.

Thanks
 
If you're using bit shifts, you can usually count the ones in and out of the array. That's how I've done it with bit shifts over a much larger sample size.
 

Similar Topics

Hi, I'm just looking for a simple way to make a button in excel (via VBA I presume) to toggle a bit in RSLogix 5000. I just got FactoyTalkLinx...
Replies
9
Views
548
If any of you wizards can help in this I would be ever more grateful. We have this device that generates 9 second pulses coming into a DI module...
Replies
31
Views
3,614
How can I achieve the same functionality in Studio 5000? Image 001.png for the old RSLogix500 program Image 002.png for conversion to Studio...
Replies
6
Views
2,521
Hello, I'm using Compact Logix L33 in RSLogix 5000. I'm trying to message over modbus register that is 16bit UINT. In Rslogix 5000 do I message...
Replies
3
Views
1,514
Hi there, I am accustomed to working with Logix 500 but have a program modification I need to do on a CompactLogix.... I created a timer...no...
Replies
7
Views
2,454
Back
Top Bottom