You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

Reply
 
Thread Tools Display Modes
Old October 20th, 2005, 11:28 AM   #1
Snide
Member
United States

Snide is offline
 
Snide's Avatar
 
Join Date: Oct 2005
Location: Pittsburgh
Posts: 73
Question Explain a LIM (Limit Test)

Hi, I'm very new to PLC's. I'm trying to understand a program that someone else has written. I having trouble understanding the LIM (limit test)I understand where the High Lim and Low Lim come from, but where does the value for the 'Test' come from. I'm looking at a program that has
low lim 4000
4000<
Test I:7.0
12234<
High Lim 20000
20000<
I understand that I:7.0 is an address input but, where does the 12234 come from. Is that a value from the input? Could you please explain the 'Test' part of the LIM (limit test). Thanks ~Snide
  Reply With Quote
Old October 20th, 2005, 11:37 AM   #2
Jimmie_Ohio
Member
United States

Jimmie_Ohio is offline
 
Jimmie_Ohio's Avatar
 
Join Date: Aug 2005
Location: Cleveland
Posts: 492
The "12234" is the current value of input word I:7.0

This rung is true because:

4000 < 12234 < 20000

Or, verbally, the "Test" value is between the low and high limits.
__________________
"Invention is 1% inspiration and 99% perspiration - Edison." This explains why so many engineers smell so bad...
  Reply With Quote
Old October 20th, 2005, 11:43 AM   #3
Mickey
Lifetime Supporting Member
United States

Mickey is offline
 
Mickey's Avatar
 
Join Date: May 2003
Location: Palmdale,Ca
Posts: 10,584
A copy of RSLOGIX instruction help. From the help file

LIM [Limit Test]



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.


Related Topics

Comparison Instructions
Addressing Help

Rockwell Software 2005
__________________
Mickey

If you want happiness for an hour-take a nap. If you want happiness for a day-go fishing. If you want happiness for a month-getmarried. If you want happiness for a year-inherit a fortune. If you want happiness for a lifetime-help someone else.
----- Chinese Proverb

Last edited by Mickey; October 20th, 2005 at 11:47 AM.
  Reply With Quote
Old October 20th, 2005, 11:56 AM   #4
Jimmie_Ohio
Member
United States

Jimmie_Ohio is offline
 
Jimmie_Ohio's Avatar
 
Join Date: Aug 2005
Location: Cleveland
Posts: 492
Quote:
Originally Posted by Mickey
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.
The second paragraph (bold) is a subtle tidbit of knowledge because this basically allows a limit instruction to look mathematically improbable.

I have seen people examining the logic go crazy trying to understand this...

Good one, Mickey. In my race to reply to this, I took the easy answer. Yours examines the "complete" answer.
__________________
"Invention is 1% inspiration and 99% perspiration - Edison." This explains why so many engineers smell so bad...
  Reply With Quote
Old October 20th, 2005, 12:30 PM   #5
Snide
Member
United States

Snide is offline
 
Snide's Avatar
 
Join Date: Oct 2005
Location: Pittsburgh
Posts: 73
Thanks, I think one day maybe I'll understand this stuff ~Amy
  Reply With Quote
Old October 20th, 2005, 12:37 PM   #6
Mickey
Lifetime Supporting Member
United States

Mickey is offline
 
Mickey's Avatar
 
Join Date: May 2003
Location: Palmdale,Ca
Posts: 10,584
Jimmie ohio,
Not my words, I cut and pasted the software's help file.
__________________
Mickey

If you want happiness for an hour-take a nap. If you want happiness for a day-go fishing. If you want happiness for a month-getmarried. If you want happiness for a year-inherit a fortune. If you want happiness for a lifetime-help someone else.
----- Chinese Proverb
  Reply With Quote
Old October 20th, 2005, 01:25 PM   #7
Snide
Member
United States

Snide is offline
 
Snide's Avatar
 
Join Date: Oct 2005
Location: Pittsburgh
Posts: 73
I was wonder about SCP (scale with parameters). Maybe you could expain the rung I have. the program is for reading data from a radar on a liquid tank. like i posted before for the lim
4000
<4000
I:7.0
<12234
20000
<20000

and on the same rung

SCP
input I:7.0
<12234
input min. 4000
<4000
input max. 20000
<20000
scaled min. 2.0
<2.0
scaled max. 119.0
<119.0
output F25:3
<62.21113

how do you calc. by hand to get 62.21113?? how do you choose scaled min and max??
My boss wants me do use this program for 8 other tanks and i want to make sure I'm doing this stuff right.

I read the help on RSlogix 500, but I need more help.

Sorry for all the questions.
  Reply With Quote
Old October 20th, 2005, 01:43 PM   #8
kamenges
Member
United States

kamenges is offline
 
kamenges's Avatar
 
Join Date: Nov 2002
Location: Brillion, WI
Posts: 4,282
The SCP instruction calculates the constants for and executes the standard equation for a line:

Code:
y = mx + b
with the constants being:

Code:
m slope of the line
b line offset from the origin
m is the change in your scaled value over the change in input. in your case it is:

Code:
m = (scaled max - scaled min) / (input max - input min)
b can be back calculated from any two known points on the line once the slope is known.

Code:
b = scaled max - (input max * m)
Scaled max and min as well as input max and min often come from your sensor calibration. All you need are two known points along your input signal and the scaled units those points correspond to. In your case it looks like someone scaled a 4-20mA signal to equal 2 - 119 user units.

I hope this helps.
Keith

Last edited by kamenges; October 20th, 2005 at 01:47 PM.
  Reply With Quote
Old October 20th, 2005, 01:49 PM   #9
Mickey
Lifetime Supporting Member
United States

Mickey is offline
 
Mickey's Avatar
 
Join Date: May 2003
Location: Palmdale,Ca
Posts: 10,584
Raw Data = value at I:7.0
(((raw data - min raw data)/ max range)* Engineering units max value-min value)+offset.
ie. ((( 12234-4000)/16000)*119-2)+2=62.21113

The min and max value are the scaling of your Transmitter at the tank
ie 4-20ma= 2 to 119 inches

Hope this helps

Kamenges you type faster then I do
__________________
Mickey

If you want happiness for an hour-take a nap. If you want happiness for a day-go fishing. If you want happiness for a month-getmarried. If you want happiness for a year-inherit a fortune. If you want happiness for a lifetime-help someone else.
----- Chinese Proverb
  Reply With Quote
Old October 20th, 2005, 01:50 PM   #10
Snide
Member
United States

Snide is offline
 
Snide's Avatar
 
Join Date: Oct 2005
Location: Pittsburgh
Posts: 73
Thank you, this helps ~Amy
  Reply With Quote
Old October 20th, 2005, 02:13 PM   #11
TConnolly
Lifetime Supporting Member
United States

TConnolly is offline
 
TConnolly's Avatar
 
Join Date: Apr 2005
Location: Salt Lake City
Posts: 6,152
All AB manuals can be found here:
http://literature.rockwellautomation..._category.hcst

SLC500 Instruction Set Reference:
http://literature.rockwellautomation...m001_-en-p.pdf

MicroLogix 1200 and 1500 Instruction Set Reference:
http://literature.rockwellautomation...m001_-en-p.pdf

Micrologix 1000 Instruction Set Reference:
http://literature.rockwellautomation...m003_-en-p.pdf

Last edited by TConnolly; October 20th, 2005 at 02:17 PM.
  Reply With Quote
Old October 20th, 2005, 02:15 PM   #12
JPCompounds
Member
United States

JPCompounds is offline
 
JPCompounds's Avatar
 
Join Date: Aug 2004
Posts: 37
This is quick:

% = (Input-Min)/(InputMax-InputMin) = (12234-4000)/(20000-4000) = .514

NewValue =(%*(ScaledMax - ScaledMin))+Scaledmin = (.514*(119-2))+2 = 62.12
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
Problems with Siemens CP340 RS232C communication Borte LIVE PLC Questions And Answers 12 December 26th, 2019 04:23 PM
LogixPro and the LIM Instruction mrmss LIVE PLC Questions And Answers 6 September 24th, 2005 03:28 PM
Information about TYPE TEST MDB? Platootod LIVE PLC Questions And Answers 3 December 2nd, 2004 10:23 AM
PID - MicroLogix Temperature Control Peter Nachtwey LIVE PLC Questions And Answers 112 October 11th, 2004 12:18 PM
Test equipment ranjana LIVE PLC Questions And Answers 1 November 10th, 2002 06:30 AM


All times are GMT -4. The time now is 05:16 AM.


.