Scaling in AB CLX (relay ladder)

PaulKraemer

Member
Join Date
Jan 2005
Posts
24
Hi,

I have a job where I am using an AB ControlLogix PLC. I have a REAL tag that can have values between 0.00 and 8,022.40 (always with two decimal places). I have to scale this value to an integer between 0 and 16,777,214.

I see that RSLogix 5000 has a SCL (Scale) function, but the online help says that this command is only available in the Structured Text editor. Unfortunately, I only own the Relay Ladder editor.

I am sure that I can use basic math functions to (1) multiply the real value by the necessary multiplier and then (2) convert the result to an integer. I think this would take me at least two rungs and three different tags (the original real tag, another real tag for the scaled value, and finally an integer tag for the scaled value after I truncate the decimal places).

I have to do this kind of scaling for quite a few tags. Before I start trying to work through this, I was just wondering if anyone might be able to suggest an easier approach that I might be missing.

Thanks in advance,
Paul
 
Why don't you just use the scaling function in the card properties?
Am I missing something? Is it because you are using your REAL integer, rather than the DISCRETE I/O? Why not scale from the start?
 
here you are:

scp.JPG
 
Use the CPT instruction for any math that involves more than one operation. ADD SUB MUL DIV are faster for single operations only, but if you have to store intermediate values for additional computations, those instructions actually take longer. The CPT has the advantage in that there is no need to store intermediate values in a tag.
 

Similar Topics

Friends, I have a question about scaling an analogue value using a CLX 5561 and Flex IO. I'm getting my data ok from my load cell and able to read...
Replies
6
Views
5,373
I know nothing about simaticnet OPC server. I do know Kepware. I would only ever scale raw to engineering in the PLC, but it is possible to scale...
Replies
5
Views
209
Hi all. I'm working on a rehab and I'm trying to figure stuff out. See screenshot at the bottom. Local:5:I.Data[6] in BTD instruction is a...
Replies
6
Views
697
Hello all, First post here. Hitting a wall with finding info on this topic online, and none of my coworkers have a clue. I have a PanelView...
Replies
10
Views
1,335
Hello, We monitor the temperature of a pipe via a 4-20mA temperature transducer. This goes into DB135(Read Analog Inputs). The issue I have is the...
Replies
0
Views
623
Back
Top Bottom