SIMATIC S5IP 240Counter/Positioning/Position Decoder ModuleManual EWA 4NEB 811 6120-02bEdition 03
IP 240 IntroductionConventionsThe following conventions are used in this book and are listed for your reference:Convention Definition ExampleA box t
Position Decoding IP 240DB20 LEN=35
IP 240 Position DecodingStart routine FB 20Reset the flagareas usedConfigureIP 240 channel 1for positiondecodingSet output”RET INTPNT”EndEWA 4NEB 81
Position Decoding IP 240Cyclic program FB 21yesnoyesyesyesyesnonoFB 26FB 25FB 24FB 23FB 22yesnoQ ”RET INTPNT”set?Enable set andstart buttonpressed?I
IP 240 Position DecodingOperation/traverse program FB 25 yesnoyesyesFB 25nonoyesBackward traverse programactive?noForward traverseprogram active?Ent
Position Decoding IP 240Control and output program FB 26noyesnoFB 26yesnoEMERG STOP”pressed?yesnoError bitset? (FY 11)yesnoLimit switch pressed?Rese
IP 240 Position DecodingInterrupt service routine FB 27 and FB 28noyesnononoyesFB 27noRead interrupt req.(FB 170 FCT 3)Interrupt fromchannel 1?Inter
Position Decoding IP 240OB 1 LEN=8 NETWORK 1 0000
IP 240 Position DecodingFB 20 LEN=52
Position Decoding IP 240FB 21 LEN=33
IP 240 Position DecodingFB 22 LEN=34NETWORK 1 0000 REDEFINE INITIAL POINTFB22 : R
2 Module Description and Accessories3 Addressing4 Hardware Installation5 Operation6 Functional Description7 Position Decoding8 Counting9 IP 252 Expans
Position Decoding IP 240FB 23 LEN=75
IP 240 Position DecodingFB 23 LEN=75
Position Decoding IP 240FB 24 LEN=97
IP 240 Position DecodingFB 24 LEN=97
Position Decoding IP 240FB 25 LEN=67
IP 240 Position DecodingFB 25 LEN=67
Position Decoding IP 240FB 26 LEN=75
IP 240 Position DecodingFB 26 LEN=75
Position Decoding IP 240FB 27 LEN=26NETWORK 1 0000 INTERRUPT SERVICE ROUTINE FOR
IP 240 Position DecodingFB 28 LEN=81NETWORK 1 0000 INTERRUPT SERVICE ROUTINE FOR
Figures1-1. Modes of the IP 240 Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1- 11-2. IP 240 with and with
Position Decoding IP 240FB 28 LEN=810039 REF8 :003A :AN F 16.7
IP 240 Position DecodingFB 38 LEN=39NETWORK 1 0000 SAVE FLAGSFB38 SAVES FLAG WOR
Position Decoding IP 240FB 39 LEN=37NETWORK 1 0000 LOAD FLAGSWRITE THE STATES OF
IP 240 Position DecodingFB 169 LEN=47NETWORK 1 0000NAME :STRU.WEGID :BGAD I/Q/D/B/T
8 Counting8.1 Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8- 18.2 Principle of Operat
Figures8-1. Actual Value Range and Overrange in Counting Mode . . . . . . . . . . . . . . . . . 8 - 18-2. Sequence Diagram for Counting Mode . . . .
IP 240 Counting8 Counting8.1 ApplicationsIn this mode, the IP 240 can be universally used for pulse counting. The module can process pulsetrains wit
Counting IP 240When the defined actual value range is exceeded, the counter enters overrange and the IP setsstatus bit UEBL (overflow).When set, the
IP 240 Counting8.2.2 Final ValueStoring the final countWhen you evaluate the actual value, you are evaluating the current count. The IP also makes t
Counting IP 240The following options are available for forcing the output:a) The digital output is to be set when the actual value reaches ”0”, and
IP 240 System Overview1 System OverviewIntelligent input/output modules (I/Os) extend the field of applications of the SIMATIC S5programmable contro
IP 240 Counting8.2.4 Flagging with Status BitsStatus data is updated in every cycle of the module firmware on the IP.If you want information about t
Counting IP 2408.2.5 Interrupt Generation and ProcessingStatus bits REF1, REF2, UEBL and UEBS can trigger an interrupt and are stored in the interru
IP 240 Counting8.3 Initializing Standard Function Blocks and Data Block Contents8.3.1 Configuring Function BlockFB 171 (STRU.DOS) Configuring and p
Counting IP 240Table 8-1. Parameters for Configuring FB 171Para- Name meter Data Description typeBGAD D KF Module starting addressKANR D KF Cha
IP 240 CountingEXT : KH 0000 to 0001 Control of count enabling by external or internal starting signalBit 0=1 Control of start of count by active si
Counting IP 240Technical SpecificationsBlock number : 171Block name : STRU. DOSPLC Library numberCall length/Block lengthCPU Processing time 1S5-115
IP 240 Counting8.3.2 Control Function BlockFB 172 (STEU.DOS) Control function block for counting. Functional descriptionThe control function block
Counting IP 240NoteIn the standard function blocks, scratch flags and system data areas are used fordata interchange with the IP 240 ( Technical Sp
IP 240 Counting8.3.3 Contents of the Data BlockThe data block to be created must have least 36 words (DW0 to DW 35). The number of theselected data
Counting IP 240Control bitsDL 17DR 177Databyte6 5 4 3 2 1 0000STRT0000DA1F0DA1S0AMSK000BitAMSK =1 All process interrupts for the channel are masked,
System Overview1P 240In the position decoding, counting and positioning modes, the 1P 240 can be used as a standalonemodule in the U-range programmabl
IP 240 CountingInterrupt request bytes for channel 1 and channel 2Channel 1Channel 1Channel 2Channel 2DL 20DR 20DL 21DR 217Databyte6 5 4 3 2 1 00000
Counting IP 240Actual valueThe specified value is an absolute value. The sign (SG) is indicated in the status area (DW 19).Actual value in BCD000000
IP 240 Counting8.4 Example for Counting: Fast Filling with Loose MaterialThe throughput in filling with loose material is measured using a pulse enc
Counting IP 240Inputs, outputs, flags, timers and counters usedOPERAND SYMBOL COMMENTI 5.2 EMERG STOPI 5.3 START FILL PUSHBUT
IP 240 CountingDB14 LEN=43
Counting IP 240DB20 LEN=35
IP 240 CountingFB 40 initialization programyesyesnonoyesyesnonoyesDepending on cause Q ”FILLING”flashes fast or slowlyReset F ”FILL ACTIV”Reset auxi
Counting IP 240OB 1 LEN=8
IP 240 CountingFB 38 LAE=39
Counting IP 240FB 39 LEN=37
3 Addressing4 Hardware Installation5 Operation6 Functional Description7 Position Decoding8 Counting9 IP 252 Expansion10 Positioning11 Direct Data Inte
IP 240 CountingFB 40 LEN=31
Counting IP 240FB 41 LEN=111
IP 240 CountingFB 41 LEN=111
Counting IP 240FB 171 LEN=38
10 Positioning11 Direct Data Interchange with the IP 24012 Response Times13 Encoder Signals14 Error Messages9 IP 252 Expansion9.1 Speed Measurement wi
TablesFigures9-1. Speed Measurement with the IP 252 Closed-Loop Control Module . . . . . . . 9 - 19-2. Actual Speed Measurement via the IP 240 Modul
IP 240 IP 252 Expansion9 IP 252 ExpansionWhen the IP 240 is used with the IP 252 closed-loop control module, control lines, which are onlyimplemente
IP 252 Expansion IP 240By expanding the IP 252 with IP 240 modules, it is possible to provide two or more control loopswith actual values from incre
IP 240 IP 252 Expansion9.2 Data Interchange between S5 CPU -- IP 240 -- IP 252 During operation, data traffic between the IP 240 and the IP 252 is c
1P 252 Expansion1P 2409.3Configuring—When configuring the 1P 252 closed-loop control module, YOU must W the configuring switches —for speed measurem
Figures2-1. Front Connectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2- 42-2. Block Diag
IP 240 IP 252 Expansion9.4 Initializing the Configuring Function Block and Data Block Contents9.4.1 Configuring Function BlockFB 173 (STRU. 252) Co
IP 252 Expansion IP 240NoteInterrupt servicing is not disabled in the configuring FBs. You must therefore writeyour STEP 5 program in such a way tha
IP 240 IP 252 Expansion9.4.2 Data Block ContentsThe data block to be created must have at least 25 words (DW 0=to DW 24). The number of theselected
10 Positioning10.1 Application and Functional Description . . . . . . . . . . . . . . . . . . . . . . . 10 - 110.1.1 Application . . . . . . . . . . .
11 Direct Data Interchange with the IP 24012 Response Times13 Encoder Signals14 Error Messages10.13 Methods of Synchronization . . . . . . . . . . . .
10-1. Overview of IP 240 Configuring and Synchronization Options . . . . . . . . . . 10- 110-2. Controlled Positioning with Two Speeds . . . . . . . .
10-1. Switching IP Digital Outputs D1 and D2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10- 310-2. Selecting Positions 0 - 254 . . . .
IP 240 Positioning10 Positioning10.1 Application and Functional Description10.1.1 ApplicationIn this mode, the IP 240 enables controlled positioning
Positioning IP 24010.1.2 Functional DescriptionThis section includes a brief description of the IP 240's method of operation in ”positioning”mo
IP 240 PositioningFig. 10-3. Controlled Positioning with the IP 240StartingpositionTargetpositionVSwitchingpointCut-offpointPosition value of thet
IP 240 Module Description and Accessories2 Module Description and Accessories2.1 General Technical SpecificationsTemperatureOperation 0 to +55 °C(In
Positioning IP 240b) Switching and signalling ranges for a positionDuring the approach to a target position, the IP 240 monitors the entry into rang
IP 240 PositioningFig. 10-5. Status Bits on Approach to Position000Approaching the positionin negative directionApproaching the positionin positiv
Positioning IP 240b) Approaching the target position in negative directionThe axis is at 1600 increments when the position is selected. The axis mus
IP 240 PositioningTable 10-3. Axis Types and Actual Value RangesRotary axis9,999,998Linear axisMaximumactual value Table-9,999,999 +9,999,999-10+1
Positioning IP 240b) The IP outputs control the direction of travelThe IP 240 sets one or both outputs in dependence on the required direction of tr
IP 240 PositioningTo compensate backlash, you can specify that the IP output is to be disabled on a approach toposition only when the direction of t
Positioning IP 240c) Synchronization with an external control signalWhen this method is used, each positive signal edge at the IN input resets the a
IP 240 PositioningBCD representationIf you require BCD-coded data for the purpose of documentation, definition or post-processing,you may choose thi
Positioning IP 24010.3.2 Data in the Data Block and in the Transfer BufferIf the data interchange with the IP 240• is handled by standard function b
IP 240 Positioning• 2-byte-dataTwo bytes are available for the following data items:- Distance value of range BEE3 for position 0Table 10-6. Layout
Module Description and Accessories IP 2402.2 Technical SpecificationsThe IP 240 has two independent channels. In the IP 252 expansion mode, the enc
Positioning IP 240Numerical representation and ranges for input and output valuesThe table below provides an overview of the digit positions actuall
IP 240 Positioning10.4.2 Rotary AxisIn the case of a rotary axis, the traverse path is closed and is not limited. A revolution can comprisea maximum
Positioning IP 240Maximum traversing speedThe encoder pulses acquired by the IP are counted in a counter chip. The current (internal) count isread o
IP 240 Positioning10.5 Switching the IP OutputsThe IP 240 is equipped with two digital outputs (D1 and D2) for each channel.You have two options for
Positioning IP 24010.5.2 The IP Outputs Control the Traversing SpeedWhen you configure DAV=0 or DAV=1, you pass control of the traversing speed to t
IP 240 PositioningFig. 10-13. Switching Performance of the IP Outputs when DAV=2OutputD2SampleactualvaluePositionvalidOutputD1BEE1Positive directi
Positioning IP 240Fig. 10-14. Contactor Control of a Three-Phase MotorEmer-gencylimitswitchEmer-gencylimitswitchK1 K2 K4K3K1 K2Axis slides Emerge
IP 240 Positioning10.6 Backlash Compensation (LOSE) Backlash in the position decoding system reduces the positioning accuracy. To prevent this, allp
Positioning IP 240If the actual value is greater than the position value of a newly selected position, the positioningprocedure must be subdivided i
IP 240 Positioning10.6.2 Backlash Compensation during Reference Point ApproachCompensation of the backlash during reference point approach ( Sectio
IP 240 Module Description and AccessoriesInput frequencies Pulse inputs:-Symmetrical signals max. 500 kHz in position decoding and positioning modem
Positioning IP 240Actual value range and overrangeThe actual value range is defined as -9,999, 999 to +9,999,999.Fig. 10-17. Actual Value Range an
IP 240 PositioningYou specify the resolution in configuring parameter AFL:: JU FB 167NAME : STRU.POS::AFL : KF x x=1 Single resolutionx=2 Twofol
Positioning IP 24010.7.2 Zero OffsetBy transferring a zero offset (NVER), you can allocate a new actual value to the current position.You may also m
IP 240 Positioningb) Additive zero offsetThe new actual value is computed as follows when you specify an additive zero offset: Actualnew=Actualold +
Positioning IP 240The table below shows the contents of the data block for a zero offset.A negative value must be spe-cified as two's complemen
IP 240 Positioning10.8 Position Data for Positions 1 to 254Position data includes:• the position value designating the absolute location of the posi
Positioning IP 240Entering the position numbers and position values in the data blockThe area beginning with DW 60 is reserved for position numbers
IP 240 PositioningThe position number assigned to a position need not be identical to the number of the positionentry.It is more practical, however,
Positioning IP 240When the actual value is within a range, the associated status bit BEE1, BEE2 or BEE3 is set to zero.Changes in the values of thes
IP 240 PositioningTransferring the distance values with the configuring FBThe distance values are initially transferred to the IP 240 when you confi
Only qualified personnel should install or maintain this equipment after becoming thoroughly familiarwith all warnings, safety notices, and maintenanc
Module Description and Accessories IP 2402.2.3 Inputs/OutputsThe IP 240 provides two options for connecting sensors to the pulse inputs:• All senso
Positioning IP 240Zero mark monitoringZero mark monitoring is used to detect spurious or missing pulses, and is possible only when• the number of en
IP 240 Positioning10.10 Initializing the Parameters for Interrupt Generation (PRA1, PRA2, ABIT)The following status bits have interrupt capability,
Positioning IP 240When using an S5-150U or S5-155U (150 mode), note that the ABIT parameter must also beinitialized. In these programmable controlle
IP 240 PositioningTable 10-15. Contents of Data Words 8 to 10DatabyteBit7654 3210DescriptionDL 8 2726252423222120Error no. 3DR 8 2726252423222120E
Positioning IP 24010.13 Methods of SynchronizationPositioning is possible with the IP 240 only when the actual value has been synchronized. Threemet
IP 240 PositioningFig. 10-22. Location of the Reference Point on Reference Point ApproachCountingpulsesPositive direction of travelActual value wh
Positioning IP 240If you configured the channel with DAV=2 (the IP controls the direction of travel duringpositioning) and want to pass control of t
IP 240 Positioningb) If the IP outputs are to be controlled by the module firmware (HAND=0), they can beenabled immediately (FREI=1).If the IP 240 c
Positioning IP 240Switching the IP outputs during reference point approach (HAND=0)The switching performance of the IP outputs specified when the ch
IP 240 Positioningc) DAV=2After the outputs have been enabled, the IP output specified by setting control bit DA1S orDA2S is set.The output is reset
IP 240 Module Description and Accessories 5 Vsym.pulse trainA, A, B, B, Z, Z 5 VA*, B*, Z*IN, CLK, GT 24 VA*, B*, Z*IN, CLK, GTData for rated voltag
Positioning IP 240Status of range bits BEE1, BEE2 and BEE3 during reference point approachWhen reference point approach is selected, all three range
IP 240 PositioningInterrupting a reference point approachYou can interrupt a reference point approach by transferring• control bit HASY = 0 or• cont
Positioning IP 240The new position number can be transferred to the IP 240 together with SOSY=1. Refer toSection 10.14.1 for information on how to s
IP 240 Positioning10.13.3 Synchronization with an External Control SignalWhen synchronization with an external control signal, referred to from here
Positioning IP 240Fig. 10-29. Synchronization with an External Control Signal at the IN InputSample actual valueNew actual valueOld ControlbitZYSY
IP 240 PositioningWarningCyclic synchronization is also allowed when the IP outputs are set. The positiontransferred goes into force immediately on
Positioning IP 24010.14 Selecting a PositionPositioning is started by selecting a position. The IP 240 uses the position value for the positionselec
IP 240 PositioningNoteThe IP 240 accepts the specified position number only when control bit HAND is notset. In addition,• status bit SYNC must be s
Positioning IP 240If it is necessary to disable the IP outputs, you can do so by transferring FREI=0 and, at the sametime, specify the new position
IP 240 PositioningTable 10-18. Contents of the DB and the Transfer Buffer for Writing Position 0Bit76543210DescriptionData byteDatablockOffsetin t
Module Description and Accessories IP 240Digital outputsNumber of outputs 4 (2 per channel)Galvanic isolation yesin groups of 1Supply voltage VpRa
Positioning IP 24010.15 Controlling the Digital Outputs During PositioningYou can use IP outputs D1 and D2 to• change the traversing speed or• contr
IP 240 PositioningControlling the IP outputs via the S5 CPU (HAND=1)You can define the states which the IP outputs are to assume via the S5 CPU usin
Positioning IP 240Table 10-19. Contents of the DB and the Transfer Buffer for Transferring the Control Bits Bit76543210DescriptionData byteDatab
IP 240 Positioning10.16 Reading and Evaluating the IP Status InformationThis includes:• the current (feedback) position number• the status bits• the
Positioning IP 240Reading the status information from the IP 240with control FB 168 in direct data interchangeYou must initialize FB 168 as follows
IP 240 PositioningBit is ”0”Status bit Bit is ”1”ZBEV(target rangeexited)BEE1BEE2BEE3PositioningBEE1BEE2BEE3Referencepoint BEE1approach(HASY=1)BEE2P
Positioning IP 240Status bitActual value exited range BEE2. Rever-sal of direction of travel is possible.RIUM(Reversal ofdirection)A new position nu
IP 240 PositioningWhen they have been read, status bits NPUE, UEBL, MESE and UEBS are reset on the IP 240, i.e.these bits can be read out only once.
Positioning IP 240Table 10-21. Contents of the DB and the Transfer Buffer on Reading the Interrupt Request Bytes Bit76543210DescriptionData byte
IP 240 PositioningExamples for interrupt bits BE1 to BE3, ZBV and RIUWithoutbacklashcompensationTargetpositionLinearaxisRotary axisPositivedirection
IP 240 Module Description and AccessoriesEncoder supplyThe power supply for 5 V encoders is taken from the programmable controller's power supp
Positioning IP 240Interrupt bit Bit is ”1”UEB(Overflow)The actual value has exited the valid actual value range and entered theoverrange.MESUBS
IP 240 PositioningThe modified data go into force as soon as they are transferred. The IP 240 updates the status bitsand generates any pending inter
Positioning IP 240If you use FB 168 to write the new position values, you must specify the entry to be transferred inthe data block when you initial
IP 240 Positioning10.18.2 Changing the Distance Values for Ranges BEE1 to BEE3Table 10-23. Contents of the Data Block and the Transfer Buffer for
Positioning IP 240Transferring modified distance values for the switching and signalling rangeswith control FB 168 in direct data interchangeYou mus
IP 240 PositioningTable 10-24. Contents of the Data Block and the Transfer Buffer for Changing the Zero OffsetZero offset in binaryA negative valu
Positioning IP 24010.19 Interrupting Positioning and Skipping of a PositionPositioning is interrupted when• control bit FREI=0 is transferred.In thi
IP 240 PositioningIf the channel was structured for backlash compensation and the actual position is above thetarget position (RICH=1), output D2 is
Positioning IP 24010.21 Positioning with the IP 240The flowchart below illustrates the functional sequence for positioning with the IP 240.In the ex
IP 240 Positioning10.21.2 Positioning with the IP Controlling the DirectionFig. 10-32. Positioning with the IP 240 Controlling the Direction of Trav
Module Description and Accessories IP 2402.4 Order NumbersOrder No.Module without instruction manual 6ES5 240-1AA21Adapter casing for 2 modules in
Positioning IP 24010.22 Error Processing Following Positioning ControlErrors occurring during transfer of data to the IP are flagged• in the PAFE by
IP 240 Positioning10.23 Data Block Contents and Initializing the Standard Function Blocks10.23.1 The Data BlockCreating the data blockThe standard f
Positioning IP 240Contents of the data blockTable 10-27. Contents of the Data Block (DW 0 to DW 821)DW 59Final position of the rotaryaxisDW 45 to
IP 240 PositioningContents of the data wordsYou must set the unassigned positions of the data words you want to transfer to the IP 240 to ”0”.Functi
Positioning IP 240ID for the configured mode and data block numberDL 23DR 237Databyte6 5 4 3 2 1 0025024023122021020Bit027026DB no.Following error-f
IP 240 PositioningStatus bitsDatabyte7DL 29DR 296 5 4 3 2 1 0Bit0DA20DA1RIUMMESEZBEVBEE3UEBSBEE2DRBRBEE1NPUERICHUEBLSYNCRIUM = 1 Range BEE2 was exit
Positioning IP 240Final valueSE21821022SE2172921SE2162820Binary representation BCD representationDL 32DR 32DL 33DR 33SE22021224106104102100SG1051031
IP 240 PositioningData for position 0Position value for position 0SE21921123SE21821022SE2172921SE2162820Binary representation BCD representationDL 3
Positioning IP 240DL43DR437Databyte6 5 4 3 2 1 02132521224211232102229212820Bit2152721426Distance value for range BEE3DL44DR447Databyte6 5 4 3 2 1 0
IP 240 PositioningFinal position of the rotary axis 021921123 021821022 02172921 02162820Binary representation BCD representationDL 48DR 48DL 49DR 4
4 Hardware Installation5 Operation6 Functional Description7 Position Decoding8 Counting9 IP 252 Expansion10 Positioning11 Direct Data Interchange with
Positioning IP 240Position number and position value for positions 1 to 254In the tables below, the first word for a position entry is always identi
IP 240 Positioning10.23.2 The Configuring Function BlockFB 167 (STRU.POS) Configures and initializes the IP 240 for ”positioning” modeFunctional des
Positioning IP 240Table 10-28. Parameters for Configuring FB 167NAMEParametertypeDatatypeDescriptionBGADKANRDBNRAFLIMPBCDPRA1PRA2RUNDLOSEDAVPAFEBE
IP 240 PositioningBCD : KY x,y Number formatx /y=0 Binary x /y=1 BCDx determines the following values:• Position values for positions 1 to 254• Dist
Positioning IP 240PAFE : QB QB or FY (0 to 239) for flagging errors ( Section 6.4)BER : KF 0 Addressing in P area1 Addressing in Q areaABIT : KYx,y
IP 240 PositioningTechnical SpecificationsBlock number : 167Block name : STRU. POSAG Library numberCall length/Block lengthCPU Processing time 1S5-1
Positioning IP 24010.23.3 The Control Function BlockFB 168 (STEU.POS) Control function block for ”positioning” modeFunctional DescriptionThe control
IP 240 PositioningInvoking the control function blockThe control FB is normally invoked in the cyclic program and in the interrupt service OBs.Name
Positioning IP 2403 - Read interrupt request bytes41 1 to Transfer position value for the yth entry in the DB.255 y= Entry to be transferred42 1 to
IP 240 PositioningTechnical SpecificationsBlock number : 168Block name : STEU. POSAG Library numberCall length/Block lengthCPUProcessing time1Functi
Figures3-1. Locations of the Address Switches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3- 1EWA 4NEB 811 6120-02a
Positioning IP 24010.24 Sample Program for Processing Data Words with a Data Word NumberExceeding 255If a data block exceeds a length of 256 data wo
IP 240 Positioning**************************SAMPLE PROGRAM FOR S5-115U**************************NAME :L/T DWXID :DBNR I/Q/D/B/T/C: D KM/KH/KY
Positioning IP 240***********************************SAMPLE PROGRAM FOR S5-135U AND 150U***********************************ADDRESS REQUIRED IN PROGR
IP 240 Positioning**************************SAMPLE PROGRAM FOR S5-155U**************************THE ADDRESS REQUIRED IN THE PROGRAMDEPENDS ON THE DA
Positioning IP 24010.25 Example: Removing Parts from a Die-Casting MachineFinished parts are to be taken from a die-casting machine and deposited at
IP 240 PositioningFlags, inputs, outputs, timers and DBs OPERAND SYMBOL COMM
Positioning IP 240OPERAND SYMBOL COMMENTARYFY 65 ERROR REASON FOR SETTING GROUP ERROR FLAG (F 64.7)F 65.0 ERR00 REF. POINT APPROACH TERM. WITHOUT SY
IP 240 PositioningOPERAND SYMBOL COMMENTARYFY 200 PAFE CONTENTS SEE INSTR. MAN. SEC. 6.4T 1 POSTIMER WATCHDOG TIMER FOR POSITIONINGT 2 STOPTIMER TIM
Positioning IP 240Functional sequence:yesRestart routine (FB 20)START”Start”?Configure IP 240:- Channel 1 for positioning modeCompute reference poi
IP 240 PositioningCyclic program for x axis (FB 30)yesnonononoMain switch on?STARTRefe-rence point approach exe-cuted?ENDRead actual value and statu
IP 240 Addressing3 AddressingThe IP 240 module reserves an address space of 16 bytes in the I/O areas. All data are exchangedvia these areas, which
Positioning IP 240Reference point approach FB 31yesnoyesReference point approach in progress?STARTReset IP outputsPreselect negative directionSelect
IP 240 PositioningSelect next position (FB 32)yes- Prepare for ”open gripper”- Write next eject position to transferflag- Decide whether machining c
Positioning IP 240Select and approach position (FB 33)Transfer position number and controlbits (FREI = "1") to IPRead out status from IP n
IP 240 PositioningInterrupt service routine for x axis (FB 34)STARTStart watchdog timer for motordecelerationnoCut-off range entered?yesTarget range
Positioning IP 240DB100 TRAVERSING DATA ##################################
IP 240 Positioning DB128 0: KH = 0000; 1: KS =&a
Positioning IP 240 69: KH = 0004; 4TH POS. NO. 70: KH = 0025; ] 4TH VALUE 71: K
IP 240 PositioningFB 20 NETWORK 1 0000
Positioning IP 240FY 60 = NPOS NO. OF NEXT POS. TO BE APPROACHEDFY 61 = RESPONSE RESPONSE WHEN POSITION
IP 240 PositioningNETWORK 5 0051 RELOAD SCRATCH FLAGS / RS DATA0051 : ------------------------
Addressing IP 240Switch settingsI/O area(P)extendedI/O area(Q)I/O area1281441601761922082242400163248648096112144128160176192208224240Startingaddres
Positioning IP 240FB 30 NETWORK 1 0000
IP 240 PositioningI 32.0 = MAINSW MAIN SWITCH: ENABLE FOR CONTROL SYSTEMF 0.0 = RLO0 FLAG FOR "0&q
Positioning IP 240F 64.2 = REFACTIV REF.POINT APPROACH IN PROGRESSF 64.0 = POSACTIV POSITIONING IN PROGRESSQ
IP 240 Positioning0082 :0083 :A I 33.2 -GRUP LIMIT SWITCH MONITORING0084 :R Q 5.1 -CLOSGR GR
Positioning IP 240FB 31 NETWORK 1 0000#
IP 240 Positioning0042 :JU FB 1680043 NAME :STEU.POS0044 DBNR : KF +00045 FKT : KY 20,0 TRANSFER CONTROL BITS00
Positioning IP 240FB 32 NETWORK 1 0000#
IP 240 PositioningFB 33 NETWORK 1 0000##
Positioning IP 2400041 :0042 :A F 63.3 -BEE20043 :A F 63.1 -RICH0044 := Q 4.1 -NEGPOS0045 :JC =NTW2
IP 240 PositioningNETWORK 2 0061 ERROR MONITORING0061 :A T 1 -POSTIMER WHEN TIME EXCEEDED0062 :S F 6
IP 240 AddressingUse of the IP 240 in the S5-183U, S5-184U, S5-185U and S5-186U expansion unitsIf you use the IP 240 in one of these EUs, set the st
Positioning IP 240FB 34 NETWORK 1 0000#
IP 240 PositioningNETWORK 3 0031 CUT-OFF RANGE REACHED0031 :AN F 69.3 -BE20032 :JC =NTW30033 :A F 0.1 -RLO10
Positioning IP 240NETWORK 6 0051 HARDWARE FAULTS0051 :AN F 68.0 -UEB0052 :AN F 68.1 -NPU0053 :AN F 68.2 -DR
IP 240 PositioningFB 167 NETWORK 1 0000
Positioning IP 240OB 2 NETWORK 1 0000
11 Direct Data Interchange with the IP 24011.1 Status and Job Request Register (Offset 15) . . . . . . . . . . . . . . . . . . . . . 11 - 211.1.1 Stat
Figures11-1. Flowchart for ”Read data from the IP 240” . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11- 511-2. Flowchart for ”Write data to
IP 240 Direct Data Interchange with the IP 24011 Direct Data Interchange with the IP 240For time-critical applications, it may be necessary to excha
Direct Data Interchange with the IP 240 IP 240In the following, it has been assumed that the channel has been configured with standard FB 167for pos
IP 240 Direct Data Interchange with the IP 240Table 11-1. Contents of the Status RegisterBit Abbr. Meaning when bit is ”1”Job terminated,The job
IP 240 Replacement Pages for IP 240 Manual, Edition 3Supplement to the IP 240 Manual, Order No. 6ES5 998 0TB22, Edition 3Use of the IP 240 in the S7-
5 Operation6 Functional Description7 Position Decoding8 Counting9 IP 252 Expansion10 Positioning11 Direct Data Interchange with the IP 24012 Response
Direct Data Interchange with the IP 240 IP 24011.1.2 Job Request RegisterThe S5 CPU enters the job number in the job request register, thus telling
IP 240 Direct Data Interchange with the IP 24011.2 Data Transfer from the IP 240 to the S5 CPUThe S5 CPU can request data from the IP 240. To make t
Direct Data Interchange with the IP 240 IP 240Fig. 11-1. Flowchart for ”Read Data from the IP 240” (Continued)EndnonoyesError detected?Data not ye
IP 240 Direct Data Interchange with the IP 24011.3 Data Transfer from the S5 CPU to the IP 240The S5 CPU can forward new data to the IP 240. To do s
Direct Data Interchange with the IP 240 IP 240The flowchart shown below illustrates the communication procedure for ”Write data to theIP 240”Fig. 11
IP 240 Direct Data Interchange with the IP 240Fig. 11-2. Flowchart for ”Write Data to the IP 240” (Continued)nononoyesError detected?Data not yet
Direct Data Interchange with the IP 240 IP 24011.4 Contents of the Transfer Buffer11.4.1 Position Decoding ModeRead actual value and status areaWhen
IP 240 Direct Data Interchange with the IP 240SYNC =1 Reference point approach was terminated with synchronizationDRBR =1 Wirebreak/short-circuit in
Direct Data Interchange with the IP 240 IP 240Write initial and final track valuesTo change the initial value and final value for a track, you must
IP 240 Direct Data Interchange with the IP 240Write control bitsTo initialize control bits, you must load the new control bits into the transfer buf
Figures4-1. Connectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4- 44-2. Con
Direct Data Interchange with the IP 240 IP 24011.4.2 Counting ModeRead actual value, final value and status areaThe IP 240 makes the actual value, t
IP 240 Direct Data Interchange with the IP 240REF2 =1 Final value was storedUEBL =1 Actual value out of range (<- 9,999)UEBE =1 Final value out o
Direct Data Interchange with the IP 240 IP 240Write initial countTo modify the initial count value, you must enter the new value in the transfer buf
IP 240 Direct Data Interchange with the IP 24011.4.3 Reading Error MessagesThe IP 240 makes the error available in the transfer buffer when you tran
Direct Data Interchange with the IP 240 IP 24011.5 Sample ProgramsThe following sample programs show how to program direct data interchange with the
IP 240 Direct Data Interchange with the IP 240: L M 239.4 -ERR ERROR?: JC =ERR2 JUMP TO ”READ ERROR MESSAGES”:: L PY224 TRANSFER BCD-CODED ACTUAL V
Direct Data Interchange with the IP 240 IP 24011.5.2 Writing Data to the IP 240The module is set to module address 160 and channel 2 is configured f
IP 240 Direct Data Interchange with the IP 240 : L FY 142 TRANSFER BCD DECADES 10^3 AND 10^2 : T PY 161 OF THE INITIAL VAL. FOR THE 3RD TR
Direct Data Interchange with the IP 240 IP 240ERR3 : L KH0001 LOAD JOB NUMBER FOR ”LOAD ERROR: T PY175 MESSAGES” AND TRANSFER JOB NO.:STA5 : L PY175
12 Response Times12.1 Structure of a Firmware Cycle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 - 112.2 Computing the Respons
IP 240 Hardware Installation4 Hardware Installation4.1 Installation4.1.1 Suitable Programmable Controllers and Expansion UnitsThe IP 240 can be used
12-1. Firmware Execution Times, Position Decoding Mode . . . . . . . . . . . . . . . . . . . 12 - 412-2. Firmware Execution Times, Counting Mode . . .
IP 240 Response Times12 Response TimesThe response time is the time between reaching of a setpoint and the IP 240's reaction.The signals from t
Response Times IP 24012.2 Computing the Response TimeUsing channel 1 as example, Figure 12-2 shows which FW slices must be taken into account whenco
IP 240 Response Times Fig. 12-3. Response Time for Evaluation of the Actual Value and of Wirebreakand Zero Mark ErrorsSetpoint reachedor error hasoc
Response Times IP 24012.3 Firmware Execution TimesThe execution time of the individual firmware slices depends on• the modes in which the channels a
IP 240 Response TimesChannel 2: • Base time without configuring tA=45µs• Position decoding mode tWW= 520 µs• 8 tracks used, without hysteresis 8 x t
Response Times IP 240Positioning modeTable 12-3. Firmware Execution Times, Positioning ModeDescriptionBase time without configuring 45 µsAbbrev.Ma
13 Encoder Signals13.1 Signal Forms and Timing Requirementsfor Incremental Encoders . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
13-1. Signal Forms: Symmetrical Encoder Signals A/A, B/B, Z/Z andAsymmetrical Encoder Signals A*, B*, Z* . . . . . . . . . . . . . . . . . . . . . . .
IP 240 Encoder Signals13 Encoder SignalsThis section discusses the requirements for the forms and timing of the signals for the IP 240. Thefollowing
Hardware Installation IP 240S5-115U expansion unit, ER 701-3 subrack7PS IM0 1 2 3 4 5 6NoteIf the IP 240 is operated in an ER 701-3 expansion unit,
Encoder Signals IP 24013.1.2 Timing RequirementsThe following diagrams show the timing requirements for signals A, B and Z at the IP 240's inpu
IP 240 Encoder SignalsFig. 13-2. Timing Diagram for Symmetrical Incremental Encoders (Continued)A signalA signalB signalB signalZ sign.1)Z sign.Z
Encoder Signals IP 240Timing requirements for encoders with asymmetrical signalsFig. 13-3. Timing Diagram for Asymmetrical Encoderst5t51) Position
IP 240 Encoder SignalsThe IN signal is evaluated by the IP 240 module firmware. For this reason, acquisition of the signaledges may sometimes be def
Encoder Signals IP 240Connecting the synchronization signal to the IN inputFig. 13-6. Timing Diagram for the Synchronization Signal, Positioning M
14 Error Messages14.1 Hardware Faults . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 - 114.2 Error Messa
14-1. Errors Flagged in the PAFE Byte . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 - 114-2. Hardware Faults . . . .
IP 240 Error Messages14 Error MessagesIf you use standard FBs 167 to 173 for data interchange between S5 CPU and IP 240, you canascertain whether an
Error Messages IP 24014.2 Error Messages in Position Decoding and Counting Mode14.2.1 Parameter and Data ErrorsIn position decoding and counting mod
IP 240 Error Messages14.2.2 Communications ErrorsCommunications errors can occur when you interchange data directly with the IP 240 withoutusing con
IP 240 Hardware InstallationS5-183U expansion unit 1)3 15511 19 27 35 43 51 59 67 75 83 91 107 123 131 139 14799 115 163S5-184U expansion unit 1)155
Error Messages IP 24014.4.2 Data ErrorsThe specified data is checked by the module firmware. If standard function blocks are used fordata interchang
IP 240 Error MessagesTable 14-7. Data Errors in Positioning Mode (Continued)Chan. 1DescriptionExten-sionChan. 2Error code for60 90 nn Position num
Error Messages IP 240Table 14-7. Data Errors in Positioning Mode (Continued)DescriptionExten-sionChan. 2Chan. 1Error code forMore than one synchro
A-1IP 240EWA 4NEB 811 6120-02bAdapter Casing (S5 Adapter)In this chapter, you will learn how to install modules in the adapter casing, and what you
A-2IP 240EWA 4NEB 811 6120-02bA.1 PrerequisitesThe following prerequisites must be observed as regards the use of S5modules in the S7-400: Check with
A-3IP 240EWA 4NEB 811 6120-02bA.2 Installing an Adapter Casing in the S7-400To install an S5 module in an S7-400, you must first install the adapter c
A-4IP 240EWA 4NEB 811 6120-02bA.3 Inserting S5 Modules in the Adapter CasingProceed as follows to insert an S5 module in the adapter casing:1. Set an
A-5IP 240EWA 4NEB 811 6120-02bA.4 Interrupt ProcessingThe adapter casing converts S5 interrupts into S7 interrupt functions and in-terrupt signals.All
A-6IP 240EWA 4NEB 811 6120-02bA.5 Technical SpecificationsDimensions and WeightDimensions WHD 50mm290mm210mm(1.96 in. x 11.41 in. x8.26 in.)Weight
B-1IP 240EWA 4NEB 811 6120-02bAddressing S5 Modules (Adapter Casing and IM 463-2)This chapter describes how to address S5 modules inserted in the ada
Hardware Installation1P 2404.2 Wiring4.2.1 Wiring MethodII~ Base connector Xl,Submin. D-type socket connector (1 5-pin)X2 and X4ShieldFixing screw, 4-
B-2IP 240EWA 4NEB 811 6120-02bB.1 Addressing S5 ModulesThere are two ways of using an IP xxx S5 module in the S7-400: By installing it in the adapter
B-3IP 240EWA 4NEB 811 6120-02bS5 modules in the S7-400 may be addressed in the following addressingareas: I/O area (P area) Extended I/O area (Q, IM
B-4IP 240EWA 4NEB 811 6120-02bThe CPU and an IP (an IP being an intelligent I/O module) interchange datavia the S5 bus interface and a 2 Kbyte dual-po
C-1IP 240EWA 4NEB 811 6120-02bThe IP 240 Counter, Position Decoder andPositioning ModuleThis chapter describes the counting, position decoding and pos
C-2IP 240EWA 4NEB 811 6120-02bC.1 OverviewThis addendum supplements Chapters 7, 8 and 10 of the Manual. It describesthe standard functions of the IP 2
C-3IP 240EWA 4NEB 811 6120-02bResult:The software is installed in the following directories on the target drive:Software DirectoryCounting and positio
C-4IP 240EWA 4NEB 811 6120-02bC.2 Counting FunctionsFunction FC 171 (STRU_DOS)The call, meaning and parameter values for the FC 171 function are de-s
C-5IP 240EWA 4NEB 811 6120-02bFunction FC 172 (STEU_DOS)The call, meaning and parameter values for the FC 172 function are de-scribed below.Ladder Dia
C-6IP 240EWA 4NEB 811 6120-02bThe technical specifications for FC 171 and FC 172 are listed below:FC 171 FC 172Block number 171 172Block name STRU_DOS
C-7IP 240EWA 4NEB 811 6120-02bC.3 Position Decoding FunctionsFunction FC 164 (STRU_WEG)The call, meaning and parameter values for the FC 169 function
IP240Hardware Installation4.2.2 Connector Pin AssignmentsFront Connector Pin AssignmentsX21X46‘ 15014013012011010 c), 90706050403020X31X5X6–A—ii–M—B–E
C-8IP 240EWA 4NEB 811 6120-02bFunction FC 170 (STEU_WEG)The call, meaning, and parameter values for the FC 165 function are de-scribed below.Ladder Di
C-9IP 240EWA 4NEB 811 6120-02bThe technical specifications for FC 169 and FC 170 are listed below:FC 169 FC 170Block number 169 170Block name STRU_WEG
C-10IP 240EWA 4NEB 811 6120-02bC.4 Positioning FunctionsFunction FC 167 (STRU_POS)The call, meaning, and parameter values for the FC 167 function are
C-11IP 240EWA 4NEB 811 6120-02bDBNR: INT = xx = Depends on the CPU used (0 is not permitted)For the values of all other parameters, please refer to t
C-12IP 240EWA 4NEB 811 6120-02bThe technical specifications for FC 167 and FC 168 are listed below:FC 167 FC 168Block number 167 168Block name STRU_PO
C-13IP 240EWA 4NEB 811 6120-02bC.5 Differences between SIMATIC S7 and SIMATIC S5As a rule, the following applies for SIMATIC S7: The memory locations
C-14IP 240EWA 4NEB 811 6120-02bC.6 Programming Example for “Counting” ModePrerequisites, Settings, Blocks and AddressesThe programming example describ
C-15IP 240EWA 4NEB 811 6120-02bThe following interrupt settings are required in the CPU: Process interrupt: OB 40, Interrupt: I1 (S5 assignment: IA)
C-16IP 240EWA 4NEB 811 6120-02bThe inputs and outputs are mapped onto memory bits at the beginning andend of OB 1. Within the test program, only the m
C-17IP 240EWA 4NEB 811 6120-02bStart-up Program and Error ResponsesThe start-up program is located in OB 100. When OB 100 has been pro-cessed, you can
Hardware Installation IP 240Shielding of cable connections on the IP 240WarningTo ensure noise immunity, shielded twisted-pair cables must be used f
C-18IP 240EWA 4NEB 811 6120-02bCyclic ProgramThe cyclic program is located in OB 1.At the beginning of the program, the inputs are mapped to memory bi
C-19IP 240EWA 4NEB 811 6120-02bInterrupt ProgramThe interrupt program is located in the organization block OB 40.In the start-up program, the module i
C-20IP 240EWA 4NEB 811 6120-02bC.7 Programming Example for “Position Decoding” ModePrerequisites, Settings, Blocks and AddressesThe programming exampl
C-21IP 240EWA 4NEB 811 6120-02bThe following interrupt settings are required in the CPU: Process interrupt: OB 40, Interrupt I1 (S5 assignment: IA).
C-22IP 240EWA 4NEB 811 6120-02bThe inputs and outputs are mapped onto memory bits at the beginning andend of OB 1. Within the test program, only the m
C-23IP 240EWA 4NEB 811 6120-02bStart-up Program and Error ResponsesThe start-up program is in OB 100. When OB 100 has been processed, youcan check the
C-24IP 240EWA 4NEB 811 6120-02bCyclic ProgramThe cyclic program is in OB 1.At the beginning of the program, the inputs are mapped to memory bitswhich
C-25IP 240EWA 4NEB 811 6120-02bThe LEDs in the front panel allow you to observe the setting of the digitaloutputs D1 and D2 on the module.With the DIG
C-26IP 240EWA 4NEB 811 6120-02bInterrupt ProgramThe interrupt program is located in the organization block OB 40.In the start-up program, the module i
C-27IP 240EWA 4NEB 811 6120-02bC.8 Programming Example for “Positioning” ModePrerequisites, Settings, Blocks and AddressesThe programming example desc
IP 240 Hardware Installation4.3 Installation Examples4.3.1 InputsFig. 4-3. Connection of BERO Proximity SwitchesA1 has NO function (”1” signal)A2
C-28IP 240EWA 4NEB 811 6120-02bThe following interrupt settings are required in the CPU: Process interrupt: OB 40, Interrupt I1 (S5 assignment: IA).
C-29IP 240EWA 4NEB 811 6120-02bThe inputs and outputs are mapped onto memory bits at the beginning andend of OB 1. Within the test program, only the m
C-30IP 240EWA 4NEB 811 6120-02bStart-up Program and Error ResponsesThe start-up program is in OB 100. When OB 100 has been processed, youcan check the
C-31IP 240EWA 4NEB 811 6120-02bCyclic ProgramThe cyclic program is in OB 1.At the beginning of the program, the inputs are mapped to memory bitswhich
C-32IP 240EWA 4NEB 811 6120-02bWith the control word DB 168.DBW 38 FUNCTION = B#(21,1)and brief activation of the input I 1.0 (M190.0), position 1 is
C-33IP 240EWA 4NEB 811 6120-02bThe LEDs in the front panel allow you to observe the setting of the digitaloutputs D1 and D2 on the module.With the DAV
C-34IP 240EWA 4NEB 811 6120-02bInterrupt ProgramThe interrupt program is located in the organization block OB 40.In the start-up program, the module i
IndexEWA 4NEB 811 6120-02a
IP 240 IndexIndexAABIT 7-15, 10-36, 10-85,10-86, 10-88Actual value 7-3, 8-3, 10-23,10-28, 10-57, 10-61,10-76, 10-79- acquisition 7-17, 7-26, 10-26-
Index IP 240Communication 11-2- cycle 11-2, 11-7- errors 6-6, 7-25, 8-13, 9-7,10-36, 14-1, 14-3,14-6- error flags 6-6- resetting 11-8, 11-9- start 1
Hardware Installation IP 240Incremental Encoders(with symmetrical outputs to RS 422 A)Fig. 4-4. Connection of Encoders with Symmetrical Output Sig
IP 240 IndexDD subminiature socket connector 2-4DA1 7-13, 7-26, 8-4, 8-5,8-14, 11-10, 11-14DA1F 7-26, 8-3, 8-14,11-13, 11-16DA1S 7-26, 8-3, 8-4, 8-1
Index IP 240Encoder- signal 2-2, 2-4, 4-8 ... 4-10,5-7, 6-1- signal forms 13-1- signal level 5-7- signal matching 5-1- supply 2-2, 2-4, 2-7, 5-1- su
IP 240 IndexHHardware 7-18- fault 2-7, 6-3, 6-6, 10-36,14-1- fault flag/code/message 6-6, 14-1- version 7-18, 8-7, 9-5, 10-85HOLD time 13-7HW Hard
Index IP 240JJob request 11-4- identified 11-3- identifier 11-11- number 10-37, 10-61, 10-74,11-1, 11-4, 11-7- register 11-1, 11-2, 11-4,11-5, 11-7,
IP 240 IndexParameter 10-86, 10-91, 14-3- assignment 7-18, 8-7, 10-85- assignment errors 6-6, 6-7, 7-18, 7-23,7-25, 8-7, 8-11, 8-13,9-5, 9-7, 14-1,
Index IP 240REF1 11-14REF2 8-3, 11-15REF bit 7-5, 7-6, 7-14, 8-5Reference- bit 7-15, 7-20, 8-8, 8-15- signal 2-2, 7-16- tracks 7-1, 7-4, 7-5, 7-8,7-
IP 240 IndexStatus bit- DRBR 7-14, 10-33, 10-60,10-79- MESE 10-47, 10-60, 10-79- NPUE 10-34, 10-60, 10-79- RICH 10-5, 10-18, 10-59,10-79- RIUM 10-60
Index IP 240Write- control bit 10-90- modified distance values 10-90- modified position values 10-90- modified zero offset 10-90- position data for
IP 240 Module Description and Accessories2 Module Description and Accessories2.1 General Technical SpecificationsTemperatureOperation 0 to +55 °C(In
Module Description and Accessories IP 2402.2 Technical SpecificationsThe IP 240 has two independent channels. In the IP 252 expansion mode, the enc
12345678PrefaceIntroductionAddressingHardware InstallationOperationFunctional DescriptionPosition DecodingCountingIP 252 Expansion 9Module Description
IP 240 Hardware InstallationIncremental Encoders(with asymmetrical outputs)Fig. 4-5. Connection of Encoders with Asymmetrical Signals: Push-Pull Enc
IP 240 Module Description and AccessoriesInput frequencies Pulse inputs:- Symmetrical signals max. 500 kHz in position decoding and positioning mode
Module Description and Accessories IP 2402.2.3 Inputs/OutputsThe IP 240 provides two options for connecting sensors to the pulse inputs:• All senso
IP 240 Module Description and AccessoriesData for rated voltage 5 V 24 Vsymmetricalpulse trainInput voltage ranges to RS 422 A”0”-Signal - 30to+ 5.
Module Description and Accessories IP 240 Digital outputsNumber of outputs 4 (2 per channel)Galvanic isolation yesin groups of 1Supply voltage VpR
IP 240 Module Description and AccessoriesEncoder supplyThe power supply for 5 V encoders taken from the programmable controller's power supply
Module Description and Accessories IP 2402.4 Order NumbersOrder No.Module without instruction manual 6ES5 240-1AA12Adapter casing for 2 modules in
IP 240 Addressing3 AddressingThe IP 240 module reserves an address space of 16 bytes in the I/O areas. All data are exchangedvia these areas, which
Addressing IP 240Switch settingsI/O area(P)extendedI/O area(Q)I/O area1281441601761922082242400163248648096112144128160176192208224240Startingaddres
IP 240 AddressingUse of the IP 240 in expansion units S5-183U, S5-184U, S5-185U and S5-186UIf you use the IP 240 in one of these EUs, set the start
IP 240 Operation5 OperationBefore startup you must set various coding switches on the module. You can stipulate• interrupt generation with switchban
Hardware Installation IP 240Fig. 4-6. Connection of Encoders with Asymmetrical Signals:Open-Collector Encoder Output CircuitConnectorX2/X4Z*9MB*A*L+
Operation IP 2405.1 Settings for Interrupt GenerationThe processing of interrupt signals makes it possible to respond rapidly to status changes. In
IP 240 OperationIf several IP 240 modules use one interrupt circuit, the current interrupt source must bedetermined by reading the interrupt request
Operation IP 240Fig. 5-3. Allocation of Coding Switches on Switchbanks S1 and S2 to Interrupt Generation with I/O Byte 0PB 0.0 0.1 0.2 0.3 0.4 0.5 0
IP 240 OperationExample for setting the coding switchesThree IP 240s are to be enabled for interrupt generation. One IP 240 is to be operated as mas
Operation IP 240Additional programming in the organization blocks for the S5-115U:a) The interrupt service routine must be programmed in an FB so th
IP 240 Operation5.3 Matching to Encoder SignalsEncoders with 24 V DC signals and encoders which generate signals to the RS 422 A or a similarstandar
Siemens AGAUT E 148Postfach 1963D-92209 AmbergFederal Republic of GermanyFrom:Your Name:Your Title:Company Name:Street:City, Zip Code:Country:Please
Remarks FormYour comments and recommendations will help us to improve the quality and usefulness ofour publications. Please take the first available o
IP 240 Hardware InstallationSIEMENS provides the following prefabricated cables for connecting a 6FC9320-3..00 incrementalencoder to the IP 240:Cabl
Hardware Installation IP 2404.3.2 OutputsFig. 4-8. Connecting the Load to the Digital Outputs on the IP 240+++orVp+VpVpVpX3/X5Vs=Supply voltage((1
6 Functional Description7 Position Decoding8 Counting9 IP 252 Expansion10 Positioning11 Direct Data Interchange with the IP 24012 Response Times13 Enc
Figures5-1. Locations of Switchbanks and Fuses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5- 1 5-2. Allocation of Coding Sw
IP 240 Operation5 OperationBefore startup you must set various coding switches on the module. You can stipulate• interrupt generation with switchban
Operation IP 2405.1 Settings for Interrupt GenerationThe processing of interrupt signals makes it possible to respond rapidly to status changes. In
IP 240 OperationIf several IP 240 modules use one interrupt circuit, the current interrupt source must be determi-ned by reading the interrupt reque
Operation IP 240Fig. 5-3. Allocation of Coding Switches on Switchbanks S1 and S2 to Interrupt Generation with I/O Byte 0PB 0.0 0.1 0.2 0.3 0.4 0.5 0
IP 240 PrefacePrefaceIn addition to open and closed-loop control, the programmable controllers of the SIMATIC S5 fa-mily execute special tasks such
IP 240 OperationExample for setting the coding switchesThree IP 240s are to be enabled for interrupt generation. One IP 240 is to be operated as mas
Operation IP 240Additional programming in the organization blocks for the S5-115U:a) The interrupt service routine must be programmed in an FB so th
IP 240 Operation5.3 Matching to Encoder SignalsYou can connect the following to the IP 240 as position encoders:• symmetrical incremental encoders w
7 Position Decoding8 Counting9 IP 252 Expansion10 Positioning11 Direct Data Interchange with the IP 24012 Response Times13 Encoder Signals14 Error Mes
Figures6-1. Data Interchange in Programmable Controllers with Multiprocessor Capability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
IP 240 Functional Description6 Functional Description6.1 Module FunctionsThe IP 240 is an intelligent I/O module for acquiring and preprocessing enc
Functional Description IP 2406.1.2 Digital OutputsThe digital outputs on the module can be used for direct driving of actuators and displays forpart
IP 240 Functional DescriptionWirebreak/short-circuit (red WB LED)When a channel is set to symmetrical pulses, the encoder cable is monitored by eva
Functional Description IP 2406.2.1 Configuring Function BlocksConfiguring function blocks serve to select the modes. Each mode is assigned its own f
IP 240 Functional Description6.3 Restart Characteristics6.3.1 Power OnAfter ”Power on” a test routine is initiated on the IP 240 to verify proper fu
IP 240 IntroductionIntroductionThe following pages contain information which will help you to use this manual.Description of ContentsThe contents of
Functional Description IP 240Table 6-2. Error Flagging in the PAFE ByteBit numberPAFE byteError category01237Hardware faults, communication and da
IP 240 Functional Description6.4.2 Parameter and Data ErrorsParameter errorsWhen parameter errors occur, the function block sets bit 1 in the PAFE b
Functional Description IP 2406.5 Multiprocessor OperationIn the S5-135U and S5-115U PLCs with multiprocessor capability,the IP 240 can also be used
8 Counting9 IP 252 Expansion10 Positioning11 Direct Data Interchange with the IP 24012 Response Times13 Encoder Signals14 Error Messages7 Position Dec
Figures7-1. Counting Direction in Position Decoding Mode . . . . . . . . . . . . . . . . . . . . . . . . 7- 17-2. Actual Value and Overrange in Positi
IP 240 Position Decoding7 Position Decoding7.1 ApplicationIn this mode, the IP 240 can be used in all applications in which position changes are to
Position Decoding IP 240Changing the counting directionTo change the counting direction, you must interchange the encoder signal connections asfollo
IP 240 Position DecodingThe zero offset value thus always offsets the zero point of the actual value range to the referencepoint. A zero offset can
Position Decoding IP 240Example:The position encoder emits 1000 pulses/revolution. The spindle has a gradient of 50 mm/revolu-tion. The position enc
IP 240 Position DecodingTransfer of the initial values from the data block to the IP 240The limit values are initially transferred to the IP with co
Introduction IP 240• Automating with the S5-115USIMATIC S5 programmable controllersHans BergerSiemens AG, Berlin and Munich 1989Contents:- STEP 5 pr
Position Decoding IP 240Triggering a process interruptEvery REFn bit can trigger a process interrupt when it goes from 0 to 1 (rising edge). You mus
IP 240 Position DecodingIf you set bit DIGn/9 to ”0”, a change in the REF bit from 0 to 1 sets the output only when theactual value enters the track
Position Decoding IP 240Fig. 7-4. Evaluating the Reference Tracks1) The interrupt request is reset when the interrupt request bytes are scanned.
IP 240 Position DecodingTraversing speed and track widthIn order for entry into a track to be detectable in every module firmware cycle, the travers
Position Decoding IP 240Defining the hysteresisThe hysteresis can be preset in BCD in the data block in data byte DR 22 ( Section 7.3.3) in therang
IP 240 Position DecodingIf the direction is reversed outside the hysteresis range following switching of an output, theswitching point at the track
Position Decoding IP 240The output is switched analogously upon entry into and upon exit from the upper track limit.The output is reset when the act
IP 240 Position Decoding7.2.5 Forcing the IP OutputsYou can use control bits DAnF and DAnS (n=1 for digital output 1 or n=2 for digital output 2) to
Position Decoding IP 240In addition, the following are carried out on the basis of the specified configuring data:• any outputs that are set are res
IP 240 Position DecodingInvoking the interrupt servicing OBs in the S5-150U and S5-155U PLCs (150 mode)In the S5-150U and S5-155U (150 mode), the a
IP 240 IntroductionConventionsIn order to improve the readability of the manual, a menu-style breakdown was used, i.e.:• The individual chapters can
Position Decoding IP 2407.2.9 Reference Point ApproachSince incremental encoders cannot indicate the absolute position after a power failure, a re-f
IP 240 Position DecodingAborting a reference point approachThe reference point approach initiated by setting the REFF bit is normaly terminated, fol
Position Decoding IP 2407.3 Initializing Standard Function Blocks and Data Block Assignments7.3.1 Configuring Function BlockFB 169 (STRU.WEG) Confi
IP 240 Position DecodingTable 7-5. Parameters for Configuring FB 169Name Para- Data Descriptionmeter typetypeBGAD D KF Module starting addressKANR
Position Decoding IP 240DIG1 : KM 0000 0000 Bit 0 to Bit 7:0000 0000 Assignment of digital output D1 to reference tracks 1 to 8 - Bit n = 1 Output D
IP 240 Position DecodingPRA2 : KM 0000 0000 Assignment of a process interrupt to bits in the status area0000 0000 Bit n= 1 A process interrupt is ge
Position Decoding IP 240Technical SpecificationsBlock number : 169Block name : STRU. WEGPLC Library numberCall length/Block lengthCPU Processing tim
IP 240 Position Decoding7.3.2 Control Function BlockFB 170 (STEU.WEG) Control function block for position decoding mode.Functional descriptionThe co
Position Decoding IP 240NoteScratch flags and system data areas are used in the standard function blocks for thepurpose of data interchange with the
IP 240 Position Decoding7.3.3 Contents of the Data BlockThe data block to be created must comprise at least 68 words (DW 0 to 67). The number of the
Introduction IP 240Manuals can only describe the current version of the programmable controller. Shouldmodifications or supplements become necessary
Position Decoding IP 240Control bitsDL 17DR 177Databyte6 5 4 3 2 1 00000DA2F0DA2S0DA1F0DA1SREFFAMSK000BitAMSK =1 All process interrupts for the chan
IP 240 Position DecodingInterrupt request byte for Channel 1 and Channel 2Channel 1Channel 1Channel 2Channel 2DL 20DR 20DL 21DR 217Databyte6 5 4 3 2
Position Decoding IP 240Identifiers of tracks used7 6DL 29DR 29Databyte5 4 3 2 1 00TR60TR50TR40TR30TR20TR1Bit0TR80TR7TRn =1 The track limits for thi
IP 240 Position DecodingFinal value of the first track (END 1)7 6DL 36DR 36DL 37DR 37Databyte5 4 3 2 1 000000Bit00001040 0 SG103101102100SG =1 The f
Position Decoding IP 2407.4 An Example of Position Decoding: Heat TreatmentThe induction coil of an induction furnace for heat treatment must move a
IP 240 Position DecodingFunctional descriptionAll data required for operation must be entered in a data block (DB 10 in the example). The datainclud
Position Decoding IP 240StipulationsInput card Module address 4Output card Module address 12Analog output card Module address 128 (1st output)IP 240
IP 240 Position DecodingInputs, outputs, flags, timers and counters usedOPERAND SYMBOL COMMENTI 4.0 EMERG STOPI 4.1 START START RUNI 4.2 ON INTPNT
Position Decoding IP 240DB10 LEN=38
IP 240 Position DecodingDB12 LEN=73
Commentaires sur ces manuels