Limit Instruction Help

.... you can reverse LOW and HIGH (that is, put the high limit value first) and get an inverted reaction.

I took that to refer to the output of the instruction, if you didn't mean it to be so, you should have said.

Your choice of words could easily mislead.

Let's put it to bed, assuming that the rung is already in a true state (rung logic continuity = TRUE), then -

With Low Limit < High-Limit : Output is true when the Test Value is Greater Than, or Equal to, the Low-Limit, AND Less Than, or Equal to, the High-Limit.

With High-Limit < Low Limit : Output is true when the Test Value is Greater Than, or Equal to, the Low-Limit, OR Less Than, or Equal to, the High-Limit.

At the limit values, whether the low limit is less than the high limit, or vice-versa, the result (reaction?) of the instruction will be to set rung logic continuity TRUE.

For X : output when Low-Limit=4, High-Limit=6
And Y : output when Low-Limit=6, High-Limit=4
Test X Y
3 0 1
4 1 1
5 1 0
6 1 1
7 0 1


I will state again - inverting the limits does not simply invert the "reaction" of the output.
 
That is incorrect. Reversing the relative values of the Low and High limits DOES NOT invert the output.
Daba, it depends on the specific software and how the function is defined within that software. In the case of RSLogix, reversing the Low and High Limit in the LIM instrcution does indeed "invert" the output. The quote below from the RSLogix program pretty much puts an end to your arguement. If the Low limit value is larger than the High Limit value, then the output is false, (not true as you have stated).

LIM [Limit Test]

Rockwell Software 2000
Use with processorsSLC 5/02SLC 5/03SLC 5/04SLC 5/05 All MicroLogix Example of Instruction(Parameters shown are examples only, your data will vary.)

Description
Use the LIM instruction to test for values within or outside a specified range, depending on how you set the limits.

Entering Parameters
Depending on how you define the Test parameter, the Low and High Limit parameters can be a word address or program constant. See below.

Test Low Limit High Limit
Constant Word Address Word Address
Word Address Constant or Word Address Constant or Word Address
True/False Status of the Instruction.

If the Low Limit has a value equal to or less than the High Limit, the instruction is true when the Test value is between the limits or is equal to either limit. If the Test value is outside the limits, the instruction is false.

If the Low Limit has a value greater than the High Limit, the instruction is false when the Test value is between the limits. If the Test value is equal to either limit or outside the limits, the instruction is true.
Rockwell Software 2000
 
Last edited:
Lancie1, I have never ever said that the Low>High situation will not "reverse" the output (and please note I said reverse, not invert). Even my truth table posted above shows that.

I have been merely pointing out that reversing the limits DOES NOT "invert" the output function of the instruction, in ALL A-B PLCs and ControlLogix.

Please take the time to analyse the truth table, and relate it to the RS quote you have provided.

The important statement is the one immediately following the one you have highlighted.

If the Test value is equal to either limit or outside the limits, the instruction is true.
I will say no more on the subject - I know how LIM works, for those who are dubious, put one in an A-B PLC and try it.
 
I have been merely pointing out that reversing the limits DOES NOT "invert" the output function of the instruction, in ALL A-B PLCs and ControlLogix.
invert: (1) to turn upside down, (2) to reverse in position, direction, or relationship, (3) to turn or change to the opposite or contrary...

For me, these are the important statements, right from the horse's mouth:

"If the Low Limit has a value equal to or less than the High Limit, the instruction is true...

"If the Low Limit has a value greater than the High Limit, the instruction is false...."

Apparently these sentences mean something different to you, than they do to me. It could be a cultural difference. We Yanks talk and think differently, you know.

I have studied your table, but still I see that if you swap the High and Low limit values, and the Test value is still between the two, then the output will be false (where before it was true). To me that reverses the function of the instruction. It also inverts the output, in that it changes to the opposite of two possible states. But to you it doesn't.

Can we politely agree to disagree?
 
👨🏻‍🏫 Last chance to clear this up.

Lancie1, by your argument, in the following examples, Output1 and Output2 should follow each other - they do not.

Although this is taken from a ControlLogix, the LIM instruction works the same in ALL A-B PLCs.

LIMIT3.jpg LIMIT4.jpg LIMIT5.jpg LIMIT6.jpg LIMIT7.jpg
 
In order to be "inverted" (which is not even the right word in this case), the output would have to be the exact opposite for one scenario than it would be versus the other scenario, in this case flipping the limits. The part that is confusing ya'll is the 4 and 6, because they are both true no matter what. If you look at it this way, the output is not really inverted. Its not even reversed if you want to get right down to it, because, as I said before, if you leave 4 and 6 as the limits, testing the numbers 4 or 6 give you the same result, regaurdless if you put 4 as the high or low limit. This whole argument is ridiculous.

I see both your points, ya'll just aren't looking at it the same.
 
Which is precisely the purpose of posting the corrections, shoelesscraig.

There shouldn't be two ways of looking at it, or having different views..

A full understanding of how instructions work is essential when authoring PLC code, and if anyone is misled into believing, because they read it on a PLC Forum, that swapping the Low and High Limits "inverts" or "reverses" the output, then their code may fail under circumstances they believed would be covered, which, simply put, is just not good enough.

I firmly stand by what I originally stated, there should be no mention of "inversion" or "reversing" when talking about this instruction. Sure it behaves differently in the two cases, but the outcomes are not wholly "opposite", and therefore shouldn't be described as such.

In conclusion - LIM will tell you when you when Test is BETWEEN the limits (L<H) or OUTSIDE the limits (L>H), but when Test is equal to either limit value, the output is always true, irrespective what the limit values are.
 

Similar Topics

I have a CLX L61 and I'm trying to read from and write to a Micrologix 1100. I'm attempting to read 200 REAL elements but I'm receiving an error...
Replies
2
Views
1,471
If I am using a LIM instruction and the low limit is 10 and the high limit is 20 and the actual tested value is either 10 or 20 does the limit...
Replies
5
Views
2,905
I know this instuction keeps a varaible within limits. EX. 5psi-35psi. My question is how do you put the valve into the interger. Okay I have a...
Replies
5
Views
2,838
Dear forum members, By reffering to the blue labelled command on the attached file, Could you tell me what PLC register that is being limited by...
Replies
0
Views
71
Good day: I am wondering if anyone has experience with the Kinetix 5500 S33 Fault. I have 3 drives in a group set as follows: 2198-H025-ERS2...
Replies
5
Views
194
Back
Top Bottom