Addressing issue

Jose_Jalapeno

Member
Join Date
Jun 2011
Location
SC
Posts
10
I'm trying to write a program to better understand the various uses for a LIM Instruction. I'm having a issue with it reading the Counter value. I would greatly appreciate the help. :)
 
Jose,

The LIM instruction is like two comparison instructions combined (ANDed) together. There are two major variations:

1. NORMAL CASE: When the Low Limit value is less than High Limit:
IF (TEST >= LOW LIMIT) AND (TEST <= HIGH LIMIT), THEN OUTPUT = TRUE
(Notice that when Test = Low or High Limit, ouput is TRUE).

2. ABNORMAL CASE: When the Low Limit value is entered as greater than or equal to the High Limit:
IF (TEST > LOW LIMIT) AND (TEST < HIGH LIMIT), THEN OUTPUT = FALSE
(Notice that when Test = Low or High Limit, ouput is TRUE).

In both cases, if the test value is outside the comparison limits, then the output is the opposite of those shown above.
 
Last edited:
Jose,
2. ABNORMAL CASE: When the Low Limit value is entered as greater than or equal to the High Limit:
IF (TEST > LOW LIMIT) AND (TEST < HIGH LIMIT), THEN OUTPUT = FALSE
(Notice that when Test = Low or High Limit, ouput is TRUE).
...

There is nothing "abnormal" in such case.
This is a common case on machines with rotary encoder.
And such behavior of the zone comparison instruction is one of few AB advantages.
In Omron, the emulation of this requires 6 branched in-line comparison instructions.
 
Greetings Jose ...

regarding your statement:

I'm trying to write a program to better understand the various uses for a LIM Instruction.


based on that, you might be interested in the link posted below ...

the idea is that many programmers try to use the LIM (Limit Test) instruction to KEEP/MAINTAIN/HOLD a variable within a certain RANGE of values ...

for example, suppose that we tell the operator: "Don't ever set this dial any LOWER than 20 – and don't ever set it any HIGHER than 80" ... some operators will naturally start cranking the dial too low – and too high – just as soon as we walk away ...

at first glance, the LIM instruction seems to be a natural programming choice for keeping the variable within an acceptable range ... the problem is that the LIM only tests to see whether we're INSIDE or OUTSIDE of the range – but it isn't all that handy when it comes to actually "fixing" an out-of-range problem ...

specifically, the LEFT end of the rung is pretty easy to set up ... but then ... what do you do with the RIGHT end of the rung? ...

the picture in the following post is a very common way of "limiting" a value and keeping it from getting out of line ...

http://www.plctalk.net/qanda/showthread.php?postid=23689#post23689

good luck with your studies ...
 
There is nothing "abnormal" in such case. This is a common case on machines with rotary encoder.
Sergei, Okay, you convinced me. Perhaps abnormal was a poor choice of words. Unusual would be better.

You have to admit that a control case where Low Limit = Largest Number, and High Limit = Smallest Number is at least unusual, if not completely odd.

Tank Level? No, the highest number will be the fullest (high limit).

Motor Speed? No, the highest speed will be the high limit.

Travel Distance? No, the longest distance will be the high limit?

You can see what I mean if you think about it. Can you think of any other cases except the rotary encoder? I am not sure how a LIM instuction would work there, because the encoder continually goes from high to low and back.
 

Similar Topics

Hey, I'm having trouble with moving data within a DB and I think the problem is rooted in my lack of understanding of programming 'pointers' so...
Replies
27
Views
6,078
Excuse my ignorance but I am having a hard time figuring out where my real IO points are to address tags. Please refer to attachments for screen...
Replies
5
Views
2,136
I'm trying to set up a project in Cscape for a new install. Our config will be an RCC972 with 2 SmartBlock I/O's - HE579DAC207 and HE579MIX105...
Replies
2
Views
1,554
Hello All, I was installing a 1785-ENET card on an existing 5/60B processor. Before installing i moved an 6 point AC input card from slot 0 (next...
Replies
7
Views
2,993
Hello all, I am currently working with a Control Logix 1756-L72. Using studio 5000 v. 23. I also have a 1756-ENBT Ethernet module plugged into an...
Replies
6
Views
2,098
Back
Top Bottom