using cpt instructions for scaling

Sadly, Rockwell did not include the magnificent SCP instruction for CompactLogix, and the similar SCL instruction is available only as Function Block, not ladder.

However, they obviously realised their gaffe and made SCP available as an add on instruction, which you can import from the attached file.

This saves you messing about with the CPT instruction.

Thanks for this Ian

I will try this tomorrow at work.
 
I just imported the SCP add-on and i am going to try it. I just want to make sure i am using the right tags and parameters in the correct location.

My analog input card is configured for engineering such as 4000-20000. I want my scaled min to be = 0 and max scaled to be 192.

4000 = input min
20000 = input max
0 = scaled min
192 = scaled max
Input = i am not sure what to place here. I thought i would use my analog input point here. Right?
Output = result
rate = result

Am i on the right track?
 
You are on the right track.

The input is indeed the values from the analogue input module.

I can't remember what the Rate variable does, but I'd avoid setting Result from both Output and Rate. Configure Rate to a dummy tag and see what it does (or ignore it - I don't think it's compulsory to use all the connections.)
 
Thanks Ian for the reply.

Do i just use the input and make the alias a controller tag (analog input point connection). I am not seeing how to address it to the input point.
 
Rate is the destination in the first compute in the logic, used in the final compute to get the output.

First compute

Dest - Rate
Exp - (scaled_max-scaled_min)/(input_max-input_min)

Second compute

Dest - Output
Exp - (input-input_min)*Rate+scaled_min
 
Rate is the destination in the first compute in the logic, used in the final compute to get the output.

First compute

Dest - Rate
Exp - (scaled_max-scaled_min)/(input_max-input_min)

Second compute

Dest - Output
Exp - (input-input_min)*Rate+scaled_min

I know. Thanks though.

I just need to figure out how to make the "input" parameter the actual analog input point address and then i will be rolling.
 
For the input you can simply use the full address of the data point, e.g. Local:5:I.Ch1Data.

Alternatively, you can create an alias for the input data point e.g. Tank_1_Level and use that as the input.
 
Dest - Rate
Exp - (scaled_max-scaled_min)/(input_max-input_min)
If you remember your 9th-grade General Mathmatics course, "Rate" was called the Slope of a line of the form Y = mx + b, where m is the Slope of the line, and b is the Y Offset (the value of Y when X = 0).
 

Similar Topics

I have 4 outputs which cycle off-back on, one at a time if more than 1 output shuts off I need to set an alarm I`m wanting to use the compute...
Replies
3
Views
1,891
Hello, Trying to understand the MOD in Logix 5000 when used in a CPT block. I'm familiar with MOD or modulo as a ratio or division...
Replies
6
Views
3,571
I have a need to calculate the difference between two values in percent. I tried Google and found a formula that does exactly that. I attempted to...
Replies
5
Views
2,853
Hello all L30ER, rs 5000 MINI Using a laser as redundancy for encoder for linear motion. Placement is critical. Please look over this CPT...
Replies
10
Views
3,334
I want to average a phorsphorus reading (F8:20) over an hour (4 samples/hr). Ranged 0.03 to 3.0 mg/l. I may want to increase it to 4 or an 8 hr...
Replies
15
Views
5,606
Back
Top Bottom