×
Siemens Industry Online Support
Siemens AG
Entry type: FAQ, Entry ID: 1765297, Entry date: 02/07/2008
(8)
Rate

How and for which analog measurements can you use the function FC105 "SCALE" to convert the integer values (INT) into real number values?

  • Entry
  • Associated product(s)

Description:
You can use the FC 105 "SCALE" function for measuring voltage, current, temperature and resistance.

The following holds for temperature measurements:

  • With resistance thermometers configured in the standard range and with thermoelements, the analog input gives the 10-fold temperature value as integer.
    Example: 
    The integer value 600 corresponds to a temperature of 60.0°C. Set a high limit HI_LIM and low limit LO_LIM of +2764.8 and -2764.8 respectively to avoid a division by 10.
  • With resistance thermometers configured in the climate range, you get the 100-fold temperature value as integer.
    Example: 
    The integer value 2500 corresponds to a temperature of 25.0°C. Set a high limit HI_LIM and low limit LO_LIM of +276.48 and -276.48 respectively to avoid a division by 100.

The following holds for current measuring (taking the example of a pressure sensor):

  • Configured measuring range of 4 to 20mA (0 to 5 bar)
    Example:
    The integer value 27648 corresponds to 20mA and thus 5 bar in this example. The integer value 0 corresponds to 4mA and thus 0 bar in this example. Therefore, you should parameterize the high limit HI_LIM to 5.0 and the low limit LO_LIM to 0.0 to obtain correct scaling.

The measuring ranges of the analog inputs are available, for example, in the manual "Programmable Logic Controllers S7-300 Module Data", section entitled "Analog Value Representation for Analog Input Channels" in Entry ID 8859629.

The Scale Values function FC 105 "SCALE" converts an integer value (IN) into a REAL value. This is scaled in physical units between a low and high limit value (LO_LIM and HI_LIM). The result is written to the OUT parameter. If the integer input value is not in the range specified for the type concerned (BIPOLAR or UNIPOLAR), then the output (OUT) is linked to the nearest value (LO_LIM or HI_LIM) and an error is issued.

Measuring ranges:

  • BIPOLAR: it is assumed that the integer input value is between -27648 and 27648.
  • UNIPOLAR: it is assumed that the integer input value is between 0 and 27648.

FC 105 parameters:
 

Parameters

Declaration

Data type

Storage area

Description

EN

INPUT

BOOL

I, Q, M, D, L

The signal status "1" at the release input activates the box.

ENO

OUTPUT

BOOL

I, Q, M, D, L

The release output has the signal status "1" when the function is executed without error.

IN

INPUT

INT

I, Q, M, D, L, P, Const.

Input value that is to be scaled in a value of the REAL data type in physical units.

HI_LIM

INPUT

REAL

I, Q, M, D, L, P, Const.

High limit value in physical units.

LO_LIM

INPUT

REAL

I, Q, M, D, L, P, Const.

Low limit value in physical units.

BIPOLAR

INPUT

BOOL

I, Q, M, D, L

Signal status "1" means a bipolar input value. Signal status "0" means a unipolar input value.

OUT

OUTPUT

REAL

I, Q, M, D, L, P, Const.

Result of scaling.

RET_VAL

OUTPUT

WORD

I, Q, M, D, L, P

Outputs the value W#16#0000 when the operation is executed without error. If a different value is output, more details are given in the error information.

Security information
In order to protect plants, systems, machines and networks against cyber threats, it is necessary to implement – and continuously maintain – a holistic, state-of-the-art industrial security concept. Siemens’ products and solutions constitute one element of such a concept. For more information about industrial security, please visit
http://www.siemens.com/industrialsecurity.