Tietokoneiden näyttöjä, joissa näkyy kuvaa automaatiolaboratorion laitteistosta. Monitoreiden takana näkyy sama laitteisto kuin kuvissa.

timohei.net / My Courses / My Courses / Production Automation Project / Siemens S7 How-to /
Scaling of Analog Input

S7-1200

Extract from Siemens web pages:

Connecting a signal from the NORM_X function block to the SCALE_X function block can be done using a local temporary variable of Real type (LI-100-norm in the example below):

Operation of the scaling can be verified by forcing values of 0, 13824 and 27648 (corresponding to 0, 50 and 100 %) to the analog input.

Input current 4 mA -> analog input forced to 0 -> scaled value should be 0:

Input current 12 mA -> analog input forced to 13824 -> scaled value should be 50:

Input current 20 mA -> analog input forced to 27648 -> scaled value should be 100:

S7-300

Signals from the analog input units are 16 bit INT values. The mos significant bit (b15) is the sign of the value (0="+", 1="-"). The following 12 [or 8] bits (b14..b3[b7]) make the actual analog measurement value. Rest of the 16 bits (b2[b6]..b0) are set to zero.

Analog input's and output's INT values have a range of 0d .. 27648d (0000 0000 0000 0000b .. 0110 1100 0000 0000b, 0000h .. 6C00h).

Overflow is shown with a value of 7FFFh and underflow with a value of 80D0h.

Source: S7-300 and M7-300 Programmable Controllers Module Specifications (pdf, n. 2 MB)

Process Value (PV) of a PID controller can be scaled using the integrated scaling function of the PID function block. Other analog signals can be scaled using FC105 SCALE function block. It can be found at Libraries -> Standard Library -> TI-S7 Converting Blocks.

In the example below an input signal LI-004 from peripheral address PIW256 is scaled to 0.0 .. 1.6 m.

Note that PIW256 has to be declared to be of INT type!

Updated 15.11.2020

<<  Previous Page
(7) Simulating PID Compact with PLCSIM
Sivu 8/12Next Page >>
(9) Simulating Input Signals with Force Table
© Timo Heikkinen | timo piste heikkinen at oamk piste fi