Siemens SIMATIC S5 Equipment Manual

Siemens SIMATIC S5 Equipment Manual

Digital position decoder ip 241 with fb 156/1 57 158
Hide thumbs Also See for SIMATIC S5:
Table of Contents

Advertisement

Siemens SIMATIC S5 Equipment Manual

Advertisement

Table of Contents
loading

Summary of Contents for Siemens SIMATIC S5

  • Page 1 Artisan Technology Group is your source for quality new and certified-used/pre-owned equipment SERVICE CENTER REPAIRS WE BUY USED EQUIPMENT • FAST SHIPPING AND DELIVERY Experienced engineers and technicians on staff Sell your excess, underutilized, and idle used equipment at our full-service, in-house repair center We also offer credit for buy-backs and trade-ins •...
  • Page 2 General Function Description Operating Instructions Matching Module for Incremental Encoders Digital Position Decoder for Abso ute Encoders (Excess-3 Gray) with FB 156/1 57 for Abso ute Encoders Equipment Manual for Abso ute Encoders (Analog) for Abso ute Encoders (Synchronous-Serial) Technical Specifications Programming Instructions Release: 02 Order No.: 6ES5998–0KD21...
  • Page 3 Passing on and reproduction of these documents, or utilization and disclosure of their contents is prohibited unless specifically authorized. Violations are cause for damage liability. All rights reserved, particularly in the event a patent is issued or a utility-model patent registered.
  • Page 4 In the event of product liability damages due to the use of so–called SIMATIC– compatible mod- ules, Siemens is not liable since we have taken timely action in warning users of the potential hazards involved in so–called SIMATIC– compatible modules.”...
  • Page 5 ENVIRONMENTAL PROTECTION IN ACTION Information Concerning Packaging Material/Notes on Disposal Dear Customer ! Our high–quality products cannot reach you safely without effective protective packaging. The size of the packaging is kept to an absolute minimum. All our packaging materials are harmless to the environment and can be disposed of without dan- ger.
  • Page 6: Table Of Contents

    Table of Contenta R 02/92 Table of Contents General Function Description Design of thelP 241 ..........1 – 1 Block Diagram: Basic Module IP241 .
  • Page 7 Table of Contents Matching Module 1 for Absolute Encoders (Excess–3 Gray) Function Description ..........4 – 1 Block Diagram .
  • Page 8 For clarity’s sake, this equipment manual does not cover every conceivable situation in complete detail. Contact your local Siemens office if you need additional information or if a special problem arises which is not covered in sufficient detail by this manual.
  • Page 9: General Function Description

    Contents R 02/92 General Function Description Design of the IP241 ..........1 – 1 Block Diagram: Basic Module IP241 .
  • Page 10 R 02/92 General Function Description Design of the 1P 241 Basic module Matching module Incremental Absolute 1 Synchronization LEDs for channel 1 < Excess–3 Gray < for channel 2 CD/Binary Channel 1 (50-way sub D) Absolute 3 Analog Preliminary contact 2 Absolute 4 P 24 V external Serial...
  • Page 11: Characteristicsofthe Lp241

    General Function Description Characteristics of the 1P 241 – The 1P 241 acquires position–based signals. of 16 tracks. Single channel operation, however, with 32 tracks can also be selected. ply voltage for these encoders can also be provided by the 1P 241). actual values are continuously compared with the initial and the end track setpoints and the corresponding track identifier bits are set.
  • Page 12: Block Diagram: Basic Module Ip241

    General Function Description Block Diagram: Basic Module 1P 241 Channel 2 Channel 1 - - - - - * - - - - - PS Enwder Encoder Matching Encoder Matching Module Module P 24 V P 24 V DC Converter T V S DEW-7 Address generation...
  • Page 13: Structureofachannel

    R 02/92 General Function Description Structure of a Channel Position encoder Peripheral bus SIMATIC S5 > The position encoder signals are converted to ITL level by the encoder matching module and are transferred as actual values to the basic module.
  • Page 14: Communication Between Ip241 Digital Position Encoder

    General Function Description R 02/92 Communication between 1P 241 Digital Position Decoder and Programmable Controller Programmable Controller 2 4 1 ) ~p~~~~eterize) — S nchronization LED New start S nchronization LED controller sub D) nary contact (Control) — + 24 V external M external —...
  • Page 15: Linearaxis Operating Mode

    General Function Description General Operating Principle of the 1P 241 r ————.————.———.————— Basic module Matching module 1500 Track 2000 Electromechanical cam control system A maximum of 16 tracks per channel is possible. If “single channel” operation is selected, max- imum of 32 tracks is possible (operation with par- allel connection) Each cam corresponds to an electronic cam on the 1P 241;...
  • Page 16 General Function Description R 02/92 For each desired reaction, a cam can be setup on a track. The size and position of this cam can be specified by writing the respective initial setpoint A and the end setpoint E of the cam into a data block (IP 241). By means of the standard function block FB 156, this data block is then transferred to the 1P 241 and the module is parameterized.
  • Page 17 R 02/92 General Function Description If the selected end value is higher than the initial value, the track identifier bit is set within the cam (= 1). If, however, the selected initial value is higher than the end value, the track identifier bit within the cam is reset (= O).
  • Page 18 General Function Description Note 1 (for positive values): Total track area Traversing direction — I raversing direction “o” Track identifier bit (A= 100, E = 200) “ ,, 1 Track identifier bit (E = 100, A = 200) “o” Aside from the traversing direction the following applies: When the first cam value in traversing direction is reached, the track identifier bit is set (or reset respectively).
  • Page 19 R 02/92 General Function Description Note 2 (for negative values): Total track area – l o o –200 Increasing values Traversing direction — Decreasing values Traversing direction Track identifier bit (A= –100, E = –200) Track identifier bit (E = -100, A = –200) “o”...
  • Page 20 General Function Description R 02/92 Note 3 (for positive values): Total track area Traversing direction I [ Traversing direction Track identifier bit (A= 50, E = 51) Track identifier bit (E = 50, A = 51) Aside from the traversing direction, in this case the track identifier bit is available as an edge. This means that an evaluation in the S5 can only be effected by enabling an interrupt for this track, Artisan Technology Group - Quality Instrumentation ...
  • Page 21 R 02/92 General Function Description Note 4 (for negative values): Total track area –50 - 5 1 Increasing I r a v e r s i n g ‘ Traversing time “o” Track identifier bit (A= –51, E = –50) Track identifier bit (E = –51, A = -50) –511 –49 –50...
  • Page 22 General Function Description R 02/92 Note 5: It is possible to define a cam, the initial value of which is very close to the end values. It is generally best to adjust the width of the cam to the traversing speed. It must still be possible to read the respective track identifier during normal evaluation in the S5 cycle.
  • Page 23: Function

    R 02/92 General Function Description Linear Axis Operating Mode 1.7.1 Function The linear axis operating mode is the basic setting for the 1P 241 at the initial start-up, after a power failure, and after software reset. Channel 2 Channel 1 A = Initial –99999 -99999...
  • Page 24 General Function Description Example 1 Programmable controller Amplifying unit Example 1: Automatic Milling Operation with 1P 241 Via the encoder, flange attached to the shaft, the 1P 241 receives the “actual position” of the car- riage and thus accordingly the work piece position. The end positions of the milling head (respective work piece dimensions) are specified as set- points.
  • Page 25: Conditions

    General Function Description Example 2: Example 2: Simple Positioning in a High Shelf Storage System In this case the actual positions are transferred to the 1P 241 via absolute value encoders as other- wise long distances would have to be covered by “reference point traversing” in the event of a voltage cut off.
  • Page 26: Rotary Axis Operating Mode

    General Function Description R 02/92 Rotary Axis Operating Mode 1.8.1 Function The rotary axis function can be selected separately for each channel, starting with version: A14 (firmware release R08) for basic module 6ES5 241 –lAA11 or AO1 (firmware release R09) for basic module 6ES5 241 –1AA12 Specify the desired function in the data block (IP 241 ) for parameterization via standard function block FB 156 in accordance with the programming instructions.
  • Page 27 R 02/92 General Function Description Use only cyclic movement in one direction in rotary axis mode! The example shows the most frequently used rotary axis with the end value 359 and a cam from 310 to 320: The hatched area may not have an initial value and/or an end value (see also section 1.8.2). This area depends on the processing time per channel.
  • Page 28 Enabled interrupts are also triggered by this. As a remedy, a track with a cam from 20 (E) via O to 350 (A) can be assigned. With this track identifier bit, the traversing direction in the SIMATIC S5 must then be linked and “held”.
  • Page 29: Conditions

    R 02/92 General Function Description 1.8.2 Conditions Incremental encoder: 1. The zero mark of the encoder and the preliminary contact define the end value of the rotary axis. The encoder must be selected in accordance with the rotary axis requirements, or the zero mark and the preliminary contact must be transferred to the 1P 241 accordingly.
  • Page 30: Parallel Connection Operation

    General Function Description Parallel Connection Operation 1.9.1 Function “operation in parallel connection” function makes it possible to use a maximum of 32 tracks (with only one encoder matching module) without additional wiring in pseudo single–channel mode. This means that the result from the comparison of the actual values with the setpoints can be evaluated by reading the track identifier bits for channel 1 (tracks Oto 15) and channel 2 (tracks 16 to 31 ), both...
  • Page 31: Verify-Read

    R 02/92 General Function Description 1.10 Verify-Read This special function is used to eliminate brief disturbances (e.g., on the encoder line), The basic module reads the actual value of the matching encoder submodule. Immediately after this read access, the actual value is read again, and compared with the value first read in. If equal, calculation is continued with this value.
  • Page 32 R 02/92 General Function Description This special function allows you to use software to inhibit all interrupts of the module. Entry in Byte (Module Address +n) The function is selected by transfer of E3, and deselected with another transfer of E3. The status of bits 5 and 6 in response message byte 7 (module address +7) indicates whether this function is active.
  • Page 33: Read Zeroshiftvalue

    R 02/92 General Function Description 1.12.3 Depending on Direction This function allows you to inhibit the interrupts for channel 1 and/or channel 2, depending on the direction. Inhibit Direction Entry in Byte (Module Address +n) Channel Backward Forward Backward and forward Backward Forward Backward and forware...
  • Page 34: Operating Instructions

    Contents R 02/92 Operating Instructions Overview of 1P 241 Settings ......... . 2 – 1 Settings for the Module Address and the Interrupt Lines .
  • Page 35: Overviewoflp241 Settings

    Operating Instructions R 02/92 Overview of 1P 241 Settings Dip Switch S1 Jumpers A-B/C–D II R18/R27/R30 For configuring the For setting the module address Connection M ,X and the interrupt line with Mint encoder supply vol- tage (see section 3) 2.2) only to be opened in (see section...
  • Page 36: Settingsforthe Moduleaddress And The Lnterruptlines

    Operating Instructions R 02/92 Settings for the Module Address and the Interrupt Lines 2 . 2 (See the layout for the basic module, section 2.1.) Example: “136” is set as module address. s 5 - 115U 135U 15ou/s .13 -g open 010 010 0 .
  • Page 37: Possible Interrupts (Alarms)

    Operating Instructions Possible Interrupts (Alarms) Interrupts can be allocated to the following values by an entry into a data block (IP 241): For each initial track value (of a cam) An interrupt is triggered only when the initial value is reached or exceeded from any travers- ing direction.
  • Page 38 R 02/92 Operating Instructions Notes: — If the peripheral byte O is used as an interrupt source, the address O may not be used in the P–area of any other 1/0 module (double addressing). – After start-up, the interrupts in OB20 to OB22 must be deleted. This is accomplished by read- ing identifier bits.
  • Page 39 Operating Instructions R 02/92 Example for the Recommended Interrupt Evaluation in the Cyclic Program and in the interrupt–OBs: Program in 061: Program in 062: : JU FB 157 : JU FB 157 Name : Per:WST Name : Per:WST : KS)()( : KSKB : FY 190’...
  • Page 40: General Interrupt Routing In The Programmable Controllers

    Operating Instructions General Interrupt Routing in the Programmable Controllers Setting for the 1P 241 without interrupt processing DIP Switch S2: All switches OPEN DIP Switch S1: IRA to IRD OPEN Settings for one 1P 241 with interrupt processing via hardware line Depending on the interrupt line used, the corresponding switch on the module must be closed.
  • Page 41 Operating Instructions R 02/92 Settings for two to eight 1P 241s with interrupt processing The distinction as to which 1P has triggered the interrupt can be made by using the so–called group interrupt (i.e., by output via the peripheral byte O (PYO)). By means of the peripheral byte O, a programmable controller can distinguish up to eight posi- tion decoder modules (IP 241).
  • Page 42 R 02/92 Operating Instructions GeneraI Interrupt Processing with thePLCS5–115U With the programmable controller S5–115U, the interrupt lines in general are available for inter- rupt processing. Via the peripheral byte O it then can be established which module(s) has (have) triggered the inter- rupt on the line.
  • Page 43 Operating Instructions R 02/92 Interrupt for several 1P 241 modules on one interrupt line If several IPs access one interrupt (IRA to IRD), the individual IPs must be identified. For this pur- pose (up to eight units) a specific bit must be allocated in the peripheral byte O for each 1P; (e.g., peripheral bit 0.0 for IP1, peripheral bit 0.1 for IP2 and soon (see section 2.5.2).
  • Page 44 R 02/92 Operating Instruction 2.5.2 Table for Interrupt Routing (S5–115U) a) Setting for 1P 241 without interrupt DIP switch S2 All switches open DIP switch S1 (lRAto IRD) All open b) One 1P 241 per interrupt Signal DIP switch S1 (Peripheral byte O 141A/B 0 6 2...
  • Page 45 Operating Instruction GeneraI Interrupt Processing with S5-135U A separate hardware interrupt line is allocated to each CPU slot (IRA to IRD). The 1P triggers an interrupt by activating the interrupt line (i.e., by outputting a low–signal) In the corresponding CPU a jump to interrupt 062 is effected (for more details see Equipment Manual for the S5–135U).
  • Page 46: Save And Reload Scratchpad Flags

    R 02/92 Operating Instructions 2.6.1 Interru t Processing with Standard Function Block FB 157 When an interrupt occurs, the interrupt OB2 is called. The call for the function block FB 157 with the parameter assignment BEF = KB is written into this organization block. After the call by the interrupt OB, parameter ST shows from which channel the interrupt originated (i.e., you can have your specific interrupt program processed then).
  • Page 47: General Interrupt Processing With S5-150 S/U

    Operating Instructions R 02/92 2.7 General Interrupt Processing with S5–150 S/U The operating system of the programmable controller scans the peripheral byte O (PYO) at each block limit. When an interrupt occurs, a jump to the correlated interrupt organization block (OB2 to OB9) takes place.
  • Page 48 R 02/92 Operating Instructions If one of the setpoints or a zero shift value is supplied with an interrupt identifier, the module must be set to a group interrupt bit of the peripheral byte PYO via jumper adjustment. The number of this group interrupt bit must be specified at parameter ABIT (in the interrupt OB): x = O Reset of the pertaining interrupt bit in the system data Number of the interrupt bit See the Equipment Manual for the S5–150S/U.
  • Page 49: General Interrupt Processing With Plc S5-155U

    Operating Instructions R 02/92 2.8 General Interrupt Processing with PLC S5-155U The central processor of the programmable controller operates in two operating modes: –S5–150U mode –S5–155U mode The two operating modes process interrupts differently. Interrupt Type of processing Process interrupt Interrupt lines Input byte IBO Acquisition of the interrupt via...
  • Page 50 Operating Instructions When an interrupt (process interrupt or interrupt) occurs the appropriate interrupt OB is called depending on operating mode and jumper settings on the 1P 241. Function block FB 157 is then called in the interrupt OB with the command BEF = KB. Parameter ST indicates from which channel an interrupt was reported.
  • Page 51 Operating Instructions 2.9 Sequence for the Start-Up of the 1P 241 Check for up–to–date software and hardware status. 1.1) Shielding of encoder lines (Shielding with potential (Mext) (e.g., by screw connecting the metal housing of the connector on the 1P side). 1.2) Internal encoder supply (from 1P 241) External encoder supply (at encoder) 1.3) Perform potential equalization with sufficient cross sections.
  • Page 52 R 02/92 Operating Instructions 9) Setting up a cyclic program in OB1 – Cyclic program depending on programmable controller and task 10) Setting up the interrupt program – Save scratchpad flags – Evaluate interrupts with FB 157 (BEF = KB) Scan and evaluate interrupt bit In case of interrupt jump to your specific interrupt program –...
  • Page 53: Example For Better Comprehension Of The Ip241

    Operating Instructions R 02/92 2.10 Example for Better Comprehension of the 1P 241 1000 1200 point %!’5 of the coordinate thus definition Software synchronization zero point (reference or synchronization point). Output Q1.0 (Drive ON) is turned on. At point ‘~ the final system speed is reached. When point <~ is reached, change over to crawl speed (Q1.1 set).
  • Page 54 Operating Instructions R 02/92 4) Interrupt processing – Save scratchpad flags - Interrupt processing with FB 157 (BEF = KB) – Evaluate the interrupt bits; in case of interrupt, jump on interrupt program – Reload the scratchpad flags 5) Interrupt programs –...
  • Page 55 R 02/92 Function Description ..........3 – 1 Block Diagram .
  • Page 56: Function Description

    Matching Module for Incremental Encoders Function Description The signals arriving from the encoders via channel A and B are converted to ITL level in the input– conditioning circuit. Depending on the selected operating mode, the signals are initialized in the directional logic. Encoders with the following signals can be used: –...
  • Page 57: Block Diagram

    R 02/92 Matching Module for Incremental Encoders Block Diagram Channel Preliminary contact Input adapter (Conversion to llL level) Drive Drive Directional Logic Synchronization Logic Actual value Sync. Enable Sync. Sync. sync. Sign Synchronization Memory Addresses 1st SVTE 2nd BWE 3rd BYTE lat BYTE 2nd SYTE 3rd BYTE...
  • Page 58: Putting Into Operation

    Matching Module for Incremental Encoders R 02/92 Putting into Operation 3.3.1 Setting the Operating Mode The three possible operating modes are selected with DIP switch S1. The settings apply to sym- metrical and asymmetrical operation. The encoder provides two pulse trains displaced by 90° in relation to each other: Setting of DIP switch S1: ’...
  • Page 59: Conditioningthe Lnputlevels

    Matching Module for Incremental Encoders 3.3.2 Conditioning the Input Levels Input Other nput voltage range Input- Input Zero marking Components Incremental encoders) pulse Cl, C2, C5 = 10 nF inserted inserted soldered in symmetrical ” inserted R14: Jumper VI, V2, V3: not used inserted inserted inserted...
  • Page 60: Connectorassignment

    Matching Module for Incremental Encoders R 02/92 3.3.4 Connector Assignment Assignment of the sub D connectors (channel 1 or 2) 20 Zero marking pulse 21 K’ 37 B 31 + 5 V/12115 33 M 17 M Pin 31/47 and pin 17/33/50 are parallel and can be used alternatively. * For encoders which do not permit all six signals, asymmetrical operation applies! Encoders with only 3 signals must be connected to inputs X (pin 21), B (pin 4) and the , ,,...
  • Page 61 R 02/92 Matching Module for Incremental Encoders Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com...
  • Page 62: Hardware Synchronization

    Matching Module for Incremental Encoders R 02/92 Hardware Synchronization 3.3.5 Path Initiating pulse a: maximum of 1 encoder revolution Pulse diagram Counter pulse Synchronization Synchronization instant pulse Synchronization bit Synchronization LED The data block (IP 241) is set with an NV value (or left at 0) The hardware synchronization is called (e.g., by the standard function block with...
  • Page 63: Software Synchronization

    Matching Module for Incremental Encoders Otherwise, the zero marking pulse of the encoder would be effective twice. Otherwise, the counter is synchronized as often as the number of pulses contained in the zero marking pulse. coincide, the synchronization pulse is generated and the counter is synchronized. –...
  • Page 64 R 02/92 Matching Module for Incremental Encodera Layout 3.3.7 = Cathode The layout shows the position of the configurable elements, jumpers, and switches. 3.3.8 Switch Diagram of the Input Amplifiers ‘connector ~ X1.34 X1.9 X1.33 X1.8 X1.32 X1.7 R7R8 R5R6 R ’...
  • Page 65 Matching Module for Incremental Encoders R 02/92 3.3.9 Component Sets (Incremental, 6ES5 271–lAB11) Encoder Supply Voltage Components Quantity Value Designation B54311 750 kf2 +12 v B54311 220 Q 220 kQ B54311 +15 v 390 kQ B54311 220 Q Input voltage range +10 V 30 V symmetrical R3 to R1 O...
  • Page 66 Contents R 02/92 (Excess-3 Gray) Function Description ..........4 – 1 Block Diagram .
  • Page 67: Function Description

    Matching Module 1 for Absolute Encoders Function Description The actual values arriving in Excess–3 Gray code are converted to TTL level by signal condition- ing. A code converter then changes them to BCD code. These actual values are constantly trans- ferred to the output memory and made available to the basic module.
  • Page 68: Block Diagram

    R 02/92 Matching Module 1 for Absolute Encoders Block Diagram 50–pole ~ront connector voltage - - - - - - - - - - - - - - - - - - - DO CO BOAO D4 C4 B4 A4 D3 C3 B3 A3 D2 C2 B2 A2 Signal conditioning...
  • Page 69: Putting Into Operation

    Matching Module 1 for Absolute Encoders R 02/92 Putting into Operation 4.3.1 Setting the Operating Mode DIP switch S1 DIP switch S2 Function Contact 2 Contact 1 No change signal Position 1 Change signal Position 2 Philips glass scale with open half step increments (0.5) closed...
  • Page 70: Technical Specifications

    R 02/92 Matching Module 1 for Absolute Encoders Instructions for Conditioning the Input Circuitry – In the encoder impedance range from 6 kS2 to 10 kQ wire jumpers can be inserted for RI 03/Rl 04/Rl 05, – Below 6 kQ encoder impedance, the resistor networks must be computed. –...
  • Page 71: Setting The Encoder Powersupply

    Matching Module 1 for Absolute Encoders R 02/92 4.3.3 Setting the Encoder Power Supply The required encoder supply voltage must be provided by suitable adjustment of the circuitry on the encoder matching module. Required voltage Circuitry setting @ R5 (3 W) 180 ~ 33 k~ + 5 V/O.2 A...
  • Page 72: Matching Module 1 For Absolute Encoders (Excess-3 Gray)

    R 02/92 Matching Module 1 for Absolute Encoders -3 Gray Representation 0000 0010 0010 0010 0010 0010 0010 0011 0010 0010 0010 0010 0111 0010 0010 0010 0101 0001 0010 0010 0010 The module converts 1001 0010 0010 0010 the Excess–3 Gray 0010 0010 1101...
  • Page 73: Encoder With Deviating Code

    R 02/92 Matching Module 1 for Absolute Encoders 4.3.6 Encoder with Deviating Code The comparison with the absolute encoder and 10 are reversed in all decades. 0010 0010 0010 0010 0010 0110 0010 0010 0111 0010 0010 0101 0010 0100 0010 Recommended solution: 1100...
  • Page 74 R 02/92 Matching Module 1 for Absolute Encoders 4.3.8 Switch Diagram of the Input Amplifiers 10” %“ Pin 13 xl .44 P 24 V (R104/Rl 05) L . . - 4 4.3.9 Component Sets (Excess–3 Gray, 6ES5 271–lACII) Components Designation Encoder Supply Voltage Quantity Value...
  • Page 75 Contents Function Description ..........5 – 1 Block Diagram .
  • Page 76: Function Description

    Matching Module 2 for Absolute Encoders Function Description The arriving actual values (BCD or binary) are converted to ITL level by signal conditioning. These values are transferred to the output memory and made available to the basic module. This transfer is time delayed and only takes place at each change of the least significant data bit In order to obtain short processing times, process the actual values and the setpoints in the same format.
  • Page 77: Block Diagram

    R 02/92 Matching Module 2 for Absolute Encoders Block Diagram 5–pole fropt connector Encoder External voltage P 24 V - - - - - - - - - - - - P 24 V D2C2B2A2 DO CO 60 AO D4C4B4A4 D1 Cl 61 Al Signal Conditioning voltage...
  • Page 78: Putting Into Operation

    Matching Module 2 for Absolute Encoders R 02/92 Putting into Operation 5.3.1 Setting the Operating Mode DIP switch S1 Typical . Contact 2 Contact 1 closed closed Absolute BCD encoder and of the setpoints Absolute binary encoder 3 to 13 msec. open closed (maximum of 17 bits) and BCD...
  • Page 79 Matching Module 2 for Abaolute Encoders Instructions for conditioning the input circuitry – In the encoder impedance range from 6 k!d to 10 k$l, wire jumpers can be inserted for R103, – Below 6 kQ encoder impedance, the resistor networks must be individually { computed.
  • Page 80: Setting The Encoder Powersupply

    Matching Module 2 for Absolute Encoders R 02/92 5.3.3 Setting the Encoder Power Supply The required encoder supply voltage must be provided by suitable adjustment of the circuitry on the absolute encoder matching module 2 (BCD/binary). Required voltage R13 (3W) + 5 V/O.2 A 180 ~ 33 k~...
  • Page 81 R 02/92 Matching Module 2 for Absolute Encoders Pins 15/16 and pins 32/48 as well as pins 17/33/50 are parallel and can be used alternatively. 5 – 6 Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com...
  • Page 82: Layout

    Matching Module 2 for Absolute Encoders R 02/92 5.3.5 Layout capacitors Cl to C20 .1 .2 The layout shows the configurable elements, jumpers, and switches. 5.3.6 Switch Diagram of the Input Amplifiers The voltage at the respective Schmitt Trigger (i.e., via R106 or R107) must be 5 –...
  • Page 83 R 02/92 Matching Module 2 for Absolute Encoders 5.3.7 Component Sets (BCD/Binary, 6ES5 271–lADII) Designation Encoder Supply Voltage Components Quantity Value 330 Q B54311 91 I(Q +12 v 330 !2 B54311 120 I(Q +15 v 330 Q 120 k!2 B54311 –12 v 330 Q 150 k~...
  • Page 84 Contents R 02/92 (Analog) Function Description ..........6 – 1 Block Diagram .
  • Page 85: Function Description

    Matching Module 3 for Absolute Encoders Function Description This module is capable of converting input voltages or currents into a 10–bit binaty value (Oto 1023) plus sign. Thus the maximum representable range covers + 1023 to –1023. The measured value is amplified accordingly or converted from current into voltage (OVto 10 This voltage which may be positive or negative, is rectified for the ADC and the sign is derived.
  • Page 86 R 02/92 Matching Module 3 for Absolute Encoders Voltage/Current P 24 V 10 v to +/– Driver for ADC with sign generation Output memory Data bus 6 – 2 Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com...
  • Page 87: Putting Into Operation

    R 02/92 Matching Module 3 for Absolute Encoders Putting into Operation 6.3.1 Parametrizing the Hysteresis When the 1P 241 is operated with the matching module (analog) 3forabsolute encoder, depend- ing on the ripple of the voltage applied, fluctuations of the actual values may occur. In order to correct this deficiency (starting with firmware version V7.0), a hysteresis value can be preset as follows: 1.
  • Page 88 R 02/92 Matching Module 3 for Absolute Encoders Hysteresis Specification A = Startin values Assumed track distribution: E = End va ues 05 = Hysteresis value An actual value fluctuating within the hysteresis limits will cause only one interrupt, when it reaches a switching point.
  • Page 89: Matching The Measured Value Ranges

    R 02/92 Matching Module 3 for Absolute Encoders 6.3.2 Matching the Measured Value Ranges Measuring range 1 k~ 1% 100 k~ 1% +/– 100 mV 1 I@ 1’% 9,1 k~ 1% 100 k~ 1% 10 k~ 1’%. 5,1 k~ 1% 10 k~ 500 Q 20 mA...
  • Page 90: Layout Ofthematching Elements

    Matching Module 3 for Absolute Encoders R 02/92 6.3.4 Layout of the Matching Elements The layout shows the configurable elements. 6.3.5 Component Sets (Analog, 6ES5 271–IAEII) Measuring range Value Designation Components Quantity 100 mV 1 kQ 100 kS2 10 kQ 1% 654311 1% B54311 9.1 kfd...
  • Page 91 Contents R 02/92 (Synchronous-Serial) Function Description ..........7 – 1 Block Diagram .
  • Page 92: Function Description

    Matching Module 4 for Absolute Encoders Function Description The serial actual values of an encoder with synchronous–serial interface according to RS 485 or RS 422 are converted to ~arallel information on the encoder matchina module and are transferred to the output memory of-the basic module. Time sequence of a read cycle Module LOOP...
  • Page 93 R 02/92 Matching Module 4 for Absolute Encoders See the following table for the number of clock pulses (parameter TB). Data Word wilh 25 Bits Bit Number in the Data Word Example: Encoder data: Resolution 128 Multi–turn operation with 512 rotations An actual value is transferred with the following bits.
  • Page 94 Matching Module 4 for Absolute Encoders R 02/92 After turning on, the synchronization LED of the respective channel lights up until the clock pulse group has been transferred to the module. The parameterTB can be transferred in BCD code from the programmable controller, following the example for parameter assignment.
  • Page 95: Block Diagram

    R 02/92 Matching Module 4 for Absolute Encoders Block Diagram External P 4 V Encoder voltage LOOP IN+ LOOP OUT– LOOP OUT+ LOOP IN– LOOP IN+ LOOP IN– Encoder P 24 V Gray ~ ..
  • Page 96: Putting Into Operation

    Matching Module 4 for Absolute Encoders R 02/92 Putting into Operation Components required: Basic module 1P 241 (order no.6ES5 241 –lAA11) firmware version A07 or later, Absolute encoder matching module 4 synchronous–serial (order no. 6ES5 241 -l AF1l) -1 each per channel Component set absolute 4 synchronous–serial (order no.
  • Page 97 R 02/92 Matching Module 4 for Absolute Encoders Up to an encoder resolution of 17 bits maximum, the basic module can execute a software-based DIP switch encoder matching module With an encoder resolution between 18 and 20 bits no binary/BCD conversion is executed on the basic module.
  • Page 98: Graycode

    Matching Module 4 for Absolute Encoders 7.3.1.2 Gray Code Maximum resolution = 20 bits + 1 control bit Encoders with a higher resolution, indicating the respective number of TBs, can be also con- nected, but the module will only evaluate up to 20 bits (Fault message by sign–bit VZ = 1 (i.e., overflow + synchronization bit = O).
  • Page 99: Setting The Encoder Powersupply

    Matching Module 4 for Absolute Encoders R 02/92 Maximum resolution = 20 bits + 1 control bit Without being converted on the encoder matching module, the actual values are directly trans- ferred to the basic module via the output memory (when setpoints are presented in BCD code, the processing time of the basic module must be taken into account).
  • Page 100: Select Directionofrotation (For Grayorbinarycode)

    R 02/92 Matching Module 4 for Absolute Encoders Direction of rotation right ( = clockwise) When the encoder rotates in a “right-hand” direction (i.e., clockwise with the shaft facing the ob- server), incrementing actual values are provided if: Switch S3 Direction of rotation left ( = counterclockwise) When the encoder rotates in a “left–hand”...
  • Page 101 Matching Module 4 for Absolute Encoders R 02/92 7.3.4 Parameterization of Clock Pulse Groups This procedure is only required when the standard function block is not used. Name: TB–PARA Preset: TB = 10 Channel 2 Module address 128 Read byte 7 F1 00.7 ;KHOO1 O corresponds to Write channel num–...
  • Page 102 R 02/92 Matching Module 4 for Absolute Encoders 7.3.5 Instructions for Encoder Connections The encoders are connected to the 50–way sub D connector of the basic module via a cable with twisted pair conductors, according to RS 422/RS 485 specifications. The encoders can be either connected to the input interface “optocoupler”( i.e., a current loop with approx.
  • Page 103: Fault Messages

    R 02/92 Matching Module 4 for Absolute Encoders 7.3.6 Fault Messages By evaluation in the programmable controller, states deviating from normal operation can be recognized. Normal operation can always be recognized by a synchronization bit set to”1” (“synchronization” LED is not lit up) and a sign bit VZ set to “O”. bit VZ is set with “O”, then an encoder error has occurred or the control bit polarity has been set wrong! This error can only occur in “operation mode with control bit evaluation”...
  • Page 104: Connectorpin Assignment

    Matching Module 4 for Absolute Encoders 7.3.7 Connector Pin Assignment Assignment of the sub D connector pins (channel 1 or 2) LOOP OUT– 35 LOOP OUT+ LOOP IN +/Opto coupler 29 LOOP iN+/Receiver 45 LOOP IN–/Opto coupler LOOP IN –/Receiver 30 SENSE+ 32 -t- 5 VI12 VI15 v 48 -f- 5 VI12 VI15 V...
  • Page 105: Configurationat-A-Glance

    Matching Module 4 for Absolute Encoders R 02/92 7.3.9 Configuration At–A-Glance Element Function delivered Connection to gray code encoders Gray Connection to encoders with BCD or binary code o - c l Gray Input interface RS 422 or RS 465 with: Encoder connection at receiver Position “R”...
  • Page 106 Matching Module 4 for Absolute Encoders Components Value Designation Encoder Supply Voltage Quantity +12 v 4,3 I@ +15 v 5,6 I(Q The component set allows the per channel conditioning of synchronous–serial encoders for the 7 – 15 @.SiemensA(31989, Order No.: 6ES5998-0KD21 Artisan Technology Group - Quality Instrumentation ...
  • Page 107: Technical Specifications

    Replacement Types for Resistor Networks ......8 – 9 Cables for Siemens Incremental Encoders ......8 – 10 Permissible Slots for the Digital Positon Decoder Module .
  • Page 108: Technical Specifications Of The Encoder Matching Modules

    Technical Specifications 8.1 Technical Specifications of the Basic Module 1P 241 Operating temperature O“c to 55°C Storage temperature Isolation class “C” (According toVDE0110) Degree of protection IP20 for installation in module rack Power supply voltages and current consumption of the basic module 5 V/l A 24 VIO.I 8 A the values of the basic module!
  • Page 109 Technical specifications of the encoder matching modules: Absolute 2 Absolute 3 Absolute 4 Incremental Absolute 1 Excess–3 Analog serial Gray –1AE12 — — — sarial according to Output signal RS 422 or RS 465 interface (Transmitting clock pulse groups) — —...
  • Page 110: Time Requirements

    Technical Specifications R 02/92 Time Requirements 1. Power On The SP bit appears after turn-on or return of thevoltagetothe control. After approx. 100 psecthe SP bit can be scanned by the S5 unit. Its status is “l” until the module is ready to permit write commands (memory initialization).
  • Page 111 R 02/92 Technical Specification 3.3 Encoder Matching Module Absolute 2 (BCD/Binary) 1st case: Typical processing time per setpoint/actual value comparison msec 2nd case: Setpoints BCD and actual values BCD Typical processing time per setpoint/actual value comparison msec 3rd case: Here the processing time depends on the encoder resolution (up to 17 bits) which requires the following time periods for internal minimum 3 msec maximum 13 msec...
  • Page 112 Technical Specifications 3.5 Encoder Matching Module Absolute 4 (Synchronous–Serial) Here the switch position (see section 7.3.1) must be considered! 1st case: Binary setpoints and actual binary values (up to 20 bits) Typical processing time per setpoint/actual value comparison msec 2nd case: Typical processing time per setpoint/actual value comparison msec 3rd case: 1.4 msec...
  • Page 113 R 02/92 Technical Specifications 5. Modifying Setpoints 8 msec The transfer of a setpoint for each parameterized initial or end value takes = 256 msec 8 msec x 32 (maximum initial values for 2 channels) = 256 msec 8 msec x 32 (maximum end values for 2 channels) - - - - - - - - - - = 512 msec...
  • Page 114 Technical Specifications R 02/92 8 – 7 Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com...
  • Page 115: Basic Connectorassignment

    R 02/92 Technical Specifications Basic Connector Assignment P + !5V OV (Potential) PESP AB O CPKL AB 1 AB 2 AB 3 AB 4 AB 5 AB 6 AB 7 AB 8 AB 9 AB 10 AB 11 OV (Potential) 8 –...
  • Page 116: Spare Parts For 1P 241

    Technical Specifications Spare Parts for 1P 241 Part Order No.: Basic module Encoder matching module incremental Encoder matching module absolute 1 (Excess–3 Gray) Encoder matching module absolute 2 (BCD/Binary) Encoder matching module absolute 3 (Analog) Encoder matching module absolute 4 (Synchronous–Serial) Configuring set incremental Configuring set absolute 1 (Excess–3 Gray) Configuring set absolute 2 (BCD/Binary)
  • Page 117: Replacementtypesforresistor Networks

    R 02/92 Replacement Types for Resistor Networks Beckmann Dale Bourns Type 14–01 -202 Single resistors 899–3–R K e.g., 2 kQ 14–02–152 Resistors with joint point 899–1 –R.5 K e.g., 1.5 kQ 14–01 –332 Single resistors MDP1 4–03332 e.g., 3.3 kQ 899–1 –f&2 K 14–02-822 Resistors with joint point...
  • Page 118: Cablesforsiemens Incremental Encoders

    R 02/92 Technical Specifications Cables for Siemens Incremental Encoders Cable name: 1P 241 pulse generator (6FC9320–... with SIEMENS round connector) Order no.: 6ES5705–4xx1 (see catalog ST 52.3) xxx = Length code: 5 m BFO 10 m CBO 20 m CCO...
  • Page 119: Permissible Slotsforthe Digital Positon Decoder Module

    R 02/92 Technical Specifications Permissible Slots for the Digital Position Decoder Module Programmable Controller Slot Designation in Module Subrack CR 700–OIJ L CR 700–OLE i Central device CR 700–1 ‘ CR 700–2 CR 700–3 ‘ Expansion ER 701 –3’ device Central device 135U Central device 155U Expansion device 183U...
  • Page 120: Programming Instructions

    Contents R 02/92 9 Programming Instructions Overview ............9 – 1 Function Block FB156(PER:WPA) .
  • Page 121 R 02/92 Contents Direct Programming of the 1P 241 (without the Standard Function Block) ...9 – 63 9.6.1 Parameterization ........... . 9 – 63 9.6.1.1 Byte Structure .
  • Page 122: Overview

    Programming Instructions Overview These programming instructions describe the following two standard function blocks: “Parameterize position decoder” FB 156 (PER:WPA) FB 157 (PER:WST) “Control position decoder” FB 158 (PER:WSI) “Control position decoder (indirect parameterization)” The function blocks are used in connection with the in the following programmable controllers: FB 156 FB 157...
  • Page 123: Function Block Fb156(Per:wpa)

    Programming Instructions Function Block FB 156 (PER:WPA) 9.2.1 Function Description The function block “parameterize position decoder” supplies the module with the initial and final track setpoints for both channels including the zero shift. If necessary the interrupt identifier bits are set. The data to be transferred is stored in a user data block.
  • Page 124: Explanation Ofparameters

    Programming Instructions 9.2.3 Explanation of Parameters DESIGNATION BGDB D I KS I Specification of 1/0 areai PAFE Parametererror Module error (SP bit) It can only be addressed in the P–range. 9 – 3 Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com...
  • Page 125: Parameterassignment

    Programming Instructions 9.2.4 Parameter Assignment Module address (BG) X, y for P/Q : KS=P 128< X <248 for P/Q: KS=Q 0 < X <248 x = Data block number (DB) 1< y <255 2 < y <255 for S5– 155U and S5– 135U : KS = P Normal 1/0 area Extended 1/0 area...
  • Page 126 Programming Instructions R 02/92 9.2.5 User Data Block Assignment The data block specified under parameter BGDB is assigned as follows: From DW Assignment Work area of the function block Channel 1 Track O Channel 1 Track 1 Channel 1 Track 2 Channel 1 Track 3 Channel 1 Track 4 Channel 1 Track 5...
  • Page 127 R 02/92 Programming Instructions Setting of ‘ Interrupt for end value Interrupt for initial value DW n DW n+l DW n+2 ..2 DW n+3 DW n+4 .,..2 “l”: negative “O”: positive S = sign = DW n+l and DW n+2 Initial setpoint = DW n+3 and DW n+4 Final setpoint...
  • Page 128 Programming Instructions Setting of the zero shift (NV): DW 170 Interrupt for NV 1 Interrupt for NV 2 DW 171 DW 172 DW 173 DW 174 10’ 10° NV 1 (Channel 1) = DW 171 and DW 172 NV 2 (Channel 2) = DW 173 and DW 174 The setpoints for the zero shift are entered in the user data block.
  • Page 129 R 02/92 Programming Instructions Setting of the clock pulse groups (for SS1 module) Enable for channel 1 Enable for channel 2 10° 10’ 10° 10’ DW 176 The lengths of the clock pulse groups in data word DW 176 are given in BCD code. If the enables for channel 1 (DL 175) or channel 2 (DR 175) are set with KH = FF the clock pulse group length for the respective channel is not transferred to the module.
  • Page 130 Programming Instructions R 02/92 Setting of the parallel connecting function Enable parallel connection channel 1 and 2 DW 180 I If data word DW 180 is set with KH = FFFF, the function is disabled. In all other cases channels 1 and 2 are switched parallel by the software.
  • Page 131 R 02/92 Programming Instructions Assignment of special function for inhibit interrupt depending on direction DW 185 Enable for interrupt direction specification Bit pattern for IR–direction DW 186 Free When the current “actual position” exceeds a cam end or cam start setpoint, the module does not generate an interrupt unless the appropriate interrupts were enabled.
  • Page 132 Programming Instructions R 02/92 Technical Specifications Block no. PER:WPA Block name 155U 15ou/s 115U 135U Library no. P71200–S... 5156–A–6 9156–A–6 4156–A–3 6156–B–3 Call length (in words) 1012 Block length (in words) Processing time in msec @ CPU 941A/B CPU 922 13.9 Basic requirement 98.5124.3...
  • Page 133: Function Blockapplication

    R 02/92 Programming Instructions 9.2.7 Function Block Application FB 156 can be used in programmable controller S5–115U without restrictions. The [#{ manual automatic warm ~ other programmable controllers may not be used in restart operation modes. For programmable controllers S5–135U and S5–155U, the operation mode “automatic \ ; cold restart”...
  • Page 134 R 02/92 Programming Instructions When the “calculate average value” or “verify” special function is used, the “number” para-meter must be located in the range from O to 15 in data word DR 184 or DR 182 respectively in the user data block.
  • Page 135: Function Block Fb157(Per:wst)

    R 02/92 Programming Instructions Function Block FB 157 (PER:WST) 9.3.1 Function Description With the function block “control position decoder”, the following functions can be performed: – Read actual values – Read track identifier bits – Read, delete or modify track setpoints –...
  • Page 136: Calling The Function Block

    Programming Instructions 9.3.2 Calling the Function Block In the IAD/CSF Ladder Diagram/ in the STL (Statement List) Control System low Chart): S5-I 15U FB 157 NAME :PER:WST “ — KB 1 — KB 2 — KB 1 : KB 2 : FB 157 NAME :PER:WST —...
  • Page 137: Explanation Ofparameters

    R 02/92 Programming Instructions 9.3.3 Explanation of Parameters NAME DESIGNATION SPDB Specification of the track number and of the user data block Command; specification of the function to be performed by the block Specification of the interrupt bit in case of interrupt processing Depending on command, output of —...
  • Page 138: Parameterassignment

    Programming Instructions 9.3.4 Parameter Assignment x = Track number SPDB : ~ = X, y The track number is dependent on the parameter BEF: x <31 track number 32 Zero shift Channel Zero shift Channel x = any choice 1< y <255 2<...
  • Page 139 Programming Instructions PAFE : In case of illegal parameterization the signal status is”1”. The recognized error is then indicated by the assignment of the flag byte FY 255: 255.0 – F 255.1 When special function “verify” or “calculate average value” in data word DR 182 or DR 184 of the user data block is used, the “number”...
  • Page 140: User Data Blockassignment

    Programming Instructions Assignment of the parameters W, KB, and ST Depending on the setting of parameter BEF, either the actual value, the initial setpoint or the final shown at parameter W 1 (setpoint with interrupt -t setting of bits 23 through 20: 0100). The bit assignment looks like this: 2423 16 15...
  • Page 141: Technical Specifications

    R 02/92 Programming Instructions 9.3.6 Technical Specifications Block number PER:WST Block name 155U PLC S5– 115U 135U 15ou/s 4157–A–3 6157–B–3 5157–A–7 9157–A–5 Call length (in words) Block length (in words) 1095 Processing time (in msec) For BEF = CPU 941A/B CPU 922 12.5/ 4.5 29.0/ 9.7...
  • Page 142 R 02/92 Programming Instructions 135U 15ou/s PLC S5– 115U Assignment in data area User data block specified in parameter SPDB up to and including DW 186 FY 234 to FY 255 FY 238 to FY Assignments in flag area FY 236 to FY —...
  • Page 143: Function Blockapplication

    Programming Instructions R 02/92 9.3.7 Function Block Application other programmable cohtrofiers may not be used in manual and automatic warm restart operation modes. For programmable controllers S5– 135U and S5– 155U, the operation mode “automatic cold restart” must be set in data block DXO (see equipment manuals of the respective programmable controllers).
  • Page 144 Programming Instructions R 02/92 : Output of identifier bits, or : Output of identifier bits (High word) -t Channel 2 : Output of identifier bits (Low word) + Channel 1 : Output of control bits Both setpoints must be specified per track. The track is deleted for interrupt identifier KH = FFFE KY = x, y x = 32: Zero shift, Channel 1 x = 33: Zero shift, Channel 2...
  • Page 145 R 02/92 Programming Instructions KY = x, y 0< x <31 Track number : Output of initial/end value, or : Output of initial/end value (High word) : Output of initial/end value (Low word) : Output of identifier bits, or Output of identifier bits (High word) + Channel 2 Output of identifier bits (Low word) -t Channel 1 : Output of control bits : Output of zero shift, channel 1/2 or...
  • Page 146 Programming Instructions R 02/92 Inhibit interrupt Inhibit interrupt for supplying the module with new setpoints KY = x, y x = Disregard : Output unchanged, and/or : Output unchanged (high word) ; Output unchanged (Iowword) : Output of identifier bits, and/or Output of identifier bits (high word) + channel 2 Output of identifier bits (low word) + channel 1 : Output control bits...
  • Page 147 R 02/92 Programming Instructions SPDB: KY = x, y x = Disregard : Output unchanged, and/or : Output unchanged (high word) Output unchanged (low word) : Output of identifier bits, and/or Output of identifier bits (high word)+ channel 2 Output of identifier bits (low word) + channel 1 : Output control bits During cyclic operation, the “inhibit interrupt depending on direction BEF = RV”...
  • Page 148 Programming Instructions KY = x, y x = Disregard SPDB : : Output unchanged, and/or : Output unchanged (high word) : Output unchanged (low word) : Output of identifier bits, and/or Output of identifier bits (high word) + channel 2 Output of identifier bits (low word) -t channel 1 : Output control bits Selection of the “verification read BEF = PR”...
  • Page 149: Interruptprocessing

    R 02/92 Programming Instructions 9.3.8 Interrupt Processing If one of the setpoints or a zero shift value is to receive an interrupt identification, the module must be preset to a group interrupt bit of the input byte IB or to an interrupt line by means of jumper setting.
  • Page 150 Programming Instructions R 02/92 Example: Program in 061 Program in062 – Save scratchpad flags :PER:WST N A M E :PER:W#T NAME KSxx KSKB FY 190 FY 191 F 190.0 190.0 191.0 F 190.1 FY 190 FY 191 - Load scratchpad flags FB xx –...
  • Page 151: Function Description

    Programming Instructions Function Block FB 158 (PER:WSI) 9.4.1 Function Description Function block FB 158 (PER:WSI) can be used to execute the same functions as function block FB 157 except that function block FB 158 transfers the parameters indirectly using the so–called working data block.
  • Page 152: Explanation Ofparameters

    Programming Instruction R 02/92 9.4.3 Explanation of Parameters CLASS NAME TYPE DESIGNATION DBDW Specification of the workin data block, first data word (DW n) use % Parameterization error PAFE 9 – 31 Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com...
  • Page 153: Parameterassignment

    Programming Instructions 9.4.4 Parameter Assignment DBDW : ~ = Number of the working data block X, y 1< X <255 2< x <255 forPLCSS5–135U and S5– 155U word (DW n) used When the user data block and the working data block are identical, the first data word used of the working data block must be equal to or greater than data word DW 187.
  • Page 154 Programming Instructions R 02/92 9.4.5 Working Data Block Assignment The organization of the parameter list in the working data block is shown below. DW n Command DW n+l Track number User DB number DW n+2 “0”/4 DW n+3 Track identifier bits, channel 1 DW n+4 D W n+5 I Track identifier bits, channel 2...
  • Page 155 Programming Instructions R 02/92 Depending on whether the command parameter (DW n) contains the command “IW”, “AW”, “EW”, “N1” or “N2”, either the actual value, the initial setpoint, the end setpoint, the zero shift of channel 1 or the zero shift of channel 2 is stored in data word DW n+2 or DW n+3. Any interrupt processing of a setpoint is indicated in data word DW n+2 (setpoint with inter- rupt -+ assignment of bits 4 to 7 of DW n+2: 0100 = 4).
  • Page 156: Technical Specifications

    Programming Instructions R 02/92 9.4.6 Technical Specifications Block no, Block name 155U PLC S5– 115U 135U Library no. P71200–S... 91 58–A–1 41 58–A–1 6158–B–1 5158–A–1 Call length (in words) 1246 Block length (in words) 1118 Processing time in msec For BEF = CPU 941A/B CPU 922 8.71 3.5...
  • Page 157 R 02/92 Programming Instructions User data block up to and including DW 186 Assignment in data area User data block requires x data words for parameter transfer. x = 8 Assignment in flag area FY255 — BS 60 to Assignment in system area BS 183 BS 63 System instructions...
  • Page 158: Useofthe Function Block

    Programming Instructions 9.4.7 Use of the Function Block The module must be parameterized with function block FB 156 before function block FB 158 can be called. The parameter transfer is performed via the working data block. The function to be executed by function block FB 158 is selected by entering the appropriate command code in format KS in data word DW n.
  • Page 159 R 02/92 Programming Instructions Read actual value (IW) Parametrize the working data block as shown below. Input DW n Input DW n+l output DW n+2 output Actual value (dec. O to dec. 3) DW n+3 Track idenffier bits, channel 1 output DW n+4 Track identifier bits, channel 2...
  • Page 160 R 02/92 Programming Instructions Changing the setpoints (AE) I KS Input DW n Track number Input DW n+l Unaffected DW n+2 Unaffected DW n+3 Track identifier bits, channel 1 output DW n+4 Track identifier bits, channel 2 output DW n+5 Assigned ST parameter Output of control bits...
  • Page 161 R 02/92 Programming Instructions Software synchronization (SS) Hardware synchronization (SH) Parametrize the working data block as shown below. Input SS or SH DW n Input Track number User DB DW n+l Unaffected DW n+2 Unaffected DW n+3 output Track identifier bits, channel DW n+4 output Track identifier bits, channel 2...
  • Page 162 Programming Instructions R 02/92 Read initial setpoint (AIM) Read end value (EW) Parametrize the working data block as shown below. KS Input DW n Track number User DB KY Input DW n+l KH Output, inital/end setpoint DW n+2 KH Output, initial/end sepoint DW n+3 Track KM Output...
  • Page 163 R 02/92 Programming Instructions Inhibit interrupt (IS) Inhibit interrupt for supplying new setpoints to the module (IV) Inhibit interrupt depending on direction (RV) Calculate average value (MB) Verify-read (PR) Parametrize the working data block as shown below. Input IS, IV, RV, MB or PR DW n Input User DB...
  • Page 164: Processing Interrupts

    R 02/92 Programming Instructions 9.4.8 Processing Interrupts See the description of function block FB 157 for the processing of interrupts. Only the differences will be covered here. Data word Dw n+7 in the working data block of function block FB 158 corresponds to the ABIT parameter of function block FB 157.
  • Page 165 Programming Instructions Alarm processing may only be performed at block boundaries (exception: PLCS S5–155U and S5–115U). Example: Program in 061: Program in 062: – Save scratchpad flags –Save DW n, DL n+l, DR n+6 and DW n+7 DB 158 DB 158 KS xx KS KB DW n...
  • Page 166: Example

    Programming Instructions R 02/92 Example This example shows the operation of the digital position decoder 1P 241. By means of a simulator, the individual functions can be selected via digital inputs; the signal states can be displayed via digital outputs. It explains how a channel is parameterized with an incremental encoder module. The actual value and the track identifier bits can be read and, depending on the parameterization, a process interrupt can be triggered.
  • Page 167 R 02/92 Programming Instructions 9.5.2 Jumper Assignment of the Digital Position Decoder Jumper assignment on the basic module DIP switch S1 S5–155U (P-area) As the transducer voltage is 5 V, the following resistor values must be soldered in on the basic module: 39 kQ 82 Q...
  • Page 168 Programming Instructions R 02/92 Jumper assignment of the incremental encoder matching module Assuming that an encoder with a symmetrical line (5 V input voltage) is used (providing two– phase displaced pulse sequences) and that the evaluation of two signal edges is selected, then the following jumpers and components must be soldered in (configuration at delivery): R4, R6, R7, R9, R12, R14 Solder jumpers:...
  • Page 169 R 02/92 Programming Instructions 9.5.3 Assignment of the Inputs and Outputs The program is designed in a way that allows easy adaptation to different input and output assign- The program blocks PB 11, PB 12, PB 13, FB 11 and FB 12 contain the test program and ments.
  • Page 170: Turn-On, Start-Up Behavior

    Programming Instructions R 02/92 9.5.4 Turn–On, Start-Up Behavior The program is completely loaded from the floppy disk to the user memory of the programmable controller. For the start-up the digital position decoder is supplied with the respective setpoints for the indi- vidual tracks and with the zero shift.
  • Page 171: Cyclicoperation

    R 02/92 Programming Instructions 9.5.5 Cyclic Operation During cyclic operation, input 15.6 in the organization block can be used to choose between indi- rect parameterization (15.6 = “O”) and direct parameterization (15.6 =”1 “). Function block FB 11 is called for indirect parameterization and program block PB 11 for direct parameterization. The “parameterization error”...
  • Page 172: Reading Theactualvalue

    Programming Instructions 9.5.6 Reading the Actual Value Direct parameterization (PB 11) The actual value can be indicated on the PG monitor screen in flag double word FD 134 with the “control variable” PG function. Function block FB 157 can be called with BEF = IW via input 14.0, and the actual value can be viewed as follows: FD 134 KH = 800F FFFF...
  • Page 173: Reading Track Identifier Bits

    Programming Instructions 9.5.8 Reading Track Identifier Bits Direct parameterization (PB 11) The track identifier bits are located in flag double word FD 130. The track identifier bits for channel 1 are found in flag word FW 132, and can be displayed on the monitor screen of the programmer using the “control variable”...
  • Page 174: Reading Setpoints

    Programming Instructions 9.5.9 Reading Setpoints Direct parameterization (PB 11) By means of input 14.1, the initial setpoint for track 4 can be read; input 14.2 gives the end setpoint. Both setpoints are shown in the flag double words FD 138 and FD 142. By setting input signal 14.7 or 15.0, the zero shift for channel 1 or 2 stored in the module can be assigned to flag double word FD 150 or FD 154.
  • Page 175 R 02/92 Programming Instructions Direct parameterization (PB 11) (Actual value) FD 134 KH – 00000225 FW 132 KM – 0000000000010000 (Track identifier bit 4 set) (Initial setpoint track 4) FD 138 KH – 00000200 KH – 00000300 (End setpoint track 4) FD 142 Indirect parameterization (FB 11) The information about the actual value or the setpoints can be read in data double word DD 3 of...
  • Page 176: Control Interrupttriggering

    Programming Instructions R 02/92 9.5.11 Control Interrupt Triggering If the interrupts assigned to the applicable tracks were enabled during startup, they can be tempo- rarily inhibited during the cycle. All interrupts can be inhibited by setting input 14.5. Another activa- tion of input 14.5 cancels the interrupt inhibit.
  • Page 177: Inhibit Interrupt Dependingon Direction

    R 02/92 Programming Instructions 9.5.12 Inhibit Interrupt Depending on Direction This function requires that the desired interrupts have been enabled in user data block DB 156 during startup. The desired inhibit direction must first be stored in data word DW 186 of user data block FB 156 before this function can be activated with input 15.3.
  • Page 178: Process Alarm Processing

    Programming Instructions R 02/92 9.5.14 Process Alarm Processing The interrupt processing for this example is programmed in organization block062. Depending on the type of programmable controller used, the process interrupts are acquired via the input byte 160 (with S5–150U/S, S5–155U in S5–150U mode) or via an interrupt line (with S5–115U, S5–135U, and S5–155U in S5–155U mode).
  • Page 179 Programming instructions Indirect parameterization (FB 12) (Working data block) KH = 00000572 (Actual value) KM = 0000000000000000 (Track identifier bits) (Initial setpoint track 4) KH = 00000250 (End setpoint track 4) KH = 00000350 The actual value, initial cam value and end cam value cannot be output simultaneously when indi- rect parameterization is used.
  • Page 180 Programming Instructions In the example, data block DB 156 is used. LE= 193 PARAMETERIZATION DATA BLOCK 0000; # # # # # # # # # ########################+ 0000; OPERATING AREA FB 156, FB 157, FB 158 0000; # –––––––-–––––––––-––+ ----–– 0000;...
  • Page 181 Programming Instructions R 02/92 KH = FFFF: KH = 0000: KH = 0000: HAL VALUE DEC. 3 + 2 + 1 + O KH = 0000: SIGN + DEC. 4 KH = 0000: DEC. 3 + 2 + 1 + O 3 VALUE KH = FFFF: KH = 0000:...
  • Page 182 Programming Instructions H UZIVZ KH = FFFF: INTERRUPT ENABLE TRACK 20 INITIAL VALUE SIGN + DEC. 4 KH = 0000: INITIAL VALUE DEC. 3 + 2 + 1 KH = 0000: END VALUE KH = 0000: SIGN + DEC. 4 KH = 0000: DEC.
  • Page 183 R 0192 Programming Instructions 1 70: KH = OOFF: ZERO SHl~ SIGN +DEC.4 171 : KH = FOOO: 172: KH = 0250: SIGN +DEC.4 KH = 0000: 1 74: KH = 0000: KH = FFFF: 176: KH = 0000: HYSTERESIS ENABLE 1 77: KH = FFFF: HYSTERESISVALUE...
  • Page 184 The intelligent 1/0 module “digital position decoder” is addressed by a central processor like an 1/0 module. Processors for SIMATIC S5 technology are programmed in STEP 5 programming language. Via byte–based (8 bits) load and transfer commands, this language allows parameterization of the module or processing of available identifiers in the working range of the central processor.
  • Page 185 Programming Instructions 9.6.1.1 Byte Structure Byte O specified below corresponds to the hardware–based setting of the module address. 7654 = Zero shift Interrupt identifier bit Track No. 0–31 = Initial setpoint End = End setpoint 1 0 1 Sign = Erase set track Examples: A) Specifiy bit pattern for track 3 with –...
  • Page 186 Programming Instructions R 02/92 9.6.2 Modification of Parameterized Initial and End Values Meaning of the B bit: At the first parameterization of an initial or an end setpoint the B bit is irrele- vant. If a track needs to be modified, there are the following possibilities: —...
  • Page 187 Programming Instructions R 02/92 9.6.3 Reading the Result Tracks In order to evaluate the current track bit assignment, bytes O to 3 and byte 7 can be read at all times. Result track bits are set when an internal counter value is within a specified initial and end setpoint. In case of incremental encoders, synchronization bits are set when a synchronization pulse is ac- tive (via an external preliminary contact in connection with a zero mark and a count pulse) or syn- chronized by the software.
  • Page 188 Programming Instructions 9.6.3.1 Interrupt Processing Starting with firmware status R08, the interrupt behavior of the module can be modified by writing the block address +4 as follows: – Interrupt identifier bits deleted after reading byte 7 KH = El – Interrupt identifier bits not deleted after reading byte 7 KH = E2 –...
  • Page 189 R 02/92 Programming Instructions I . . . 9.6.4 Reading the Absolute Value (Actual Value) To read and evaluate actual absolute values, parameterized tracks or initial and end setpoints, a prompt for updating bytes 4,5, and 6 of the output register must be given. Byte 4 must provide an L read prompt.
  • Page 190 Programming Instructions R 02/92 Example: module address set at 128 SP bit scan L KM 11010000 T PY 132 (MOD address +4) – Waiting time 150 psec – SP bit scan L PY 132 (MOD address + 4) L PY 133 (MOD address + 5) L PY 134 (MOD address + 6) T FY .
  • Page 191 R 02/92 Programming Instructions 9.6.5 Special Functions Entry in Byte No: (Module Address +n) Clock pulse group Channel number 1 or 2 O to 24 Code Hysteresis Channel number 1 or 2 o to 9 Hysteresis value Code Rotary axis Channel 1 Channel 2 Both channels...
  • Page 192 Programming Instructions R 02/92 Entry in Byte No: (Module Address +n) n = 4 Inhibit interrupt depending on direction Channel 1, backwards inhbited Channel 1, forward inhibited Channel 1, both directions inhibited Channel 2, backwards inhbited Channel 2, forward inhibited Channel 2, both directions inhibited Code Inhibit interrupts...
  • Page 193: Glossary

    Glossary R 02/92 Definitions and explanations for the 1P 241 Equipment Manual Actual value The actual position information from the encoder which arrives at the 1P 241 Average value calculation Special function for calculating an average value from up to 15 consecutive actual values (for analog submodule) Basic connector Connection to the device bus of the PLC...
  • Page 194 R 02/92 Glossary An encoder which emits individual pulses when its axis Incremental encoder rotates The possibility of obtaining a quick reaction from the Interrupt programmable controller when an alarm is triggered Address area for peripheral modules in the programmable 1/0 area controller 24 V connection, positive terminal...
  • Page 195 (FY 200 to FY 255); the scratchpad flag area must be saved during interruptions that are caused by timed interrupts or interrupts. Desired start and end values of a cam Setpoints Program package in the SIMATIC S5 programmable Standard function block controller Standard function block ST FB With incremental encoders this means the timing coinci–...
  • Page 196 Suggesti- Siemens AG AUT WKF BI.2 - TI For instructions or manual: Siemensstr. 2 Title D-8510 Furth/Bay. Order No. If you find typographical errors while From: reading this document, please use this form Name to let us know. We would also be grateful for your sugges- Company/department tions, remarks or corrections.
  • Page 197 Artisan Technology Group is your source for quality new and certified-used/pre-owned equipment SERVICE CENTER REPAIRS WE BUY USED EQUIPMENT • FAST SHIPPING AND DELIVERY Experienced engineers and technicians on staff Sell your excess, underutilized, and idle used equipment at our full-service, in-house repair center We also offer credit for buy-backs and trade-ins •...

Table of Contents