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,382
I have everything set up for vibration monitoring with the code in Controllogix 5000. The thing is that I am not able to read values SCADA in mm/s...
Replies
0
Views
28
Hi, having some issues with scalings (SCP commands) with some Vegapuls 65 guided wave radar level transmitters. I've set the min/max in the...
Replies
5
Views
194
I want to measure the tank level and get the sensor output to the PLC. Below are the details : Tank Height =0 - 3m, the sensor is stalled 0,2m...
Replies
15
Views
655
Hi, I have a ControlLogix system with 1756-IF16 analogue inputs. I can't scale the inputs at the card as there is a requirement to facilitate...
Replies
14
Views
386
Back
Top Bottom