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 May 8th, 2006, 05:31 AM   #1
yfcarer
Member
China

yfcarer is offline
 
yfcarer's Avatar
 
Join Date: Apr 2006
Location: Tianjin
Posts: 82
Lightbulb analog scale with Rslogix 5000

Hello, everyone.

It's me again.
I am now write a program under RSLOGIX 5000. When I try to scale an analog input from IO cards, I cannot find a command like "SCP" in RSLOGIX 500. This give some trouble to my program because I have a lot of analog signals.

Can anyone give me some idea to make the scaling simply?
Thanks in advance!
  Reply With Quote
Old May 8th, 2006, 07:28 AM   #2
andybutcher
Member
Australia

andybutcher is offline
 
Join Date: May 2004
Location: Brisbane
Posts: 52
Hi There,

There is a scaling function in RSLOGIX5000. To use it you have to create an FBD or Structured Text subroutine and use the function there. The function is called SCL.

Hope this helps.

Andrew
  Reply With Quote
Old May 8th, 2006, 07:36 AM   #3
SNK
Member
Canada

SNK is offline
 
SNK's Avatar
 
Join Date: May 2004
Location: Toronto, Ontario
Posts: 885
In logix 5K, you scale all of the signals in the I/O configuration. You really don't need to use SCP anymore, unless you are using indirect addressing for this function.
Believe me, it is REALLY easy.
Just right click on the module in the software, click properties, then the configuration tab.
  Reply With Quote
Old May 8th, 2006, 10:02 AM   #4
yfcarer
Member
China

yfcarer is offline
 
yfcarer's Avatar
 
Join Date: Apr 2006
Location: Tianjin
Posts: 82
Unhappy

Thanks a lot for your reply.

But unfortunately, my RSLogix5000 is a mini edition, which is not supporting FBD.
And I have looked carefully in the IO module (My AI module is 1769-IF8) configuration tab, but did not find the place where I can input engineering H/L value and other parameters for scaling. I think it maybe different from module to module, since when I tried to add another type of analog iput module(1769-IF4), and find it support the scaling.
  Reply With Quote
Old May 8th, 2006, 10:39 AM   #5
dash
Lifetime Supporting Member
United States

dash is offline
 
dash's Avatar
 
Join Date: Jun 2003
Location: Birmingham, AL
Posts: 589
The scaling at the input module level only applies to 1756 I/O. The 1769 you will need to scale in a compute calculation (CPT) or use the FBD, which you stated you do not have access to.

Darren
  Reply With Quote
Old May 8th, 2006, 11:05 AM   #6
mgvol
Member
United States

mgvol is offline
 
mgvol's Avatar
 
Join Date: Dec 2004
Location: Knoxville, TN
Posts: 746
Since there is only a "thin profile" for this mpodule, you will need to use this technote to assist in configuring/enabling the channels of your module.

http://domino.automation.rockwell.co...9?OpenDocument
  Reply With Quote
Old May 8th, 2006, 02:12 PM   #7
TConnolly
Lifetime Supporting Member
United States

TConnolly is offline
 
TConnolly's Avatar
 
Join Date: Apr 2005
Location: Salt Lake City
Posts: 6,152
Our distinguished colleague and PLC guru Ron Beaufort has posted an excellent thread on scaling.
http://www.plctalk.net/qanda/showthread.php?t=15069
While this thread is geared towards the SLC family of PLCs it contains all of the basic information needed to use the CPT instruction in a compact logix to perform the scaling.

In addition, since you have many analog points to scale I suggest you create a UDT that contains the following elements:
RAW DINT Raw analog value
SCALED REAL Scaled analog value or Y term of scaling
M REAL Slope of line for scaling
B REAL Offese of line for scaling.

Create only one user subroutine that can accept a tag of tne UDT type passed to it and perform the scaling and then pass the tag back out. You will use this subroutine over and over for each point rather than creating new code for each point.

Create a tag for each analog point of the new UDT type.
Copy the analog raw value from the IO module to the .RAW Dint. Then call the scaling subroutine and pass it it the new UDT tag.

Repeat for each analog point.
  Reply With Quote
Old May 9th, 2006, 02:14 AM   #8
RSL
Member
United States

RSL is offline
 
RSL's Avatar
 
Join Date: Nov 2004
Location: Missouri, USA
Posts: 356
I do it just like Alaric suggested. I roll my own scale function in ladder. I use UDT's to handle all my data. I map the raw values into my UDT's and call the subroutine with a For next Loop. All you do is enter the raw minimum, raw maximum, scaled minimum, and scaled maximimum for each analog you want to scale.

Start by writing the formula you want to use for scaling in a compute instruction.

Then create a UDT that has all the variables needed to fill in your formula.

Then create a tag array of your UDT big enough to handle all your analogs plus room for growth.

Then edit your compute formula to use indirect references where your array element equals the current index value of your For Next Loop.

Once you figure this out the first time you will remember it.

It really is simpler than it sounds.

RSL
  Reply With Quote
Old May 9th, 2006, 04:03 AM   #9
yfcarer
Member
China

yfcarer is offline
 
yfcarer's Avatar
 
Join Date: Apr 2006
Location: Tianjin
Posts: 82
Thanks for all your help.
I will try your method.
  Reply With Quote
Old November 2nd, 2010, 03:22 PM   #10
lloydsteve
Member
United States

lloydsteve is offline
 
Join Date: Apr 2009
Location: us
Posts: 9
Hi, I'm super new to ab, controllogix.
And I'm programming a scaling with. Fblocks,
Is there any easy way to do it. Something that walks you through it?.

Sorry for this question. But I don't know where to start.
  Reply With Quote
Old November 2nd, 2010, 04:06 PM   #11
dash
Lifetime Supporting Member
United States

dash is offline
 
dash's Avatar
 
Join Date: Jun 2003
Location: Birmingham, AL
Posts: 589
Look here:

http://samplecode.rockwellautomation...w=26&EndRow=37

Look for the example titled "SCP Scale w/Parameters AOI for RSlogix 5000 ver 16 ". The add-on instructions will work with V16 and up. I do not know what this one is written in, if it is ladder or structured text. Also look at some of the other examples in that link and you may see some other ideas for common problems.

Darren

[Edit]

OK, looked at it real quick and it is done in ladder, which is good since you will not have to worry if you have the Professional version of RSLogix 5000. You will need to open the project and go to the file menu to select "Import Component -> Add-On Instruction..." and choose the file that is in the zip attachment called "SCP.L5X". It operates similar to the Scale With Parameters instruction from the SLC.

Last edited by dash; November 2nd, 2010 at 04:14 PM.
  Reply With Quote
Old November 2nd, 2010, 04:29 PM   #12
Ron Beaufort
Lifetime Supporting Member
United States

Ron Beaufort is offline
 
Ron Beaufort's Avatar
 
Join Date: Jul 2002
Location: Charleston, SC
Posts: 5,698
if I'm reading your post correctly, you're trying to do it with Function Blocks ... if so, the "down-and-dirty" example below might help ... this one goes from:

an input range of 3277 to 16384 ... to

an output range of 6242 to 31208 ...

if this isn't enough to get you going, give us the specific details of what ranges and data types you need and we'll help you nail it down ...

tip: start a new thread when you have a question ... many people don't read the ones with "old dates" ...
Attached Images
File Type: jpg try_scl_fb.JPG (45.3 KB, 1287 views)
__________________

2-B ?
Best regards, ----+----] [----+------------( )----
Ron | |
PLC Boot Camp - Retired | 2-B |
+----]/[----+

I once was lost, but now am found, was blind, but now I see.


Last edited by Ron Beaufort; November 2nd, 2010 at 04:53 PM.
  Reply With Quote
Old November 2nd, 2010, 05:50 PM   #13
Ron Beaufort
Lifetime Supporting Member
United States

Ron Beaufort is offline
 
Ron Beaufort's Avatar
 
Join Date: Jul 2002
Location: Charleston, SC
Posts: 5,698
another way ...

this is example uses the same ranges of values - but exposes the scaling values on the screen ...
Attached Images
File Type: jpg try_scl_fb_2.JPG (17.9 KB, 1265 views)
__________________

2-B ?
Best regards, ----+----] [----+------------( )----
Ron | |
PLC Boot Camp - Retired | 2-B |
+----]/[----+

I once was lost, but now am found, was blind, but now I see.

  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
Newbie RSLogix 5000 Paullys50 LIVE PLC Questions And Answers 12 April 5th, 2019 10:19 PM
Custom Data Monitor in RSLogix 5000 Oakley LIVE PLC Questions And Answers 3 May 28th, 2007 03:53 AM
RSLogix 5000 V15 Features Samneggs LIVE PLC Questions And Answers 18 April 20th, 2006 06:45 PM
RSlogix 5000 professional huynt LIVE PLC Questions And Answers 4 August 2nd, 2005 02:45 AM
RSLogix 5000 eastkodakguy LIVE PLC Questions And Answers 2 July 3rd, 2002 12:28 PM


All times are GMT -4. The time now is 09:25 PM.


.