Limit Instruction Help

The Plc Kid

Member
Join Date
Feb 2009
Location
Macon, Georgia
Posts
3,233
Guy's

I am doing some rs logix 500 programming in a slc 5/04 and i have to use a limit instruction on about 20 rungs. Same instruction and same values in each.

On the high and low limit i can put a static value my question is where is that static value stored? In the instruction or in a memory location not viewable?

From time to time this value will need to change and i do not want to change it 20 times.I can use a integer word and enter the value but is there ever any situation where this value may get lost somehow and the instruction have a zero for high/low limit.

I could make a rung to always move the values to the memory locations but i would like to avoid that unless it is necessary.

Just trying to make the code a little more simple or is it a best practice to jsut make a rung to move the value into the locations on first scan or something?

Whats best?
 
Put the High and Low Value for the Limit Instruction in N Registers. Unless the Backup Battery goes dead, the values will be retained. In that case you would have to download the program anyway. Make sure when you save the program, you say yes to save current values.

Stu.....
 
Create a rung which tests for sane (within reasonable limits) for the values. If they are not reasonable then take an action which may be raising an error, preventing running or loading default values.
 
If you enter a constant, then the only way to edit that value will be via a rung edit (rinse lather repeat 20 times).

Storing the data in an N location as suggested is the way to go if you need to be able to "tune" the value occasionally.

As Bernie mentions though, always do a test on what number you are moving into those locations. You can even write logic to say that if the value is not acceptable then load in a default acceptable value.

OG
 
As suggested, if you expect to be changing the values, use N registers for the high and low limits.

My next suggestion has to do with the efficiency of your program. You say you are using the same LIM comparison on about 20 rungs. Comparison instructions take considerably more processor time than XIC and XIO does, a LIM instruction on the 5/04 takes six times as long if doing integers and 54 times as long if doing floats. I suggest you use a single LIM and use it to set a bit. Then use that bit as a condition on the 20 rungs.

A08050901.JPG
 
Last edited:
The individual limit instructions control the min/max value that can be entered from the panelview.

Seems stupid to me.Just set the limits on the numeric entry on the panel view button.

But i did not write it just trying to fix a few things
 
Putting the limits in in the Panelview means that to change them requires downloading to the panelview. It is less painful to edit PLC code in most cases.

Paul
 
They have it set in the pv also in the data entry limits of the numeric entry object.

Should you have the integer addresses in the data entry limits high / low ?
 
Should you have the integer addresses in the data entry limits high / low ?
Depends on what you want to do. Most times limits are set up as LOW <= test value <= HIGH, with the low value placed in the LOW parameter and the high value in the HIGH parameter. I like to think of this as the 'normal' mode. However, you can reverse LOW and HIGH (that is, put the high limit value first) and get an inverted reaction. Check out LIM in Instruction Help in RSLOGIX.
 
.... However, you can reverse LOW and HIGH (that is, put the high limit value first) and get an inverted reaction. Check out LIM in Instruction Help in RSLOGIX.

That is incorrect. Reversing the relative values of the Low and High limits DOES NOT invert the output.

You stated this in your equation LOW <= test value <= HIGH. The important to remember is the "or equal to" part of the comparison operators. Always at the limit values the output will be true.
 
That is incorrect. Reversing the relative values of the Low and High limits DOES NOT invert the output.

You stated this in your equation LOW <= test value <= HIGH. The important to remember is the "or equal to" part of the comparison operators. Always at the limit values the output will be true.

Daba:

Have a look at page 3-5 of the SLC500 Instruction Reference Manual 1747-RM001 for the Limit Instruction before you discount what Doug stated. It may be on a different page if you have a different manual. The way I read it, Doug is correct.

Stu.....
 
My vote also is on Dougs side.
Also I am a believer in the limits being in the PLC (as well as in the HMI). The PLC limits stops the program executing if a value is set to an erroneous value directly in the data table.
Regards Alan Case
 
Putting the limits in in the Panelview means that to change them requires downloading to the panelview. It is less painful to edit PLC code in most cases.

Paul

Also, putting the limits in the PLC allows you to change them dynamically on the fly, which you can't do if hard-coded into the HMI, and even somewhat more importantly, it insures that even if someone goes to the logic to change a value, it can still be clamped to 'safe' or 'good' values.

For limit-entries like you are describing, I normally actually compare to see if the entered value is outside of the range, then just move the limiting value into the register.
 

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,458
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,876
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,811
Hello, I have a motor that we are sending a RPM Speed Output from 0-100% to the VFD. However, the Motor HP needs to be limited to 6000 HP and the...
Replies
3
Views
88
Hello, I have a quick question. I have been using scripts to change the color of buttons. The reason, I am usually using multiple hmiruntime.tags...
Replies
1
Views
99
Back
Top Bottom