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
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