The FC 105 Scaling Function in Siemens
Muhammad Wajeeh Ul Haque
Technical Consultant || Digital Transformation || IoT & Enterprise Solutions @ Telenor
The Siemens ladder logic includes a very important function FC 105 that is widely utilized in the automation world to convert integer values (like the voltage, current, temperature, and resistance) into real useful value.
Before going into details of this scaling function, let us look into the different blocks present in Siemens for designing PLC logic.
What are Blocks
Blocks, in the Siemens ladder logic, consists of instructions that are executed, either every time the program runs or they are called to execute from the main program itself. The different blocks that are being used are:
- Organizational Block (OB)
The organization block (OB) is the main programming block that determines the sequence of executing the programming logic.
- Function Block (FB)
It is a general practice to not write the complete PLC logic in OB, otherwise troubleshooting and debugging will become difficult. This is where the function block comes into play. Function blocks contain a piece of code/PLC logic that can be called to execute from the main program (OB), these blocks store their values in the memory so that they remain available even after execution.
- Function (FC)
The FC plays the same role as FB, except that FC does not have its own dedicated memory which means that it can not retain its values.
As mentioned earlier, the FC 105 Scale function converts integer values into real useful values. There are two important terms that need to be mentioned here:
- NORMALIZING
The normalizing function is generally used when the input data varies a lot. The purpose of normalizing a given data set is to describe it as a normal distribution (usually from 0 to 1).
- SCALING
The scaling function basically maps the input values to a desired range. It is a general practise, to first normalize the input values and then scale them.
FC 105 Function
- EN (Release input): Whenever EN is set high (1 at EN), it activates the Scale block.
- IN (Input): This is the incoming integer value (voltage, current, temperature, and resistance) that is to be scaled.
- HI_LIM (High limit): The desired maximum value for the output.
- LO_LIM (Low limit): The desired minimum value for the output.
- BIPOLAR: If 1 is present, it means a bipolar input value (-27648 and 27648). If 0 is present, it means a unipolar value (0 and 27648).
- ENO (Release output): Whenever ENO is set high (1 at ENO), it means the scale function is executed withour error.
- RET_VAL (Return Value): Outputs the value W#16#0000 when the operation is executed without error.
- OUT (Output): Gives the scaled output.