TIA Portal & Scaling

bgtorque

Member
Join Date
Oct 2013
Location
Northampton
Posts
127
Hi All
I'm from an Allen-Bradley background and i'm using an S7-300 on a project. With scaling a channel in AB I had a Scaling Block setup which would take in a raw input (counts) and multiply it by a scalar to return a value in the appropriate engineering units. I then had an ADD block that would let me add in an offset. So to calibrate the channel, say for a pressure transducer I would simulate a voltage or current input and note counts and then a different voltage or current and note counts again. Then looking at the gradient vs what those currents or voltages should represent in kPa I would derive a scalar to apply to the counts. After applying this scalar I would then simulate another pressure and apply the appropriate +ve or -ve value in the offset to get the correct reading in kPa. So, all I would need to do in the HMI is allow the appropriate calibration engineer access to change the scalar and the offset values (for calibration you would make the offset 0 and the scalar 1 initially and then do the calibration).

With TIA there is a Scaling function already under the basic instructions called scale. This looks like you stipulate the theoretical high and low value of the sensor (say 100kPa to 1000kPa) and the block works it out for you. My question is really, how to you calibrate this in reality, since that pressure transducer might return 4-20mA = 87.558kPa - 1057.849kPa, for example?
 
Hi All
I'm from an Allen-Bradley background and i'm using an S7-300 on a project. With scaling a channel in AB I had a Scaling Block setup which would take in a raw input (counts) and multiply it by a scalar to return a value in the appropriate engineering units. I then had an ADD block that would let me add in an offset. So to calibrate the channel, say for a pressure transducer I would simulate a voltage or current input and note counts and then a different voltage or current and note counts again. Then looking at the gradient vs what those currents or voltages should represent in kPa I would derive a scalar to apply to the counts. After applying this scalar I would then simulate another pressure and apply the appropriate +ve or -ve value in the offset to get the correct reading in kPa. So, all I would need to do in the HMI is allow the appropriate calibration engineer access to change the scalar and the offset values (for calibration you would make the offset 0 and the scalar 1 initially and then do the calibration).

With TIA there is a Scaling function already under the basic instructions called scale. This looks like you stipulate the theoretical high and low value of the sensor (say 100kPa to 1000kPa) and the block works it out for you. My question is really, how to you calibrate this in reality, since that pressure transducer might return 4-20mA = 87.558kPa - 1057.849kPa, for example?

The "easy" solution is to make the limits you feed the Scale block tags instead of constants. You can make those tags visible on an HMI so that an engineer can tweak them later.

You also could build a custom FB that does exactly what you did in the AB system.
 
The problem with that is many sensors can go slightly non-linear at the edge of their range, we don't tend to use them much beyond 80% and might only calibrate up to 90%. So the scalar method gives you that flexibility to restrict the range on that basis. I guess its the fuction block method using a MUL and an ADD then.

Thanks,
 
Yeah, the Scale blocks do assume linear scaling. If you need to try to account for nonlinearity or use calibration points other the max/min limit, you'll have to do some math of your own. You could try to calculate what the idealized engineering limits should be (to feed to the scale block), but you are right, it would probably be easier to build a custom block at that point.

Instead of having a pile of ADD/MUL blocks in ladder logic, I prefer to do my mathematical algorithms (like scaling) in SCL. Both languages get the job done, that's just my personal preference.
 
I'm not familiar with SCL to be honest. I'm self-taught on ladder logic. I haven't had anything to do with siemens before, so i'm trying to wade me way through it. My FC logic bascially consists of

CONV (INT to DINT) - CONV (DINT to REAL) - MUL (input * ENG_scalar) - ADD (+/-Offset)

All my program blocks currently call up the Scaling Block and I need to find out how to flush through them and replace with the new FC1 that i've created.
 
All my program blocks currently call up the Scaling Block and I need to find out how to flush through them and replace with the new FC1 that i've created.

If LAD is what you know, def stick with that.

Unfortunately, I'm not sure if there is an easy global cross reference/global search for where instructions are used. Probably the easiest thing to do (if the Scale blocks are scattered all over) is to do a cross reference on your analog input tags. That gets tedious if you have a lot of tags, but it beats simply looking through all your code network by network.
 
THanks, I've figured it out I think. I just needed to check my tags were in the Block Interface correctly (they were in as local temps) and then update the block calls in the relevant program. Hopefully this should work now.

Thank you very much for your kind assistance.
 

Similar Topics

Hi, Didn't found an answer to this particular problem. As everyone probably knows if you use windows scaling of display crazy things happen to...
Replies
1
Views
1,655
Dear all Iam using three load cells connected in parallel to calibrate the weight of a product but in don't have a weighting module in my...
Replies
4
Views
3,500
Hi Guys, I just want to scale an analog input (current ) from 4-20mA to an Integer value (0-100) in the PLC (S7-1500) also (300) using tia Portal...
Replies
18
Views
18,359
Hi Guys, I just want to scale an analog output to 0-10V from an Integer value in the PLC (S7-1500) using Portal version 13. I assume it hinges...
Replies
6
Views
8,702
Hello, good morning, I have been having two problems with the Tia Portal software. The first is that I have installed it on my computer and...
Replies
1
Views
54
Back
Top Bottom