Bit comperison

Adam303

Lifetime Supporting Member
Join Date
Aug 2009
Location
Chicago
Posts
587
Hi To all again.
Rs logix 500 ab
I have came upon some logic that uses the Equal to and Les than Instructions. I do fully understand the instructions above. The only thing I do not undestand is why would a programer use them to compare bit values. I have inculded a piece of logic with the question.
Please let me know how to understand this type of logic and how, what for would i use this type of comperisons.
Thank You
 
It is difficult to tell from this program fragment what is intended by the programmer. Without any labels it would be a pure guess.

With pure bit patterns the EQU quickly tests (Source A) for a complete pattern (Source B). If information about a process is encoded in the bits a particular state could be quickly tested.

The other type comparisons (GRT LES among others) would have less utility unless the bit patterns at least partially resembled a numeric pattern. For example, If bits in the higher numbered bit positions are turned on sequentially as a process continues (the represented number getting higher) then they could give relative information about the process's progress.
 
Comparing Words, not Bits

Adam303

Don't confuse B3:1 with B3/1. B3:1 is the address of the second word of B3 file. It contains bits B3/16 to B3/31. The Equal instruction is comparing the 16 bits in Source A with the 16 bits in Source B. All 16 bits must be equal for the instruction to be true.
 
Right This is the same problem that i'm faced with as i do not have the orginal program this is a download form the equipment. I wish i could post the whole logic but that would be against the producents rights. Anyway thanx for the for the explanation.
 
Here is an example from a system I designed. There are sixteen flexible U beams which have a switch mounted inside the U of the beam. When a bolt through the U beam has been properly tensioned the beam flexes enough to activate the switch. If the bolt breaks then the beam will spring open, opening the switch. The 16 switches are wired to a PLC input card. All 16 switches must be on in order for a motor to run.

Instead of putting all 16 XICs in series on a rung, which would wrap the rung over several lines in the display, the motor start/stop rung has EQU I:6.0 -32768 programmed in the motor start/stop rung.

Alarms elsewhere in the system annunciate which bolt is not properly tensioned.
 

Similar Topics

See the screenshot of EIP tag list. We are trying to read in a digital input that is hard-wired. It is shown here as I31.1. I believe we cannot...
Replies
7
Views
282
A couple days ago I accidentally toggled an alwasyoff bit. The issue is it was set up as a single OTU on a rung, nothing else, and used as XICs...
Replies
3
Views
226
Hi I have an old panel builder 32 that I’m replacing for a factory talk me hmi . In the plc for the old panel builder there is a coms bit for the...
Replies
0
Views
74
Hello, Haven't been on in a while. I need to generate a bit level pdf of the I/O for RSLogix 500. I can generate a report but it just shows the...
Replies
1
Views
158
I tried researching but I still don't quite get it. As far as I understood, it's used after a function is called in STL and then if the function...
Replies
1
Views
143
Back
Top Bottom