SlideShare a Scribd company logo
Date: 22.12.24
File: PRO1_14E.1
SIMATIC S7
Siemens AG 1999. All rights reserved.
Information and Training Center
Knowledge for Automation
Analog Value Processing
Level
transmitter
High level
Low level
Date: 22.12.24
File: PRO1_14E.2
SIMATIC S7
Siemens AG 1999. All rights reserved.
Information and Training Center
Knowledge for Automation
Use of Analog Modules
Process
Physical
quantity
Standard
analog signal
Sensor Transducer
• Pressure
• Temperature
• Flow
• Speed
• pH value
• Viscosity
• etc.
± 500mV
± 1V
± 5V
± 10V
± 20mA
4...20mA
etc.
DAC
PQW ...
PQW ...
:::
PQW ...
Analog output module
MR
module
ADC
Result
memory
PIW ...
PIW ...
:::
PIW ...
Analog input module CPU
:
:
:
:
:
:
L PIW 352
T PQW 368
:
Analog
actuator
Physical
quantity
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
Date: 22.12.24
File: PRO1_14E.3
SIMATIC S7
Siemens AG 1999. All rights reserved.
Information and Training Center
Knowledge for Automation
Measuring Range Module
Date: 22.12.24
File: PRO1_14E.4
SIMATIC S7
Siemens AG 1999. All rights reserved.
Information and Training Center
Knowledge for Automation
Analog Module Addresses with S7-300
IM 256
to
270
336
to
350
352
to
366
368
to
382
304
to
318
320
to
334
272
to
286
288
to
302
(Send)
Slot 2 3 4 5 6 7 8 9 10 11
384
to
398
400
to
414
432
to
446
448
to
462
464
to
478
480
to
494
496
to
510
416
to
430
Rack 1
R
0
Power
Supply
IM
(Receive)
Power
Supply CPU
512
to
526
528
to
542
544
to
558
560
to
574
576
to
590
592
to
606
608
to
622
624
to
638
Rack 2
IM
(Receive)
Power
Supply
Rack 3 640
to
654
656
to
670
672
to
686
688
to
702
704
to
718
720
to
734
736
to
750
752
to
766
IM
(Receive)
Power
Supply
Date: 22.12.24
File: PRO1_14E.5
SIMATIC S7
Siemens AG 1999. All rights reserved.
Information and Training Center
Knowledge for Automation
Analog Module SM335 (Inputs)
Date: 22.12.24
File: PRO1_14E.6
SIMATIC S7
Siemens AG 1999. All rights reserved.
Information and Training Center
Knowledge for Automation
Analog Module SM335 (Outputs)
Date: 22.12.24
File: PRO1_14E.7
SIMATIC S7
Siemens AG 1999. All rights reserved.
Information and Training Center
Knowledge for Automation
Analog Input Module SM331
Date: 22.12.24
File: PRO1_14E.8
SIMATIC S7
Siemens AG 1999. All rights reserved.
Information and Training Center
Knowledge for Automation
Analog Value Representation and Measured Value Resolution
20
21
22
23
24
25
26
27
28
29
210
211
212
213
214
VZ
Hex.
Bit value Dec.
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Bit no. Units
Reso-
lution
in bits
+ sign
1 1
1 *
*
*
*
*
*
*
* * * * * * * *
15
* = 0 or 1
80 0
0
0
0
0
0
0
1
128 *
*
*
*
*
*
*
*
8
40
20
10
8
4
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
2
1
64
1
32
1
16
1
8
1
4
1
2
*
*
*
*
*
*
*
* *
*
*
*
*
*
*
*
* * *
*
*
*
*
*
*
*
* * * *
*
*
*
*
*
*
*
* * * * *
*
*
*
*
*
*
*
* * * * * *
*
*
*
*
*
*
*
* * * * * * *
9
10
11
12
13
14
Date: 22.12.24
File: PRO1_14E.9
SIMATIC S7
Siemens AG 1999. All rights reserved.
Information and Training Center
Knowledge for Automation
Analog Value Representation of Different Measuring Ranges
Range
Overflow
Overrange
Rated range
Underrange
Underflow
Meas.range
± 10V
Voltage
e.g.:
>= 11.759
11.7589
:
10.0004
10.00
7.50
:
-7.5
-10.00
- 10.0004
:
- 11.759
<= - 11.76
Units
32767
32511
:
27649
27648
20736
:
-20736
-27648
- 27649
:
- 32512
- 32768
Meas.range
4 .. 20mA
Current
e.g.:
>= 22.815
22.810
:
20.0005
20.000
16.000
:
:
4.000
3.9995
:
1.1852
<= 1.1845
Units
32767
32511
:
27649
27648
20736
:
:
0
- 1
:
- 4864
- 32768
Meas.range
-200...+850ºC
Temperature
e.g. Pt100
Units
32767
10000
:
8501
8500
:
:
:
-2000
- 2001
:
- 2430
- 32768
>= 1000.1
1000.0
:
850.1
850.0
:
:
:
-200.0
- 200.1
:
- 243.0
<= - 243.1
Meas.range
0...300Ohm
Resistance
e.g.:
>=352.778
352.767
:
300.011
300.000
225.000
:
:
0.000
Negative
values
not
possible
Units
32767
32511
:
27649
27648
20736
:
:
0
- 32768
- 1
:
- 4864
Date: 22.12.24
File: PRO1_14E.10
SIMATIC S7
Siemens AG 1999. All rights reserved.
Information and Training Center
Knowledge for Automation
Scaling Analog Input Values
500,0
0,0
0 27648
Date: 22.12.24
File: PRO1_14E.11
SIMATIC S7
Siemens AG 1999. All rights reserved.
Information and Training Center
Knowledge for Automation
Unscaling a Real Number for Analog Output
27648
0
0,0 100,0
Date: 22.12.24
File: PRO1_14E.12
SIMATIC S7
Siemens AG 1999. All rights reserved.
Information and Training Center
Knowledge for Automation
Analog Value Representation for the Analog Outputs
Range
Overflow
Overrange
Rated range
Underrange
Underflow
Units
>=32767
32511
:
27649
27648
:
0
:
- 6912
- 6913
:
:
:
- 27648
- 27649
:
- 32512
<=- 32513
Output ranges:
Voltage
0
11.7589
:
10.0004
10.0000
:
0
0 to 10V 1 to 5V
0
5.8794
:
5.0002
5.0000
:
1.0000
0
11.7589
:
10.0004
10.0000
:
0
:
:
:
:
:
:
:
-10.0000
- 10.0004
:
- 11.7589
0
± 10V
0
0.9999
0
0
Output ranges:
Current
0
23.515
:
20.0007
20.000
:
0
0 to 20mA 4 to 20mA
0
22.81
:
20.005
20.000
:
4.000
0
23.515
:
20.0007
20.000
:
0
:
:
:
:
:
:
:
-20.000
- 20.007
:
- 23.515
0
± 20mA
0
3.9995
0
0
Date: 22.12.24
File: PRO1_14E.13
SIMATIC S7
Siemens AG 1999. All rights reserved.
Information and Training Center
Knowledge for Automation
Exercise: Assigning Parameters to the Analog Module SM335
Date: 22.12.24
File: PRO1_14E.14
SIMATIC S7
Siemens AG 1999. All rights reserved.
Information and Training Center
Knowledge for Automation
Exercise: Assigning Parameters to the Analog Module SM331
Date: 22.12.24
File: PRO1_14E.15
SIMATIC S7
Siemens AG 1999. All rights reserved.
Information and Training Center
Knowledge for Automation
Exercise: Controlling the Level in a Tank
Level
transmitter
Min. level 50 l.
When the level falls below
this, a message is to be
output at output Q9.2
(Q 5.2).
Max. level of 600 l,
equals 10 V at
analog channel 0
Date: 22.12.24
File: PRO1_14E.16
SIMATIC S7
Siemens AG 1999. All rights reserved.
Information and Training Center
Knowledge for Automation
Exercise: Diagnostic Interrupt from an Analog Module
Analog input module
When the value measured at an analog
channel of the module exceeds the
overflow range, OB82 is called, as well
as when it re-enters the range.
Rated range
Overrange
Overflow
Task:
Output Q 9.1 (Q 5.1) is to flash as long
as one of the encoded values is in the
overflow range.
.

More Related Content

PPT
Analogue Module
PPT
Sensors And Actuators
PDF
Advanced motion controls dpranir c100a400
PDF
6 operaciones numericas
PDF
Types of Actuators and Sensors in Robotics
PDF
0900766b8002da3b
PDF
Advanced motion controls dpranir c060a400
Analogue Module
Sensors And Actuators
Advanced motion controls dpranir c100a400
6 operaciones numericas
Types of Actuators and Sensors in Robotics
0900766b8002da3b
Advanced motion controls dpranir c060a400

Similar to SIEMENS FILLING programming procedure step by step (20)

PDF
PPT
04._sensors_and_actuators.ppt Kassa presentation
PPTX
emmanuel and catherine project.pptx
PDF
Advanced motion controls dzsantu 040b080
PPT
"Empowering Motion: A Dive into Actuators"
PDF
Embedded_Systems_secondcourse_UniversitéToulouse.pdf
PDF
Advanced motion controls dpranie c100a400
PDF
Basic Controller SIMATIC S7-1200
PDF
Sensors-and-Actuators-working principle and types of sensors
PDF
Advanced motion controls dprahie 015s400
PPTX
rae_mic2_sensors_and_signals for study purposes
PPT
Sensors and actuators
PPTX
Chapter 2 - Sensors Actuators Microcontrollers.pptx
PPTX
bus system.pptx
PDF
Advanced motion controls dpranie c060a400
PDF
The iot academy_embeddedsystems_training_basicselectronicspart2
PPT
motor_2.ppt
PDF
Comparison list for Siemens S7-300, S7-400, S7-1200, S7-1500 Reference Manual
PDF
Book - Automating with SIMATIC_ Controllers, Software, Programming, Data Comm...
04._sensors_and_actuators.ppt Kassa presentation
emmanuel and catherine project.pptx
Advanced motion controls dzsantu 040b080
"Empowering Motion: A Dive into Actuators"
Embedded_Systems_secondcourse_UniversitéToulouse.pdf
Advanced motion controls dpranie c100a400
Basic Controller SIMATIC S7-1200
Sensors-and-Actuators-working principle and types of sensors
Advanced motion controls dprahie 015s400
rae_mic2_sensors_and_signals for study purposes
Sensors and actuators
Chapter 2 - Sensors Actuators Microcontrollers.pptx
bus system.pptx
Advanced motion controls dpranie c060a400
The iot academy_embeddedsystems_training_basicselectronicspart2
motor_2.ppt
Comparison list for Siemens S7-300, S7-400, S7-1200, S7-1500 Reference Manual
Book - Automating with SIMATIC_ Controllers, Software, Programming, Data Comm...
Ad

More from brendsriverasy (10)

PDF
salinity-221125015608-057f2760.pd environmental f
PDF
Fin_lecture for college of engineering depart
PPT
PLC using logic gates ppt.ppt for education
PPT
PLC Explained pp.ppt for educational purpose
PPTX
CoDeSys First Steps.pptx to programming for beginners
PPT
113 - MPS Stations.ppt presentaton for education
PPT
LOGIC GATES EXPLAINED fundamentals theory
PPT
LABVIEW create graphical software programming
PPT
Cosimir Advanced Manual 060810-Advanced.ppt
PPT
Hydraulics and Electro-Hydraulic fundamentals
salinity-221125015608-057f2760.pd environmental f
Fin_lecture for college of engineering depart
PLC using logic gates ppt.ppt for education
PLC Explained pp.ppt for educational purpose
CoDeSys First Steps.pptx to programming for beginners
113 - MPS Stations.ppt presentaton for education
LOGIC GATES EXPLAINED fundamentals theory
LABVIEW create graphical software programming
Cosimir Advanced Manual 060810-Advanced.ppt
Hydraulics and Electro-Hydraulic fundamentals
Ad

Recently uploaded (20)

PPTX
communication and presentation skills 01
PDF
null (2) bgfbg bfgb bfgb fbfg bfbgf b.pdf
PPTX
"Array and Linked List in Data Structures with Types, Operations, Implementat...
PPTX
AUTOMOTIVE ENGINE MANAGEMENT (MECHATRONICS).pptx
PPTX
6ME3A-Unit-II-Sensors and Actuators_Handouts.pptx
PPTX
Information Storage and Retrieval Techniques Unit III
PDF
PREDICTION OF DIABETES FROM ELECTRONIC HEALTH RECORDS
PDF
Abrasive, erosive and cavitation wear.pdf
PDF
A SYSTEMATIC REVIEW OF APPLICATIONS IN FRAUD DETECTION
PDF
August 2025 - Top 10 Read Articles in Network Security & Its Applications
PDF
BIO-INSPIRED ARCHITECTURE FOR PARSIMONIOUS CONVERSATIONAL INTELLIGENCE : THE ...
PDF
Improvement effect of pyrolyzed agro-food biochar on the properties of.pdf
PDF
Human-AI Collaboration: Balancing Agentic AI and Autonomy in Hybrid Systems
PPTX
ASME PCC-02 TRAINING -DESKTOP-NLE5HNP.pptx
PPTX
Chemical Technological Processes, Feasibility Study and Chemical Process Indu...
PDF
Visual Aids for Exploratory Data Analysis.pdf
PPT
Total quality management ppt for engineering students
PPTX
Management Information system : MIS-e-Business Systems.pptx
PPTX
Fundamentals of Mechanical Engineering.pptx
PPTX
Module 8- Technological and Communication Skills.pptx
communication and presentation skills 01
null (2) bgfbg bfgb bfgb fbfg bfbgf b.pdf
"Array and Linked List in Data Structures with Types, Operations, Implementat...
AUTOMOTIVE ENGINE MANAGEMENT (MECHATRONICS).pptx
6ME3A-Unit-II-Sensors and Actuators_Handouts.pptx
Information Storage and Retrieval Techniques Unit III
PREDICTION OF DIABETES FROM ELECTRONIC HEALTH RECORDS
Abrasive, erosive and cavitation wear.pdf
A SYSTEMATIC REVIEW OF APPLICATIONS IN FRAUD DETECTION
August 2025 - Top 10 Read Articles in Network Security & Its Applications
BIO-INSPIRED ARCHITECTURE FOR PARSIMONIOUS CONVERSATIONAL INTELLIGENCE : THE ...
Improvement effect of pyrolyzed agro-food biochar on the properties of.pdf
Human-AI Collaboration: Balancing Agentic AI and Autonomy in Hybrid Systems
ASME PCC-02 TRAINING -DESKTOP-NLE5HNP.pptx
Chemical Technological Processes, Feasibility Study and Chemical Process Indu...
Visual Aids for Exploratory Data Analysis.pdf
Total quality management ppt for engineering students
Management Information system : MIS-e-Business Systems.pptx
Fundamentals of Mechanical Engineering.pptx
Module 8- Technological and Communication Skills.pptx

SIEMENS FILLING programming procedure step by step

  • 1. Date: 22.12.24 File: PRO1_14E.1 SIMATIC S7 Siemens AG 1999. All rights reserved. Information and Training Center Knowledge for Automation Analog Value Processing Level transmitter High level Low level
  • 2. Date: 22.12.24 File: PRO1_14E.2 SIMATIC S7 Siemens AG 1999. All rights reserved. Information and Training Center Knowledge for Automation Use of Analog Modules Process Physical quantity Standard analog signal Sensor Transducer • Pressure • Temperature • Flow • Speed • pH value • Viscosity • etc. ± 500mV ± 1V ± 5V ± 10V ± 20mA 4...20mA etc. DAC PQW ... PQW ... ::: PQW ... Analog output module MR module ADC Result memory PIW ... PIW ... ::: PIW ... Analog input module CPU : : : : : : L PIW 352 T PQW 368 : Analog actuator Physical quantity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
  • 3. Date: 22.12.24 File: PRO1_14E.3 SIMATIC S7 Siemens AG 1999. All rights reserved. Information and Training Center Knowledge for Automation Measuring Range Module
  • 4. Date: 22.12.24 File: PRO1_14E.4 SIMATIC S7 Siemens AG 1999. All rights reserved. Information and Training Center Knowledge for Automation Analog Module Addresses with S7-300 IM 256 to 270 336 to 350 352 to 366 368 to 382 304 to 318 320 to 334 272 to 286 288 to 302 (Send) Slot 2 3 4 5 6 7 8 9 10 11 384 to 398 400 to 414 432 to 446 448 to 462 464 to 478 480 to 494 496 to 510 416 to 430 Rack 1 R 0 Power Supply IM (Receive) Power Supply CPU 512 to 526 528 to 542 544 to 558 560 to 574 576 to 590 592 to 606 608 to 622 624 to 638 Rack 2 IM (Receive) Power Supply Rack 3 640 to 654 656 to 670 672 to 686 688 to 702 704 to 718 720 to 734 736 to 750 752 to 766 IM (Receive) Power Supply
  • 5. Date: 22.12.24 File: PRO1_14E.5 SIMATIC S7 Siemens AG 1999. All rights reserved. Information and Training Center Knowledge for Automation Analog Module SM335 (Inputs)
  • 6. Date: 22.12.24 File: PRO1_14E.6 SIMATIC S7 Siemens AG 1999. All rights reserved. Information and Training Center Knowledge for Automation Analog Module SM335 (Outputs)
  • 7. Date: 22.12.24 File: PRO1_14E.7 SIMATIC S7 Siemens AG 1999. All rights reserved. Information and Training Center Knowledge for Automation Analog Input Module SM331
  • 8. Date: 22.12.24 File: PRO1_14E.8 SIMATIC S7 Siemens AG 1999. All rights reserved. Information and Training Center Knowledge for Automation Analog Value Representation and Measured Value Resolution 20 21 22 23 24 25 26 27 28 29 210 211 212 213 214 VZ Hex. Bit value Dec. 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Bit no. Units Reso- lution in bits + sign 1 1 1 * * * * * * * * * * * * * * * 15 * = 0 or 1 80 0 0 0 0 0 0 0 1 128 * * * * * * * * 8 40 20 10 8 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 1 64 1 32 1 16 1 8 1 4 1 2 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 9 10 11 12 13 14
  • 9. Date: 22.12.24 File: PRO1_14E.9 SIMATIC S7 Siemens AG 1999. All rights reserved. Information and Training Center Knowledge for Automation Analog Value Representation of Different Measuring Ranges Range Overflow Overrange Rated range Underrange Underflow Meas.range ± 10V Voltage e.g.: >= 11.759 11.7589 : 10.0004 10.00 7.50 : -7.5 -10.00 - 10.0004 : - 11.759 <= - 11.76 Units 32767 32511 : 27649 27648 20736 : -20736 -27648 - 27649 : - 32512 - 32768 Meas.range 4 .. 20mA Current e.g.: >= 22.815 22.810 : 20.0005 20.000 16.000 : : 4.000 3.9995 : 1.1852 <= 1.1845 Units 32767 32511 : 27649 27648 20736 : : 0 - 1 : - 4864 - 32768 Meas.range -200...+850ºC Temperature e.g. Pt100 Units 32767 10000 : 8501 8500 : : : -2000 - 2001 : - 2430 - 32768 >= 1000.1 1000.0 : 850.1 850.0 : : : -200.0 - 200.1 : - 243.0 <= - 243.1 Meas.range 0...300Ohm Resistance e.g.: >=352.778 352.767 : 300.011 300.000 225.000 : : 0.000 Negative values not possible Units 32767 32511 : 27649 27648 20736 : : 0 - 32768 - 1 : - 4864
  • 10. Date: 22.12.24 File: PRO1_14E.10 SIMATIC S7 Siemens AG 1999. All rights reserved. Information and Training Center Knowledge for Automation Scaling Analog Input Values 500,0 0,0 0 27648
  • 11. Date: 22.12.24 File: PRO1_14E.11 SIMATIC S7 Siemens AG 1999. All rights reserved. Information and Training Center Knowledge for Automation Unscaling a Real Number for Analog Output 27648 0 0,0 100,0
  • 12. Date: 22.12.24 File: PRO1_14E.12 SIMATIC S7 Siemens AG 1999. All rights reserved. Information and Training Center Knowledge for Automation Analog Value Representation for the Analog Outputs Range Overflow Overrange Rated range Underrange Underflow Units >=32767 32511 : 27649 27648 : 0 : - 6912 - 6913 : : : - 27648 - 27649 : - 32512 <=- 32513 Output ranges: Voltage 0 11.7589 : 10.0004 10.0000 : 0 0 to 10V 1 to 5V 0 5.8794 : 5.0002 5.0000 : 1.0000 0 11.7589 : 10.0004 10.0000 : 0 : : : : : : : -10.0000 - 10.0004 : - 11.7589 0 ± 10V 0 0.9999 0 0 Output ranges: Current 0 23.515 : 20.0007 20.000 : 0 0 to 20mA 4 to 20mA 0 22.81 : 20.005 20.000 : 4.000 0 23.515 : 20.0007 20.000 : 0 : : : : : : : -20.000 - 20.007 : - 23.515 0 ± 20mA 0 3.9995 0 0
  • 13. Date: 22.12.24 File: PRO1_14E.13 SIMATIC S7 Siemens AG 1999. All rights reserved. Information and Training Center Knowledge for Automation Exercise: Assigning Parameters to the Analog Module SM335
  • 14. Date: 22.12.24 File: PRO1_14E.14 SIMATIC S7 Siemens AG 1999. All rights reserved. Information and Training Center Knowledge for Automation Exercise: Assigning Parameters to the Analog Module SM331
  • 15. Date: 22.12.24 File: PRO1_14E.15 SIMATIC S7 Siemens AG 1999. All rights reserved. Information and Training Center Knowledge for Automation Exercise: Controlling the Level in a Tank Level transmitter Min. level 50 l. When the level falls below this, a message is to be output at output Q9.2 (Q 5.2). Max. level of 600 l, equals 10 V at analog channel 0
  • 16. Date: 22.12.24 File: PRO1_14E.16 SIMATIC S7 Siemens AG 1999. All rights reserved. Information and Training Center Knowledge for Automation Exercise: Diagnostic Interrupt from an Analog Module Analog input module When the value measured at an analog channel of the module exceeds the overflow range, OB82 is called, as well as when it re-enters the range. Rated range Overrange Overflow Task: Output Q 9.1 (Q 5.1) is to flash as long as one of the encoded values is in the overflow range. .

Editor's Notes

  • #1: Contents Page Use of Analog Modules ……............................................................................................................ 2 Measuring Range Modules .............................................................................................................. 3 Analog Module Addresses with S7-300 …....................................................................................... 4 Analog Module SM335 (Inputs) …................................................................................................... 5 Analog Module SM335 (Outputs) .................................................................................................... 6 Analog Input Module SM331 ........................................................................................................... 7 Analog Value Representation and Measured Value Resolution ....................................................... 8 Analog Value Representation of Different Measuring Ranges ....................................................... 9 Scaling Analog Input Values ......................................................................................................... 10 Unscaling a Real Number for Analog Output .................................................................................. 11 Analog Value Representation for the Analog Outputs ...................................................................... 12 Exercise: Assigning Parameters to the Analog Module SM335 ....................................................... 13 Exercise: Assigning Parameters to the Analog Module SM331 ....................................................... 14 Exercise: Controlling the Level in a Tank …………......................................................................... 15 Exercise: Diagnostic Interrupt from an Analog Module ..................................................................... 16
  • #2: Principle In a production process, there are a variety of physical quantities (pressure, temperature, speed, rotational speed, pH value, viscosity, etc.) that need to be processed in the PLC for automation purposes. Sensor Measuring sensors respond to changes in the quantity to be measured by linear expansion, angular ductability, alteration of electrical conductivity, etc. Transducer Measuring transducers convert these above-mentioned changes into standard analog signals, such as: ± 500mV, ± 10V, ± 20mA, 4...20mA. These signals are supplied to the analog input modules. ADC Before these analog values can be processed in the CPU, they must be converted to digital form. This is done by the ADC (Analog-to-Digital Converter) on the analog input module. The analog-to-digital conversion is performed sequentially, that is, the signals are converted for each analog input channel in turn. Result Memory The result of the conversion is stored in the result memory and remains there until it is overwritten by a new value. The converted analog value can be read with the Load instruction “L PIW...”. Analog Output The Transfer instruction “T PQW...” is used to write the analog values calculated by the user program to an analog output module, where a DAC (Digital-to-Analog Converter) converts them to standard analog signals. Analog Actuators with standard analog input signals can be connected to the analog output modules direct.
  • #3: Type of Measurement You set the type of measurement and the measuring range by setting coding keys on the measuring range module. Special modules without coding keys have different terminals for voltage and current measurement. Thus, the type of measurement can be set by wiring the appropriate terminal. Measuring Range The measuring range modules with their coding keys are located on the left- Module hand side of the module. You must set them correctly before installing the module. The possible settings are “A”, “B”, “C” and “D”. The settings for the various types of measurement and measuring ranges are printed on the module. Channel Groups On some modules, several channels are grouped together to form a channel group. In this case, the coding key setting applies to the whole channel group.
  • #4: Address Area The S7-300 has a special address area for analog inputs and outputs, which is separate from the process image input and output tables for the digital modules (PII/PIQ). This address area extends from byte 256 to byte 767. Each analog channel occupies 2 bytes. Access You access the analog modules by means of Load and Transfer instructions. Example: The statement “L PIW256” reads the first channel of the first module in rack 0. S7-400 On the S7-400, the address area for the analog modules starts at byte 512.
  • #5: Diagnostic Interrupt When the diagnostic interrupt is activated and a hardware fault occurs, such as a power supply failure, a diagnostic interrupt (OB 81) is triggered. As well, you must specify in the "Diagnostics" field which inputs are to be monitored. A wire break check is only possible with 4 to 20 mA power inputs. Scan Cycle Time The scan cycle time is the time it takes for the module to process ("convert") all the activated analog inputs once. The setting for the scan cycle time for A/D conversion can be between 0.5ms and 16ms. When it has processed all the analog inputs, the module can trigger a hardware interrupt (= End of Cycle interrupt) (only if a scan cycle time for conversion longer than 1ms has been selected). Note Unused inputs must be short-circuited on the hardware and "Deactivated" in the software. Deactivated analog inputs reduce the scan cycle time! Measuring Range When the type of measurement and the measuring range have been selected, Module the necessary coding key setting on the measuring range module is displayed. Example: For the measuring ranges selected in the slide above, the measuring range module must be inserted in position “C”. Resolution The analog inputs of the SM 335 have a resolution of 13 bits + sign, the analog outputs 11 bits + sign.
  • #6: Note Unused output channels must remain open on the hardware (not be short-circuited like the analog inputs) and be “deactivated” in the software.
  • #7: Parameters You can set two groups of parameters for analog input modules with the “HW Config” tool: Module as a Whole • Diagnostic Interrupt: If the “Group Diagnosis” checkbox has been activated and a diagnostic event occurs, the relevant information is entered in the diagnostics data area of the module and the diagnostic interrupt (OB82) is triggered. The analog module can detect the following diagnostic events: - Configuration/ parameter assignment errors - Wire break (if "With Wire Break Check" is activated) - Above measuring range - Below measuring range - No load voltage L+ • Hardware Interrupt when Limit Value Exceeded If the input value exceeds the range set by the entries for "Upper Limit Value" and "Lower Limit Value", the module triggers a hardware interrupt. Note: Only the first channel in a group can monitor the input value for violation of the selected limit values! Individual Inputs • Type of Measurement: When you click this box, the possible types of measurement (voltage, current...) are displayed. For unused channels or channel groups you select the "deactivated" option. You must connect these channels to chassis ground on the module • Measuring Range: When you click this box, the possible measuring ranges for the type of measurement selected are displayed. • Coding Key Setting: A very specific setting of the measuring range module becomes necessary when you select the type of measurement and the measuring range. This is displayed here. • The integration time and interference frequency suppression are interdependent (see next page).
  • #8: Representation Analog values are represented as the two's complement. The value is positive if bit No. 15=0 and negative if bit No.15=1. Resolution If the resolution of an analog module is less than 15 bits, the analog value is written into the accumulator left-justified. The unused less significant bit positions are filled with “0”s. Integration Time The resolution is specified indirectly by selecting an integration time with the “HW Config” tool. The following table for the SM331 illustrates the relationship between integration time, resolution and interference frequency suppression: Integration time Resolution Interference frequency suppression (ms) (in bits) (Hz) 2.5 9 + sign bit 400 16.6 12 + sign bit 60 20 12 + sign bit 50 100 14 + sign bit. 10 Accuracy Resolutions of between 8 and 15 bits are possible, depending on the type of module. Conversion Time The conversion time depends on the conversion procedure used in the module (integrating procedure, successive approximation). The conversion times of the different modules are given in the S7-300 manual. Example: The SM344 has a conversion time of only 5 ms for all 4 input channels.
  • #9: Voltage, Current Encoding the symmetrical voltage or current ranges (Symmetrical) • ± 80mV • ± 2.5 V • ± 3.2 mA • ± 250 mV • ± 5V • ± 10 mA • ± 500 mV • ± 10V • ± 20 mA • ± 1 V results in a rated range of -27648 to +27648. Voltage, Current Encoding the asymmetrical voltage or current ranges (Asymmetrical) • 0 to 2 V • 0 to 20 mA • 1 to 5 V • 4 to 20 mA results in a rated range of 0 to +27648. Resistance Encoding the resistance ranges • 0 to 150 Ohm • 0 to 300 Ohm • 0 to 600 Ohm results in a rated range of 0 to +27648. Temperature Temperatures are measured with resistance thermometers or thermocouples. Encoding results in a rated range of ten times the temperature range: Sensor: Temperature range: Rated range when encoded: • Pt 100 -200 to + 850 ºC -2000 to + 8500 • Ni 100 -60 to + 250 ºC -600 to + 2500 • Thermocouple type K -270 to + 1372 ºC -2700 to + 13720 • Thermocouple type N -270 to + 1300 ºC -2700 to + 13000 • Thermocouple type J -210 to + 1200 ºC -2100 to + 12000 • Thermocouple type E -270 to + 1000 ºC -2700 to + 10000.
  • #10: Example The level in a tank is to be measured in liters. The measuring transformer was chosen in such a way that 500 liters have an analog value of 10 V. Scaling The analog module encodes the analog value 10 V as the integer value 27 648. This value now has to be converted to the physical quantity “liters”. This is known as “scaling” the analog value. Program Standard block FC 105 is used for scaling analog values. FC 105 is supplied with the STEP 7 software in the library "Standard Library" in the S7 Program "TI-S7 Converting Blocks". IN The analog value at input IN can be read in from the module direct or read from a data interface in INTEGER format. LO_LIM, HI_LIM Inputs LO_LIM (low limit) and HI_LIM (high limit) are used for specifying the limits for conversion to physical quantity. In the example the reading is scaled to the range 0 to 500 liters. OUT The scaled value (physical quantity) is stored as a real number at output OUT. BIPOLAR The input BIPOLAR determines whether negative values are also to be converted. In the above example, memory bit M0.0 has a signal "0" and thus indicates that the input value is unipolar. RET_VAL The output RET_VAL has the value 0 if execution is free of errors.
  • #11: Example The user program calculates an anaolg value in the range 0 to 100.0%. This value is to be output via an analog output module. Unscaling Standard block FC106 is used for unscaling (conversion of a real number from 0 to 100.0% to a 16-bit integer between 0 and 27648). OUT The unscaled analog value at output OUT can be transferred in the form of a 16-bit integer to a data interface or to the module direct. Program FC 106 is supplied with the STEP 7 software in the library "Standard Library" in the S7 Program "TI-S7 Converting Blocks".
  • #12: Voltage, Current For symmetrical voltage or current ranges a rated range of Symmetrical -27648 to +27648 is converted to: • ± 10V • ± 20mA. Voltage, Current For asymmetrical voltage or current ranges a rated range of Asymmetrical 0 to +27648 is converted to: • 0 to 10V • 1 to 5V • 0 to 20mA • 4 to 20mA. Overflow If the value to be converted reaches the overflow range, the analog output module is disabled (0V, 0mA).
  • #13: Note Depending on which analog module is in your training unit, you are to do either this exercise or the one on the following page. Goal To get to know how to change the settings and parameters of analog modules. What to Do Change the settings of your analog module to correspond to those in the slide.
  • #14: Note Depending on which analog module is in your training unit, you are to do either this exercise or the one on the previous page. Goal To get to know how to change the settings and parameters of analog modules. What to Do Change the settings of your analog module to correspond to those in the slide.
  • #15: Task The tank has a maximum capacity of 600 liters. The level is measured using a measuring transducer. It has an analog value of 10 V when the maximum level is reached. This analog value is to be converted to a physical quantity (number of liters) using the FC 105 block. If the level goes below the minimum 50 liters, the output Q 9.2 (Q 5.2) is to flash until the level is once more 50 liters or more. The first potentiometer on the simulator specifies the level. What to Do 1. Create an FC 20 block in the S7 program "FILL" according to the task. 2. Call FC 20 in OB 1 as well. 3. Download the FC 20, FC 105 blocks and the OB1. 3. Test your program.
  • #16: Task Solve the problem shown above using the diagnostic interrupt OB82 and the diagnostics capability of the analog input module. Note If you want to specifically evaluate which channel is in the overflow range, you have to use a system function here. What to Do 1. Write a program for OB82 in the S7 program "FILL" according to the task. 2. Supplement the program in OB 1 to control the output Q 9.1 or Q 5.1. 3. Test your program.