analog scale with Rslogix 5000

yfcarer

Member
Join Date
Apr 2006
Location
Tianjin
Posts
82
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!
 
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
 
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.
 
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.:cry:
 
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
 
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.
 
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
 
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.
 
Look here:

http://samplecode.rockwellautomation.com/intradoc-cgi/nph-idc_cgi.exe?IdcService=GET_SEARCH_RESULTS&urlTemplate=%2fidc%2fgroups%2fpublic%2fdocuments%2fwebassets%2fsc_search_results.hcst&QueryText=%28dSecurityGroup+%3cMATCHES%3e+%27Sample_Code%27%29+%3cAND%3e+%28%28xSC_Products+%3cSUBSTRING%3e+%27Programmable+Controllers%27+%3cAND%3e+xSC_ProductsLevel2+%3cSUBSTRING%3e+%27ControlLogix+System%27%29%29+%3cAND%3exSC_Technologies+%3cSUBSTRING%3e+%60Add+On+Instruction+%28AOI%29%60&SortField=dInDate&SortOrder=Desc&ResultCount=25&SearchProviders=mms&&PageNumber=2&StartRow=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:
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" ...

try_scl_fb.JPG
 
Last edited:

Similar Topics

Hi, I'm using a Micrologix1500 and it doesnt have the SCP (Scale with parameters) block. I have a 1769-IF8 analog module and need read the inputs...
Replies
10
Views
3,717
Hi I'm trying to change the scale in a analog Input module in the module while online. I got a warning saying something like Module changes could...
Replies
4
Views
2,032
I have an automated batching system that im using an analog scale to trigger automated valves to open and close. I have the programming done and...
Replies
6
Views
2,324
Please help me... Is there any possible way to use AB IR4-1762 module for analog input scaling....?
Replies
1
Views
1,166
can anyone please tell me how to use analog i/o devices.....how to scale?...i know how to do it in allen bradley...but cannot do in siemens 300...
Replies
0
Views
1,409
Back
Top Bottom