Page 2
YOUR PARTNER IN MAINTENANCE Repair this product with RGB ELEKTRONIKA ORDER A DIAGNOSIS LINEAR ENCODERS SYSTEMS INDUSTRIAL COMPUTERS ENCODERS CONTROLS SERVO AMPLIFIERS MOTORS MACHINES OUR SERVICES POWER SUPPLIERS OPERATOR SERVO PANELS DRIVERS At our premises in Wrocław, we have a fully equipped servicing facility. Here we perform all the repair works and test each later sold unit.
Page 3
SIMATIC S5 S5-100U Programmable Controller System Manual CPU 100/102/103 EWA 4NEB 812 6120-02b Edition 04...
Page 4
STEP ® SINEC ® and SIMATIC ® are registered trademarks of Siemens AG. LINESTRA® is a registered trademark of the OSRAM Company. Subject to change without prior notice. The reproduction, transmission or use of this document or its contents is not permitted without express written authority.
Page 5
Introduction The SIMATIC S5 System Family Technical Description Installation Guidelines Start-Up and Program Tests Diagnostics and Troubleshooting Addressing Introduction to STEP 5 STEP 5 Operations Integrated Blocks and Their Functions Interrupt Processing Analog Value Processing The Integral Real-Time Clock, for CPU 103 and Higher Connecting the S5-100U to SINEC L1 Module Spectrum Function Modules...
Page 10
Contents S5-100U Page 7.4.5 Interrupt-Driven Program Processing, for CPU 103 Version 8MA02 and Higher ....... . . 7 - 29 Processing Blocks .
Page 11
S5-100U Contents Page Integrated Blocks and Their Functions ......9 - 1 Assigning Internal Functions to DB1, for CPU 103 Version 8MA03 and Higher .
Page 12
Contents S5-100U Page 11.5 Analog Output Modules ........11 - 19 11.5.1 Connection of Loads to Analog Output Modules .
Page 13
S5-100U Contents Page Connecting the S5-100U to SINEC L1, for CPU 102 and Higher ..13 - 1 13.1 Connecting the Programmable Controllers to the L1 Bus Cable ......... . 13 - 1 13.2 Setting Parameters in the Programmable Controller...
Page 17
S5-100U How to Use This System Manual How to Use This System Manual The S5-100U is a programmable controller for lower and intermediate performance ranges. It meets all the requirements for a modern programmable controller. To use this controller optimally, you need detailed information.
Page 18
How to Use This System Manual S5-100U Conventions This system manual is organized in menu form to make it easier for you to find information. This means the following: • Each chapter is marked with printed tabs. • At the front of the system manual is an overview page that lists the title of each chapter. Following this page, you will find a table of contents.
Page 19
Changes Made to the Third Edition of the S5-100U System Manual (Order Number: 6ES5 998-0UB23) The contents were updated. Training Siemens offers a wide range of training courses for SIMATIC S5 users. Contact your Siemens representative for more information. xvii EWA 4NEB 812 6120-02b...
Siemens. • The product will function correctly and safely only if it is transported, stored, set up, and installed as intended, and operated and maintained with care.
The SIMATIC S5 System Family EWA 4NEB 812 6120-02b...
Page 22
Figures Members of the SIMATIC S5 System Family ..... . 1 - 1 EWA 4NEB 812 6120-02b...
Page 24
The SIMATIC S5 System Family S5-100U The S5-100U has the following features: • Modular Design Depending on the CPU you use, the S5-100U allows you to have a maximum of 448 digital inputs and outputs. It is suitable for machine control and for process automation and monitoring on a medium scale.
Technical Description Programmable Controller Design ......2 - 1 Principle of Operation for the Programmable Controller .
Page 26
Figures The S5-100U ..........2 - 1 Functional Units of the S5-100U .
Page 28
Technical Description S5-100U Input/output modules Input/output modules transfer information between the CPU and such process peripherals as sensors, actuators, and transducers. You can use the following types of input/output modules with your S5-100U: • Digital input modules and digital output modules (4, 8, and 16/16 channel) - Use these modules for simple control tasks involving signal states “0”...
S5-100U Technical Description Principle of Operation for the Programmable Controller The remainder of this chapter explains how your S5-100U processes your program. 2.2.1 Functional Units Interrupt Process Program process System Timers Counters Flags I/O image memory I/O image data tables tables Memory operating...
Page 30
Technical Description S5-100U Program Memory (EPROM/EEPROM) In order to safely store the control program outside of your S5-100U, you must store it on an EPROM or EEPROM memory submodule (see section 4.4). Programs that are available on a memory submodule (EPROM or EEPROM) can be copied to the internal program memory (see section 4.3).
Page 31
S5-100U Technical Description Table 2-1 gives information about the number and retentive characteristics (the internal memory contents are retained/are not retained) of these timers, counters, and flags. Table 2-1. Retentive and Non-Retentive Operands Retentive Non-Retentive Operand CPU 100 to 103 CPU 100 CPU 102 CPU 103...
Technical Description S5-100U 2.2.2 Mode of Operation for the External I/O Bus The S5-100U has a serial bus for the transfer of data between the CPU and the I/O modules. This serial bus has the following characteristics: • The modular design permits optimal adaptation to the particular control task. •...
Page 33
S5-100U Technical Description Data Cycle Prior to a program scan, the external I/O bus transfers current information from the input modules to the process image input table (PII). At the same time, information contained in the process image output table (PIQ) is transferred to the output modules. Data cycle Shift Shift...
Page 34
Technical Description S5-100U Length of the Shift Register The total length of the shift register is obtained from the sum of the data bits of all plugged-in modules and of the empty slots. The check bit is not counted. You must know the length of the shift register to be able to determine the data cycle time. Data cycle time is 25 µs x number of data bits.
Page 35
S5-100U Technical Description Examples: a) CPU 100: This CPU lets you operate six digital modules (8-channel) and two analog modules (4-channel): [6 x 8+2 x (4 x 16)]=48+128<256 b) CPU 100: This CPU does not let you use three digital modules (8-channel) with three analog modules (4-channel) because the maximum permissible number of analog data bits would be exceeded: [3 x 8+3 x (4 x 16)]=24+192<256...
Page 38
Figures Mounting the PS 930 Power Supply Module ..... . . 3 - 2 Removing Bus Units ........3 - 3 Coding System to Prevent an Inadvertent Interchange of Modules .
S5-100U Installation Guidelines Installation Guidelines Installing S5-100U Components Except for the I/O module, all of the S5-100U components are mounted on standard mounting rails in accordance with DIN EN 50022-35x15. Mount the rails on a metal plate to obtain the same reference potential.
Page 44
Installation Guidelines S5-100U Installing an Interface Module 1. Hook the interface module to the standard mounting rail. 2. Swing the interface module back until the slide on the bottom snaps into place on the rail. 3. Use the ribbon cable to connect the module to the last bus unit. 4.
S5-100U Installation Guidelines 3.1.3 Cabinet Mounting Make sure that the S5-100U, the power supply, and all modules are well grounded. Mount the S5-100U on a metal plate to help prevent noise. There should be electrical continuity between the grounded enclosure and the mounting rails. Make sure that the system is bonded to earth. You can use the 8LW system or the 8LX system mounting plates (see Catalog NV 21).
Installation Guidelines S5-100U Wiring devices and/or cable duct At least 45 mm (1.77 in.) 210 mm+a (8.3 in.+a) Figure 3-6. Cabinet Mounting with a Series of Devices 3.1.4 Vertical Mounting You can also mount the standard mounting rails vertically and then attach the modules one over the other.
S5-100U Installation Guidelines Wiring 3.2.1 Connection Methods: Screw-Type Terminals and Crimp Snap-in SIGUT Screw-Type Terminal When using screw-type terminals, you can clamp two cables per terminal. It is best to use a 3.5-mm screwdriver to tighten the screws. Permissible cable cross-sections are: •...
S5-100U Installation Guidelines 3.2.3 Connecting Digital Modules All I/O modules are plugged into bus units. Connect the I/O modules to the terminal blocks of the bus units. The connections illustrated in this section are of the screw terminal type (SIGUT connection method).
Page 52
Installation Guidelines S5-100U Connecting Four-Channel Digital Modules All of these modules are designed for a two-wire connection. You can therefore wire directly to the sensor or output field device. An external distribution block is not required. The four channels of a module are numbered from .0 through .3. (Numbers .4 through .7 are only significant for the ET 100 distributed I/O system.) Each channel has a pair of terminals on the ter- minal block.
Page 53
S5-100U Installation Guidelines Connecting Four-Channel Output Modules Example: Connecting a lamp to channel 3 (address Q 1.3) on the output module in slot 1 (see Figure 3-13) DIGITAL OUTPUT 4 x 24 V DC/2 A 6ES5 440-8MA22 Lamp Figure 3-13. Two-Wire Connection of a Lamp to Channel 3 3-15 EWA 4NEB 812 6120-02b...
Page 54
Installation Guidelines S5-100U Connecting Eight-Channel Digital Modules These modules do not have a two-wire connection. You therefore need an external distribution block. The eight channels of a module are numbered from .0 through .7. One terminal on the terminal block is assigned to each channel. The terminal assignment and the connection diagram are printed on the front plate of the module.
Page 55
S5-100U Installation Guidelines Connecting Eight-Channel Output Modules The actuators must be connected to terminal 2 via the M (negative) terminal block. This does not apply to the digital output module 8× 5 to 24 V DC/0.1 A (see section 14.6.2). Example: Connecting a lamp to channel 6 (address output Q 5.6) on an output module in slot 5 (see Figure 3-15) DIGITAL OUTPUT...
Installation Guidelines S5-100U 3.2.4 Connecting the Digital Input/Output Module Use only slots 0 through 7 when you plug the module into the bus unit. Use a 40-pin cable connector with a screw-type connection or crimp snap-in connection for wiring. The module does not have a two-wire connection.
Page 57
S5-100U Installation Guidelines Example: The start address for the modules is 65.3. Inputs and outputs have the same address. A sensor is to be connected to input I 64.4 and a lamp to output Q 7.3. Figure 3-17 illustrates the wiring on the front connector. A 65.3 E 64.4 Lamp...
The PS 931 power supply module (see Chapter 14) • A Siemens load power supply from the 6EV1 series (see Appendix D) If you use load power supplies other than the recommended ones, make certain that the load voltage is in the range of 20 to 30 V (including ripple).
S5-100U Installation Guidelines 3.3.2 Electrical Configuration with External I/Os Figures 3-18, 3-19, and 3-20 display different configuration possibilities. Pay attention to the following points when you design your configuration. The numbers appearing in parentheses in the following points refer to the numbers in Figures 3-18 to 3-20. •...
Page 60
Installation Guidelines S5-100U (10) DO DO 230 V AC Figure 3-18. Configuration Possibility: S5-100U with 115/230 V AC Power Supply for Programmable Controller, Sensors, and Actuators 3-22 EWA 4NEB 812 6120-02b...
Page 61
S5-100U Installation Guidelines DO DO (10) Figure 3.19 Configuration Possibility: S5-100U with 24 V DC Power Supply (with Safe Electrical Isolation According to DIN VDE 0160) for Programmable Controller, Sensors, and Actuators 3-23 EWA 4NEB 812 6120-02b...
Page 62
Installation Guidelines S5-100U 1 µF/ Install the standard mounting 100 K 500 V AC rail electrically isolated DO DO Figure 3-20. Non-Grounded Operation; 24 V DC Power Supply (with Safe Electrical Isolation According to DIN VDE 0160) for Programmable Controller and I/Os Interference voltages are discharged to the ground conductor (PE) via a capacitor.
S5-100U Installation Guidelines 3.3.3 Non-Floating and Floating Configurations The S5-100U is powered by its own control circuit. The I/Os are powered by the load circuit. The circuits can either be connected to the same grounding point (non-floating) or galvanically isolated (floating). Example of a Non-Floating Connection of Digital Modules A 24 V DC load circuit has the same chassis grounding as the control circuit of the CPU.
Page 64
Installation Guidelines S5-100U The common chassis grounding connection makes it possible for you to use reasonably priced non- floating I/Os. These modules function according to the following principles. • Input modules - The ground line, line M (control circuit chassis) is the reference potential. A voltage drop V on line affects the input signal level V •...
Page 65
S5-100U Installation Guidelines When you have a non-floating configuration, you must make certain that the voltage drop on cables and does not exceed 1 V. If 1 V is exceeded, the reference potentials could change and the modules could malfunction. Warning If you use non-floating I/O modules, you must provide an external connection between the chassis ground of the non-floating I/O module and the chassis ground of the CPU.
Page 66
Installation Guidelines S5-100U Figure 3-24 shows a simplified schematic for the connection of floating I/O modules. • +9 V • • Data • • • Figure 3-24. A Simplified Representation of a Floating I/O Connection 3-28 EWA 4NEB 812 6120-02b...
S5-100U Installation Guidelines Wiring Arrangement, Shielding and Measures against Electromagnetic Interference This section describes the wiring arrangements for bus cables, signal cables, and power supply cables that guarantee the electromagnetic compatibility (EMC) of your installation. 3.4.1 Running Cables Inside and Outside a Cabinet Dividing the lines into the following groups and running the groups separately will help you to achieve electromagnetic compatibility (EMC).
Install these protective elements at the point where the cable enters the building. Note Lightning protection measures always require an individual assessment of the entire system. If you have any questions, please consult your local Siemens office or any company specializing in lightning protection. Grounding Make certain that you have sufficient equipotential bonding between the devices.
S5-100U Installation Guidelines 3.4.3 Equipotential Bonding Potential differences may occur between separate sections of the system if • Programmable controllers and I/Os are connected via non-floating interface modules or • Cables are shielded at both ends but grounded via different sections of the system. Potential differences may be caused, for instance, by differences in the system input voltage.
Installation Guidelines S5-100U 3.4.4 Shielding Cables Shielding is a measure to weaken (attenuate) magnetic, electric or electromagnetic interference fields. Interference currents on cable shields are discharged to ground over the shield bar which has a conductive connection to the housing. So that these interference currents do not become a source of noise in themselves, a low-resistance connection to the protective conductor is of special importance.
S5-100U Installation Guidelines Note the following when connecting the cable shield: • Use metal cable clamps for fixing the braided shield. The clamps have to enclose the shield over a large area and make good contact (see Figure 3-26). • Connect the shield to a shield bar immediately at the point where the cable enters the cabinet.
Page 72
Installation Guidelines S5-100U Mains Connection for Programmers Provide a power connection for a programmer in each cabinet. The plug must be supplied from the distribution line to which the protective ground for the cabinet is connected. Cabinet Lighting Use, for example, LINESTRA® lamps for cabinet lighting. Avoid the use of fluorescent lamps since these generate interference fields.
Start-up and Program Tests S5-100U START-UP Operating Mode • The operating system processes DB1 and accepts the parameters (see section 9.1). • Either the start-up organization block OB21 or OB22 is processed (see section 7.4.2). • The amount of time start-up requires is not limited since the scan time monitor is not activated. •...
S5-100U Start-up and Program Tests Starting Up a System The following section contains suggestions for configuring and starting up a system containing programmable controllers. 4.2.1 Suggestions for Configuring and Installing the Product A programmable controller is often used as a component in a larger system. The suggestions contained in the following warning are intended to help you safely install your programmable controller.
Start-up and Program Tests S5-100U 4.2.2 Procedures for Starting Up the Programmable Controller Table 4-1. Starting Up the Programmable Controller Prerequisites Remarks Displays Procedures System and programmable Check the mechanical assembly controller are off-load. (VDE 0100 and VDE 0160). Ter minal “M”...
S5-100U Start-up and Program Tests Loading the Program into the Programmable Controller You can load a program from a connected programmer (online operation). When you load a program, it is transferred to the programmable controller's program memory. There are specific instructions in your programmer manual for doing this.
Page 80
Start-up and Program Tests S5-100U Loading the Program Manually Manual loading copies the program from a memory submodule into the program memory of the CPU. If a back-up battery is installed, any program in the memory is completely erased. You can only load valid blocks. See section 7.5.2. Figure 4-3 shows how a program can be loaded manually.
S5-100U Start-up and Program Tests Backing Up the Program A program can be backed up only if the back-up battery is connected. Backing up copies a program from the program memory of the CPU to a memory submodule. Only valid blocks are backed up. As soon as you have changed the integral, default DB1 data block, it is a valid block that can be backed up.
Start-up and Program Tests S5-100U 4.4.2 Function of the Back-Up Battery If the power fails or the programmable controller is turned off, the contents of the internal (retentive) memory are stored only if a back-up battery is connected. When power is recovered or when the programmable controller is turned on, the following contents are available: •...
S5-100U Start-up and Program Tests Cycle trigger ontrol STATUS ogram = Q 2.0 1 1 Transfer data Figure 4-5. “STATUS" Test Function Refer to your programmer manual for information about the test function on your programmer. Direct Signal Status Display “STATUS VAR” This test function specifies the status of the operands (inputs, outputs, flags, data words, counters, or timers) at the end of program processing.
Start-up and Program Tests S5-100U Forcing Outputs, “FORCE”, for CPU 103 and Higher Outputs can be set directly to a desired status even without the control program. This enables you to control the wiring and functionality of output modules. This does not change the process I/O image table, but the output disable condition is cancelled.
S5-100U Start-up and Program Tests Search Function This function allows you to search for specific terms in the program and list them on the pro- grammer's display panel. You can perform program changes at this point. You can have search runs in the following programmer functions: •...
Page 86
Start-up and Program Tests S5-100U During the program check, you can execute the following additional test and programmable controller functions from the programmer: • Input and output (program modification possible) • Direct signal status display (STATUS VAR) • Forcing of outputs and variables (FORCE, FORCE VAR) •...
Diagnostics and Troubleshooting Indication of Errors by LEDs ......5 - 1 CPU Malfunctions .
Page 88
Figures Structured Program with an Illegal Statement ..... . 5 - 8 Addresses in the CPU’s Program Memory ......5 - 9 Calculating the Error Address .
S5-100U Diagnostics and Troubleshooting Diagnostics and Troubleshooting Indication of Errors by LEDs The programmable controller's operator panel will show you if your device is not functioning correctly (see Table 5-1). Table 5-1. Error Indication and Error Analysis Error Indication Error Analysis CPU in STOP CPU malfunction Red LED lights...
Page 90
Diagnostics and Troubleshooting S5-100U The following table shows which positions in the bit pattern are relevant for error diagnosis (gray- shaded bits). Table 5-2. ISTACK Output (Bytes 1 to 16) Abso- Syst. Da- lute ta Word Byte Addr. (SD) EA0A SD 5 EA0C SD 6...
Page 91
S5-100U Diagnostics and Troubleshooting Table 5-2. ISTACK Output (Bytes 17 to 32) [continued] Abso- Syst. Da- lute ta Word Byte Addr. (SD) 2nd nesting level EBA4 SD 210 3rd nesting level Nesting depth (0 to 6) EBA2 SD 209 1st nesting level Start address of the data block (high) EBA0 SD 208...
Diagnostics and Troubleshooting S5-100U 5.2.2 Interrupt Analysis When there is an interrupt in program processing, you can use the following table to determine the cause of the error. The CPU always goes into the STOP mode. Table 5-3. Interrupt Analysis ISTACK Byte Cause of Error...
S5-100U Diagnostics and Troubleshooting Table 5-3. Interrupt Analysis (continued) ISTACK Byte Cause of Error Remedy Display SUF* Substitution error: Change actual Function block called with an incorrect actual parameter. parameter TRAF Transfer error Eliminate program error • Data block statement programmed with a (see your programmer data word number larger than the data manual).
Diagnostics and Troubleshooting S5-100U 5.2.4 Explanation of the Mnemonics Used in “ISTACK” Table 5-5. Meaning of the Remaining ISTACK Bits ISTACK Byte Explanation Display BST SCH Shift block. SCH TAE Execute shift operation. ADR BAU Structure address list. STO ANZ PLC in STOP STO ZUS Internal control bit for STOP/RUN change...
Page 95
S5-100U Diagnostics and Troubleshooting Table 5-6. Mnemonics Used for the Interrupt Display Mnemonics Used Explanation for the Interrupt Display ANZ1/ANZ0 Condition codes for various operations (see section A.1.4) ASPFA Illegal memory submodule Battery failure ERAB First scan 0 : O( 1 : A( KE1...KE6 Nesting stack entry 1 to 6 entered for A( and O(...
Diagnostics and Troubleshooting S5-100U Program Errors 5.3.1 Locating the Error Address The SAZ (STEP address counter) in the ISTACK (bytes 25 and 26) contains the absolute address of the STEP 5 statement in the programmable controller before which the CPU went into the STOP mode.
Page 97
S5-100U Diagnostics and Troubleshooting EE00 Absolute addresses in the CPU’s internal RAM OB1 Header EE09 EE0A JU PB0 EE0B EE0C EE0D EE0E PB0 Header EE17 It is not possible to localize an error in EE18 the program on the basis of the physical EE19 address of the illegal statement.
Page 98
Diagnostics and Troubleshooting S5-100U Calculating the Address (necessary only when using the PG 605U) In order to be able to make program corrections, it is necessary to have the address of the statement that led to the fault referenced to the particular block (relative address). The faulty block is found by comparing the SAZ (STEP address counter) contents and the “DIR PC”...
S5-100U Diagnostics and Troubleshooting 5.3.2 Tracing the Program with the “BSTACK” Function Program trace with “BSTACK” is not possible on the 605U programmer. During program processing, the following information about jump operations is entered in the block stack (BSTACK): • The data block that was valid before program processing exited a block.
Diagnostics and Troubleshooting S5-100U 5.4 I/O Faults Fault Module with fault indication Check supply Power supply ok? (red LED) leads. Module addressable via - Check module the process input image Red LED lights. (exchange). (PII) and the process out- - Check program. put image (PIQ) (STA- TUS VAR, FORCE VAR) Check...
1. Set the operating mode switch to STOP. 2. Remove the battery. 3. Set the ON/OFF switch to “0”. 4. Set the ON/OFF switch to “1”. 5. Install a battery. Contact your local Siemens representative if the above measures are ineffective. 5-13 EWA 4NEB 812 6120-02b...
S5-100U Addressing Addressing The inputs and the outputs have different assigned addresses so that you can access them specifically. The I/O addresses are the same as the module slot addresses. When you mount a module in a slot on a bus unit, the module is assigned a slot number and consequently a fixed byte address in one or both process image I/O tables.
Page 106
Addressing S5-100U If the programmable controller consists of more than one tier, numbering of the expansion tiers is continued at the slot on the extreme left. Slot numbers 26 27 23 24 14 15 4 5 6 Figure 6-3. Slot Numbering in a Multi-Tier Configuration When expanding your system, always add the new bus units to the topmost tier on the right.
Page 107
S5-100U Addressing Example: Expanding from 14 to 18 slots Existing configuration 12 13 New bus units 2 3 4 5 6 Correct expansion procedure 12 13 16 17 The new bus units are added at the right. The interface module is moved correspondingly to the right.
Addressing S5-100U Digital Modules Digital modules can be plugged into all slots (0 through 31). Only two information states (“0” or “1”, OFF or ON) per channel can be transferred from or to a digital module. The memory requirement is one bit. Each channel of a digital module is displayed by a bit.
S5-100U Addressing Analog Modules You can plug analog modules only into slots 0 through 7. Transfer of 65,536 different items of information is possible per channel from or to an analog module. The memory requirement is 16 bits=2 bytes=1 word. The modules are addressed byte-by-byte or word-by-word with load or transfer operations.
Addressing S5-100U Combined Input Modules and Output Modules With these modules it is possible to write data from the control program to the module and to read in data from the module to the control program. The byte addresses in the process image input table (PII) and process image output table (PIQ) are identical.
S5-100U Addressing 6.4.2 Digital Input/Output Module, 16 Inputs, 16 Outputs, 24 V DC for All CPUs Version 8MA02 and Higher and for CPU 102, Version 8MA01, Revision 5 and Higher Plug the module only into slots 0 through 7. This module occupies the same address space as an analog module. However, only the first two of the eight reserved bytes are used.
Addressing S5-100U The Structure of Process Image Input and Output Tables Information about inputs is stored in the process image input table (PII). Information about outputs is stored in the process image output table (PIQ). The PII and the PIQ each have an area of 128 bytes in the RAM memory. The PII and the PIQ have identical structures.
Page 113
S5-100U Addressing Figure 6-7 shows a possible programmable controller configuration and storage of information in the process I/O images. Slot ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° °...
Addressing S5-100U 6.5.1 Accessing the Process Image Input Table (PII) During a data cycle, data is read into the process image input table (PII) from input modules (see section 2.2.2 - Data Cycle). This data is available to the control program for evaluation in the next program processing cycle.
S5-100U Addressing 6.5.2 Accessing the Process Image Output Table (PIQ) During a program cycle, data coming from the control program to the output modules is written into the process image output table (PIQ). The data is transferred to the output modules in the following data cycle.
Addressing S5-100U Interrupt Process Images and Time-Controlled Program Processing in OB13 for CPU 103, Version 8MA02 and Higher In the event of a time-controlled or process interrupt, the CPU does not access the I/O modules directly. The CPU stores its information in interrupt process images. •...
Page 117
S5-100U Addressing Time-Controlled Program Processing Access to the interrupt PII is expressed by the “PB” or “PW” operand identifiers in a statement in the time-controlled program. The letter “L” represents the “Load” operation (see chapter 8). Interrupt PII • Byte-by-byte reading “PB <byte address>” Example: Reading in the signal states of all channels of an 8-channel digital input module in slot 21...
Addressing S5-100U 6.6.2 Accessing the Interrupt PIQ When accessing the interrupt PIQ, the following rules apply. • Data can be written to the interrupt PIQ only within time-controlled or interrupt-driven program processing. • Data from a time-controlled or interrupt-driven program to external outputs is written during time- controlled or interrupt-driven program processing both to the “normal”...
S5-100U Addressing RAM Address Assignments The following table gives an overview of the major addresses in the RAM of the three CPUs (in hexadecimal code). Table 6-5. Important Addresses in the RAM 102* Program memory EE00 to FFFF D000 to DFFF 8000 to CFFF Memory submodule C000 to DFFF...
Page 120
Addressing S5-100U The following table gives an overview of the most important system data in the system data area. Table 6-6. System Data Area Assignment System data Chapter/ Contents word Section Reference 5 to 7 ISTACK (Interrupt STACK) 8 to 12 Integral real-time clock First free program memory address Program memory starting address...
S5-100U Introduction to Step 5 Introduction to STEP 5 This chapter explains how to program the S5-100U. It describes how to write a program, how the program is structured, the types of blocks the program uses, and the number representation of the STEP 5 programming language.
Page 124
Introduction to STEP 5 S5-100U Each method of representation has its own special characteristics. A program block that has been programmed in STL cannot necessarily be output in CSF or LAD. The three methods of graphic re- presentation are not compatible. However, programs in CSF or LAD can always be converted to STL.
S5-100U Introduction to Step 5 7.1.2 Operand Areas The STEP 5 programming language has the following operand areas: (inputs) Interfaces from the process to the programmable controller (outputs) Interfaces from the programmable controller to the process (flags) Memory for intermediate results of binary operations (data) Memory for intermediate results of digital operations (timers)
Introduction to STEP 5 S5-100U Example: Hard-Wired Control A signal lamp (H1) is supposed to light up when a normally open contact (S1) is acti- vated and a normally closed contact (S2) is not activated. Programmable Control The signal lamp is connected to an output (i.e., Q 1.0). The signal voltages of the two contacts are connected to two programmable controller inputs (i.e., I 0.0 and I 0.1).
S5-100U Introduction to Step 5 7.2.2 Structured Programming To solve complex tasks, it is advisable to divide a program into individual, self-contained program parts (blocks). This procedure has the following advantages: • Simple and clear programming, even for large programs •...
Page 128
Introduction to STEP 5 S5-100U The program uses block calls to exit one block and jump to another. You can therefore nest pro- gram, function, and sequence blocks randomly up to 16 levels (see section 7.3). Nesting can be up to 32 levels for CPU 103 version 8MA03.
S5-100U Introduction to STEP 5 Block Types The following table lists the most important characteristics of the individual block types: Table 7-2. Comparison of Block Types Number CPU 100 OB0 to OB63 PB0 to PB63 FB0 to FB63 DB2 to DB63 Number CPU 102 OB0 to OB63...
Page 130
Introduction to STEP 5 S5-100U Block Structure Each block consists of the following parts: • The block header that specifies the block type, number, and length Generated by the programmer when it transforms the block • The block body that has the STEP 5 program or data Synchronization Absolute pattern...
S5-100U Introduction to STEP 5 7.3.1 Organization Blocks Organization blocks (OB) form the interface between the operating system and the control program. Organization blocks are handled in one of the following three ways: • Organization block OB1 is called cyclically by the operating system. •...
Page 132
Introduction to STEP 5 S5-100U Figure 7-4 shows how to set up a structured control program. It also illustrates the significance of organization blocks. OB21/OB22 SB1* FB61 System program Control program For CPU 103 and higher Figure 7-4. Example of Organization Block Use 7-10 EWA 4NEB 812 6120-02b...
S5-100U Introduction to STEP 5 7.3.2 Program Blocks Self-contained program parts are programmed in program blocks (PB). Special feature: Control functions can be represented graphically in program blocks. Call Block calls JU and JC activate program blocks. You can program these operations in all block types except data blocks.
Page 134
Introduction to STEP 5 S5-100U Block Header Besides the block header, function blocks have organizational information that other blocks do not have. A function block's memory requirements consist of the following: • Block header (five words) as for other blocks •...
Page 135
S5-100U Introduction to STEP 5 hen assigning parameters, enter all block parameter specifications. Block header Name NAME: EXAMPLE DES: IN 1 Block parameter DES: IN 2 Name Block parameter DES: OUT 1 Q BI Data type Parameter type : A = IN 1 : A = IN 2 Control program...
Page 136
Introduction to STEP 5 S5-100U Table 7-4. Block Parameter Types and Data Types with Permissible Actual Parameters, for CPU 103 and Higher Parameter Data Type Permissible Actual Parameters Type I, Q for an operand with bit address x.y Inputs x.y Outputs x.y Flags for an operand with byte address Input bytes...
Page 137
S5-100U Introduction to STEP 5 A function block call consists of the following parts: • Call statement - JU unconditional call ( J ump U nconditional) - JC call if RLO = 1 ( J ump C onditional) • Parameter list (only if block parameters were defined in the FB) Function blocks can be called only if they have been programmed.
Introduction to STEP 5 S5-100U Executed program PB 3 FB 5 NAME : EXAMPLE DES: X1 I DES: X2 I DES: X3 Q BI : JU : A = X1 First call NAME : EXAMPLE : A = X2 : = = X3 : I 0.0 I 0.0 Parameter list...
Page 139
S5-100U Introduction to STEP 5 Programming Data Blocks Begin programming a data block by specifying a block number between 2 and 63 for CPU 100 or CPU 102, and between 2 and 255 for CPU 103. DB0 is reserved for the operating system, DB1 for setting parameters for internal functions (see section 9.1).
Introduction to STEP 5 S5-100U Program Processing Some of the organization blocks (OBs) are responsible for structuring and managing the control program. These OBS can be grouped according to the following assignments: • OBs for START-UP program processing • One OB for cyclic program processing •...
S5-100U Introduction to STEP 5 7.4.1 Program Processing with CPU 102 You can process the program in the following two modes: • Normal mode • Test mode Program processing is faster in the normal mode, but you can not use the STATUS test function. Transferring from one mode to the other is called a mode change.
Page 142
Introduction to STEP 5 S5-100U Special Features of the Normal Mode Significance of the Memory Submodule Normal mode is only possible if the memory submodule is plugged in. This submodule contains only the STEP 5 program. The CPU RAM contains the STEP 5 program and the compiled program to be processed. Program Change You can enter, modify, or erase PBs, OBs and FBs only in the test mode.
Page 143
S5-100U Introduction to STEP 5 Mode Change Load program Load program Back up program (manual) (automatic) (without PG) 1. Turn off the PLC Battery required 1. Reset the PLC 2. Plug in memory sub- 1. Turn off the PLC 2. Turn off the PLC module 2.
Page 144
Introduction to STEP 5 S5-100U Determining the Processing Mode in the ISTACK Byte KEIN Figure 7-11. Display of the Processing Mode in the ISTACK You can use a programmer to check the current processing mode in the ISTACK. The ISTACK display, byte 6, is possible in RUN and STOP (see section 5.2).
Page 145
S5-100U Introduction to STEP 5 Further Reduction in the Execution Time in Normal Mode Logic operations executed in one input byte, output byte, or flag byte require only 2 µs per logic operation. Program your control according to example 2. Example 1: Example 2: Time/ µs...
Introduction to STEP 5 S5-100U 7.4.2 START-UP Program Processing In the START-UP mode, the operating system of the CPU automatically calls up a start-up OB if the OB has been programmed. • OB21 is called up for a manual cold restart. •...
Page 147
S5-100U Introduction to STEP 5 The following two examples show you how you can program a start-up OB. Example 1: Programming OB22 Explanation Example After power recovery, you A 5 s time value is loaded in want to be sure that the power ACCU 1.
Introduction to STEP 5 S5-100U 7.4.3 Cyclic Program Processing The operating system calls OB1 cyclically. If you want to have structured programming, you should program only jump operations (block calls) in OB1. The blocks you call up, PBs, Cycle trigger FBs, and SBs, should contain completed functional units in order to provide a clearer overview.
Page 149
S5-100U Introduction to STEP 5 Response Time Response time t is defined as the time between a change in the input signal and the subsequent change in the output signal. Prerequisites for the following information: • No interrupts are running. •...
Introduction to STEP 5 S5-100U 7.4.4 Time-Controlled Program Processing, for CPU 103 Version 8MA02 and Higher Time-controlled program processing can be defined as a (periodic) time signal causing the CPU to interrupt cyclic program processing to process a specific program. Once this program has been processed, the CPU returns to the interruption point in the cyclic program and resumes processing.
S5-100U Introduction to STEP 5 • Saving data If a time-controlled OB uses scratchpad flags that are also used in the cyclic control program, then these scratchpad flags must be saved in a data block during the processing of the time- controlled OB.
Introduction to STEP 5 S5-100U Processing Blocks Earlier sections in this chapter described how to use blocks. Chapter 8 introduces all of the operations required to work with blocks. You can change any block that has been programmed. The following sections will deal only briefly with the different ways you can change blocks. Refer to the operator‘s guide for your programmer for more detailed information on changing blocks.
S5-100U Introduction to STEP 5 You can use the COMPRESS programmer function to clean up internal program memory. If there is a power failure during the compress operation when a block is being shifted and block shifting can not be completed, the CPU remains in the STOP mode. The “NINEU” error message appears.
Page 154
Introduction to STEP 5 S5-100U You can work with binary-coded decimals to program timers and counters in the decimal system. BCD tetrads are defined in the range of 0 to 9. Example: 12-bit timer or counter value in BCD and decimal formats Word No.
Page 155
S5-100U Introduction to STEP 5 You can use the “LC” operation to convert a binary number to a BCD number for timers and counters. Example: Comparing a count in counter 1 with decimal number 499 The comparison value must be stored in the accunulator by means of a load operation.
S5-100U STEP 5 Operations STEP 5 Operations The STEP 5 programming language has the following three operation types: • Basic Operations include functions that can be executed in organization, program, sequence, and function blocks. Except for the addition (+F), subtraction (-F), and organizational ope- rations, the basic operations can be input and output in the statement list (STL), control system flowchart (CSF), or ladder diagram (LAD) methods of representation.
STEP 5 Operations S5-100U 8.1.1 Boolean Logic Operations Table 8-1 provides an overview of Boolean logic operations. Examples follow the table. Table 8-1. Overview of Boolean Logic Operations Operation Operand Meaning Combine AND operations through logic OR Combine the result of the next AND logic operation (RLO) with the previous RLO through logic OR.
Page 161
S5-100U STEP 5 Operations AND Operation The AND operation scans to see if various conditions are satisfied simultaneously. Example Circuit Diagram Output Q 1.0 is “1” when all three inputs are “1”. I 0. 0 The output is “0” if at least one input is “0”. The number of scans and the sequence of the logic I 0.1 statements are at random.
Page 162
STEP 5 Operations S5-100U AND before OR Operation Example Circuit Diagram Output Q 1.0 is “1” when at least one AND condition has been satisfied. I 0.0 I 0.2 Output Q 1.0 is “0” when neither of the two AND conditions has been satisfied.
Page 163
S5-100U STEP 5 Operations OR before AND Operation Example Circuit Diagram Output Q 1.0 is “1” when one of the following conditions has been satisfied: I 0.0 I 0.2 I 0.3 • Input I 0.0 is “1”. • Input I 0.1 and either input I 0.2 or I 0.3 is “1”. I 0.1 Output Q 1.0 is “0”...
Page 164
STEP 5 Operations S5-100U OR before AND Operation Example Circuit Diagram Output Q 1.0 is “1” when both OR conditions have been satisfied. I 0.0 I 0.1 Output Q 1.0 is “0” when at least one OR condition has not been satisfied.
S5-100U STEP 5 Operations 8.1.2 Set/Reset Operations Set/reset operations store the result of logic operation (RLO) formed in the processor. The stored RLO represents the signal state of the addressed operand. Storage can be dynamic (assignment) or static (set and reset). Table 8-2 provides an overview of the set/reset operations. Examples follow the table.
Page 166
STEP 5 Operations S5-100U Flip-Flop for a Latching Signal Output (reset dominant) Example Circuit Diagram A “1” at input I 0.1 sets flip-flop Q 1.0 (signal state “1”). If the signal state at input I 0.1 changes to “0”, the state of output Q 1.0 is maintained, i.e., the signal is latched.
Page 167
S5-100U STEP 5 Operations RS Flip-Flop with Flags (set dominant) Example Circuit Diagram A “1” at input I 0.0 sets flip-flop F 1.7 (signal state “1”). If the signal state at input I 0.0 changes to “0”, the state of flag F 1.7 is maintained, i.e., the signal is latched.
STEP 5 Operations S5-100U 8.1.3 Load and Transfer Operations Use load and transfer operations to do the following tasks. • Exchange information between various operand areas • Prepare time and count values for further processing • Load constants for program processing Information flows indirectly via accumulators (ACCU 1 and ACCU 2).
Page 169
S5-100U STEP 5 Operations Table 8-3. Overview of Load and Transfer Operations Opera- Operand Meaning tion Load The operand contents are copied into ACCU 1 regardless of the RLO. The RLO is not affected. Transfer The contents of ACCU 1 are assigned to an operand regardless of the RLO.
Page 170
STEP 5 Operations S5-100U Load Operation During loading, information is copied from a memory area, e.g., from the PII, into ACCU 1. The previous contents of ACCU 1 are shifted to ACCU 2. The original contents of ACCU 2 are lost. Example: Two consecutive bytes (IB7 and IB8) are loaded from the PII into the accumulator.
Page 171
S5-100U STEP 5 Operations Loading and Transferring a Time (See also Timer and Counter Operations) Example Representation During graphic input, QW62 is assigned to output BI of a timer. The programmer automatically stores the corresponding load and transfer operation in the control program.
Page 172
STEP 5 Operations S5-100U Loading and Transferring a Time (Coded) Example Representation The contents of the memory location addressed with T 10 are loaded into the accumulator in BCD code. Then a transfer operation transfers the accumulator T 10 contents to the process image memory location Load addressed by QW50.
S5-100U STEP 5 Operations 8.1.4 Timer Operations The program uses timer operations to implement and monitor chronological sequences. Table 8-4 provides an overview of timer operations. Examples follow the table. Table 8-4. Overview of Timer Operations Operation Operand Meaning Pulse Timer The timer is started on the leading edge of the RLO.
Page 174
STEP 5 Operations S5-100U Loading a Time Timer operations call internal timers. When a timer operation is started, the word in ACCU 1 is used as a time value. You must therefore first specify time values in the accumulator. You can load a timer with any of the following data types: constant time value data word input word...
Page 175
S5-100U STEP 5 Operations Example: KT 40.2 corresponds to 40 x 1 s. Tolerance: The time tolerance is equivalent to the time base. Examples Operand Time Interval KT 400.1 400 x 0.1 s - 0.1 s 39.9 s to 40 s Possible settings for KT 40.2...
Page 176
STEP 5 Operations S5-100U Output of the Current Time You can use a load operation to put the current time into ACCU 1 and process it further from there (see Figure 8-4). Use the “Load in BCD” operation for digital display output. Current time in T1 L T1 LD T1...
Page 177
S5-100U STEP 5 Operations Starting a timer In the programmable controller, timers run asynchronously to program scanning. The time that has been set can run out during a program scanning cycle. It is evaluated by the next time scan. In the worst case, an entire program scanning cycle can go by before this evaluation.
Page 178
STEP 5 Operations S5-100U Pulse Example: Output Q 1.0 is set when the signal state at input I 0.0 changes from “0” to “1”. However, the output should not remain set longer than 5 s. Timing Diagram Circuit Diagram Signal states I 0.0 I 0.0 Q 1.0...
Page 179
S5-100U STEP 5 Operations Extended pulse Example: Output Q 1.0 is set for a specific time when the signal at input I 0.0 changes to “1”. The time is indicated in IW16. Timing Diagram Circuit Diagram Signal states I 0.0 I 0.0 Q 1.0 Time...
Page 180
STEP 5 Operations S5-100U On-Delay Example: Output Q 1.0 is set 9 s after input I 0.0 and remains set as long as the input carries signal “1”. Timing Diagram Circuit Diagram Signal states I 0.0 I 0.0 Q 1.0 Time in s Q 1.0 900.0...
Page 181
S5-100U STEP 5 Operations Stored On-Delay and Reset Example: Output Q 1.0 is set 5 s after I 0.0. Further changes in the signal state at input I 0.0 do not affect the output. Input I 0.1 resets timer T 4 to its initial value and sets output Q 1.0 to zero. Timing Diagram Circuit Diagram Signal states...
Page 182
STEP 5 Operations S5-100U Off-Delay Example: When input I 0.0 is reset, output Q 1.0 is set to zero after a certain delay (t). The value in FW14 specifies the delay time. Timing Diagram Circuit Diagram Signal states I 0.0 I 0.0 Q 1.0 Time in s...
S5-100U STEP 5 Operations 8.1.5 Counter Operations The programmable controller uses counter operations to handle counting jobs. Counters can count up and down. The counting range is from 0 to 999 (three decades). Table 8-5 provides an overview of the counter operations. Examples follow the table. Table 8-5.
Page 184
STEP 5 Operations S5-100U Loading a Constant Count The following example shows how the count 38 is loaded. Operation Operand L KC Count (0 to 999) Loading a Count as an Input, Output, Flag, or Data Word Load statement: The count 410 is stored in data word DW3 in BCD code. Bits 12 to 15 are insignificant for the count.
Page 185
S5-100U STEP 5 Operations Outputting the Current Counter Status You can use a load operation to put the current counter status into ACCU 1 and process it further from there. The “Load in BCD” operation outputs a digital display (see Figure 8-5). Current Counter Status in C2 L C2 LD C2...
Page 186
STEP 5 Operations S5-100U Setting a Counter “S” and Counting Down “CD” Example: When input I 0.1 is switched on (set), counter 1 is set to count 7. Output Q 1.0 is now “1”. Every time input I 0.0 is switched on (count down), the count is decremented by 1. The output is set to “0”...
Page 187
S5-100U STEP 5 Operations Resetting a Counter “R” and Counting Up “CU” Example: When input I 0.0 is switched on, the count in counter 1 is incremented by 1. As long as a second input (I 0.1) is “1”, the count is reset to “0”. The A C 1 operation results in signal state “1”...
STEP 5 Operations S5-100U 8.1.6 Comparison Operations Comparison operations compare the contents of the two accumulators. The comparison does not change the accumulators' contents. Table 8-6 provides an overview of the comparison operations. An example follows the table. Table 8-6. Overview of Comparison Operations Operation Operand Meaning...
S5-100U STEP 5 Operations Example: The values of input bytes IB19 and IB20 are compared. If they are equal, output Q 1.0 is set. Circuit Diagram CSF/LAD IB19 IB20 IB19 Q 1.0 IB20 Q 1.0 8.1.7 Arithmetic Operations Arithmetic operations interpret the contents of the accumulators as fixed-point numbers and manipulate them.
Page 190
STEP 5 Operations S5-100U Processing an Arithmetic Operation Before an arithmetic operation is executed, both operands must be loaded into the accumulators. Note When using arithmetic operations, make sure the operands have the same number format. Arithmetic operations are executed independently of the RLO. The result is available in ACCU 1 for further processing.
S5-100U STEP 5 Operations 8.1.8 Block Call Operations Block call operations specify the sequence of a structured program. Table 8-8 provides an overview of the block call operations. Examples follow the table. Table 8-8. Overview of Block Call Operations Operation Operand Meaning Jump unconditionally...
Page 192
STEP 5 Operations S5-100U Unconditional Block Call “JU” One block is called within another block, regardless of conditions. Example: A special function has been programmed in FB26. It is called at several locations in the program, e.g., in PB63, and processed. Program Sequence Explanation The “JU FB26”...
Page 193
S5-100U STEP 5 Operations Call a Data Block “C DB” Data blocks are always called unconditionally. All data processed following the call refers to the data block that has been called. This operation cannot generate new data blocks. Blocks that are called must be programmed or created before program scanning.
Page 194
STEP 5 Operations S5-100U Generating a Data Block Example Explanation Generate a data block with 128 data The constant fixed-point number KF + 127 words without the aid of a pro- +127 is loaded into ACCU 1. At grammer. the same time, the old contents of ACCU 1 are shifted to ACCU 2.
Page 195
S5-100U STEP 5 Operations Block End “BE” The “BE” operation terminates a block. Data blocks do not need to be terminated. “BE” is always the last statement in a block. In structured programming, program scanning jumps back to the block where the call for the current block was made.
STEP 5 Operations S5-100U Conditional Block End “BEC” The “BEC” operation causes a return within a block if the previous condition has been satisfied (RLO = 1). Otherwise, linear program scanning is continued with RLO “1”. Example: Scanning of program block FB20 is terminated if the RLO = “1”. Program Sequence Explanation FB20...
S5-100U STEP 5 Operations STOP Operation The “STP” operation puts the programmable controller into the STOP mode. This can be desirable for time-critical system circumstances or when a programmable controller error occurs. After the statement is processed, the control program is scanned to the end, regardless of the RLO. Afterwards the programmable controller goes into the STOP mode with the error ID “STS”.
STEP 5 Operations S5-100U 8.2.1 Load Operation, for CPU 103 and Higher As with the basic load operations, the supplementary load operation copies information into the accumulator. Table 8-10 explains the load operation. An example follows the table. Table 8-10. Load Operation Operation Operand Meaning...
S5-100U STEP 5 Operations 8.2.2 Enable Operation, for CPU 103 and Higher You can use the enable operation (FR) to execute the following operations even without an edge change. • Start a timer • Set a counter • Count up and down Table 8-11 presents the enable operation.
STEP 5 Operations S5-100U 8.2.3 Bit Test Operations, for CPU 103 and Higher Bit test operations scan digital operands bit by bit and affect them. Bit test operations must always be at the beginning of a logic operation. Table 8-12 provides an overview of these operations. Table 8-12.
Page 201
S5-100U STEP 5 Operations Example Explanation A photoelectric barrier that counts Call data block 10. piece goods is installed at input I 0.0. After every 100 pieces, the Input I 0.1 loads the count of program is to jump to FB5 or FB6. counter 10 with the constant 0.
STEP 5 Operations S5-100U 8.2.4 Digital Logic Operations Digital logic operations combine the contents of both accumulators logically bit by bit. Table 8-14 provides an overview of these digital logic operations. Examples follow the table. Table 8-14. Overview of Digital Logic Operations Operation Operand Meaning...
Page 203
S5-100U STEP 5 Operations The result of the arithmetic operation is available in ACCU 1 for further processing. The contents of ACCU 2 are not affected. Explanation Load input word IW92 into ACCU 1. IW 92 Load a constant into ACCU 1. The previous contents of ACCU 1 are shifted KH 00FF to ACCU 2.
Page 204
STEP 5 Operations S5-100U Explanation Load input word IW36 into ACCU 1. IW 36 Load a constant into ACCU 1. The previous contents of ACCU 1 are shifted KH 00FF to ACCU 2. Combine the contents of both accumulators bit by bit through logic OR. Transfer the result (contents of ACCU 1) to input word IW36.
Page 205
S5-100U STEP 5 Operations Explanation Load input word IW70 into ACCU 1. IW 70 Load input word IW6 into ACCU 1. The previous contents of ACCU 1 are IW 6 shifted to ACCU 2. Combine the contents of both accumulators bit by bit through logic EXCLUSIVE OR.
STEP 5 Operations S5-100U 8.2.5 Shift Operations Shift operations shift a bit pattern in ACCU 1. The contents of ACCU 2 are not affected. Shifting multiplies or divides the contents of ACCU 1 by powers of two. Table 8-15 provides an overview of the shift operations.
Page 207
S5-100U STEP 5 Operations Explanation Load the contents of data word DW2 into ACCU 1. DW 2 Shift the bit pattern in ACCU 1 three positions to the left. SLW 3 Transfer the result (contents of ACCU 1) to data word DW3. DW 3 Numeric Example (DW2)
STEP 5 Operations S5-100U 8.2.6 Conversion Operations Conversion operations convert the values in ACCU 1. Table 8-16 provides an overview of the conversion operations. Examples follow the table. Table 8-16. Overview of Conversion Operations Operation Operand Meaning One's complement The contents of ACCU 1 are inverted bit by bit. Two's complement The contents of ACCU 1 are inverted bit by bit.
Page 209
S5-100U STEP 5 Operations Explanation Load the contents of input word IW12 into ACCU 1. IW 12 Invert all bits and add a “1”. Transfer the altered word to data word DW100. DW 100 Numeric Example Form the negative value of the value IW12 in input word IW12.
STEP 5 Operations S5-100U 8.2.7 Decrement/Increment, for CPU 103 and Higher The decrement/increment operations change the data loaded into ACCU 1. Table 8-17 provides an overview of the decrement/increment operations. An example follows the table. Table 8-17. Decrement/Increment Operations Operation Operand Meaning Decrement...
S5-100U STEP 5 Operations 8.2.8 Disable/Enable Interrupt, for CPU 103 Version 8MA02 and Higher The disable/enable interrupt operations affect interrupt-driven and time-controlled program scanning. They prevent process or time interrupts from interfering with the processing of a sequence of state- ments or blocks.
STEP 5 Operations S5-100U 8.2.9 “DO” Operation, for CPU 103 and Higher Use the “DO” operation to process STEP 5 statements as indexed operations. This allows you to change the parameter of an operand during control program processing (see Table 8-19). Table 8-19.
Page 213
S5-100U STEP 5 Operations Figure 8-6 shows how the contents of a data word determine the parameter of the next statement. Actual program :DO DW DW 12 KH = 0108 DW 13 KH = 0001 :DO DW :FR T :FR T Figure 8-6.
STEP 5 Operations S5-100U 8.2.10 Jump Operations Table 8.20 provides an overview of the jump operations. An example follows the table. Table 8-20. Overview of Jump Operations Operation Operand Meaning JU = Jump unconditionally The unconditional jump is executed independently of conditions. Jump conditionally The conditional jump is executed if the RLO is “1”.
Page 215
S5-100U STEP 5 Operations Processing Jump Operations A symbolic jump destination (jump label) must always be entered next to a jump operation. This jump label can have up to four characters. The first character must be a letter of the alphabet. When programming, please be aware of the following items: •...
STEP 5 Operations S5-100U 8.2.11 Substitution Operations, for CPU 103 and Higher If you plan to process a program with various operands and without a lot of changes, it is advisable to assign parameters to individual operands (see section 7.3.4). If you have to change the ope- rands, you only need to reassign the parameters in the function block call.
Page 217
S5-100U STEP 5 Operations Set/Reset Operations Table 8-22 provides an overview of the set/reset operations. An example follows the table. Table 8-22. Overview of Set/Reset Operations Operation Operand Meaning Set a formal operand (binary). RB = Reset a formal operand (binary). Assign The RLO is assigned to a formal operand.
Page 218
STEP 5 Operations S5-100U Load and Transfer Operations Table 8-23 lists the various load and transfer operations. An example follows the table. Table 8-23. Overview of Load and Transfer Operations Operation Operand Meaning Load a formal operand. Load a formal operand in BCD code. LW = Load the bit pattern of a formal operand.
Page 219
S5-100U STEP 5 Operations Timer and Counter Operations Table 8-24 provides an overview of timer and counter operations. Examples follow the table. Table 8-24. Overview of Timer and Counter Operations Operation Operand Meaning Enable a formal operand for a cold restart. (For a description, see “FT”...
Page 220
STEP 5 Operations S5-100U The following examples show how to work with timer and counter operations: Example 1: Function Block Call Program in Function Block (FB32) Executed Program =I 5 FB 32 =I 6 NAME :TIME 005.2 I 0.0 :SFD =TIM5 I 0.1 =I 5...
Page 221
S5-100U STEP 5 Operations “DO” Operation Table 8-25 and the example that follows explain the processing operation. Table 8-25. “DO” Operation Operation Operand Meaning DO = Process formal operand The substituted blocks are called unconditionally. Parameter Data Formal operands Actual operands permitted type type DB, PB, SB, FB...
STEP 5 Operations S5-100U System Operations, for CPU 103 and Higher System operations and supplementary operations have the following limitations: • You can program them only in function blocks. • You can program them only in the STL method of representation. Since system operations access system data, only users with system knowledge should use them.
Page 223
S5-100U STEP 5 Operations Table 8-27. Overview of Load and Transfer Operations Operation Operand Meaning Load the register indirectly The contents of a memory word are loaded into the specified register (ACCU 1, 2). The address is in ACCU 1. Transfer the register indirectly The contents of the indicated register are transferred to a memory location.
Page 224
STEP 5 Operations S5-100U Processing a Field Transfer A field transfer is processed independently of the RLO. The parameter indicates the length of the data field (in bytes) that is to be transferred. The field can be up to 255 bytes long. The address of the source field is in ACCU 2.
S5-100U STEP 5 Operations Transferring to the System Data Area Example: Set the scan monitoring time to 100 ms after each mode change from “STOP” to “RUN”. You can program this time in multiples of 10 ms in system data word 96. The following function block can be called from OB21, for example.
STEP 5 Operations S5-100U Example Explanation Decrement the constant 1020 by 33 The constant 1020 is loaded into 1020 and store the result in flag word ACCU 1. FW28. Afterwards add the constant The constant -33 is added to 256 to the result and store the sum in the ACCU contents.
S5-100U STEP 5 Operations Condition Code Generation The processor of the programmable controller has the following three condition codes: • CC 0 • CC 1 • OV (overflow) The following operations affect the condition codes. • Comparison operations • Arithmetic operations •...
Page 228
STEP 5 Operations S5-100U Condition Code Generation for Digital Logic Operations Digital logic operations set CC 0 and CC 1. They do not affect the overflow condition code (see Table 8-32). The setting depends on the contents of the ACCU after the operation has been pro- cessed.
S5-100U STEP 5 Operations Sample Programs Sections 8.5.1 through 8.5.3 provide a few sample programs that you can enter and test in all three methods of representation on a programmer. 8.5.1 Momentary-Contact Relay/Edge Evaluation Example Circuit Diagram On each leading edge of the signal at input I 0.0, the AND condition “A I 0.0 and AN F 64.0”...
Page 230
STEP 5 Operations S5-100U Timing Diagram Circuit Diagram Signal states I 0.0 I 0.0 Q 1.0 Q 1.0 Time I 0.0 & I 0.0 F 1.0 F 1.1 F 1.0 F 1.1 F 1.0 F 1.1 F 1.0 F 1.1 I 0.0 I 0.0 NOP 0...
S5-100U STEP 5 Operations 8.5.3 Clock/Clock-Pulse Generator This subsection describes how to program a clock-pulse generator. Example: A clock-pulse generator can be implemented using a self-clocking timer that is followed in the circuit by a binary scaler. Flag F 2.0 restarts timer T 7 each time it runs down, i.e., flag F 2.0 is “1”...
Integrated Blocks and Their Functions Assigning Internal Functions to DB1, for CPU 103 Version 8MA03 and Higher ....9.1.1 Configuration and Default Settings for DB1 .
Page 234
Figures DB1 with Default Parameters ........Inputting the Address for the Parameter Error Code .
S5-100U Integrated Blocks and Their Functions Integrated Blocks and Their Functions Assigning Internal Functions to DB1, for CPU 103 Version 8MA03 and Higher You can program the following CPU functions: • Using the integral real-time clock (see chapter 12) • Exchanging data via SINEC L1 (see chapter 13) •...
Integrated Blocks and Their Functions S5-100U The parameter blocks listed in Table 9-1 are used for the S5-100U. Table 9-1. Parameter Blocks and Their IDs Block ID Explanation/Default Setting Start ID 'DB1 '; S INEC L1 : Parameter block for SINEC L1 configuration / 'SL1: (see chapter 13) Cl ock- P arameters: Parameter block for integral time clock/...
Page 237
S5-100U Integrated Blocks and Their Functions To help find parameter errors more easily and to help correct them, you can ask the programmable controller to output error messages in a coded form All you have to do is to tell the programmable controller where it should store the error code.
Integrated Blocks and Their Functions S5-100U 9.1.3 Assigning Parameters in DB1 As discussed in section 9.1.2, you use the following steps to change or expand the preset values of DB1: 1. Display the default DB1, with its parameter block “ERT:” on the programmer. 2.
Page 239
S5-100U Integrated Blocks and Their Functions In the following section are the rules for changing or expanding entire parameter blocks. Follow these steps or the CPU will not understand what you have entered. 1. Enter the start ID “DB1”, followed by a filler. DB1 must begin with the start ID “DB1”...
Integrated Blocks and Their Functions S5-100U The preceding steps present the minimal requirements for setting the parameters Beyond that, there are additional rules that make it easier for you to assign parameters. For example: • You have the ability to add comments. •...
Page 241
S5-100U Integrated Blocks and Their Functions Example: You entered the start address DB3 DW0 in parameter block “ERT:”. The parameters set in DB1 have already been transferred to the programmable controller. Then you continue to set parameters in DB1. While attempting to transfer the changed DB1 parameters to the programmable controller, you find out that the programmable controller remains in the STOP mode.
Page 242
Integrated Blocks and Their Functions S5-100U Locating Parameter Errors in “ISTACK” If the CPU recognizes an error in DB1 in the initial start-up, then the CPU remains in the STOP mode and stores a message in “ISTACK” describing where the error happened. The “ISTACK” contains the absolute error address as well as the relative error address The STEP Address Counter (SAC) in the ISTACK points either to the address that contains the incorrect input or in front of the address that contains the incorrect input.
S5-100U Integrated Blocks and Their Functions 9.1.6 Transferring DB1 Parameters to the Programmable Controller Unlike other data blocks, DB1 is processed only one time. This occurs when a cold restart is performed on the programmable controller. This was done so that DB1 could handle certain special functions.
Integrated Blocks and Their Functions S5-100U 9.1.7 Reference Guide for Setting Parameters in DB1 Parameter Argument Meaning Block ID: SL1: SINEC L1 (SL1) Slave number DBx DWy Location of Send Mailbox DBxDWy Location of Receive Mailbox Location of Coordination Byte “Receive” Location of Coordination Byte “Send”...
S5-100U Integrated Blocks and Their Functions 9.1.8 Defining System Characteristics in DB1 Each cyclical program processing triggers the beginning of a monitoring period. If the cycle trigger is not retriggered during the monitoring period, the programmable controller is forced into the STOP mode and disables the output modules.
Integrated Blocks and Their Functions S5-100U 9.2.1 Code Converter : B4 - FB240 - Use function block FB240 to convert a number in BCD (4 tetrads) with sign to a fixed-point binary number (16 bits). You must change a two-tetrad number to a four-tetrad number before you convert it. •...
S5-100U Integrated Blocks and Their Functions 9.2.3 Multiplier : 16 - FB242 - Use function block FB 242 to multiply one fixed-point binary number (16 bits) by another The pro- duct is represented by two fixed-point binary numbers (16 bits each) The result is also scanned for zero.
Integrated Blocks and Their Functions S5-100U 9.2.5 Analog Value Conditioning Modules FB250 and FB251 Function block FB250 reads in an analog value from an analog input module and outputs a value XA in the scale range specified by the user. Function block FB251 allows you to output analog values to analog output modules.
S5-100U Integrated Blocks and Their Functions 9.3.3 OB251 PID Algorithm, for CPU 103 Version 8MA02 and Higher A PID algorithm is integrated in the operating system of the S5-100U. OB251 helps you use this algorithm to meet your needs. Before calling up OB251, you must first open a data block called the controller DB. It contains the controller parameters and other controller specific data.
Page 250
Integrated Blocks and Their Functions S5-100U BGOG STEU STEU Bit 5 Bit 2 Sum- ming unit Limiter Manual function STEU STEU STEU STEU Bit 1 Bit 0 Bit 3 Bit 4 YH, dYH BGUG Figure 9-7. Block Diagram of the PID Controller Table 9-6.
Page 251
S5-100U Integrated Blocks and Their Functions Table 9-7. Description of the Control Bits in Control Word “STEU” Control Signal Name Description State AUTO Manual mode The following variables are updated in Manual mode: , XW and PW , XZ and PZ , when STEU bit 1=1 and Z , when STEU bit 5=0...
Page 252
Integrated Blocks and Their Functions S5-100U Correction Rate Algorithm The relevant correction increment dY is computed at instant t= k TA according to the following • formula: • Without feedforward control (D11.5=1); XW is forwarded to the differentiator (D11.1=0) = K[(XW - XW ) R+TI + (TD (XW...
Page 253
S5-100U Integrated Blocks and Their Functions At instant t , manipulated variable Y is computed as follows: Initializing the PID Algorithm OB251's interface to its environment is the controller DB. All data needed to compute the next manipulated variable value is stored in this DB. Each controller has its own controller data block. The controller-specific data are initialized in a data block that must comprise at least 49 data words.
Page 254
Integrated Blocks and Their Functions S5-100U Table 9-8. Structure of the Controller DB (continued) Data Name Comments Word Actual value (- 2047 to +2047) Disturbance variable (- 2047 to +2047) Derivative time (- 2047 to +2047) Output variable (- 2047 to +2047) All parameters (with the exception of the control word STEU) must be specified as 16-bit fixed point numbers.
Page 255
S5-100U Integrated Blocks and Their Functions Initialization and Call Up of the PID Controller in a STEP 5 Program Several different PID controllers can be implemented by calling up OB251 repeatedly. A data block must be initialized prior to each OB251 call up. These DBs serve as data interface between the controllers and the user.
Page 256
Integrated Blocks and Their Functions S5-100U Example for the Use of the PID Controller Algorithm: A PID controller is supposed to keep an annealing furnace at a constant temperature. The temperature setpoint is entered via a potentiometer. The setpoints and actual values are acquired using an analog input module and forwarded to the controller.
Page 257
S5-100U Integrated Blocks and Their Functions Calling the Controller in the Program: OB 13 Description PROCESS CONTROLLER : JU FB NAME : CONTROLLER 1 THE CONTROLLER'S SAMPLING INTERVAL DEPENDS ON THE TIME BASE USED TO CALL OB13 (SET IN DB1). THE DECODING TIME OF THE ONBOARD ANALOG INPUTS MUST BE TAKEN INTO ACCOUNT WHEN SELECTING...
Page 258
Integrated Blocks and Their Functions S5-100U FB10 Description NAME :CONTROLLER 1 SELECT CONTROLLER'S DB DB 30 ********************************** READ CONTROLLER'S CONTROL BITS ********************************** READ CONTROLLER'S PY 0 CONTROL BITS FY 10 AND STORE IN DR11 DR 11 NOTE CAREFULLY: DR11 CONTAINS IMPORTANT CONTROL DATA FOR OB251 THE CONTROL BITS MUST THEREFORE BE TRANSFERRED WITH...
Page 259
S5-100U Integrated Blocks and Their Functions FB10 (continued) STL Explanation READ SETPOINT : JU FB250 NAME : RLG: AI MODULE ADDRESS KF +8 CHANNEL NO. 1, FIXED-POINT BIPOLAR KNKT KY 1,6 UPPER LIMIT FOR SETPOINT KF +2047 LOWER LIMIT FOR SETPOINT KF - 2047 NO SELECTIVE SAMPLING EINZ...
Page 260
Integrated Blocks and Their Functions S5-100U DB 30 Explanation 0000; K PARAMETER (HERE=1), FACTOR 0.001 +01000; (VALUE RANGE: - 32768 TO 32767) 0000; R PARAMETER (HERE=1), FACTOR 0.001 +01000; (VALUE RANGE: - 32768 TO 32767) 0000; TI=TA/TN (HERE=0.01), FACTOR 0.001 +00010;...
Interrupt Processing 10.1 Interrupt Processing with OB2, for CPU 103 Version 8MA02 and Higher ......10 - 1 10.2 Calculating Interrupt Reaction Times...
Page 262
Figures 10-1 Possible Configuration of the Programmable Controller with Bus Units Having Interrupt Capability ......10 - 1 10-2 Program Interruptions by Process Interrupts .
Page 263
S5-100U Interrupt Processing Interrupt Processing, for CPU 103 Version 8MA02 and Higher Interrupt-driven program processing starts when a signal from the CPU causes the programmable controller to interrupt cyclic or time-controlled program scanning in order to process a specific program. Once this program has been scanned, the CPU returns to the point of interruption in the cyclic or time-controlled program and resumes processing at that point.
Page 264
Interrupt Processing S5-100U Triggering an Interrupt Interrupts can only be triggered by four-channel digital input modules and comparator modules that are plugged into slots 0 and 1 on a bus unit with interrupt capability. Interrupts are triggered by a change in the signal state (0 1=positive edge; 1 0=negative edge) at the respective interrupt input.
Page 265
S5-100U Interrupt Processing Reading Out the Interrupt PII If a process interrupt occurs, only the signal states of the interrupt inputs in slots 0 and 1 are read out to the interrupt PII. This data in the interrupt PII is the only data provided to the interrupt-driven program for evaluation. The interrupt PII can be scanned in OB2 by means of the following load operations: Overview: Operation...
Page 266
Interrupt Processing S5-100U Possibilities of Accessing Process I/O Image Tables The following figure shows how data transfer between the process I/O image tables and ACCU 1 takes place when using various load and transfer statements in OB2. Interrupt T IBX/T IW X L IBX/L IW X L PYX/L PY1/L PW0 ACCU 1...
S5-100U Interrupt Processing 10.2 Calculating Interrupt Reaction Times The total reaction time is is the sum of the following times: • Signal delay of the module triggering the interrupt (= time from the input signal change triggering the interrupt to the activation of the interrupt line) •...
S5-100U Analog Value Processing Analog Value Processing 11.1 Analog Input Modules Analog input modules convert analog process signals to digital values that the CPU can process (via the process image input table, PII). In the following sections, you will find information about the operating principle, wiring methods, and start-up and programming of analog input modules.
Page 274
Analog Value Processing S5-100U 11.2.1 Voltage Measurement with Isolated/Non-Isolated Thermocouples Module 464-8MA11/8MA21 is recommended for voltage measurement with thermocouples. With floating sensors (e. g., isolated thermocouples), the permissible potential difference V between terminals of the inputs and the potential of the standard mounting rail must not be exceeded. To avoid this, the negative potential of the sensor must be connected to the central ground point (see Figure 11-1).
S5-100U Analog Value Processing Connection of Thermocouples with Compensating Box to Module 464-8MA11/8MA21 The influence of the temperature on the reference junction (e. g., terminal box) can be compensated for with a compensation box. Observe the following rules: • The compensation box must have a floating supply. •...
Analog Value Processing S5-100U 11.2.3 Two-Wire Connection of Current Sensors You can use module 464-8MD11 for the two-wire connection of current sensors. Figure 11-4 shows the two-wire connections of current sensors. Figure 11-4. Two-Wire Connection for Current Sensors (6ES5 464-8MD11) 11.2.4 Connection of Two-Wire and Four-Wire Transducers Use the 24-V inputs 1 and 2 of analog input module 464-8ME11 to supply the two-wire transducers.
Page 277
S5-100U Analog Value Processing If you use a four-wire transducer connect it as shown in Figure 11-6. Four-wire transducer Figure 11-6. Connection for Four-Wire Transducers (6ES5 464-8ME11) Four-wire transducers require their own power supply. Connect the “+” pole of the four-wire transducer to the corresponding “-”...
Analog Value Processing S5-100U 11.2.5 Connection of Resistance Thermometers Analog input module 464-8MF11/8MF21 is suited for the connection of resistance thermometers (e.g., PT 100). The resistance of the PT 100 is measured in a four-wire circuit. A constant current is supplied to the resistance thermometer via terminals 7 and 8 as well as via terminals 9 and 10, so that voltage drops in these “constant current circuits”...
S5-100U Analog Value Processing 11.3 Start-Up of Analog Input Modules Set the intended operating mode using the switches on the front panel of analog input modules 464-8 through 11. These switches are located on the right side at the top of the front panel of the module.
Page 280
Analog Value Processing S5-100U Additional operating mode switch selections possible with analog module 464-8MA21: Linearization: With this function, you can obtain a characteristic linearization of the thermo- couples of type J, K, and L or of the resistance thermometer PT 100. With module 464-8MA21, the linearization must always be activated together with the corresponding compensation of the reference point temperature.
Page 281
S5-100U Analog Value Processing Table 11-2. Operating Mode Switch Settings for Analog Input Module 464-8MA21 (continued) Function Settings for Operating Mode Switch without Linearization Linearization Linearization linearization type K type J type L Characteristic linearization of thermocouples without temperature Temperature compen- Temperature compen- compensation sation for type K...
Page 282
Analog Value Processing S5-100U Set the switches on analog module 464-8MF21 as illustrated in Table 11-3. Table 11-3. Operating Mode Switch Settings for Analog Input Module 464-8MF21 Function Settings for Operating Mode Switch 50 Hz 60 Hz Power supply frequency 1 channel 2 channels (channel 0 and (channel 0)
S5-100U Analog Value Processing 11.4 Analog Value Representation of Analog Input Modules Each analog process signal has to be converted into a digital format, to be stored in the process image input table (PII). The analog signals are converted into a binary digit that is written in one of the following ways: •...
Page 284
Analog Value Processing S5-100U Table 11-6. Analog Input Module 464-8MC11, -8MD11 (Bipolar Fixed-Point Number) Measured Value Units High Byte Low Byte Range in V in mA >4095 20.000 40.0 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 1 Overflow 4095 19.995...
Page 285
S5-100U Analog Value Processing Table 11-9. Analog Input Module 464-8MF21, 2x PT 100 “with Linearization” (Bipolar) Temperature in Resis- Units High Byte Low Byte Range tance in ° C ° F >1766 >400 >883 >1531 0 0 1 1 0 1 1 1 0 0 1 1 0 0 0 1 Overflow 1766 1531 Overrange...
Page 286
Analog Value Processing S5-100U Table 11-10. Analog Input Module 464-8MA21, 4x±50 mV “with Linearization” and “with Temperature Compensation” (Bipolar); Thermoelement Type K (Nickel-Chromium/Nickel-Aluminium, according to IEC 584) Thermal Temperature Units Voltage High Byte Low Byte Range ° C ° F in mV* >2359 0 1 0 0 1 0 0 1 1 0 1 1 1 0 0 1 Overflow...
Page 287
S5-100U Analog Value Processing Table 11-11. Analog Input Module 464-8MA21, 4x±50 mV “with Linearization” and “with Temperature Compensation” (Bipolar); Thermoelement Type J (Iron/Copper-Nickel (Konstantan), according to IEC 584) Thermal Units Temperature Voltage High Byte Low Byte Range ° C ° F in mV* 1485 0 0 1 0 1 1 1 0 0 1 1 0 1 0 0 1 Overflow...
Page 288
Analog Value Processing S5-100U Table 11-12. Analog Input Module 464-8MA21, 4x±50 mV “with Linearization” and “with Temperature Compensation” (Bipolar); Thermoelement Type L (Iron/Copper-Nickel (Konstantan), according to DIN 43710) Thermal Temperature Units Voltage High Byte Low Byte Range ° C ° F in mV* 1361 0 0 1 0 1 0 1 0 1 0 0 0 1 0 0 1 Overflow...
Page 289
S5-100U Analog Value Processing If you want to read in the analog value with function block FB250 (analog value reading), you have to pre-process the analog value before calling up FB250. Example 1: Analog input module 466-8MC11 is inserted in slot 1, which means that the module's start address is 72.
Page 290
Analog Value Processing S5-100U Example 2: Analog input module 466-8MC11 is inserted in slot 0, which means that the module’s start address is 64. The analog values that are read in are stored in four consecutive bytes: 1st analog value (channel 0) in IB64 2nd analog value...
S5-100U Analog Value Processing 11.5 Analog Output Modules Analog output modules convert the bit patterns that are output by the CPU into analog output voltages or currents. 11.5.1 Connection of Loads to Analog Output Modules No adjustments are necessary if you want to connect loads to the analog outputs. Check the following items before connecting loads: •...
Analog Value Processing S5-100U Figure 11-10 shows how to connect loads to the current outputs of the following modules. • 470-8MB12 (2x±20 mA) • 470-8MC12 (2x+4 to 20 mA). Key: Analog output "Current" Chassis ground terminal of the analog unit 24 V DC (4/8) (6/10)
Page 293
S5-100U Analog Value Processing Table 11-15 and 11-16 show the voltage and currents assigned to the bit patterns. Table 11-15. Output Voltages and Currents for Analog Output Modules (Fixed-Point Number Bipolar) Output Values Units High Byte Low Byte Range in V in mA 1280 12.5...
Analog Value Processing S5-100U 11.6 Analog Value Conversion: Function Blocks FB250 and FB251 11.6.1 Reading in and Scaling an Analog Value - FB250 - Function block FB250 reads in an analog value from an analog input module and outputs a value XA in the scale range specified by the user.
Page 295
S5-100U Analog Value Processing Example: Display of Tank Make-Up Quantity The make-up of a cylindrical tank holding 30 m is to be shown on a 3-digit display. The individual digits must be set in BCD. The level of the liquid in the tank is sensed by a SONAR-BERO®, range 80 to 600 cm, with analog output (see Catalog NS3).
Page 296
Analog Value Processing S5-100U Explanation Unconditional call FB250 JU FB 250 NAME : RLG:AI Slot 0 Channel 0, channel type 3 KNKT : 0.3 Upper limit: 30.0 m : 300 Lower limit: 0.0 m No meaning EINZ Make-up quantity stored in flag word 1 as fixed-point number : FW1 “1”, if wire break :F0.0...
Page 297
S5-100U Analog Value Processing 11.6.2 Output of Analog Value - FB251 - Analog values can be output to analog output modules using this function block. In doing so, values from the range between the lower limit (UGR) and high limit (OGR) parameters are converted to the nominal range of the module in question.
Page 298
Analog Value Processing S5-100U The tank contents are determined from the make-up quantity. Explanation Maximum tank capacity L KF +300 Make-up quantity L FW 1 Calculate difference Store tank contents in FW20 T FW 20 The UGR and OGR parameters of FB 251 refer to the nominal range of the analog output module. For this reason, the UGR parameter must be assigned the value -30.0.
Page 299
The Integral Real-Time Clock, for CPU 103 Version 8MA02 and Higher 12.1 Function ......... . . 12 - 12.2 Setting Parameters in DB1, for CPU 103 Version 8MA03...
Page 300
Figures 12-1 DB1 with Default Parameters for Integral Real-Time Clock ... . . 12 - 12-2 Example: Setting the Clock in DB1 to Monday, November 9, 1992, 15:30 . . . 12 - 12-3 Example: Setting the Prompt Time in DB1 to Thursday, December 17, 1992, 8:00 o'clock...
S5-100U The Integral Real-Time Clock The Integral Real-Time Clock, for CPU 103 Version 8MA02 and Higher 12.1 Function The integral real-time clock offers the following possibilities of controlling the process sequence: • Clock and calendar function Used to configure clock-time dependent control, for example •...
The Integral Real-Time Clock S5-100U 12.2 Setting Parameters in DB1, for CPU 103 Version 8MA03 and Higher Set the clock parameters in DB1 to be able to use the clock functions. Follow the same rules you used in setting parameters for other functions. Refer to section 9.1. Procedures for Setting Parameters in DB1 1.
S5-100U The Integral Real-Time Clock 12.2.2 Reading the Current Clock Time and the Current Date Proceed as follows to see how and with which values the clock runs. 1. Perform an overall reset. 2. Output DB1 to the programmer. 3. Overwrite both (#) comment characters with a blank space. 4.
The Integral Real-Time Clock S5-100U 12.2.3 DB1 Parameters Used for the Integral Real-Time Clock Table 12-2. DB1 Parameters for the Integral Real-Time Clock Parameters Argument Meaning Block ID: CLP: Clock Parameters Entering the correction factor ( C orrection F actor) DBxDWy, MWz,EWv Location of the clock data ( CL oc K Data) or AWv...
S5-100U The Integral Real-Time Clock 12.3 Programming the Integral Real-Time Clock in DB1, for CPU 103 Version 8MA03 and Higher Sections 12.3.1 to 12.3.4 contain examples for programming the clock in DB1. Adhere to the rules described in chapter 9 for setting parameters when you enter these examples into the programmable controller.
The Integral Real-Time Clock S5-100U 12.3.2 Setting the Prompt Time in DB1 How to set the prompt time in DB1 1. Perform an overall reset on the programmable controller. 2. Generate DB5 with DW0 to DW21. 3. Output default DB1 to the programmer. 4.
S5-100U The Integral Real-Time Clock 12.3.3 Setting the Operating Hours Counter in DB1 How to set the operating hours counter in DB1 1. Perform an overall reset on the programmable controller. 2. Generate DB5 with DW0 to DW21. 3. Output default DB1 to the programmer. 4.
The Integral Real-Time Clock S5-100U 12.4 Structure of the Clock Data Area You need only to change the default values in DB1 to program the clock in DB1. See section 12.2. During start-up, the DB1 interpreter writes all information into the system data area. TIP: Do not attempt to set parameters in the system data, or to access directly from the user program unless you have extensive knowledge of the system.
Page 309
S5-100U The Integral Real-Time Clock When you set the clock, you have to transfer only the data needed to implement a particular function. For example, if you want to change only the clock function data, you do not have to enter data for the time prompt function or for the operating hours counter.
Page 310
The Integral Real-Time Clock S5-100U Make certain you are aware of the following points when you make inputs into the clock data area. • Entries into the clock data area must be in BCD code. • The clock runs either in the 12-hour mode or the 24-hour mode depending on how you set bit 1 in the status word.
Page 311
S5-100U The Integral Real-Time Clock If your inputs differ from the ones described, the operating system outputs error messages that are displayed in the status word. The operating system resets error messages displayed in the status word the next time you set the clock, prompt time, or the operating hours counter, if the new settings are within the definition range.
The Integral Real-Time Clock S5-100U 12.5 Structure of the Status Word and How to Scan it You can scan the status word to identify errors in the entered settings. You can deliberately change certain bits in the status word to enable or disable transfer or read operations. You can use designated flag bits to govern the clock’s behavior when the programmable controller is switched from the RUN to the STOP mode or during Power OFF.
Page 313
S5-100U The Integral Real-Time Clock Tables 12-5 through 12-8 provide you with information about the significance of the signal states of the respective flags. Clock Flags Table 12-5. Significance of Bits 0, 1, 2 and 3 of the Status Word Bit Number Signal State Meaning...
Page 314
The Integral Real-Time Clock S5-100U Operating Hours Counter Flags Table 12-7. Significance of the Operating Hours Counter Flags Bits 8, 9, and 10 of the Status Word Bit Number Signal State Meaning Error in setting entry No error in setting entry Enable the operating hours counter Disable the operating hours counter Transfer the settings...
S5-100U The Integral Real-Time Clock 12.6 Setting Parameters for the Clock Data Area and the Status Word in the System Data Area Table 12-9. The System Data Area for the Integral Real-Time Clock Absolute System Permissible Address RAM Data Word Meaning Parameters Operand area for the clock data...
Page 316
The Integral Real-Time Clock S5-100U The following section is intended to help you to start running the integral real-time clock as quickly as possible by setting parameters in the system data. You need to be familiar with the clock data area described in sections 12.4 and 12.5 in order to understand this section.
Page 317
S5-100U The Integral Real-Time Clock The Block Entry Sequence and a Programming Example: The following procedure is suggested: 1. Program FB1 - Defining system data for the integral real-time clock 2. Program OB21 - Calling up FB1 during a change from STOP to RUN 3.
Page 318
The Integral Real-Time Clock S5-100U Table 12-11. OB21 Program Explanation OB 21 The function block is called up once during a switch from STOP to JU FB 1 RUN. NAME: CLOCK Table 12-12. OB22 Program Explanation OB 22 The function block is called up once when the programmable JU FB 1 controller is switched on.
Page 319
S5-100U The Integral Real-Time Clock Reading and Setting the Time and Date After you enter the program, you can test it as follows. 1. Switch the programmable controller to the RUN mode. 2. Use the FORCE VAR programmer function to enter the following. Data block number Data words DW0 to DW7 Clock data...
Page 320
The Integral Real-Time Clock S5-100U Write the settings into the clock data area Set transfer bit 2 in the control program Wait approximately two seconds (entering a wait program) Possible errors: Status Word - Clock is not Bit 2=1 available. - Clock system data is incorrect or not available.
S5-100U The Integral Real-Time Clock 12.7 Programming the Integral Real-Time Clock in the User Program The programming of the clock in the user program should be performed only by users with extensive knowledge of the system. For all other users, use of DB1 is recommended (see sections 12.2 and 12.3).
Page 322
The Integral Real-Time Clock S5-100U FB10 STL Description NAME :SET CLOCK SETTING THE CLOCK :WDAY I/Q/D/B/T/C: I BI/BY/W/D: BY :DAY I/Q/D/B/T/C: I BI/BY/W/D: BY :MON I/Q/D/B/T/C: I BI/BY/W/D: BY :YEAR I/Q/D/B/T/C: I BI/BY/W/D: BY :HOUR I/Q/D/B/T/C: I BI/BY/W/D: BY :AMPM I/Q/D/B/T/C: I BI/BY/W/D: BI :MIN...
Page 323
S5-100U The Integral Real-Time Clock FB10 STL (continued) Explanation 11.2 HAVE SETTINGS BEEN TRANSFERRED? =M002 IF YES, JUMP TO M002 =ERR SET ERROR BIT IF THERE ARE ERRORS :BEU M002 :AN 11.0 WERE THERE ERRORS WHILE ENTERING SETTINGS? =ERR IF NO, RESET ERROR BIT :BEC IF NO ERROR, THEN BEC =ERR...
S5-100U The Integral Real-Time Clock Storing the Updated Time/Date after a RUN to STOP Switch Note This clock data area is only written to if the following requirements are met. • Bit 5 in the status word is set to “1”. •...
Page 326
The Integral Real-Time Clock S5-100U Write the settings into the clock data area Set transfer bit 14 in the control program Wait about two seconds (entering wait program Possible errors: Bit 14=1 - Clock is not available. - Clock system data is incorrect or not available.
Page 327
S5-100U The Integral Real-Time Clock Prompt Time Sequence • Bit 13 in the status word is set after the prompt time has elapsed. • Bit 13 remains set until you reset it in the control program. • The prompt time can be read at any time. Caution If the prompt time is reached in the STOP mode or during Power OFF, the prompt time cannot be evaluated.
Page 328
The Integral Real-Time Clock S5-100U FB11 STL Explanation NAME :SET PROMPT TIME SETTING THE PROMPT TIME :WDAY I/Q/D/B/T/C: I BI/BY/W/D: BY :DATE I/Q/D/B/T/C: I BI/BY/W/D: BY :MON I/Q/D/B/T/C: I BI/BY/W/D: BY :HOUR I/Q/D/B/T/C: I BI/BY/W/D: BY :AMPM I/Q/D/B/T/C: I BI/BY/W/D: BI :MIN I/Q/D/B/T/C: I BI/BY/W/D: BY...
Page 329
S5-100U The Integral Real-Time Clock FB11 STL (continued) Description =HOUR STORE VALUE FOR HOURS =AMPM IF AM/PM = 1 (AFTERNOON) AND =MODE 12-HOUR MODE IS SET, THE =MORN CORRESPONDING BIT IN THE CLOCK KH 0080 DATA AREA IS SET MORN :T =MIN STORE VALUE FOR MINUTES =SEC...
The Integral Real-Time Clock S5-100U 12.7.3 Programming the Operating Hours Counter You can enable the operating hours counter with bit 9 of the status word. This allows you to establish, for example, the number of hours a motor has been in operation. The operating hours counter is active only in the RUN mode.
Page 331
S5-100U The Integral Real-Time Clock Write the settings into the clock data area Set transfer bit 10 in the control program Wait about two seconds (entering a wait program Possible errors: - Clock is not Status word available. Bit 10=1 - Clock system data is incorrect or not available.
Page 332
The Integral Real-Time Clock S5-100U Example: Setting the operating hours counter The status of input I 0.7 determines whether the operating hours counter values are transferred. You must transfer these values to flag bytes FY136 to FY140 before setting input I 0.7 (not implemented in the example program).
Page 333
S5-100U The Integral Real-Time Clock FB12 STL Explanation NAME :SET OPER. HOURS COUNTER SETTING THE OPERATING HOURS COUNTER :SEC I/Q/D/B/T/C: BI/BY/W/D: :MIN I/Q/D/B/T/C: BI/BY/W/D: :HOUR0 I/Q/D/B/T/C: BI/BY/W/D: :HOUR2 I/Q/D/B/T/C: BI/BY/W/D: :HOUR4 I/Q/D/B/T/C: BI/BY/W/D: :ERR I/Q/D/B/T/C: BI/BY/W/D: 20.2 FLAG IS RESET IF SETTINGS =M001 ALREADY READ INTO THE 20.2...
Page 334
The Integral Real-Time Clock S5-100U Reading the Current Operating Hours Counter The current data is stored in words 12 to 14 of the clock data area. You can use load operations to read out the data. Example: Reading the operating hours counter You need to switch off a machine for inspection after every 300 hours of operation.
S5-100U The Integral Real-Time Clock 12.7.4 Entering the Clock Time Correction Factor You can configure a correction value that increases the exactness of the integral real-time clock. The correction value is displayed in seconds/month. The month is defined as 30 days. Absolute Address Range System Data Word...
Page 337
Connecting the S5-100U to SINEC L1, for CPU 102 and Higher 13.1 Connecting the Programmable Controllers to the L1 Bus Cable ........13 - 1 13.2 Setting Parameters in the Programmable Controller...
Page 338
Figures 13-1 Connection of the Bus Cable ....... . . 13 - 1 13-2 Programming Example for Setting Parameters in FB1 .
S5-100U Connecting the S5-100U to SINEC L1 Connecting the S5-100U to SINEC L1, for CPU 102 and Higher SINEC L1 is a local area network that enables SIMATIC S5 programmable controllers to communi- cate with each other. This option is available when you are using CPU 102 or higher. It operates on the master-slave principle.
Connecting the S5-100U to SINEC L1 S5-100U • Storage location of the coordinating information for receiving data (e.g., the message: “Receiving data can be read”) Name: Coordination Byte Receive, abbreviated: KBE • Programmer number (necessary if you want to transmit programmer functions over the SINEC L1 local area network), abbreviated: PGN You can set parameters for the programmable controller for the CPU 102 in the function block, and for the CPU 103 version 8MA03 in the integrated data block (DB1).
Page 341
S5-100U Connecting the S5-100U to SINEC L1 Table 13-2. Setting Parameters in the Coordination Byte Meaning Parameters Address in System Data Area “Flag” data identifier (“F”) 4D EA74 Flag byte 0 to 127 EA75 EA76 “Data word” identifier (“D”) 44 EA77 Data block 2 to 63...
Page 342
Connecting the S5-100U to SINEC L1 S5-100U Explanation Load slave number and store it in flag byte 65 - Load “Flag” data identifier and store it 4D00 in flag byte 66 - Load flag byte 100 and store it 100,0 in flag byte 67 - Load “Flag”...
S5-100U Connecting the S5-100U to SINEC L1 13.2.2 Setting Parameters in DB1, for CPU 103 and Higher Set the parameters in DB1 as follows: 1. Display the default DB1 on the programmer (Transfer function, source: PC, target: FD (PG) A default DB1 is integrated into the programmable controller's operating system; it contains default parameters for the data exchange via SINEC L1.
Page 344
Connecting the S5-100U to SINEC L1 S5-100U Table 13-3 shows how to change default parameters for the example given above and which parameter settings are permitted. Table 13-3. Setting Parameters for the SINEC L1 Interface Default DB1: Valid Modifications Block: SINEC L1 to Parameters for Explanation Necessary for the...
S5-100U Connecting the S5-100U to SINEC L1 5. Transfer the changed DB1 to the programmable controller. The default DB1 is overwritten. If you now go from STOP to RUN or from Power OFF to Power ON (with a battery inserted), the programmable controller accepts the changed parameters and stores them in the system data area.
Connecting the S5-100U to SINEC L1 S5-100U 13.3.1 Sending Data The prerequisites for sending data are as follows: • The parameters are set in DB1 for the location of the Send Mailbox (see section 13.2.2). • The data to be sent, additional information (length of the send data “net data”), and destination slave number are then transferred to the Send Mailbox.
S5-100U Connecting the S5-100U to SINEC L1 The control program for sending data should be structured as follows: 1. Check bit 7 in the KBS to see if data is currently being sent. - If the programmable controller is sending data, bit 7 is set. During this phase, the Send Mailbox can not be modified and no transmission can be started.
Page 348
Connecting the S5-100U to SINEC L1 S5-100U Structure of the Coordination Byte Receive (KBE) Figure 13-7 shows the structure for receiving data (KBE). No error Error during last data transfer No slave failed At least one slave failed Bus in STOP mode Bus in RUN mode No message Data arrives as express transmission...
S5-100U Connecting the S5-100U to SINEC L1 13.3.3 Programming the Messages in a Function Block The control program must execute the following tasks: • Enable the send and receive mailboxes and process the data contained in them. • Manage the coordination bytes (e.g. send request, error evaluation). Example: Data traffic with the master as slave 1 Definitions:...
Page 350
Connecting the S5-100U to SINEC L1 S5-100U Explanation Receive mailbox (DB3) Check whether access to receive mailbox is permissible. F100.7 KBE/Bit 7=0: Access permitted KBE/Bit 7=1: Access not permitted Skip receive mailbox evaluation if access not permitted =M001 Check whether the number of the source (master 0) is in byte 2 of the receive mailbox KF+0 ><F...
73/23/EC "Electrical Equipment Designed for Use between Certain Voltage Limits" (Low-Voltage Directive) The EC declarations of conformity are held at the disposal of the competent authorities at the address below: Siemens Aktiengesellschaft Bereich Automatisierungstechnik AUT E 14 Postfach 1963 D-92209 Amberg...
Page 354
Module Spectrum S5-100U Notes for the machine manufacturer The SIMATIC automation system is not a machine in the sense of the EC Directives Machines. Therefore a declaration of conformity with regard to the EC Directive Machines 89/392/EC does not exist for SIMATIC. The EC Directive Machines 89/392/EC regulates the requirements on a machine.
S5-100U Module Spectrum 14.1 General Technical Specifications Electromagnetic Compatibility (EMC) Climatic Environmental Conditions Noise Immunity Static electricity to IEC 801-2 Temperature (discharge on all parts that are accessible to the operator Operating during normal operation) - horizontal design 0 to+60° C (32 to 140° F) - Test voltage 2.5 kV - vertical design...
115/230 V AC - permiss. range 92 to 132 V/ 187 to 264 V Line frequency - rated value 50/60 Hz SIMATIC S5-100U - permiss. range 47 to 63 Hz PS 930 Input current at 115/230 V - rated value 0.35/0.18 A...
Page 357
- permiss. range 92 to 132 V/ 187 to 264 V Line frequency - rated value 50/60 Hz - permiss. range 47 to 63 Hz SIMATIC S5-100U Input current at 115/230 V PS 931 - rated value 0.9/0.6 A Efficiency approx.
Page 358
18.5 to 30.2 V DC stat. 20.4 to 28.8 V DC - Polarity reversal protection Radio interference level A to VDE 0871 SIMATIC S5-100U Input current at 24 V DC - rated value 1.25 A PS 935 - inrush current limitation...
Scan monitoring time approx. 300 ms Flags 1024; 512 retentive Timers: Number/range approx. 16; 0.01 to 9990 s SIEMENS SIMATIC S5-100U Counters: Number/range 16; 8 retentive CPU 100 0 to 999 (up/down) Digital inputs, Digital outputs together max. 256...
Page 360
40/125 µs Scan monitoring time approx. 350 ms Flags 1024; 512 retentive Timers: Number/range approx. 32; 0.01 to 9990 s SIEMENS SIMATIC S5-100U Counters: Number/range 32; 8 retentive 0 to 999 (up/down) Digital inputs, CPU 102 Digital outputs together max. 256...
Page 361
Execution times - per binary operation approx. 0.8 µs - per word operation approx. 100 µs SIEMENS SIMATIC S5-100U Scan monitoring time 500 ms, selectable Flags 2048; 512 retentive CPU 103 Timers: Number/range approx. 128; 0.01 to 9990 s Counters: Number/range 128;...
Bus Unit (SIGUT Screw-type Terminals) (6ES5 700-8MA11) Technical specifications Type of connection SIGUT screw-type terminals Number of plug-in modules Number of bus units per programmable SIEMENS controller max. Connection between two bus units flat ribbon Number of terminals 10 per slot Insulation rating...
Page 363
(6ES5 700-8MA22) Technical specifications Type of connection Crimp snap-in Number of plug-in modules Number of bus units per programmable controller max. SIEMENS Connection between two bus units flat ribbon Number of terminals 10 per slot Conductor cross sectional area - stranded 0.5 to 1.5 mm...
Page 364
Type of connection SIGUT (screw-type terminals) Number of plug-in units Number of bus modules per programmable controller max. 16 * SIEMENS Connection between two bus modules flat ribbon Number of terminals Insulation rating VDE 0160 Rated insulation voltage (+9 V to...
Page 365
(Crimp Snap-in Connections) (6ES5 700-8MB21) Technical specifications Type of connection Crimp-snap-in Number of plug-in units Number of bus modules per programmable SIEMENS controller max. 16 * Connection between two bus modules flat ribbon Number of terminals 10 per slot Conductor cross-...
Module Spectrum S5-100U 14.5 Interface Modules IM 315 Interface Module (6ES5 315-8MA11) SIEMENS SIMATIC S5 INTERFACE MODULE 6ES5 315-8MA11 MADE IN GERMANY Technical specifications Current supply to the expansion unit max. 2.5 A Data Number of interface modules per PLC max.
Module Spectrum S5-100U 14.6 Digital Modules 14.6.1 Digital Input Modules Digital Input Module 4 × 24 V DC (6ES5 420-8MA11) Technical specifications Number of inputs Galvanic isolation - in groups of Input voltage L+ - rated value 24 V DC - ”0”...
Page 369
S5-100U Module Spectrum Digital Input Module 8 × 24 V DC (6ES5 421-8MA12) Technical specifications Number of inputs Galvanic isolation - in groups of Input voltage L+ - rated value 24 V DC - ”0” signal 0 to 5 V - ”1”...
Page 370
Module Spectrum S5-100U Digital Input Module 16 × 24 V DC (6ES5 422-8MA11) (6ES5 490-8MA13/-8MA03) (6ES5 490-8MB11) Technical specifications Number of inputs Galvanic isolation Input voltage L+ - rated value 24 V DC - ”0” signal 0 to 5 V DIGITAL - ”1”...
Page 371
S5-100U Module Spectrum Digital Input Module 4 × 24 to 60 V DC (6ES5 430-8MB11) Technical specifications Number of inputs Galvanic isolation yes (optocoupler) - in groups of Input voltage L+ - rated value 24 to 60 V DC - ”1” signal 13 to 72 V - ”0”...
Page 372
Module Spectrum S5-100U Digital Input Module 4 × 115 V AC (6ES5 430-8MC11) Technical specifications Number of inputs Galvanic isolation yes (optocoupler) - in groups of Input voltage L1 - rated value 115 V AC/DC - ”0” signal 0 to 40 V - ”1”...
Page 373
S5-100U Module Spectrum Digital Input Module 4 × 230 V AC (6ES5 430-8MD11) Technical specifications Number of inputs Galvanic isolation yes (optocoupler) - in groups of Input voltage L1 - rated value 230 V AC - ”0” signal 0 to 70 V - ”1”...
Page 374
Module Spectrum S5-100U Digital Input Module 8 x 24 V DC (6ES5 431-8MA11) Technical Specifications Number of inputs Galvanic isolation yes (optocoupler) - in groups of Input voltage L+ - rated value 24 V DC - "0" signal 0 to 5 V - "1"...
Page 375
S5-100U Module Spectrum Digital Input Module 8 × 115 V ACV (6ES5 431-8MC11) Technical specifications Number of inputs Galvanic isolation yes (optocoupler) - in groups of Input voltage L1 - rated value 115 V AC/DC - ”0” signal 0 to 40 V - ”1”...
Page 376
Module Spectrum S5-100U Digital Input Module 8 × 230 V AC (6ES5 431-8MD11) Technical specifications Number of inputs Galvanic isolation yes (optocoupler) - in groups of Input voltage L1 - rated value 230 V AC/DC - ”0” signal 0 to 95 V - ”1”...
Page 377
S5-100U Module Spectrum Digital Input Module 8 x 5 to 24 V DC (6ES5 433-8MA11) Technical Specifications Number of inputs Galvanic isolation yes (optocoupler) - in groups of Input voltage L+ - rated value 5 to 24 V DC - "0" signal approx.
Module Spectrum S5-100U 14.6.2 Digital Output Modules Digital Output Module 4 × 24 V DC/0.5 A (6ES5 440-8MA12) Technical specifications Number of outputs Galvanic isolation - in groups of Load voltage L+ - rated value 24 V DC - permissible range 20 to 30 V (including ripple) - value at t<0.5 s...
Page 379
S5-100U Module Spectrum Digital Output Module 4 × 24 V DC/2 A (6ES5 440-8MA22) Technical specifications Number of outputs Galvanic isolation - in groups of Load voltage L+ - rated value 24 V DC - permissible range 20 to 30 V Output current for ”1”...
Page 380
Module Spectrum S5-100U Digital Output Module 8 × 24 V DC/0.5 A (6ES5 441-8MA11) Technical specifications Number of outputs Galvanic isolation - in groups of Load voltage L+ - rated value 24 V DC - permissible range 20 to 30 V (including ripple) - value at t<0.5 s 35 V...
Page 381
S5-100U Module Spectrum Digital Output Module 4 × 24 to 60 V DC/0.5 A (6ES5 450-8MB11) Technical specifications Number of outputs Galvanic isolation yes (optocoupler) - in groups of Load voltage L+ - rated value 24 to 60 V DC - permissible range 20 to 72 V Output current for...
Page 382
Module Spectrum S5-100U Digital Output Module 4 × 115 to 230 V AC/1 A (6ES5 450-8MD11) Technical specifications Number of outputs Galvanic isolation - in groups of Load voltage L1 - rated value 115 to 230 V AC - frequency max.
Page 383
S5-100U Module Spectrum Digital Output Module 8 x 24 V DC/1 A (6ES5 451-8MA11) Technical specifications Number of outputs Galvanic isolation yes (optocoupler) - in groups of Load voltage L+ - rated value 24 V DC - permissible range (including ripple) 20 to 30 V - value at t<0.5 s 35 V...
Page 384
Module Spectrum S5-100U Digital Output Module 8 × 115 to 230 V AC/0.5 A (6ES5 451-8MD11) Technical specifications Number of outputs Galvanic isolation yes (optocoupler) - in groups of Load voltage L1 - rated value 115 to 230 V AC - frequency max.
Page 385
S5-100U Module Spectrum Digital Output Module 8 × 5 to 24 V DC/0.1 A (6ES5 453-8MA11) Technical specifications Number of outputs Galvanic isolation - in groups of Load voltage L+ - rated value 5 to 24 V DC - permissible range 4.75 to 30 V (including ripple) - value at t<0.5 s...
Page 387
SIOV-S07- K275 Galvanic isolation yes (optocoupler) - in groups of Continuous current I Relay type Siemens V 23127-D 0006- A402 Switching capacity of the contacts - resistive load max. 5 A at 250 V AC 2.5 A at 30 V DC - inductive load max.
Module Spectrum S5-100U 14.6.3 Digital Input/Output Modules Digital Input/Output Module with LED Display (6ES5 482-8MA13) Crimp Snap-in Connector, 40-pin (6ES5 490-8MA13/-8MA03) Screw Plug Connector, 40-pin (6ES5 490-8MB11) DIGITAL 32x24V DC n + 1 0.5A 0.5A 1 2 3 +9 V Data M L + 180 K...
Page 389
S5-100U Module Spectrum Digital Input/Output Module with LED Display (continued) (6ES5 482-8MA13) Technical specifications Output side Cable length Number of outputs - unshielded 100 m (330 ft.) Galvanic isolation - in groups of Rated insulation voltage (+9 V to 12 V AC Load voltage L+ - insulation group 1 x B...
Module Spectrum S5-100U 14.7 Analog Modules 14.7.1 Analog Input Modules Analog Input Module 4 x ±50 mV (6ES5 464-8MA11) broken wire operating mode Comp. Ch.0 Ch.1 Ch.2 Ch.3 10 - ANALOG INPUT 4 x±50 mV 6ES5 464-8MA11 +9 V Data broken wire Cu Cu...
Page 391
S5-100U Module Spectrum Analog Input Module 4 × ±50 mV (continued) (6ES5 464-8MA11) Technical specifications Noise suppression Input ranges for f=nx (rated values) ±50 V (50/60 Hz±1%); n=1, 2, ... Number of inputs 1, 2 or 4 - common-mode (selectable) rejection min.
Page 392
Module Spectrum S5-100U Analog Input Module 4 x ±50 mV (6ES5 464-8MA21) broken wire operating mode Comp. Ch.0 Ch.1 Ch.2 Ch.3 10 - ANALOG INPUT 4 x±50 mV 6ES5 464-8MA21 +9 V Data broken wire Cu Cu Comp. Ch.0 Ch.1 Ch.2 Ch.3 14-40...
Page 393
S5-100U Module Spectrum Analog Input Module 4 x ±50 mV (continued) (6ES5 464-8MA21) Technical specifications Noise suppression Input range for f = nx (rated values) ± 50 mV (50/60 Hz±1%) n = 1, 2, ... Number of inputs 1, 2 or 4 - common mode rejection min.
Page 394
Module Spectrum S5-100U Analog Input Module 4 x ±1 V (6ES5 464-8MB11) broken wire operating mode Ch.0 Ch.1 Ch.2 Ch.3 10 - ANALOG INPUT 4 ×± 1V 6ES5 464-8MB11 +9 V Data broken wire Ch.0 Ch.1 Ch.2 Ch.3 14-42 EWA 4NEB 812 6120-02b...
Page 395
S5-100U Module Spectrum Analog Input Module 4 x ±1 V (continued) (6ES5 464-8MB11) Technical specifications Noise suppression Input ranges for f=nx (rated values) ± 1 V (50/60 Hz±1%); n=1, 2, ... Number of inputs 1, 2 or 4 - common-mode (selectable) rejection (V =1 V)
Page 396
Module Spectrum S5-100U Analog Input Module 4 x ±10 V (6ES5 464-8MC11) operating mode Ch.0 Ch.1 Ch.2 Ch.3 10 - ANALOG INPUT 4 x ± 10 V 6ES5 464-8MC11 +9 V Data 2,5 k 47 k Ch.0 Ch.1 Ch.2 Ch.3 14-44 EWA 4NEB 812 6120-02b...
Page 397
S5-100U Module Spectrum Analog Input Module 4 x ±10 V (continued) (6ES5 464-8MC11) Technical specifications Input ranges Noise suppression (rated values) ±10 V for f=nx (50/60 Hz±1%); Number of inputs 1, 2 or 4 n=1,2, ... (selectable) - common-mode min. 86 dB rejection (V =1 V)
Page 398
Module Spectrum S5-100U Analog Input Module 4 x ±20 mA (6ES5 464-8MD11) operating mode Ch.0 Ch.1 Ch.2 Ch.3 10 - ANALOG INPUT 4 x ± 20 mA 6ES5 464-8MD11 +9 V +9 V Data Data Four-wire transducer Two-wire transducer Ch.0 Ch.1 Ch.2 Ch.3...
Page 399
S5-100U Module Spectrum Analog Input Module 4 x ±20 mA (continued) (6ES5 464-8MD11) Technical specifications Input ranges Noise suppression (rated values) ±20 mA for f=nx (50/60 Hz±1%); Number of inputs 1, 2 or 4 n=1,2, ... (selectable) - common-mode rejection (V =1 V) min.
Page 400
Module Spectrum S5-100U Analog Input Module 4 x 4 to 20 mA (6ES5 464-8ME11) operating mode Ch.0 Ch.1 Ch.2 Ch.3 10 - ANALOG INPUT 4 x 4 ... 20 mA 6ES5 464-8ME11 +9 V +9 V Data Data 31,2 31,2 Four-wire transducer Ch.0 Ch.1...
Page 401
S5-100U Module Spectrum Analog Input Module 4 x 4 to 20 mA (continued) (6ES5 464-8ME11) Technical specifications Input ranges Noise suppression (rated values) 4 to 20 mA for f=nx (50/60 Hz±1%); Number of inputs 1, 2 or 4 n=1, 2, ... (selectable) - common-mode min.
Page 402
Module Spectrum S5-100U Analog Input Module 2 x PT 100/±500 mV (6ES5 464-8MF11) broken wire operating mode I C + Ch.0 I C - I C + Ch.1 I C - ANALOG INPUT 2×Pt100 6ES5 464-8MF11 +9 V Data broken wire 2×PT100 Ch.0...
Page 403
S5-100U Module Spectrum Analog Input Module 2 × PT 100/±500 mV (continued) (6ES5 464-8MF11) Technical specifications Input range Noise suppression (rated values) for f = nx - resistance (50/60 Hz±1%) sensor (PT 100) 0 to 200 n = 1, 2, ... (max.
Page 404
Module Spectrum S5-100U Analog Input Module 2 x PT 100/±500 mV (6ES5 464-8MF21) broken wire operating mode I C + Ch.0 I C - I C + Ch.1 I C - ANALOG INPUT 2×Pt100 6ES5 464-8MF21 +9 V Data broken wire 2×PT100 Ch.0...
Page 405
S5-100U Module Spectrum Analog Input Module 2 × PT 100/±500 mV (continued) (6ES5 464-8MF21) Technical specifications Input range Noise suppression for f = nx (rated values) (50/60Hz ± 1%); - resistance sensor (PT 100) 0 to 200 n = 1, 2, ... (max.
Page 406
Module Spectrum S5-100U Analog Input Module 4 × +0 to 10 V (6ES5 466-8MC11) Ch.0 Ch.1 Ch.2 Ch.3 10 - ANALOG INPUT 4 x 0 ...10 V 6ES5 466-8MC11 +9 V Data 10 k 90 k Ch.0 Ch.1 Ch.2 Ch.3 14-54 EWA 4NEB 812 6120-02b...
Page 407
S5-100U Module Spectrum Analog Input Module 4 × +0 to 10 V (continued) (6ES5 466-8MC11) Technical specifications Input ranges Basic error limits ±0.4% (rated values) +0 to 10 V Operational error limits Number of inputs (0 to 60 °C) (32 to 140 °F) ±0.6% Galvanic isolation Single errors...
Module Spectrum S5-100U 14.7.2 Analog Output Modules Analog Output Module 2 x ±10 V (6ES5 470-8MA12) Technical specifications Output range (rated values) ±10 V Number of outputs Galvanic isolation yes (outputs to grounding point and between outputs) Input resistance min. 3.3 k Connection method two or four-wire...
Page 409
S5-100U Module Spectrum Analog Output Module 2 x ±20 mA (6ES5 470-8MB12) Technical specifications Output range (rated values) ±20 mA Number of outputs Galvanic isolation yes (outputs to grounding point and between outputs) Input resistance max. Connection method two-wire connection Digital representation of output signal 11 bits + sign...
Page 410
Module Spectrum S5-100U Analog Output Module 2 x 4 to 20 mA (6ES5 470-8MC12) Technical specifications Output range (rated value) 4 to 20 mA Number of outputs Galvanic isolation yes (outputs to grounding point and between outputs) Load resistance max. Connection method two-wire connection Digital representation...
Page 411
S5-100U Module Spectrum Analog Output Module 2 x 1 ... 5 V (6ES5 470-8MD12) Technical specifications Output range (rated values) 1 to 5 V Number of outputs Galvanic isolation yes (outputs to grounding point and between outputs) Input resistance min. 3.3 k Connection method two or four-wire...
S5-100U Function Modules Function Modules 15.1 Comparator Module 2 × 1 to 20 mA/0.5 to 10 V (6ES5 461-8MA11) Technical Specifications Channels Galvanic isolation Current or voltage switch-selectable measurement Switch position “0” no measuring Display green LED for actual value setpoint Setpoint adjustment with potentiometer Setting error...
Page 416
Function Modules S5-100U Function The module has two isolated comparators for voltage or current measurement (selector switch with positions U/0/I). When the preset value is reached, the LED of the respective channel lights up and sends a “1” signal to the programmable controller. The module must be removed or the measuring circuit disconnected before you select the function.
Page 417
S5-100U Function Modules Typical Application A comparator module is mounted at slot 4. The current source is connected to channel 1. If the Schmitt trigger 1 detects that the current has exceeded the preset value, output 5.1 is to be set. Terminal Connections Explanation As soon as the limit is reached or exceeded, input 4.1...
Function Modules S5-100U 15.2 Timer Module 2 × 0.3 to 300 s (6ES5 380-8MA11) Technical Specifications Number of timers Time setting 0.3 to 3 s Range extension factor ×10, ×100 Function indication green LED Setting error ±10% Reproducibility ±3% Temperature influence +1%/10 °C (50 °F) of set time Insulation rating...
Page 419
S5-100U Function Modules Function The module contains two pulse timers. While a timer runs, the LED of the respective channel is lit and a “1” is reported to the CPU. The pulse duration is preselected with the time range selector “x 0.3 s / x 3 s / x 30 s” in a definite range and then set to the exact value by means of a potentiometer on the front panel.
Page 420
Function Modules S5-100U Typical Application as “On-Delay Timer” A timer module is mounted at slot 5. A time of 270 s is set on channel “0” of this module by means of the time-range selector and the potentiometer. The timer is started when input 0.0 is “1”. A lamp lights up (output 4.0) when the timer has run down.
S5-100U Function Modules 15.3 Simulator Module (6ES5 788-8MA11) Technical Specifications Function selection - simulation of 8 input selected by switch signals on rear of module - display of 8 output signals Function indication yellow LED “0”/“1” input signals switch-selectable Insulation rating VDE 0160 Rated insulation voltage...
Page 422
Function Modules S5-100U Function Simulator modules are 8-channel modules that can simulate digital input signals and display output signals. The type of module to be simulated (input or output) is selected by means of a switch on the rear of the module and indicated by two LEDs on the front panel.
S5-100U Function Modules 15.4 Diagnostic Module (6ES5 330-8MA11) Technical Specifications Insulation rating VDE 0160 Rated insulation voltage (+9 V to 12 V AC - insulation group 1×B - tested with 500 V AC Voltage monitor - undervoltage red LED - voltage ok green LED U1 8V Signal status display for...
Page 424
Function Modules S5-100U Function The diagnostic module is used for monitoring the S5-100U I/O bus. LEDs on the front panel display the signal states of the control lines and the supply voltage for the I/O bus. • IDENT The programmable controller executes an IDENT run after each change from STOP to RUN. It executes an IDENT run after any changes in the configuration in order to determine the current configuration.
Page 425
S5-100U Function Modules Installation The diagnostic module is plugged into a bus unit like any other input or output module (see chapter 3). The module has no mechanical coding. The coding element on the bus unit does not have to be reset. Note The module can be plugged in and removed regardless of the operating status of the programmable controller.
Function Modules S5-100U 15.5 Counter Module 2 × 0 to 500 Hz (6ES5 385-8MA11) Ch.0 Ch.1 5V/24 V Ch.0 Ch.1 COUNTER 500 Hz 6ES5 385-8MA11 +9 V Data 24 V 15-12 EWA 4NEB 812 6120-02b...
Page 427
S5-100U Function Modules Technical Specifications Number of Inputs Total permissible current of outputs Galvanic isolation Driving a digital input possible Input voltage - rated value 5 V/24 V DC Paralleling of outputs possible - for “0” signal 0 to 0.8/-33 to 5 V - max.
Page 428
Function Modules S5-100U Function The module consists of two independent down counters with isolated inputs and outputs. It counts input signals up to a frequency of 500 Hz from a set value down to the value 0. When 0 is reached, the 24-V DC output of the module is energized.
Page 429
S5-100U Function Modules Addressing A counter module can be addressed like a two-channel digital module (channel “0” or “1”). For enabling and resetting the counter, you address the module like a digital output module. The counter reading is scanned in the same way as a digital input module. Counter enable Q x .
Page 430
Function Modules S5-100U Typical Application A counter module is plugged into slot 2. A value of 100 is set on channel “0” of this module using the three-digit thumbwheel switches. The incoming pulses are counted once the counter has been enabled by the control program.
S5-100U Function Modules 15.6 Counter Module 25/500 kHz (6ES5 385-8MB11) 2× 4× 24 V HIGH SPEED COUNTER 25/500 kHz 6ES5 385-8MB11 +9 V Data +5 V 24 V 15-17 EWA 4NEB 812 6120-02b...
Page 432
Function Modules S5-100U Technical Specifications Power supply for sensor 24 V from L+ Operating mode (PTC thermistor) (switch-selectable) - position decoder Output current max. 300 mA, short- - counter circuit proof Sensor inputs 1 sensor 5 V Digital Inputs reference and (differential input) or enabling 1 sensor 24 V DC...
Page 433
S5-100U Function Modules Function The counter module can be used as an up-counter or as an up/down counter for a position decoder. The counting pulses are supplied by a sensor that you can connect to the 15-pin subminiature D female connector of the module. You can choose from two types of sensors that fulfill the following requirements: •...
Function Modules S5-100U 15.6.1 Installation Guidelines Installing and Removing the Module Plug the counter module into a bus unit like other I/Os. The counter module can only be plugged into slots 0 through 7. Set the coding key to number 6 on the bus unit. Installing or Removing the Sensor Disconnect the 24-V DC power supply (terminals 1 and 2 of the terminal block) before connecting or disconnecting the sensor cables.
Page 435
S5-100U Function Modules • Connecting Counting Pulse Sensors for 5-V Differential Signal to RS 422 Module Electronic light Sensor line 24 V Pulse sensor Shield Shell of subminiature D connector Figure 15-9. Connecting a Counting Pulse Sensor for 5-V Differential Signal to RS 422 •...
Page 436
Function Modules S5-100U • Connecting a 5-V Position Sensor to RS 422 Module Electronic light Sensor line 24 V Position sensor Shield Shell of subminiature D connector Figure 15-11. Connecting a 5-V Position Sensor to RS 422 • Connecting a 24-V DC Position Sensor Module Electronic light source 24 V...
Page 437
S5-100U Function Modules Sensor Requirements The following requirements must be satisfied by the sensor signals to the module inputs: • Signal sequence for up-counting Sensor signals: V (A, A-N/A) (B, B-N/B) (R, R-N/R) Figure 15-13. Signal Sequence for Up-Counting • Pulse time of the sensors 5-V Sensors 24-V Sensors...
Page 438
Function Modules S5-100U Terminal Block Proximity switches can be connected (contacts, two-wire BERO proximity limit switches) to the inputs on the terminal block. Terminal Terminal Assignment 24-V DC supply for the module Ground 24-V DC supply for enable signal DI enable signal DQ 24 V/0.5 A setpoint (Q0) Ground 24-V DC supply for reference signal...
S5-100U Function Modules 15.6.2 Data Transfer The data is transmitted via the I/O bus. Four bytes are used. Examples of data transfer are shown in section 15.6.6. Transfer from the Programmable Controller to the Counter Module (PIQ) The control program transfers two setpoints to the counter module by means of transfer operations. Table 15-1.
Page 440
Function Modules S5-100U • Diagnostic Byte (Byte 1) The diagnostic byte is byte 1 of the first input word. Byte 0 has no significance. The diagnostic byte provides information on the following items: - Preset position resolution - Preset mode - Status of setpoints - Signal status of the sync bit for position decoding Bit No.:...
S5-100U Function Modules 15.6.3 Functional Description of the Counter Mode In the operation mode “Counter”, the module works as a “port-controlled” up-counter and counts the positive edges of the counting pulses while the enable input is active. If the counter reaches a preselected setpoint, the respective output is enabled.
Page 442
Function Modules S5-100U Disabling the Counter A negative edge at the enable input disables the counter. The outputs, diagnostic bits, and the counter are not reset. You can continue reading the current count. A positive edge at the enable input resets the outputs and the diagnostic bytes. Reaching the Setpoints - Setting the Outputs - Resetting the Outputs If setpoints have been preselected and the counter is enabled, the module counts the positive edges at the counter input.
S5-100U Function Modules Performance during Overflow If the enabled counter exceeds the counter range limit 65,535 the following occurs: • Bit 3 (overflow) in the diagnostic byte is set to “1”. • The outputs and diagnostic bits for “setpoint reached” are disabled, but they remain unchanged. The counting function continues.
Page 444
Function Modules S5-100U Connect the sub-D interface female connector to an incremental position encoder that has to deliver the following signals: • Two counting pulses offset by 90 degrees • A reference pulse The pulses can be supplied as 5-V differential signals according to RS 422 (up to 500 kHz) or as 24-V DC signals.
Page 445
S5-100U Function Modules Example: A rotary incremental position encoder produces 1000 pulses per revolution. The spindle has a pitch of 50 mm/revolution. The position encoder therefore produces 1000 pulses for a traversing path of 50 mm (1 revolution). The resolution of the encoder is therefore 50 mm/1000 pulses. The counter can handle up to 65,536 pulses.
Page 446
Function Modules S5-100U Prerequisites for a Synchronization 1. The reference signal The sensor for the reference signal is connected to terminals 7 and 8 of the terminal block. Synchronization is enabled with the leading edge (0 to 1) at terminal 8. If the signal was already on “1”...
Page 447
S5-100U Function Modules Positive direction of traverse Reference signal Reference pulse of the sensor Change of direction Change of direction Reference signal Reference pulse of the sensor Synchronization No synchronization Sync. bit Figure 15-19a. Synchronization (SYNC Bit 0 -->1) 15-19b. No Synchronization during a Reversal of Direction before Reaching the Reference Pulse in a Positive Direction...
Page 448
Function Modules S5100U Starting the Counter The counter is reset and started by setting the SYNC bit in the diagnostic byte during the reference point approach operation. The active pulses are counted according to the rotation direction of the position encoder. The count value is incremented during a positive count direction, and decremen- ted during a negative count direction.
Page 449
S5-100U Function Modules You can read the current count in the STEP 5 program. The actual value is displayed as a signed whole number in two's complement and lies in the range - 32,768 to +32,767. Note Before you enable the outputs to be switched on by setting the enable input to “1”, make sure the following conditions exist: •...
Page 450
Function Modules S5100U Example 2: Approaching a Setpoint in Down-Count Direction Enable input Direction of traverse Output, diagnostic bit setpoint reached Setpoint Example of 1000 2000 3000 4000 5000 6000 7000 actual value Figure 15-23. Approaching a Setpoint in Down-Count Direction •...
Page 451
S5-100U Function Modules Performance during Overflow If the counter leaves the counting range of -32,768 to + 32,767, then the following occurs: • Bit 3 (overflow) in the diagnostic byte is set to “1”. • The outputs of the counter module are disabled. The enable input (terminal 4 of the terminal block) must be set to “0”, in order to switch off active outputs.
Function Modules S5100U 15.6.5 Entering New Setpoints for the Counter and Position Decoder Entering new setpoints is always possible via the PIQ. However, a setpoint is only valid if the respective output is not switched on. The status of the outputs is displayed with diagnostic bits S1 and S2.
S5-100U Function Modules 15.6.6 Addressing The counter module is addressed like an analog module (see section 6.3). • The module may only be plugged into slots 0 to 7. • The address range extends from byte 64 to byte 127. •...
Page 454
Function Modules S5100U Examples for Data Exchange between the Programmable Controller and the Counter Module Example 1: The counter module is plugged into slot 4. If you now wish to check whether your system for position decoding has been synchronized by a reference point approach, you must scan the sync bit in the diagnostic byte (bit 0).
S5-100U Function Modules 15.7 Closed-Loop Control Module IP 262 (6ES5 262-8MA12) (6ES5 262-8MB12) STATUS CLOSED LOOP CONTROLLER 6ES5 262-8MA12 15-41 EWA 4NEB 812 6120-02b...
Page 456
Function Modules S5-100U Technical Specifications Controller Analog outputs of the constant controller (6ES5 262-8MA12) Total cycle time (equals scan time) 100 to 200 ms Number of outputs Resolution of the Galvanic isolation open-loop controller 5 ms at 50 Hz Output signal range 0 to 20 mA or 4.2 ms at 60 Hz 4 to 20 mA...
Page 457
S5-100U Function Modules Function The S5-100U programmable controller offers different solutions for individual closed-loop control tasks. First there is a software solution for CPU 103, version 8MA02 and higher, via function blocks. Second, there is a control module solution (for example, a module that can solve PID control tasks simply and in a time saving manner).
Page 458
Function Modules S5-100U Addressing The module is addressed like a four-channel analog module. Operating Modes Since transducers and sensors are directly wired to the module, the module can work independently from a programmable controller in stand-alone operation, provided that the setpoints and the 24-V power supply voltage are fed directly to the IP 262.
S5-100U Function Modules 15.8 IP 263 Positioning Module (6ES5 263-8MA13) FAULT 1 FAULT 2 F 3.15 A Positioning/Counter Module IP 263 6ES5 263-8MA13 15-45 EWA 4NEB 812 6120-02b...
Page 460
Function Modules S5-100U Technical Specifications Digital Inputs Encoders Input voltage range - 3 V to + 30 V Galvanic isolation Position decoder incremental, absolute 0 signal - 3 V to +5 V (SSI interface) 1 signal +13 V to+30 V Permissible zero-signal current Maximum traversing range at 0 signal...
Page 461
S5-100U Function Modules A separate manual is available for the IP 263 positioning module. It can be ordered under the order number 6ES5 998-5SK21. The IP 263 is suitable for positioning of two independent axes. Assignments of Outputs The IP 263 is a two-channel module: 4 digital outputs are assigned to each channel for the control of drives;...
Page 462
Function Modules S5-100U Switchover point Cutoff point Rapid traverse Target range Creep Rapid traverse Creep speed Clockwise Anti-clockwise Fig. 15-26. Positioning with the IP 263 During reference point travel, the digital input of the module senses the speed reducing cam (reference point switch).
S5-100U Function Modules 15.9 IP 264 Electronic Cam Controller Module 6ES5 264-8MA12 ACTIVE FAULT F 10 A Cam Controller Module IP 264 6ES5 264-8MA12 15-49 EWA 4NEB 812 6120-02b...
Page 464
Function Modules S5-100U Technical Specifications Digital Inputs Encoders Input voltage range -3 V to + 30 V Actual value sensing incremental, absolute Galvanic isolation (SSI interface) 0 signal - 3 V to +5 V 1 signal +13 V to+30 V Maximum traversing range Permissible zero-signal current - with incremental encoders...
Page 465
S5-100U Function Modules A separate manual is available for the electronic cam controller. It can be ordered under the order number 6ES5 998-5SL21. The IP 264 can be used both for rotary and linear axes. The IP 264 electronic cam controller makes electronic processing of cams economical even for applications in the lower performance range.
Function Modules S5-100U 15.10 IP 265 High Speed Sub Control (6ES5 265-8MA01) STOP RUN HIGH SPEED SUB CONTROL 24 V 6ES5 265-8MA01 15-52 EWA 4NEB 812 6120-02b...
Page 467
S5-100U Function Modules Technical Specifications Digital 24 V outputs (9-pin sub D socket connector) Current consumption from +9 V (CPU) <175 mA Number of outputs Signal status display only for 24 V inputs Galvanic isolation and 24 V outputs (green LEDs) Status display Yes, on 5 V side Operating status display...
Page 468
The COM 265 is available for user-programming of the IP 265. Besides it being programmable, the IP 265 can also be used to implement the special ”counter” function with a fixed-program standard program. For this purpose, SIEMENS AG offers a memory submodule for the IP 265 with the standard ”counter” function.
S5-100U Function Modules 15.11 Positioning Module IP 266 (6ES5 266-8MA11) Technical Specifications Analog Output Output signal range ±10 V Digital signal representation 13 bits plus sign Short-circuit proof Reference potential of the analog output signal analog ground of the power section FAULT Cable length shielded max.
Page 470
Function Modules S5-100U Because of its performance capability and the complexity of its description, the IP 266 has its own manual that you can order separately. The order number is: 6ES5 998-5SC21. The positioning control module IP 266 expands the field of application for “positioning operations” of the S5-100U. As an “intelligent I/O module”, it allows you to use open-loop as well as closed-loop control positioning.
Page 471
S5-100U Function Modules Besides purely traversing movements, other operating modes allow offset generation of axis coordinates or drift compensation in the system. In addition, the IP 266 offers operating modes to read data such as positioning actual value or residual traversing distances. In order to use the IP 266 in an automatic manufacturing process, it is possible to combine individual traversing applications, positioning corrections, offsets or dwell times in a “traversing program”.
Page 472
Function Modules S5-100U Overview of the Operation Modes Table 15-8. Designation of the Operating Modes List of the Operating Modes JOG 1 AUTOMATIC SINGLE BLOCK ACKNOWLEDGE ERROR JOG 2 TEACH-IN ON DRIFT COMPENSATION ON CONTROLLED JOG TEACH-IN OFF DRIFT COMPENSATION OFF FOLLOW-UP MODE ZERO OFFSET ABSOLUTE RAM EEPROM...
S5-100U Function Modules 15.12 Stepper Motor Control Module IP 267 (6ES5 267-8MA11) Technical Specifications Supply voltage (BUS) Current consumption approx. 150 mA Special voltage V 5 V to 30 V Digital Inputs Rated input voltage 24 V Galvanic isolation Input voltage: “0”...
Page 474
Function Modules S5-100U Because of its performance capability and the complexity of its description, the IP 267 has its own manual that you can order separately. The order number is: 6ES5 998-5SD21. The IP 267 Stepper Motor Control Module expands the field of application as an intelligent I/O module (IP) of the S5-100U and S5-95U programmable controllers for “closed-loop control positioning".
Page 475
S5-100U Function Modules Using a limit switch on the digital inputs, IP 267 can monitor the limits of a traversing range and stop the traversing movement when the permissible range limit is exceeded. The activated input “external stop” causes a calculated decelerating of the traversing movement. An emergency limit switch can be installed at input “IS”...
Function Modules S5-100U 15.13 Communications Modules 15.13.1 Printer Communications Module CP 521SI (6ES5 521-8MA22) Technical Specifications Galvanic isolation TTY signals are isolated Memory submodule EPROM/EEPROM Serial interface V.24/TTY passive (active) Transmission Asynchronous 10-bit character frame/11-bit character frame Transmission rate 110 to 9600 baud Battery Permissible cable length 3,4 V...
Page 477
S5-100U Function Modules The CP 521 SI (Serial Interface) communications module is a powerful I/O module with its own central processor. A separate manual is available for this module. It can be ordered under the order number 6ES5 998- 1UD21. The following is an overview of the module's mode of operation.
Page 478
Function Modules S5-100U The maximum data flow rate is 6 bytes of user data per 2 program cycles; i.e. at a program cycle time of, for example, 50 ms a maximum of 60 bytes per second can be transmitted. The following terminals and communications devices can be used as I/O devices: •...
S5-100U Function Modules 15.13.2 Communications Module CP 521 BASIC (6ES5 521-8MB12) Technical Specifications Galvanic isolation TTY signals are isolated Memory submodule EPROM/EEPROM/ Serial interface V.24 (RS-232-C)/TTY, passive Real-time clock - accuracy ±1 s/day at 25 °C PROG (77 °F) - variation due to Battery temperature change t 3,4V...
Page 480
Function Modules S5-100U The CP 521 BASIC is a powerful peripheral module that can be used with the SIMATIC systems S5-90U, S5-95U, and the S5-100U. It has its own central processor (cannot be used with the CPU 100, version 8MA01). A separate manual for this module is available.
Operations List, Machine Code and List of Abbreviations Appendix B Dimension Drawings Appendix C Active and Passive Faults in Automation Equipment / Guidelines for Handling Electrostatic Sensitive Devices Appendix D Information for Ordering Accessories Appendix E Reference Materials Appendix F Siemens Addresses Worldwide EWA 4NEB 812 6120-02b...
S5-100U Operations List, Machine Code and List of Abbreviations Operations List, Machine Code and Abbreviations Operations List A.1.1 Basic Operations For organization blocks (OB) For function blocks (FB) For program blocks (PB) For sequence blocks (SB) Oper- Permissible RLO* Execution Time in µs Function ation Operands...
Page 486
Operations List, Machine Code and List of Abbreviations S5-100U Execution Time in µs Oper- Permissible RLO* Function ation Operands CPU 100 CPU 102 CPU 103 MA02 MA03 (STL) Set/Reset Operations (cont.) I, O typ. Reset operand to “0”. I, O typ.
Page 487
S5-100U Operations List, Machine Code and List of Abbreviations Oper- Permissible RLO* Execution Time in µs Function ation Operands CPU 100 CPU 102 CPU 103 MA02 MA03 (STL) Load Operations (cont.) 1.45 Load a constant (1-byte number) into ACCU 1. Load a constant (2 characters in ASCII format) into ACCU 1.
Page 488
Operations List, Machine Code and List of Abbreviations S5-100U Oper- Permissible RLO* Execution Time in µs Function ation Operands CPU 100 CPU 102 CPU 103 MA02 MA03 (STL) Transfer Operations (cont.) Permissible in OB2 and OB13. Transfer the contents of ACCU 1 to the interrupt PIQ with updating of the PIQ.
Page 489
S5-100U Operations List, Machine Code and List of Abbreviations Oper- Permissible RLO* Execution Time in µs Function ation Operands CPU 100 CPU 102 CPU 103 MA02 MA03 (STL) Counter Operations (cont.) Set counter. Reset counter. Arithmetic Operations Add two fixed-point numbers: ACCU 1+ACCU 2.
Page 490
Operations List, Machine Code and List of Abbreviations S5-100U Execution Time in µs Oper- Permissible RLO* Function ation Operands CPU 100 CPU 102 CPU 103 MA02 MA03 (STL) Block Call Operations 3.35 Jump unconditionally to a program block. 3.35 Jump unconditionally to a function block.
Page 491
S5-100U Operations List, Machine Code and Abbreviations Execution Time in µs Oper- Permissible Function ation Operands RLO* CPU 100 CPU 102 CPU 103 MA02 MA03 (STL) Display Generation Operations (cont.) Display generation operation for the programmer: switch to control system flowchart (CSF). Display generation operation for the programmer: switch to ladder diagram (LAD).
Operations List, Machine Code and Abbreviations S5-100U A.1.2 Supplementary Operations For organization blocks (OB) For function blocks (FB) For program blocks (PB) For sequence blocks (SB) Oper- Permissible RLO* Execution Time in µs Function ation Operands CPU 100 CPU 102 CPU 103 MA02 MA03...
Page 493
S5-100U Operations List, Machine Code and Abbreviations Oper- Permissible RLO* Execution Time in µs Function ation Operands CPU 100 CPU 102 CPU 103 MA02 MA03 (STL) Bit Operations (cont.) Test a bit of a data word for “0”. Test a bit of a data word in the system data area for “0”.
Page 494
Operations List, Machine Code and Abbreviations S5-100U Oper- Permissible RLO* Execution Time in µs Function ation Operands CPU 100 CPU 102 CPU 103 MA02 MA03 (STL) Timer and Counter Operations (cont.) Formal op. 194** 145** Start an on-delay timer (formal operand) with the value stored in ACCU 1.
Page 495
S5-100U Operations List, Machine Code and Abbreviations Oper- Permissible RLO* Execution Time in µs Function ation Operands CPU 100 CPU 102 CPU 103 MA02 MA03 (STL) Conversion Operations Form the one's complement of ACCU 1. Form the two's complement of ACCU 1.
Page 496
Operations List, Machine Code and Abbreviations S5-100U Oper- Permissible RLO* Execution Time in µs Function ation Operands CPU 100 CPU 102 CPU 103 MA02 MA03 (STL) Other Operations Disable interrupt. Input/ output interrupt or timer OB processing is disabled. Enable interrupt. This operation cancels the effect of IA.
S5-100U Operations List, Machine Code and Abbreviations A.1.3 System Operations, for CPU 102 and Higher Oper- Permissible RLO* Execution Time in µs Function ation Operands CPU 100 CPU 102 CPU 103 MA02 MA03 (STL) Set Operations Set bit in system data area unconditionally.
Operations List, Machine Code and Abbreviations S5-100U Execution Time in µs Oper- Permissible RLO* Function ation Operands CPU 100 CPU 102 CPU 103 MA02 MA03 (STL) Block Call Operations and Return Operations 3.35 Call an organization block unconditionally. 3.35 Call an organization block conditionally.
Page 500
Operations List, Machine Code and List of Abbreviations S5-100U Machine Code Machine Code Oper- Oper- Oper- Oper- ation ation A-16 EWA 4NEB 812 6120-02b...
Page 501
S5-100U Operations List, Machine Code and List of Abbreviations Machine Code Machine Code Oper- Oper- Oper- Oper- ation ation NOP 1 Explanation of the Indices + byte address + number of shifts + bit address + relative jump address + parameter address + register address + timer number + block length in bytes...
Operations List, Machine Code and List of Abbreviabrations S5-100U List of Abbreviations Permissible Operand Value Range for Abbreviation Explanation CPU 100 CPU 102 CPU 103 ACCU 1 Accumulator 1 (When accumulator 1 is loaded, any existing contents are shifted into accumulator 2.) ACCU 2 Accumulator 2 Byte constant (fixed-point number)
Page 503
S5-100U Operations List, Machine Code and List of Abbreviabrations Permissible Operand Value Range for Abbreviation Explanation CPU 100 CPU 102 CPU 103 DB1 parameter: SINEC L1, position of the “Receive” coordination byte DB1 parameter: SINEC L1, position of the “Send” coordination byte Constant (count) (0 to 999) (0 to 999)
Page 504
Operations List, Machine Code and List of Abbreviabrations S5-100U Permissible Operand Value Range for Abbreviation Explanation CPU 100 CPU 102 CPU 103 Result of logic operation RLO affected? The RLO is affected/not affected by the operation. dependent? The statement is executed only if the RLO is “1”. The statement is executed only on positive/negative edge change of the RLO.
Page 506
Figures Cross Sections of Standard Mounting Rails ......Dimension Drawing of the 483-mm (19-in.) Standard Mounting Rail .
Page 507
S5-100U Dimension Drawings Dimension Drawings Dimensions are indicated in millimeters. The approximate equivalent in inches is indicated in parentheses. (1 mm=0.039 in. rounded off to the nearest tenth or hundredth of an inch) 15° 15° Deburred Deburred 2.5 (0.1) 2.5 (0.1) R 1.2 (0.05) R 1.2 (0.05) R 1.2 (0.05)
Page 508
Dimension Drawings S5-100U 15 (0.6) 20 x 25=500 (0.8 x 1.0=19.7) 25 (1.0) 5.2 (0.2) 18 (0.7) 530 (20.9) Figure B-3. Dimension Drawing of the 530-mm (20.9-in.) Standard Mounting Rail 15 (0.6) 32 x 25=800 (1.26 x 1.0=31.5) 25 (1.0) 5.2 (0.2) 18 (0.7) 830 (32.7)
Page 510
Dimension Drawings S5-100U 135 (5.3) 85 (3.4) 127 (5) 81 (3.2) 135 (5.3) ith crimp snap-in connection (6ES5 700-8MA22) Standard mounting rail EN 50022-35 x 15 91.5 (3.6) 45.75 (1.8) Figure B-7. Dimension Drawing of the Bus Unit (Crimp Snap-in Connections) with I/O Module EWA 4NEB 812 6120-02b...
Page 511
S5-100U Dimension Drawings 135 (5.3) 85 (3.4) 127 (5) 81 (3.2) 162 (6.4) with screw type terminals (6ES5 700-8MA11) Standard mounting rail EN 50022-35 x 15 91.5 (3.6) 45.75 (1.7) Figure B-8. Dimension Drawing of the Bus Unit (SIGUT Screw-type Terminals) with I/O Module EWA 4NEB 812 6120-02b...
Page 512
Dimension Drawings S5-100U (5.3) min. 210 (8.3) max. 570 (22.4) 81 (3.2) (5.3) 13.5 (0.5) 26 (1) 45.4 (1.8) 35 (1.4) Figure B-9. Dimension Drawing of the IM 315 Interface Module EWA 4NEB 812 6120-02b...
Page 513
S5-100U Dimension Drawings 45.4 (1.8) min. 210 (8.3) max. 10000 (39.4) 81 (3.2) 135 (5.3) 13.5 (0.5) 26 (1) 35 (1.4) Figure B-10. Dimension Drawing of the IM 316 Interface Module (6ES5 316-8MA12) EWA 4NEB 812 6120-02b...
Page 514
Dimension Drawings S5-100U 135 (5.3) 120 (4.7) 127 (5) 81 (3.2) Standard mounting rail EN 50022-35×15 45.4 (1.8) Figure B-11. Dimension Drawing of the PS 930 and PS 931 Power Supply Modules EWA 4NEB 812 6120-02b...
Page 515
Active and Passive Faults in Automation Equipment EWA 4NEB 812 6120-02b...
Page 517
8, “Permissible exceptions when working on live parts.“ Do not attempt to repair an item of automation equipment. Such repairs may only be carried out by Siemens service personnel or repair shops Siemens has authorized to carry out such repairs.
Page 518
Active and Passive Faults in Automation Equipment S5-100U Guidelines for Handling Electrostatic Sensitive Devices (ESD) What is ESD? All electronic modules are equipped with large-scale integrated ICs or components. Due to their design, these electronic elements are very sensitive to overvoltages and thus to any electrostatic discharge.
Page 519
S5-100U Active and Passive Faults in Automation Equipment/ESD Guidelines Electrostatic charging of objects and persons Every object with no conductive connection to the electrical potential of its surroundings can be charged electrostatically. In this way, voltages up to 15000 V can build up whereas minor charges, i.e.
Page 520
Active and Passive Faults in Automation Equipment S5-100U Additional precautions for modules without housings Note the following measures that have to be taken for modules that are not protected against accidental contact: • Touch electrostatical sensitive devices only - if you wear a wristband complying with ESD specifications or - if you use special ESD footwear or ground straps when walking ona an ESD floor.
Page 521
S5-100U Active and Passive Faults in Automation Equipment/ESD Guidelines The following Figures once again illustrates the precautions for handling electrostatically sensitive devices. Conductive flooring material Table with conductive, grounded surface ESD footwear ESD smock Gounded ESD writstband Grounded connection of switchgear cabinet Grounded chair Figure C-1.
Page 525
S5-100U Information for Ordering Accessories Information for Ordering Accessories Order Numbers Standard 35 mm Mounting Rail for 19-in. cabinets, length 483 mm 6ES5 710-8MA11 for 600 mm cabinets, length 530 mm 6ES5 710-8MA21 for 900 mm cabinets, length 830 mm 6ES5 710-8MA31 Length 2000 mm, without holes 6ES5 710-8MA41...
Page 526
Information for Ordering Accessories S5-100U Order Numbers Central Processing Units (CPUs) CPU 100 6ES5 100-8MA02 CPU 102 6ES5 102-8MA02 CPU 103 6ES5 103-8MA03 S5-100U System Manual (CPU 100, CPU 102, CPU 103) German 6ES5 998-0UB13 English 6ES5 998-0UB23 French 6ES5 998-0UB33 Spanish 6ES5 998-0UB43 Italian...
Page 527
S5-100U Information for Ordering Accessories Order Numbers Manual for IP 262 Closed-Loop Control Module German 6ES5 998-5SG11 English 6ES5 998-5SG21 French 6ES5 998-5SG31 Italian 6ES5 998-5SG51 Manual for IP 263 Positioning Module German 6ES5 998-5SK11 English 6ES5 998-5SK21 Manual for IP 264 Electronic Cam Controller Module German 6ES5 998-5SL11 English...
Page 528
Information for Ordering Accessories S5-100U Order Numbers Digital Input/Output Module 24 V DC 16 inputs/16 outputs 6ES5 482-8MA13 Accessories Front connector, 40-pin for crimp snap-in connection – with crimp contacts 6ES5 490-8MA13 – without crimp contacts 6ES5 490-8MA03 Front connector, 40-pin for screw-type connection –...
Page 529
S5-100U Information for Ordering Accessories Order Numbers Operator Panels and Programmers OP 393-III Operator Panel with connecting cable 6ES5 393-0UA15 OP 393-III Operator guide, German 6ES5 998-0UQ12 PG 605U Programmer 6ES5 605-0UA11 PG 605U Operator guide, German 6ES5 998-0UP11 PG 720 Programmer 6ES7 720-0AB00-0YA0 PG 720 C Programmer 6ES7 720-1AB00-0YB0...
Page 533
S5-100U Reference Materials Reference Materials The following reference material can be ordered from your local Siemens Company or your local bookshop: • Automating with the SIMATIC® S5-115U Programmable Controllers Hans Berger Siemens AG, Berlin and Munich, 1989 (2nd Edition) (Order No.: ISBN 3-8009-1530-8) •...
Page 537
Federal Republic Ireland Siemens AG Österreich of Germany (continued) Siemens Ltd. Vienna Hanover Dublin Bregenz Leipzig Graz Mannheim Italy Innsbruck Munich Siemens S. p. A. Klagenfurt Nuremberg Milan Linz Saarbrücken Bari Salzburg Stuttgart Bologna Brescia Belgium Finland Casoria Siemens S.A.
Page 538
Siemens Addresses Worldwide S5-100U Romania Switzerland USSR Siemens birou de Siemens-Albis AG Siemens AG Agency consulta ii tehnice Zürich Moscow Bukarest Bern Siemens-Albis S.A. Yugoslavia Spain Lausanne, Renens General Export Siemens S.A. OOUR Zastupstvo Madrid Turkey Belgrade ETMA Ljubljana Sweden...
Page 539
S5-100U Siemens Addresses Worldwide Sudan Brazil Honduras National Electrical & Siemens S.A. Representaciones Electro- Commercial Company São Paulo industriales S. de R.L. (NECC) Belém Tegucigalpa Khartoum Belo Horizonte Brasília Mexico Swaziland Campinas Siemens S.A. Siemens (Pty.) Ltd. Curitiba México, D.F.
Page 540
Electro Mechanical Co. Iraq Lahore Abu Dhabi Samhiry Bros. Co. (W.L.L.) Peshawer Baghdad Quetta Siemens Resident Engineer Rawalpindi Abu Dhabi Siemens AG (Iraq Branch) Scientechnic Baghdad People's Republic of China Dubai Siemens Represen- Japan tative Office Siemens Resident Engineer Siemens K.K. Beijing...
Page 541
S5-100U Siemens Addresses Worldwide Asia (continued) Yemen (Arab Republic) Tihama Tractors & Engineering Co.o., Ltd. Sanaa Siemens Resident Engineer Sanaa Australia Australia Siemens Ltd. Melbourne Brisbane Perth Sydney New Zealand Siemens Liaison Office Auckland EWA 4NEB 812 6120-02b...
Page 545
S5-100U Index Index Block Accumulator 8-10, 8-12 - call operations 8-33 Actual operand 7-14 - end symbol Addition 8-31 - header Address - ID 9-1, 9-5, 9-10 - absolute - length - relative 5-10 - parameters 7-14 Address assignment - programming - in RAM 6-15 - structure...
Page 546
Index S5-100U Control Display generation operation 8-39 - deviation 9-21 Divider : 16 9-13 - system flowchart (CSF) DO operation 8-54 - variable 9-12 - word 9-19 Controller Electromagnetic interference 3-22 - continuous action 9-15 Electronic cam controller module 15-49 Controller DB 9-15, 9-19 Enable operation...
Page 547
S5-100U Index Installation of the S5-100U - electrical 3-20, 3-21 10-1, 10-4 - horizontally OB13 7-28 - mechanical OB21 7-24 - mechanical, with external OB22 7-24 I/Os On-delay 8-22, 8-23 - vertical - stored 8-23 Integral action time (TN) 9-19 - timer 15-6 Interface...
Page 548
Index S5-100U Position sensor Real-time clock - connecting 15-20, 15-2 - integral 12-1 Positioning 15-57 - reading 12-21 - algorithm 9-18 - setting 12-5, 12-21 - closed-loop controlled 15-60 Receive Mailbox (EF) 13-2 - open-loop controlled 15-56 Reference Positioning module - point approach 15-31 - IP 263...
Page 549
S5-100U Index Slave 13-3, 13-5 USTACK Slot addressing SONAR BERO 11-23 Start ID 9-4, 9-5 Wiring START-UP 4-1, 7-24 - arrangement 3-29 Starting up Wiring method Statement list (STL) - crimp-snap-in terminals 3-10 STATUS - screw-type terminals STATUS VAR Status word 12-12, 12-15 Stepper motor control 15-59...
Page 551
Siemens AG A&D AS E 148 Postfach 1963 D-92209 Amberg Federal Republic of Germany From: Your Name: Your Title: Company Name: Street: City, Zip Code: Country: Phone: Please check any industry that applies to you: Automotive Pharmaceutical Chemical Plastic Electrical Machinery...
Page 552
Your comments and recommendations will help us to improve the quality and usefulness of our publications. Please take the first available opportunity to fill out this questionnaire and return it to Siemens. Title of Your Manual: Order No. of Your Manual:...