Home
SIMATIC Counter Module CM35
Contents
1. If necessary install the new module For more information on removing the modules see manuals 70 and 140 CM35 Counter Module 4 J31069 D0416 U001 A5 7618 3 7 Commissioning 3 2 Wiring the CM35 Digital inputs Digital outputs Shield clamps 3 8 The 8 counting inputs channels of the CM35 are available on a 25 pin sub D socket on the front of the module Each counting input has separate connections for reference potential ground and 5 V and 24 V signals To prevent malfunctions only one of the two signal voltages may be wired at a time The encoder must be powered by an external voltage source The 8 outputs of the CM35 are available on a 15 pin sub D socket on the front of the module A load power supply of 24 V DC must also be connected there which is able to continuously supply the sum of the required output currents The outputs are P switches which can handle a load current of 0 4 A They are protected against overload and short circuits The size of the shield clamp depends on the diameter of the cable To mount a cable with the shield clamp bare the shield by cutting out approximately 1 5 cm of the cable insulation at the appropriate location on the cable 2 Shield clamp Shield rail gt fixed Figure 3 1 Mounting the shield clamps Caution Do not damage the braiding of
2. 8 6 Reading the Actual Positions In positioning mode you can read the current actual positions from the CM35 To ensure data consistency the read access must be performed with one load command L PID Table 8 8 shows the addresses of the individual axes for reading the actual position Table 8 8 Assignment of the output area for reading the actual positions Offset to the Module Meaning Value Range Start Address Actual position of 2 147 483 648 axis 1 to Actual position of Zul axis 2 Actual position of axis 3 Actual position of axis 4 Example Positioning mode Read actual position of axis 4 The CM35 has the module start address 256 L PID268 Address 256 12 actual position of axis 4 T MDI6 Save actual position CM35 Counter Module 4 J31069 D0416 U001 A5 7618 8 19 CM35 Counter Module 4 J31069 D0416 U001 A5 7618 Literature A Supplementary Below is a list of all manuals referred to in this manual literature 70 Manual 7 300 Programmable Controller 140 Manual ET 200M Distributed I O Device 231 User s manual Standard Software for S7 and M7 STEP 7 235 Reference manual System Software for S7 300 400 System and Standard Functions CM35 Counter Module 4 J31069 D0416 U001 A5 7618 A 1 CM35 Counter Module 4 J31069 D0416 U001 A5 7618 EC Declaration of Conformity EG Konformit tserkl rung Nr PE 0014 0999 Hersteller Siemens AG Bereich Auto
3. CM35 Counter Module 4 4 4 J31069 D0416 U001 A5 7618 Data Communication with the CM35 Table 4 2 Allocation of the control word for parameterization continued Description Allocation N Subnumber for parameter block Parameter subblock 0 Only for positioning mode Parameter subblock 1 axis 1 Parameter subblock 2 axis 2 Parameter subblock 3 axis 3 Parameter subblock 4 axis 4 Not applicable to the operating modes pulse counter period duration measurement and timer Example S5 Timer mode parameterization via direct I O accesses Write parameter block 2 To write data assign W 16 0023 to control word To accept data via CM35 assign W 16 0063 to control word Data transmission The parameter blocks for the parameterization of the CM35 can be written in one of the following ways Use of data record number 1 with SFC 55 WR_PARM Write the analog I O address area with direct I O accesses The data are written with SFC 55 when the CM35 is used with SIMATIC S7 Direct I O write accesses to the data must be used for DP operation with S5 masters or standard DP masters A consistency bit which must be specified via the user program is available to ensure the data consistency of a parame ter block CM35 Counter Module 4 J31069 D0416 U001 A5 7618 4 5 Data Communication with the CM35 4 2 1 Parameterization with SFC 55 Only SIMATIC S7 SFC 55 WR_PARM can be used to transfer to the modu
4. Function scope Digital inputs and outputs Application areas Use with program mable controllers and automation systems 1 2 The CM35 is a multi channel counter module which can be used to imple ment various tasks in the following operating modes e Pulse counter e Period duration measurement gt With 8 channels e Timer e Positioning With 4 axes The selected operating mode applies to all channels of the CM35 The func tion parameters can be set separately for each channel The counter module has eight floating digital inputs and outputs which are used for the inputs and outputs of the counting channels The signals are led out via two sub D sockets on the front When not used for the operating mode the outputs can be used as desired by the user program as process I O The module can be used for position encoding and positioning as well as in the following systems Proportioning systems Filling systems Packaging systems Sorting systems Systems with defined time intervals The counter module can be used centrally on the SIMATIC S7 300 and as distributed I O on the modular ET 200M I O device on the SIMATIC S7 and SIMATIC S5 The conventional configuration procedures of STEP 7 or COM PROFIBUS for SIMATIC S5 are used for the configuration CM35 Counter Module 4 J31069 D0416 U001 A5 7618 Product Overview 1 2 Use on Programmable Controllers and Automation Systems Central integration The
5. IM 153 1 CM35 IM 153 1 Prerequisites for the coupling are an IM 153 1 MLFB no 6ES7 153 1AA02 0XB0 or later and CM35 modules MLFB no 6AT1 735 0AA01 0AAQ release status 4 or later Up to 7 CM35 modules can be connected with each IM 153 1 interface Exception Maximum of one CM35 per IM 153 1 when distributed connection to a SIMATIC S5 95U master DP is used Maximum of 8 CM35s per IM 153 1 when distributed connection to a SIMATIC S7 CPU 318 2 DP CPU 417 4 DP CP 443 5 Ext IM 467 is used CM35 Counter Module 1 4 4 J31069 D0416 U001 A5 7618 Product Overview IM 153 2 SIMATIC S7 400H and active back plane bus SIMATIC PCS 7 CM35 Counter Module Prerequisites for the coupling are an IM 153 2 MLFB no 6ES7 153 2AA01 0XB0 release status 2 or later and CM35 modules MLFB no 6AT1 735 0AA01 0AA0 CM35 modules MLFB no 6AT1 735 0AA01 0AAO release status 4 or later are required for the IM 153 2 interfaces MLFB no 6ES7 153 2AA02 0XB0 release status 5 or later Up to 7 CM35 modules can be connected to each IM 153 2 interface Exception Maximum of one CM35 per IM 153 2 when distributed connection to a SIMATIC S5 95U master DP is used Maximum of 8 CM35s per IM 153 2 when distributed connection to a SIMATIC S7 CPU 318 2 DP CPU 417 4 DP CP 443 5 Ext IM 467 is used The present version of the CM35 does not support e The setup with active bus modules for ET 200M e Use on high availability pr
6. Incremental encoder with 5 V supply Axisl gt Track A Pin 20 Track B Pin 2 Ground Pin 14 pin 21 connect these two CM35 Counter Module 4 J31069 D0416 U001 A5 7618 3 11 Commissioning 3 2 2 15 14 3 12 IT OO oo0oo0oo00000 Connection Allocation of the 15 Pin Sub D Socket Table 3 5 Allocation of the 15 pin sub D socket Signal Input Function for Mode Output Pulse Counter Positioning Period Duration Measurement Timer 8 oa Grom tags agiatowps prec fen ain fa fox oor peas asain The connections for 24 V load voltage and for ground load voltage are con nected internally CM35 Counter Module 4 J31069 D0416 U001 A5 7618 Commissioning 3 3 Configuration and Parameterization Configuration and parameterization of the CM35 depends on the system on which the module is to be used Table 3 6 Overview of configuration and parameterization Central Integration into Distributed Integration Distributed Integration the SIMATIC S7 300 into the SIMATIC S7 into the SIMATIC S5 Configuration tool STEP 7 HW Config COM PROFIBUS Module address Depends on slot or selecta Can be selected as desired ble as desired depends on CPU Setting the operating mode During configuration With SFC 55 WR_PARM Via I O direct accesses Configuration with STEP 7 Configuration with The current GSD files must be loaded to subdirectory GSD so that COM PROFIBUS COM PROFIBUS is abl
7. Variable OB40_POINT_ADDR contains information on the event which triggered the interrupt Variable OB40_POINT_ADDR consists of four bytes The hardware interrupt information of the CM35 in timer mode is stored in local byte 10 timer fail ure and local byte 11 timer expired of OB 40 By evaluating local bytes 10 and 11 you can tell which timer triggered an interrupt Remember that more than one bit can be set Note When a failure occurs on one of the timers e g wire break this is reported once for the applicable channel with a hardware interrupt The reaction to the hardware interrupt e g the malfunctioning timer chan nel is no longer addressed by the user program is specified by the user pro gram OB 40 call All other timer channels remain functional After the malfunction is corrected e g wire break fixed a STOP RUN transition of the CPU must be executed Another method is to call SFC 57 PARM_MOD If error correction was successful the malfunction is no longer reported after a STOP RUN transition or an SFC 57 call If the mal function is still present another hardware interrupt is triggered CM35 Counter Module 7 12 4 J31069 D0416 U001 A5 7618 Timer Operating Mode Table 7 13 Allocation of the hardware interrupt information OB 40 local data bytes 10 and 11 Meaning Value Range Group Interrupt Selective Interrupt CM35 Counter Module 4 J31069 D0416 U001 A5 7618 7 13 Timer Operati
8. mode which you can use to adjust the reaction of the counting channels to your task The parameter data are divided into three parameter blocks For the structure of these parameter blocks see chapter 5 2 2 The number of the parameter block and the offset in the relate are specified in the description of the individual parameter data To be able to utilize the pulse counter operating mode you must transfer at least parameter blocks 1 and 2 to the CM35 Note A channel must be stopped before it can be reparameterized Ifyou want to change channel specific parameters this channel must be stopped If you want to change parameters affecting more than one channel all channels must be stopped The new parameterization data take effect when the channel is started again For general layout and transmission of the parameter blocks see chapter 4 2 5 2 1 Description of the Parameterization Data Counting direction When you specify the direction of counting you determine the direction in which the encoder pulses are counted Counting direction up Encoder pulses increment counting value Counting direction down Encoder pulses decrement counting value The parameterized direction of counting applies to all channels Table 5 2 Direction of counting Variable Parameter Offset Data Value Range Counting Block Type Direction C_Direction 2 7 0 Bool 0 Counting direction up 1 Counting direction
9. timer operating mode you must transfer parameter blocks 1 2 and 3 to the CM35 Note The timer must be stopped before it can be reparameterized When you want to change timer specific parameters you must stop the applicable timer When you want to change timer overlapping parameters you must stop all timers The new parameter data take effect when the timer is started again Fo see of the general layout and transfer of the parameter blocks chapter 4 2 4 J31069 D0416 U001 A5 7618 7 3 Timer Operating Mode 7 2 1 Description of the Parameter Data Time base factor When you specify time base and factor you determine how long a timer is switched on The length of time the timer is switched on is the product of time base and factor Table 7 1 contains sample timer values Table 7 1 Examples of timer values Time Base msec Switch On Duration 65 535 65 535 sec 1 092 min 65 535 6 553 5 sec 109 225 min 65 535 16 711 425 sec 278 542 min The default value for time base and factor is 1 Note The minimum switch on duration is 10 msec The time base can be specified for a specific timer Table 7 2 Setting the time base Time Base Block Tms so mm menu nme eo mm Fauna Fe me mau tmes 1 oo me Pme 1 79 Bw meme 1 60 me sum eo me CM35 Counter Module 4 J31069 D0416 U001 A5 7618 Timer Operating Mode The factor can be specified fo
10. 6 faulty disregard Bit 6 Timer 7 faulty disregard Bit 7 Timer 8 faulty disregard Local data byte 11 Operating Mode Pulse Counter Period Duration Timer for Positioning Measurement Selective Interrupt for Group Interrupt Counter channel 1 has re No hardware inter Timer 1 has expired Axis 1 has reached ached the comparison va rupts are reported in a timer has expired setpoint position lue this operating mode Counter channel 2 has re Timer 2 expired Reserved ached the comparison va disregard lue Counter channel 3 has re Timer 3 expired Axis 2 has reached ached the comparison va disregard setpoint position lue Counter channel 4 has re Timer 4 expired Reserved ached the comparison va disregard lue Counter channel 5 has re Timer 5 expired Axis 3 has reached ached the comparison va disregard setpoint position lue Counter channel 6 has re Timer 6 expired Reserved ached the comparison va disregard lue Counter channel 7 has re Timer 7 expired Axis 4 has reached ached the comparison va disregard setpoint position lue Counter channel 8 has re Timer 8 expired Reserved ached the comparison va disregard lue CM35 Counter Module 4 18 4 J31069 D0416 U001 A5 7618 Data Communication with the CM35 4 4 Overview of the Allocation of the Address Area and Sequence of the Evaluation Allocation of the Table 4 11 shows a summary of the allocation of the address area for
11. Current counting value channel 1 Current counting value channel 2 Current counting value channel 3 Current counting value channel 4 Current counting value channel 5 Current counting value channel 6 Current counting value channel 7 Current counting value channel 8 Allocation of the I O address area when reading via direct I O accesses Input Area 16 Bytes Operating Mode Measured period duration average value channel 1 Measured period duration average value channel 2 Measured period duration average value channel 3 Measured period duration average value channel 4 Measured period duration average value channel 5 Measured period duration average value channel 6 Measured period duration average value channel 7 Measured period duration average value channel 8 Pulse Counter Period Duration Timer Measurement Status of timer Bit 0 Channel 1 Bit 1 Channel 2 Bit 2 Channel 3 Bit 3 Channel 4 Bit 4 Channel 5 Bit 5 Channel 6 Bit 6 Channel 7 Bit 7 Channel 8 0 Timer is active Timer has expired and can be started again after aSTOP command Current actual position axis 1 Current actual position axis 2 Current actual position axis 3 Current actual position axis 4 Note Only word or double word accesses to even addresses can be used for O accesses CM35 Counter Module 4 J31069 D0416 U001 A5 7618 4 21 Data Communica
12. Positioning Operating mode Parameter block 1 contains The setting for edge evaluation The values for setting the actual value of axes 1 to 4 Table 8 3 Parameter block 1 00 Para_ Block _ 1 Para_Block_1_0_Data Data STRUCT Selection of the Selection of the edge evaluation evaluation Fr Peru word a Parameter a no 1 subnumber 0 positioning mode Encoder_Evaluation BYTE B 16 80 Edge evaluation 2 xxxx_xx00 Single 2 xxxx_xx01 Double 2 xxxx_xx10 Quadruple Direction of rotation 2 0xxx_xxxx Inverted 2 1xxx_xxxx Not inverted Para_Block_1_1_Data STRUCT a Set actual value for axis 1 0 0 Control_word WORD W 16 114 Parameter block no 1 subnumber 1 positioning mode Set_ActualValue_Axis_1 DINT Set actual value for axis 1 Para_Block_1_2 Data STRUCT Sa Set actual value for axis 2 0 0 Control_word WORD W 16 214 Parameter block no 1 subnumber 2 positioning mode Set_ActualValue_Axis_2 DINT Set actual value for axis 2 CM35 Counter Module 4 J31069 D0416 U001 A5 7618 8 11 Positioning Operating mode Table 8 3 Parameter block 1 42 20 Para Block 1 Para Block_1_3_Data Data STRUCT Setactual value foraxis3 575 actual value for axis 3 a 0 a word rer Parameter ea no 1 subnumber 3 positioning mode 42 0 0 Set_ActualValue_Axis_3 ActualValue_Axis 3 DNT L 0 Setactual value for axis3 actual value for Set actual value for axis3 75 3 56 0 0 Para_ Pa
13. are set to 1 or 0 for the axis CM35 Counter Module 4 J31069 D0416 U001 A5 7618 8 15 Positioning Operating mode 8 4 Controlling the Digital Outputs The user program can control the digital outputs of the CM35 e g to set up or synchronize an axis The user program must ensure that the direct access does not cause uninten tional movements or accidentally terminate running movements The firmware prevents forward movement and backward movement from being switched on at the same time Forward movement is a movement in the direction of positive values Write the DO byte to the address module start address 0 Table 8 6 shows the allocation of the bits in the DO byte to the axes Note Control of the digital outputs must be programmed with a word access Table 8 6 Assignment of the DO byte o p ooa BEE EEE EN Forwards_Axis_3 BOOL FALSE Backwards_Axis_3 BOOL FALSE Forwards_Axis 4 BOOL FALSE 40 7 7 Backwards Axis 4 Axis 4 BOOL O FALSE Example S7 Switch on forward movement for axis 2 The CM35 has the module start address 256 L 2 0000_0100_0000_0000 Load DO byte for forward running of axis 2 T POW 256 Module start address 256 Forward motion is a movement towards the positive values CM35 Counter Module 8 16 4 J31069 D0416 U001 A5 7618 Positioning Operating mode Note When controlling the digital outputs the user program must ensure that ac tiv
14. be assigned to signal modules SM are available to the CM35 For additional information see the manual of the SIMATIC S7 300 The maximum number of CM35 modules which can be installed on SIMA TIC programmable controllers depends on the following factors e Maximum number of modules in the central rack expansion unit or the modular ET 200M I O device e Memory requirements of the S5 S7 C7 CPU e Maximum permissible current consumption 5 V from the S7 backplane bus For information on possible physical setups and how to configure see manual 70 Horizontal installation is recommended When vertical installation is used remember that environmental temperatures are restricted max of 40 C 4 J31069 D0416 U001 A5 7618 3 3 Commissioning Table 3 1 CPU 312 IFM 6 ei ae 4 6 CPU Work memory of the CPU in Kbytes status 6 2000 CPU 315 CPU 315 2 DP CPU 316 CPU 318 2 DP 12 4 2 8 4 128 of these max of 256 for code 256 for data CPU 31X 2 DP CPU 41X X DP C7 6XX DP Depends on the CPU being used S5 1X5U with IM 308 C MOD CM35 modules 3 4 Technical data of the SIMATIC Number of Modules Which Can Be Installed on the Central Rack Ex pansion Unit Current 5 V from the S7 Backplane Bus Central Setup Central rack IM 365 1 IM 360 3 IM 361 No multi row setup possible 8 8 MOD 1 8 MOD Total of 1100 mA 1 850 mA plus 3 8 MOD 3 800 mA Ex
15. changes will be described in product information sheets This manual describes e The CM35 counter module order no 6AT1 735 0AA01 0AA0 e The configuration package order no 6AT1 735 0DA01 0 YAO If you are using the previous version of the CM35 counter module order no 6AT1 735 0AA00 0AA0 please use the configuration package with the or der number 6AT1 735 0DA00 0 YAO Caution The CM35 counter module order no 6AT1 735 0AA01 0AA0 is not com patible with the CM35 counter module order no 6AT1 735 0AA00 0AAO The appendix lists additional sources of information on the subject of SIMATIC S7 300 4 J31069 D0416 U001 A5 7618 i Foreword Aids to finding information in this manual Standards This manual offers the following aids to help you find the special information you want e A comprehensive table of contents is located at the beginning of the manual e All chapters provide a left hand column with an overview of the contents of the particular section e At the end of the manual you will find a glossary defining important terms as they are used in the manual The SIMATIC S7 300 programmable controller meets the requirements of standard IEC 1131 Contact your Siemens representative at your nearest Siemens office or the SIMATIC hotline telephone no 0911 895 7000 or fax no 0911 895 7002 for questions on the products described in this manual for which you are un able to find answers For questions
16. in proportioning systems filling systems A timer must be stopped before the user program can execute a new start This can be done after the timer expired hardware interrupt or after a time calculated by the user program which is with certainty longer than the run time of the timer The digital outputs of the timer can also be controlled by writing the DO byte e g for continuous switch on during washing procedures The user pro gram must ensure that the timer channels cannot be manipulated The module can monitor the switching status of its outputs To do this the digital outputs must be wired to the digital inputs The firmware cyclically compares the status of the digital outputs with the status of the digital inputs and generates a hardware interrupt when required by the parameterization e g timer failure The interrupt can be output as a group interrupt or as a selective interrupt i e channel specific CM35 Counter Module 4 J31069 D0416 U001 A5 7618 Timer Operating Mode 7 2 Parameterization CM35 Counter Module This chapter describes possible parameterization in timer mode which you can use to adapt timer reactions to your task The parameter data are divided into three parameter blocks For the structure of the parameter blocks see chapter 7 2 2 T he descriptions of the individual parameter data include the number of the parameter block and the offset in the related structure To be able to utilize
17. layout and the transmission of the parameter blocks see chapter 4 2 j 4 J31069 D0416 U001 A5 7618 8 7 Positioning Operating mode 8 2 1 Description of the Parameter Data Edge evaluation and direction of rotation Setting an actual value 8 8 When you make specifications for the edge evaluation you determine whether only the edges of encoder track A are evaluated or the edges of both encoder tracks Single evaluation All falling edges of encoder track A Double evaluation All edges of encoder track A Quadruple evaluation All edges of both encoder tracks The parameterized edge evaluation applies to all axes The direction of rotation can be inverted with a parameter bit The parame terized direction of rotation applies to all axes Table 8 1 Parameterizing the edge evaluation Variable Parame Value Range Edge Evaluation ter Block num Edge evaluation Encoder_Evaluation 2 xxxx_xx00 Single 2 xxxx_xx01 Double 2 xxxx_xx10 Quadruple Direction of rotation 2 0xxx_xxxx Inverted 2 1xxx_xxxx Not inverted You can specify an actual value for set actual value to synchronize the ac tual value acquisition of an axis To do this the axis must be moved to the position with the coordinate of the actual value Actual values are entered in the parameter blocks in twos complement repre sentation 2 147 483 648 1 0 1 2 147 483 647 8000 0000 FFFF FFFF 0 Ex 7FFF FFFF Specifica
18. module start address 2 Layout of the The control word is assigned as shown below to start and stop the channels control word Byte n Byte n 1 Start stop byte Coordination byte 15 14 13 12 11 10 9 8 7 65 43 2 1 0 1 X 0 0 Oper mode Consistency bit disregard Start stop byte enable Start stop byte Table 4 6 shows the permissible assignments of the control word Table 4 6 Allocation of the control word for controlling the channels Identifier Pulse counter operating mode for the operating mode set Period duration measurement operating mode Timer operating mode Positioning operating mode Always 0 Start stop byte is written Start stop byte enable Evaluate parameter data Evaluate start stop byte Start stop byte Bit Address Oper mode Pulse counter 8 to 15 Stop channel Period duration meas Start channel Timer Oper mode Positioning 9 8 11 10 Start axis 13 12 15 14 Stop axis CM35 Counter Module 4 J31069 D0416 U001 A5 7618 4 11 Data Communication with the CM35 Example Pulse counter operating mode To start all channels write control word W 16 FF81 To stop all channels write control word W 16 0081 CM35 Counter Module 4 12 4 J31069 D0416 U001 A5 7618 Data Communication with the CM35 4 3 2 Controlling the Digital Outputs The digital outputs of the
19. of user programs for SIMATIC S7 controllers STOP is an international term e g as an operating mode command A system function SFC is a function integrated in the CPU s operating system which can be called by the user program like a function block FB The related instance block is located in work memory CM35 Counter Module 4 J31069 D0416 U001 A5 7618 Glossary System error U User program Warm restart CM35 Counter Module System errors are those errors which can occur on a programmable controller i e not in the process System errors are programming errors on the CPU and physical defects on the modules for example The user program contains all instructions and declarations and data for signal processing via which a system or a process can be controlled This program is assigned to a programmable module e g CPU or FM and can be structured in smaller units blocks When a CPU starts up e g after you turn the operating mode switch from STOP to RUN or turn the power on organization block OB 100 warm re start is executed first before cyclic program processing begins OB 1 During a warm restart the process image of the inputs is read and the STEP 7 application program is processed starting with the first command in OB 1 4 J31069 D0416 U001 A5 7618 Glossary 5 CM35 Counter Module 4 J31069 D0416 U001 A5 7618 TO Siemens AG A amp D MC PM 4 Frauenauracher Strasse 80 D 91056 Erlang
20. or comments on the manual itself please fill out the response sheet at the end of the manual and return it to the address indicated We would also appreciate your including your personal opinion of the manual on the response sheet We offer courses to make it easier to get started with the SIMATIC automa tion system Please contact your regional training center or the central train ing center in Nuremberg tel no 0911 895 3154 CM35 Counter Module 4 J31069 D0416 U001 A5 7618 Table of Contents 1 Product Overview u ur en Rena 1 1 1 1 OVErVIEW ER 1 2 1 2 Use on Programmable Controllers and Automation Sy SeMS sane nE e aa a er a oaa a ae a a aee aE 1 3 Hardware aus arena 1 4 MIOMWANG errr tine a ee ee ne ne 1 5 Technical Data 22H ees 2 Function Description srenee euer enen nennen nennen nenn nenn 2 1 2 1 Function Overview 006 eect eee 2 2 Pulse Counter 2 2 2 men die edad eae ea 2 3 Period Duration Measurement 00 cee nern 2 4 TimMer asde e a a a a a a lene segue laut E a a e 2 5 POSItI NING 5 2 Er tr r kr Irene Lo ben 3 COMMISSIONING siesti ste ee ee a ee ee 3 1 3 1 Installation of the CM35 eee tees 3 1 1 Mounting the CM35 1 0 0 2 eects 3 3 3 1 2 Mounting and Demounting the CM35 0c eee ee 3 6 3 2 Wiring theCM35 u 2er aa 3 2 1 Connection Allocation of the 25 Pin Sub D Socket 3 2 2 Connection Alloc
21. the PROFIBUS DP standard part 3 of DIN 19245 The ET 200 utilizes the master slave principle For example the master in terface IM 308 C or the CPU 315 2 DP can be the DP master The distributed periphery ET 200B ET 200C ET 200M and ET 200U can be DP slaves for example The modules causing the interrupt trigger a hardware interrupt due to a cer tain event in the process The hardware interrupt is reported to the CPU The related organization block is processed in the order of the particular inter rupt s priority When a CPU restarts e g because you turned the operating mode switch from STOP to RUN or you turned on the power either organization block OB 100 warm restart or organization block OB 101 hot restart only with S7 400 is executed before cyclic program processing OB 1 begins During a hot restart the process image of the inputs is read and processing of the STEP 7 user program is continued at the point at which it was last terminated after STOP or power off CM35 Counter Module 4 J31069 D0416 U001 A5 7618 Glossary Incremental encoder Memory reset O Organization block OB P Parameter Parameterization PLC PROFIBUS PROFIBUS address CM35 Counter Module 4 J31069 D0416 U001 A5 7618 Incremental encoders count small increments to acquire paths positions speeds revolutions and dimensions among others A memory reset deletes the following memory of the CPU e Wo
22. the shield when baring the cable When applying the shield to all cables connected to the CM35 remember to leave enough cable between the shield connecting element and the CM35 so that the CM35 can be removed with all cables connected CM35 Counter Module 4 J31069 D0416 U001 A5 7618 Commissioning Shield connecting element Figure 3 2 Shield connecting element CM35 Counter Module 4 J31069 D0416 U001 A5 7618 3 9 Commissioning 3 2 1 Connection Allocation of the 25 Pin Sub D Socket Wiring of the oper The inputs must be wired in accordance with table 3 3 for modes pulse ating modes pulse counter period duration measurement and timer counter period duration er measurement and ble33 Wiring timer Signal Voltage Connection to Pin n COE Com fd Sonim 7 eoin sd i Ground Counts pate as ee a ee En nn m 25 oo0oo0o000000000 OOO OO DOD oO OO 14 CM35 Counter Module 3 10 4 J31069 D0416 U001 A5 7618 Commissioning Wiring for operat When positioning mode is used the inputs must be wired in accordance ing mode with table 3 4 positioning Table 3 4 Wiring for nn operating mode nn to Pin a E PEE a ee r DE nr E ee EC BEZ HE HE gt p ae DE En un Tan 25 14 oo0oo0oo0o00000000 59229 VID Note Connect the two ground connections for an axis Example of an encoder connection
23. CM35 can be controlled by the user program based on the parameterization selected The status of the digital outputs can be specified by writing the DO pattern DO byte to I O output byte module start address 0 Table 4 7 Allocation of the DO byte for controlling the digital outputs Bit Description Allocation Address 0 Digital output 1 0 Digital output off 1 Digital output on Digital output 2 Digital output 3 Example S7 Set outputs 1 and 5 of the pulse counter operating mode Parameterize DO mode with CPU control The CM35 has the module start address 256 L 2 0001_0001_0000_0000 Load DO byte to set outputs 1 and 5 T PQW 256 Module start address 256 Note Remember that only word accesses to even addresses are permitted CM35 Counter Module 4 J31069 D0416 U001 A5 7618 4 13 Data Communication with the CM35 4 3 3 I O Write Accesses When I O write accesses T PQW are used it is essential to remember that write accesses to the same I O addresses may overwrite each other before being transferred to the CM35 Example pulse counter Start channel 1 then start channel 4 shortly afterwards L W 16 0181 Start channel 1 T POW 258 Module start address 2 L W 16 0881 Start channel 4 T POW 258 Module start address 2 If the time between the start of channel 1 and channel 4 is too short the start command for channel 1 may be overwritten by the start command for ch
24. Communication with the CM35 CM35 Counter Module 4 J31069 D0416 U001 A5 7618 4 4 1 Data Communication with the CM35 4 1 Overview Address area Parameterization Programming 4 2 The CM35 is located in the analog address area of the programmable control ler Central operation The address is assigned in one of the following ways depending on the S7 300 CPU being used Slot oriented As desired Use the module s start address from HW Config Distributed operation The address of the CM35 can be assigned as desired The start address of the module can be taken from one of the following HW Config with an S7 master e g CPU 315 2 DP COM PROFIBUS with an S5 master e g IM 308 C Use HW Config or COM PROFIBUS to set the operating mode for the CM35 e g pulse counter The data required to operate the module in the selected mode e g counting direction and comparison values for pulse counting mode are transferred to the CM35 with the parameterization The parameters must be transferred at least once to the CM35 after CPU STOP RUN With centralized use of the CM35 and with distributed use on S7 masters the parameters are written with system function SFC 55 WR_PARM With DP use with S5 masters the parameters are written with direct I O ac cesses only in the permissible modes period duration measurement and timer After parameterization you can control operation of th
25. Disregard Operating mode Positioning XXXX XX Axisl 01 start 10 stop With SIMATIC S5 XXXX XX Axis2 01 start 10 stop 0 Write parameter block XX XXXX Axis3 Ol start 10 stop 1 CM35 accepts parameter XX XXXX Axis4 Ol start 10 stop block Note Wait time of 1 msec Bit allocation for transmission of between d s T parameter blocks bit 3 7 0 and positioning mode XXX XXXX XXXX Parameter block subnumber 0000 Parameter subblock 0 0001 Parameter subblock 1 0 Evaluate parameterization data 1 Evaluate start stop byte 0100 Parameter subblock 4 CM35 Counter Module 4 J31069 D0416 U001 A5 7618 4 19 Data Communication with the CM35 Table 4 11 Allocation of the I O address area for writing via direct I O accesses Offset to Output Area 16 Bytes Module Address by Word 4 to 14 Parameterization data With SFC55 Pulse counter Parameter blocks 1 to 3 2 to 12 Period duration measurement Parameter block 1 Timer Parameter blocks 1 to 3 Positioning Parameter block 1 subnumbers 0 to 4 Parameter block 2 subnumbers 1 to 4 Note With parameterization via SFC55 the data to be transferred are set up the same as output words 2 to 14 Note Only word or double word accesses to even addresses can be used for I O accesses CM35 Counter Module 4 20 4 J31069 D0416 U001 A5 7618 Data Communication with the CM35 Table 4 12 Offset to the Module Address by Word
26. J31069 D0416 U001 A5 7618 Timer Operating Mode Note When the digital outputs are controlled the user program must ensure that active channels timer running are not affected To prevent a just expired timer from being turned on again accidentally or a running timer from being turned off by control of the outputs the outputs should not be controlled unless all timers have expired or have been stopped To be noticed by the CM35 the status of the DO byte must have changed by at least one bit from its last status see also page 4 22 CM35 Counter Module 4 J31069 D0416 U001 A5 7618 7 11 Timer Operating Mode 7 5 Hardware Interrupt Evaluation When in timer mode the CM35 can trigger a hardware interrupt for the following events Timer expired Timer failure he user must wire digital outputs 1 to 8 with digital inputs 1 to 8 see chap 7 1 so that the switching status of the output can be monitored with the re ated input If the output setpoint state differs from the input actual state the following occurs based on the parameterization e No interrupt triggered Group interrupt triggered Failure of a timer e Selective interrupt triggered Timer failure The CPU must have a hardware interrupt OB OB 40 for the interrupt evalu ation The start information of OB 40 contains the following Variable OB40_MDL_ADDR contains the base address of the module which triggered the interrupt
27. SE CoordinationByte BYTE B 16 82 Start stop byte enable 1 C bit 0 Period duration measurement mode ee a Example The CM35 has the module start address 256 L W 16 0382 Start channels 1 and 2 T PQW 258 Module start address 2 to L W 16 0182 Stop channel 2 channel 1 still active T PQW 258 Module start address 2 CM35 Counter Module 4 J31069 D0416 U001 A5 7618 6 7 Period Duration Measurement Operating Mode 6 4 Controlling the Digital Outputs Since no function is assigned to the digital outputs in period duration mea surement mode they can be used as desired The DO byte is used to specify the state of the digital outputs 0 Switch off output 1 Switch on output The module firmware switches off the outputs during the transition of the CPU to the STOP state BASF OD signal Write the DO byte to address module start address 0 Table 6 7 shows the assignment of the bits of the DO byte to the measuring channels Note Control of the digital outputs must be programmed with a word access Table 6 7 Assignment of the DO byte Digital_Output_Chan_1 BOOL FALSE Digital_Output_Chan_2 BOOL FALSE 0 Digital output off 1 Digital output on Digital_Output_Chan_3 BOOL FALSE Digital_Output_Chan_4 BOOL FALSE Digital Output_Chan_5 BOOL FALSE 7 B 16 0 Example S7 Set outputs 1 3 and 5 The CM35 has the module start address 256 L 2 0001_0101_0000_0000 Load DO by
28. SIEMENS SIMATIC Counter Module CM35 SIEMENS CM35 Counter Module Manual This manual describes the counter module with order no 6AT1 735 0AA01 0AAO 4 J31069 D0416 U001 A5 7618 Release 06 2000 7 o S a D a D o F Q 5 n Cc 5 h ie 3 9 e gt Data Communication with the CM35 imer Operating Mode Positioning Operating Mode EC Declaration of Conformity Glossary C gt Ovj O O TI U oO Ss OO 5 c a o Oo o oO 3 2 N selo Q 3 Do 3 5 Q D o 2 an 2 S gt Ulo 5 2 3 o 5 e lt 96 2 3 N a amp Q lt o gt 2 0 Q Z o 2 JE o S o 3 S 3 a D U gt N OO DA Q N Notes on safety This manual contains notes which you must adhere to for your own personal safety and to avoid property damage These notes are highlighted with a warning triangle showing the degree of danger as shown below Danger ZN Means death severe personal injury or significant property damage will occur when the appropriate precautionary measures are not taken Warning aS Means death severe personal injury or significant property damage may occur when the appropriate precautionary measures are not taken Caution A nary measures are not taken Means minor personal injury or property damage may occur when the appropriate preca
29. aluation 0 000 cece eee Pulse Counter Operating Mode 000cee cece eee e eee eee eens 5 1 Function Description isasara sa aa aa aaa aa A Aa E Aaa eee 5 2 Parameterization sera riwut Esraa ee rat 5 2 1 Description of the Parameterization Data aaa 5 2 2 Structure of the Parameter Blocks c cece eee eee eee 5 3 Starting and Stopping the Counting Channels 005 5 4 Controlling the Digital Outputs 0060 e cece 5 5 Hardware Interrupt Evaluation 0 0 see eee nern nenn 5 6 Reading the Counting Values 00 c cece eee eee Period Duration Measurement Operating Mode 0 0eeeeeeeeeee 6 1 Function Description 0 00 cee eee eee ees 6 2 Parameterization 4 eee eee ee eee eee ee eee eee ee nenn 6 2 1 Description of the Parameter Data 0 e cece eee 6 2 2 Structure of the Parameter Block 0 cece eee eee eee 6 3 Starting and Stopping the Measuring Channels 000005 6 4 Controlling the Digital Outputs 2 2 2222 sense nennen nenn 6 5 Hardware Interrupt Evaluation 222e22s essen nern nenn 6 6 Reading the Measured Values 222 22 enesen nennen ern Timer Operating Mode zueunmasnnnunnnnn nun nnn nn nennen nenn nun 7 1 Function Description sassari aaa aa A A A A E nenn 7 2 Parameterization 000 iiaeaa d acara a aeia aa aia teen eee 7 2 1 Description of the Paramet
30. alue comparison function is reached Counting down from 65535 to 0 with comparison function Period dura Measuring the time CPU control Possible tion mea between 2 falling surement edges of the applied signal Outputting the speci Operating mode Expiration of Possible fied switching times CPU control the via the digital outputs switch on time Positioning Acquiring the actual Operating mode Setpoint is Not possible position of axes via CPU control reached incremental encoder track A B and comparing it with the setpoint CM35 Counter Module 2 2 4 J31069 D0416 U001 A5 7618 Function Description 2 2 Pulse Counter In this operating mode the CM35 continuously counts up or down between 0 and 65535 when the counter is enabled When the counting value reaches the upper counting limit while counting up and another pulse arrives the counting value jumps to the lower counting limit and counts from there without losing a pulse When the counting value reaches the lower counting limit while counting down and another pulse arrives the counting value jumps to the upper counting limit and counts from there without losing a pulse 2 3 Period Duration Measurement 2 4 Timer In this operating mode the CM35 acquires low frequencies with the aid of period duration measurement The CM35 measures the exact time between two falling edges of the count ing signal by counting the pulses of an internal pre
31. ameterizations in period duration mea surement mode which you can use to adjust the reaction of the measuring channels to your task The parameter data are located in a parameter block For the structure of the parameter block see chapter 6 2 2 The description of the individual parame ter data includes the number of the parameter block and the offset in the structure You must transfer parameter block 1 to the CM35 before you can use period duration measurement mode Note The channel must be stopped before it can be reparameterized You must stop the channel before you can change the channel specific pa rameters The new parameters take effect the next time the channel is started For a description of the general layout and the transmission of the parameter block see chapter 4 2 CM35 Counter Module 4 J31069 D0416 U001 A5 7618 Period Duration Measurement Operating Mode 6 2 1 Description of the Parameter Data Period number When you specify the number of periods you determine the number of peri ods of the input signal during which the measurement is to be performed You can specify the number of periods for each channel separately Table 6 2 Setting of the number of periods Number of Periods Block Ferse uns 6 yw Proma 1 8 yw Peotone ws 1 oa me Measuring range By selecting the measuring range you can also increase the period duration which is measured The parameterize
32. an nel 4 This is particularly apt to happen if you are using distributed connection of the CM35 with low bus transmission rates In this case the 1st start com mand channel 1 is overwritten by the 2nd start command channel 4 before the 1st start command can be sent to the module via PROFIBUS The following measures should be taken to ensure that I O write accesses do not compete at the same address e The same I O address may only be write accessed once during one OB1 cycle e When a distributed layout is used the DP cycle should be at least twice as fast as the CPU cycle DP cycle and CPU cycle can be determined with STEP 7 CM35 Counter Module 4 J31069 D0416 U001 A5 7618 Data Communication with the CM35 4 3 4 Reading the Data The CM35 supplies the following data based on the operating mode set Table 4 8 Data of the CM35 Period duration measurement Measured period duration For the allocation and description of the data of the CM35 see the descrip tion of the particular operating mode Remember the following points which concern the assurance of data consis tency based on the programmable controller used SIMATIC S7 central or distributed Only one single load command L PIW or L PID can be used to read the desired value This means that an actual value in double word format must be read with one double word access L PID Use of two word accesses L PIW can cause data inconsistency in this ca
33. apter 4 3 1 Write access to the start stop block must be programmed as a word access Table 7 11 Start stop block oe a Start_Stop_Timer_6 BOOL FALSE Start_Stop_Timer_7 BOOL FALSE Start_Stop_Timer_8 BOOL FALSE CoordinationByte BYTE B 16 83 Start stop byte enable 1 Consistency bit 0 timer mode Example The CM35 has the module start address 256 L W 16 F083 Start timers 5 to 8 T PQW 258 Module start address 2 L W 16 7083 Stop timer 8 Timers 5 to 7 still active T PQW 258 Module start address 2 CM35 Counter Module 4 J31069 D0416 U001 A5 7618 7 9 Timer Operating Mode 7 4 Controlling the Digital Outputs The status of the digital outputs is specified with the DO byte 0 Switch off output 1 Switch on output Write the DO byte to the address module start address 0 Table 7 12 shows the allocation of the bits of the DO byte to the channels Note Control of the digital outputs must be programmed with a word access Table 7 12 Assignment of the DO byte TEE o Ku S Digital_Output_Chan_5 BOOL FALSE Digital_Output_Chan_6 BOOL FALSE Digital Output_Chan_7 BOOL FALSE BEZ Digital_ Digital_Output_Chan_8 Chan_8 BOOL FALSE WE END END_STRUCT Example S7 Set outputs 1 and 2 The CM35 has the module start address 256 L 2 0000_0011_0000_0000 Load DO byte to set outputs 1 and 2 T POW 256 Mod start addr 256 CM35 Counter Module 7 10 4
34. asurement mode PeriodNumber_Chan_1 BYTE B 16 1 Period number channel 1 PeriodNumber_Chan_2 BYTE B 16 1 BYTE B 16 1 Period number channel 2 PeriodNumber_Chan_3 Period number channel 3 PeriodNumber_Chan_4 PeriodNumber_Chan_5 PeriodNumber_Chan_6 Period number channel 4 BYTE B 16 1 BYTE B 16 1 BYTE B 16 1 Period number channel 5 Period number channel 6 PeriodNumber_Chan_7 BYTE B 16 1 BYTE B 16 1 Period number channel 8 F_RefFrequency BYTE B 16 0 Factor for reference frequency Period number channel 7 PeriodNumber_Chan_8 Table 6 5 Parameter block 1 acceptance structure only with SIMATIC S5 0 0 Control_word WORD W 16 52 Consistency bit 1 parameter block no 1 period duration measurement mode CM35 Counter Module 6 6 4 J31069 D0416 U001 A5 7618 Period Duration Measurement Operating Mode 6 3 Starting and Stopping the Measuring Channels After parameterizing the module you can start and stop the individual mea suring channels of the CM35 To do this write the start stop block to address module start address 2 Table 6 6 shows the contents of the start stop block The required assign of tire coordination byte is entered as an initial value in the structure er of the bit assignment of the coordination byte see chapter 4 3 1 Table 6 6 Start stop block TER OO EEE EEE Start_Stop_Chan_6 BOOL FALSE Start_Stop_Chan_7 BOOL FALSE Start_Stop_Chan_8 BOOL FAL
35. ation and CPU control to control the of the digital digital outputs outputs DO mode Automatic When a counter starts the related output is switched on When the comparison value is reached the related output is switched off While counting is running a switched on output can be reset by the user program CPU control The user program specifies the status of the outputs The status is not linked to the counting procedure e g for adjustment mode DO mode can be specified for specific channels Table 5 5 DO mode Variable Parameter Offset Data Value Range DO_Mode Block Type DO_Mode_Chan he DO_Mode_Chan_3 Dribbling Comparison value Start value Digital 1 output 0 Start Stop Start Figure 5 6 Switching of the digital outputs during automatic mode counting up CM35 Counter Module 5 8 4 J31069 D0416 U001 A5 7618 Pulse Counter Operating Mode Hardware You can use the interrupt generation variable to specify whether a hardware interrupts interrupt is to be triggered by the CM35 when the comparison value is reached You can use the hardware interrupt OB to evaluate which channel has reached the comparison value After a counter starts only one hardware interrupt is triggered even when the comparison value is reached a second time Parameterization applies to all channels Table 5 6 Interrupt generation Variable Parameter Offset Data Value Range Bl
36. ation of the 15 Pin Sub D Socket 3 3 Configuration and Parameterization 00 cece eee eee 3 3 1 Installation of the Object Manager for STEP 7 22 0000 eee 3 3 2 Central Integration into the SIMATIC S7 300 cee eee eee 3 3 3 Distributed Integration into the SIMATIC S7 60 cee eee ee 3 3 4 Distributed Integration into the SIMATIC S5 2 eee eee 3 3 4 1 Hardware Prerequisites 00 cece 3 3 4 2 Configuration 0 eet tenes 3 4 Reactions during Startup and in Case of Errors 000 0005 4 Data Communication with the CM35 c0ccc cece eee ee eee eee 4 1 4 2 4 2 1 4 2 2 4 3 OVEIVIEW ae ee ee wads bond ade ee ee Par meterization 444 nnd ith 8a na dern Parameterization with SFC 55 Only SIMATIC S7 4 Parameterization via Direct I O Accesses Only SIMATIC S5 Programming sists keenly seks een hee eben CM35 Counter Module en 4 J31069 D0416 U001 A5 7618 II Table of Contents 4 3 1 Controlling the Channels 000s cece nennen nennen 4 3 2 Controlling the Digital Outputs 2u 22cn sense nennen nenn 4 3 3 I O Write ACCESSES 6 annen n annene 4 3 4 Reading the Data iacsxveeiat beaGne pie kan ra E eee eased eae s 4 3 5 Evaluating a Hardware Interrupt in OB 40 00e ee eee 4 4 Overview of the Allocation of the Address Area and Sequence of the Ev
37. bject Properties 2 In the dialog box open the tab Operating Mode select the desired oper ating mode and confirm with OK For additional details on preparation for operation see manual 70 and user manual 231 4 J31069 D0416 U001 A5 7618 3 15 Commissioning 3 3 3 Distributed Integration into the SIMATIC S7 Configuration Module address Setting the operating mode Commissioning 3 16 The module is configured as distributed I O with the HW Config application of STEP 7 To add a CM35 to an existing project proceed as shown below 1 Start the SIMATIC Manager and open the desired project 2 In the left hand portion of the project screen select the SIMATIC station from which the DP slave is to be addressed 3 Select the menu command Edit gt Open Object This opens the HW Config application This application contains a screen with the hardware setup of the opened station 4 If not already done set up a DP slave From the Hardware Catalog screen select an ET 200M with IM 153 2 and place it in a PROFI BUS DP master system 5 Select the CM35 from the hardware catalog and place it in the ET 200M Based on the position on ET 200M the required input and output address areas are automatically assigned to the CM35 and entered in the configura tion table Address gaps in the address areas of the CPU rack are utilized The preset address areas can be changed in accordance with certain rules Fo
38. ception With CPU 314 IFM Total of up to 31 modules Distributed Setup ET 200M 7 MOD per ET 200M 1000 mA Exceptions Max of 8 MOD per ET 200M with CPU 318 2 DP CPU 417 4 DP CP 443 5 Ext IM 467 Max of 1 MOD per ET 200M with SIMATIC S5 95U DP master The number of slave stations ET 200M per CPU depends on the CPU being used Example CPU 315 2 DP Max of 32 slave stations ET 200M per CPU CM35 Counter Module 4 J31069 D0416 U001 A5 7618 Commissioning Table 3 2 Requirements on the CM35 side With Use of Current requirements 5 V from S7 Backplane Bus m CM35 me 150 mA m Number of CM35 modules CM35 Counter Module 4 J31069 D0416 U001 A5 7618 3 5 Commissioning 3 1 2 Mounting and Demounting the CM35 Rules Required tools 3 6 No special protective measures ESD guidelines are required for installation of the CM35 You will need a 4 5 mm screwdriver to mount and demount the CM35 Note Make absolutely sure that cable installation meets EMC regulations also inside the cabinets Avoid installing cables next to power cables and shield the cables in the manner described above Two sided shield application is usually recommended When interference is primarily low frequency one sided shield application can be more advanta geous Adhere to the grounding concept of the SIMATIC S7 300 to avoid problems with potential The setup guide
39. cision quartz reference frequency In timer operating mode precisely defined switch on times of 10 millisec onds to 278 minutes can be implemented for every digital output 2 5 Positioning CM35 Counter Module 4 J31069 D0416 U001 A5 7618 In this operating mode the CM35 supports controlled positioning with a switch off point Position acquisition is performed with an incremental encoder whose pulses are acquired by the module with the correct sign in the traversing area from 2 147 483 648 to 2 147 483 647 Two digital outputs are available for each of the four channels These out puts are addressed by the CM35 based on the direction 2 3 CM35 Counter Module 4 J31069 D0416 U001 A5 7618 Commissioning General safety notes CM35 Counter Module This chapter provides all the information you will need for commissioning including mounting connection configuration and parameterization Adherence to these safety notes is mandatory Non adherence will void the warranty Warning Unqualified manipulations on the device system or non adherence to the warnings on the cabinet of the device system can cause severe personal in jury or property damage Only qualified personnel may perform work on this device system Note This device has been developed manufactured tested and documented in accordance with pertinent safety standards Under normal conditions the device does not endanger property or h
40. configura tion package to the appropriate directory of COM PROFIBUS Which files must be copied depends on the version of COM PROFIBUS e With COM PROFIBUS version lt 3 2 Copy the type files to the direc tory TYPDATSX e With COM PROFIBUS version 3 3 Copy the GSD files to the direc tory GSD f Select by Order Number for Slot 4 x 6ES 332 7ND00 0ABO 4A0 6ES 332 5RD00 0ABO 4A0 6ES 332 5T B00 0AB0 2A0_HART 6ES 334 0CE01 0AA0 4A1 240 6ES7 334 0KE00 0AB0 441 240 6ES 335 7HG01 0ABO 4A1 440 6ES 338 4BC00 0AB0 POS INPUT 6ES 370 0AA01 0AAO DUMMY MH 4553 1AA SIWAREX_ MH4601 17A01 SIWAREX_ 6GT2002 0FA00 ASM470 6AT1735 0A400 0AA0 CH_35 6411735 04401 04A0 6GK 342 2AH00 0XA0 CP342 2 x Figure 3 4 Selecting the CM35 module during configuration of the ET 200M Table 3 7 Type and GSD files File Name Use SI801DV 200 Type file for IM 153 1 ST801EU 200 Type file for IM 153 2 SIM801D GS GSD file for IM 153 1 SIM801E GS GSD file for IM 153 2 SIM8071 GS GSD file for IM 153 2 FO Identifies the particular language version CM35 Counter Module 4 J31069 D0416 U001 A5 7618 Commissioning Configuration Module address CM35 Counter Module Note The latest GSD files only for COM PROFIBUS version 3 3 can be down loaded from the Internet SIMATIC Customer Support Internet address http www ad siemens de support html_00 index shtml Copy
41. ctor_Timer 3 WORD W 16 01 wor Wii a CK OU En BEN Table 7 8 Parameter block 2 acceptance structure only with SIMATIC S5 Address Name Type Initial Commentary Value en word WORD W 16 63 Consistency bit 1 parameter block no 2 timer mode CM35 Counter Module 4 J31069 D0416 U001 A5 7618 7 7 Timer Operating Mode Parameter block 3 contains The settings for interrupt generation Table 7 9 Parameter block 3 data structure Para_ Para_Block_3_Data 3_Data STRUCT eee word u Parameter N no 3 timer mode Interrupt_Generation BYTE B 16 0 Interrupt mode for timer expired and timer failure Table 7 10 Parameter block 3 acceptance structure only with SIMATIC S5 Address Name Type Initial Commentary Value en word WORD W 16 73 Consistency bit 1 parameter block no 3 timer mode ee a CM35 Counter Module 7 8 4 J31069 D0416 U001 A5 7618 Timer Operating Mode 7 3 Starting and Stopping the Timers After parameterizing the module you can start and stop the individual timers ofthe CM35 To do this write the start stop block to the address module start address 2 Note The timer must be stopped with a stop command before it can be started again Table 7 11 shows the contents of the start stop block The required assign ment of the coordination byte is entered as an initial value in the structure art of the bit assignment of the coordination byte see ch
42. cts the current counting procedure 1 No effect You specify the state of the output with the DO byte 0 Switch off output 1 Switch on output Write the DO byte to the address module start address 0 Note Control of the digital outputs must be programmed with a word access CM35 Counter Module 4 J31069 D0416 U001 A5 7618 5 15 Pulse Counter Operating Mode Table 5 13 shows the assignment of the bits of the DO byte to the counting channels Table 5 13 Assignment of the DO byte 0 Digital output off DO mode automatic Digital Output_Chan_5 BOOL FALSE 1 Digital nn enabled ote Digital_Output_Chan_6 BOOL FALSE You can use a parameterization bit to specify whether enabling is to be Digital_Output_Chan_7 BOOL FALSE controlled with the DO byte or whether continuous enable is to be Digital_Output_Chan_8 BOOL FALSE used 2 WE END END_STRUCT Example S7 Set outputs 1 and 5 Parameterize DO mode with CPU control The CM35 has the module start address 256 L 2 0001_0001_0000_0000 Load DO byte to set outputs 1 and 5 T PQW 256 Module start address 256 CM35 Counter Module 5 16 4 J31069 D0416 U001 A5 7618 Pulse Counter Operating Mode 5 5 Hardware Interrupt Evaluation When in pulse counter mode the CM35 can trigger a hardware interrupt when a comparison value is reached If this is used the CPU must contain a hardware interrupt OB OB 40 The start informatio
43. ctures See tables 17 8 4 nd 7 10 The required assignment of the acceptance structures is entered as an initial value Adhere to the information in chapter 4 2 concerning transmission of the data Parameter block 1 contains The time base for timers 1 to 8 The factor for timers 1 and 2 Table 7 5 Parameter block 1 data structure Address Name Type Initial Commentary Value Para_ Para_Block_1_Data 1_Data STRUCT oe word a R nn block no 1 timer mode Timebase_Timer_1 BYTE B 16 0A Time base for timer 1 Timebase_Timer_2 BYTE B 16 0A Time base for timer 2 Timebase_Timer_3 BYTE B 16 0A Time base for timer 3 Timebase_Timer_4 BYTE B 16 0A Time base for timer 4 Timebase_Timer_5 BYTE B 16 0A Time base for timer 5 Timebase_Timer_6 BYTE B 16 0A Time base for timer 6 Timebase_Timer_7 BYTE B 16 0A Time base for timer 7 Timebase_Timer_8 BYTE B 16 0A Time base for timer 8 won were wor WW Table 7 6 Parameter block 1 acceptance structure only for SIMATIC S5 Address Name Type Initial Commentary Value Se word WORD W 16 53 Consistency bit 1 parameter block no 1 timer mode BEP EN 77 7773 Ge E CM35 Counter Module 7 6 4 J31069 D0416 U001 A5 7618 Timer Operating Mode Parameter block 2 contains The factor for timers 3 to 8 Table 7 7 Parameter block 2 data structure Para_ Para_Block_2_Data 2 _Data STRUCT eee word ae Parameter a no 2 timer mode 20 Factor_Timer_ Fa
44. d measuring range applies to all channels Table 6 3 Setting the reference frequency Variable Parameter Offset Data Value Range Measuring Range Block Type F_RefFrequency 1 10 0 Byte Oh 100 kHz standard 655 msec to 1 msec 77h 50 kHz 1310 msec to 2 msec EFh 25 kHz 2620 msec to 4 msec Note A change in the F_RefFrequency parameter only takes effect with the first parameter transfer after a warm restart power on CM35 Counter Module 4 J31069 D0416 U001 A5 7618 6 5 Period Duration Measurement Operating Mode 6 2 2 Structure of the Parameter Block Table 6 4 shows the data structure of the parameter block and how to transfer it to the CM35 using SFC 55 calls or I O direct accesses The first word of the parameter block contains the control word The struc ture shows the required assignment as an initial value When I O direct accesses are parameterized only possible with the SIMATIC S5 the acceptance structure must be transferred after the data structure See table 6 5 7 he table shows the required assignment of the ac ceptance structure as an initial value Adhere to the specifications in chapter 4 2 which apply to transmission of the data Parameter block 1 contains the following information The period numbers for channels 1 to 8 The factor for reference frequency measuring range Table 6 4 Parameter block 1 data structure W 16 12 Parameter block no 1 period duration me
45. down CM35 Counter Module 4 J31069 D0416 U001 A5 7618 Pulse Counter Operating Mode Comparison value When you specify the counting direction you determine how the comparison start value value start value parameter will be used Counting up The transferred value is the comparison value The following happens when a counter is started Counting begins with the start value 0 The counting value is incremented with each encoder pulse When the counting value reaches the specified comparison value the para meterized reactions are triggered e g reset digital output trigger hardware interrupt Counting down The transferred value is the start value The following happens when a count ing procedure is started The counting value is set to the specified start value The counting value is decremented with each encoder pulse When the counting value reaches the comparison value 0 the parameter ized reactions are triggered e g reset digital output trigger hardware inter rupt The comparison value start value can be specified for a specific channel Table 5 3 Comparison and start value Variable Parameter Offset Data Value Comparison or Start Value Block Type Range Depending on Direction of Counting Cmp_Start_Value_Chan_1 0 to 65535 a o v CM35 Counter Module 4 J31069 D0416 U001 A5 7618 5 5 Pulse Counter Operating Mode 5 6 Counting value 65 535 Upper counting li
46. e Example The CM35 has module start address 256 L W 16 FF81 Start all channels T PQW 258 Module start address 2 L W 16 0081 Stop all channels T PQW 258 Module start address 2 In DO mode automatic the related output is switched on when a channel starts The output is switched off with stop even when the comparison value has not yet been reached CM35 Counter Module 5 14 4 J31069 D0416 U001 A5 7618 Pulse Counter Operating Mode 5 4 Controlling the Digital Outputs You can control the digital outputs of the CM35 as shown below based on the parameterization of DO mode DO mode Automatic CPU control Note A parameterization bit can be used to specify whether the DO byte is to control the enable or whether the enable is continuous Enable mode Enable control via DO byte The DO byte is used to enable the output for control via the counter status 0 Output disabled The output is not switched on with the start of counting A switched on output is forcibly switched off 1 Output enabled The output is switched on at start of counting The output is switched off when the comparison value is reached or counting is stopped Enable mode continuous enable Control via the counter status is continuously enabled for the outputs A switched on output can be forcibly switched off with the DO byte 0 A switched on output is forcibly switched off The forced switch off only affe
47. e axes positioning running are not disturbed To prevent a just finished positioning procedure from being turned on again accidentally or a running positioning procedure from being turned off due to output control the outputs should only be controlled when all positioning procedures have been finished or stopped To be noticed by the CM35 the status of the DO byte must have changed by at least one bit from its last status see also page 4 22 CM35 Counter Module 4 J31069 D0416 U001 A5 7618 8 17 Positioning Operating mode 8 5 Hardware Interrupt Evaluation In positioning mode the CM35 can trigger a hardware interrupt when a set point position is reached If this is used the CPU must have a hardware inter rupt OB OB 40 The start information of OB 40 Variable OB40_MDL_ADDR contains the base address of the module which triggered the interrupt Variable OB40_POINT_ADDR contains information on the event which triggered the interrupt Variable OB40_POINT_ADDR consists of four bytes The hardware interrupt information of the CM35 in positioning mode is entered in the low byte lo cal byte 11 of OB 40 You can evaluate local byte 11 to determine which axis triggered the inter rupt Remember that more than one bit can be set Table 8 7 Assignment of the hardware interrupt information OB 40 local byte 11 Ta BE e ee CM35 Counter Module 8 18 4 J31069 D0416 U001 A5 7618 Positioning Operating mode
48. e base for timers 1 and 2 T PW 132 Module start address 4 L DBW4 Load time base for timers 3 and 4 T PW 134 Module start address 6 L DBWI12 Load factor for timer 2 T PW 140 Module start address 14 L DBW14 Load control word with C bit 1 T PW 130 Module start address 2 Transfer next parameter block CM35 Counter Module 4 J31069 D0416 U001 A5 7618 4 9 Data Communication with the CM35 Wait time OB1 OB100 When distributed connection to the SIMATIC S5 is used a wait time must be adhered to after an SS CPU STOP RUN transition before the module is para meterized via direct I O accesses The wait time depends on the PROFIBUS transmission speed set It can be configured in OB 100 or OB 1 The following standard values apply 187 5 kbit sec 500 msec wait time 1 5 kbit sec 100 ms wait time 12 kbit sec 10 ms wait time CM35 Counter Module 4 J31069 D0416 U001 A5 7618 Data Communication with the CM35 4 3 Programming Parameterization must be correct before the channels and digital outputs can be controlled and the actual values can be read With both the SIMATIC S7 and the SIMATIC SS direct I O accesses are al ways used Only word or double word accesses to even addresses can be used for I O accesses 4 3 1 Controlling the Channels The individual channels of the CM35 can be started and stopped by writing the control word The control word must be written to address
49. e duration 40 usec for high and low Signal level 24 Volt signals Signal H 15 to 30 Volt Signal L 3 to 5 Volt 5 Volt signals Signal H 2 4 to 6 Volt Signal L 0 6 to 0 8 Volt Input current For 24 V and H signal Typical 4 7mA For 5 V and H signal Typical 10 mA Maximum signal rise time From L to H typ 10 msec From H to L typ 15 msec Permissible cable length shielded For 24 V m For5 V Signal level 24 Volt P switching Output current short circuit proof Per DO Max of 0 5 A Total current Max of 4A Switching frequency Max of 10 Hz with ohmic load 8 Hz with lamp load Max of 0 5 Hz with inductive load Cable length Max of 100 m CM35 Counter Module 4 J31069 D0416 U001 A5 7618 1 9 Product Overview Other MLFB no Input voltage 5 V viaP bus Current consumption Typ 0 150 A CM 35 counter module 6AT1 735 0AAO01 0AAO or later Configuration package 6AT1 735 ODA01 0YA0 or later CM35 Counter Module 4 J31069 D0416 U001 A5 7618 Function Description CM35 Counter Module 4 J31069 D0416 U001 A5 7618 2 1 Function Description 2 1 Function Overview Table 2 1 Operating modes Operating Function Limit Control the Hardware Use Mode Fre Digital Interrupt on quency Outputs Via for S5 Master or Standard Master Pulse Counting up from Operating mode Comparison Not possible counter 0 to 65535 with CPU control v
50. e individual channels via write accesses read the data of the CM35 with read accesses Depending on the selected operating mode and the parameterization the module supports the triggering of hardware interrupts with the SIMATIC S7 OB 40 must be programmed for this CM35 Counter Module 4 J31069 D0416 U001 A5 7618 Data Communication with the CM35 4 2 Parameterization Parameter data The parameter data for the individual operating modes are combined into parameter blocks The required number of parameter blocks depends on the operating mode which you selected The parameters must be transferred at least once to the CM35 after CPU STOP RUN After the data have been transferred correctly the red SF LED goes off and the module is ready for operation The parameters can be specified again during operation so that the individual channels can be adjusted to the particular state of the process The parameter blocks can be transferred in any sequence The order has no effect on their use Note Before a channel can be reparameterized it must be stopped The parameters for a channel may not be changed or written while the channel is running Parameter block A parameter block consists of the following A control word Up to 6 words of data area parameter data Table 4 1 Layout of a parameter block For the allocation and description of the parameter data for the individual parameter blocks see the description of
51. e to recognize the CM35 during configuration Parameterization Parameterization is performed by the user program and only refers to the op erating mode which was set when the module was configured The required parameters depend on this operating mode The fundamentals of parameterization are described in chapter 4 2 For details see the descriptions of the individual operating mode CM35 Counter Module 4 J31069 D0416 U001 A5 7618 3 13 Commissioning 3 3 1 Installation of the Object Manager for STEP 7 Prerequisites Installing the object manager Configuring the hardware Indicating integrated help To install the object manager OM STEP 7 starting with V3 2 must be installed correctly on your PG PC To install the object manager proceed as shown below 1 Make sure that no applications are open in Windows 2 Insert the data medium 3 Callthe SETUP EXE program The CM35 counter module is located in the path shown below under STEP 7 HW Config Catalog Hardware Catalog Profile Standard 7 3 SM 300 a 9 41 40 300 41 300 I 40 300 I DI DO 300 C DI 300 G 00 300 Special 300 BRCM 35 0441 4 DM 370 DUMMY 4 DM 370 DUMMY 4 SM 338 POS INPUT SIMATIC 400 z H A DF BAT 1735 04401 0440 counter modul 8 canal Figure 3 3 Counter module CM35 in the hardware catalog In addition to the dialogs of the
52. en FROM Your name Your title Your company Street City Telephone Please tick your branch _ Automotive industry _ Pharmaceutics industry _ Chemical industry _ Plastics processing _ Electrical industry _ Paper industry I Foodstuffs __ Textiles industry _ Process control technology _ Transportation industry _ Mechanical engineering 8 1 7 SONNE ee _ Petrochemistry Remarks Suggestions Your remarks and suggestions help us to improve the quality of our documentation Please complete this questionnaire as soon as you have time and return it to Siemens Please enter your personal evaluation from 1 good to 5 poor Do the contents of this manual meet your requirements Is it easy to find the information you need Is the information written in an easy to understand manner Does the amount of technical detail meet your requirements R ae er What is your opinion of the figures and tables If you encountered concrete problems please use this space to explain Siemens AG Automation and Drives Motion Control Systems Frauenauracher Stra e 80 D 91056 Erlangen Siemens Aktiengesellschaft Siemens AG 2000 Subject to change without prior notice Bestell Nr J 31069 D0416 U001 A5 7618 Printed in the Federal Republic of Germany Excellence in Automation amp Drives Siemens
53. er Data uaa 7 2 2 Structure of the Parameter Blocks 00 cece cece eens 7 3 Starting and Stopping the Timers 0 000 eee eee eee 7 4 Controlling the Digital Outputs 0000 c ccc 7 5 Hardware Interrupt Evaluation 0 c cece ees 7 6 Reading the Status 22222eeeneen nennen eens Positioning Operating mode 00 cece cece nn nenn nn nenn nen 8 1 Function Description 222222 nenne een nn 8 2 Parameterization 00 cece nern een nn 8 2 1 Description of the Parameter Data 0 cece eee 8 2 2 Structure of the Parameter Blocks 00 cee seen Q N O TSE A O N Oo 7 ara el i o o o N gt P N N CM35 Counter Module 4 J31069 D0416 U001 A5 7618 Table of Contents 8 3 Starting and Stopping the Axes 2cn nennen e nee nennen 8 14 8 4 Controlling the Digital Outputs 22 2222 sense nennen nenn 8 16 8 5 Hardware Interrupt Evaluation 222e22n essen ees 8 18 8 6 Reading the Actual Positions 2e222eee nern nennen 8 19 A Literature 2 ee B EC Declaration of Conformity 0 0c cece eee eee eee eee GOSS ANY occis sects ee eet eves nee Glossary 1 CM35 Counter Module 4 J31069 D0416 U001 A5 7618 v CM35 Counter Module 4 J31069 D0416 U001 A5 7618 Product Overview CM35 Counter Module 4 J31069 D0416 U001 A5 7618 Product Overview 1 1 Overview
54. er Limit of Traversing Upper Limit of Traversing Range Range 2 147 483 648 increments 2 147 483 647 increments Note When the position is no longer in the traversing range the actual value jumps from positive to negative or from negative to positive You must ensure that the traversing path is located within the traversing range limits To synchronize actual value acquisition you can execute set actual value with the user program Move the axis to a position whose coordinate is known Transfer this coordinate to the module with set actual value The specified value is accepted as the current actual value Note The conversion of the incremental value to a length value and vice versa must be handled by the user program CM35 Counter Module 4 J31069 D0416 U001 A5 7618 Positioning Operating mode Switching the The CM35 switches on the related direction output when a positioning proce digital outputs dure starts When the setpoint position is reached the module switches off hardware the direction output again and triggers a hardware interrupt interrupt Start position Setpoint position Setpoint position Start position v Traversing direction q gt gt Traversing direction V Digital output 1 gt ies S forwards 0 Digital output 1 backwards 0 a Approaching the setpoint b Approaching the setpoint position in the forward direction position in the backward d
55. eriod duration average value chan Example Period duration measurement mode Read the measured value of channel 2 The CM35 has the module start address 256 L PIW258 Address 256 2 measured value channel 2 T MW16 Save the counting value CM35 Counter Module 6 10 4 J31069 D0416 U001 A5 7618 Timer Operating Mode CM35 Counter Module 4 J31069 D0416 U001 A5 7618 7 1 Timer Operating Mode 7 1 Function Description Switch on times Start and stop timers Controlling the outputs Monitoring the outputs 7 2 Timer mode can be used to implement precisely defined switch on times for the 8 digital outputs of the counter module Times from 10 milliseconds to 278 minutes can be specified seperately for the switch on times The timers are started by the user program thus setting the related digital outputs If no parameter values for time base and factor are available when a timer is started these values are processed with 1 as the default value The related digital output is switched off after the parameterized time expires A started timer can be terminated by transferring the control word with a 0 for the applicable channel in the start stop byte This resets the digital output and the internal counter The end of the switch on time is indicated by a hardware interrupt This can be acquired by the user program to trigger additional processing e g to position the next container
56. erlapping with other modules or conflicts with reserved areas are indicated by COM PROFIBUS 4 J31069 D0416 U001 A5 7618 3 19 Commissioning Module The same start address is used for the input area and for the output area The address for CM35 module occupies 16 bytes in the input area and 16 bytes in the output use of area The module address must be a whole number multiple of 16 The start the IM 308 C address is also required for configuration under COM PROFIBUS Addressing in the process image PYO to PY127 should never be used for consistent data Table 3 8 Possible addresses esa ER EN a e e a 1 A fixed relationship between CM35 number and address does not exist A maximum of 24 CM35 modules can be ad dressed per IM 308 C interface Module Input output bytes 64 to 127 are used for both the local I O e g analog in address for put output modules slots 0 to 7 and the distributed I O DP slaves When use of the local I O is used e g analog input output modules the address areas the S5 95U DP must be reserved in the host parameters by the user with COM PROFIBUS Table 3 9 Possible addresses esme OO e Foses e e Pm e EICH me oe rm e CM35 Counter Module 3 20 4 J31069 D0416 U001 A5 7618 Commissioning Setting the operating mode Commissioning CM35 Counter Module The operating mode of the CM35 must have already been set during configu ration Proceed as shown below 1 In the config
57. erte Europ ische Normen Referenznummer Ausgabedatum EN 50081 2 1993 EN 50082 2 1995 Diese Konformit tserkl rung gilt f r folgende Komponenten Bestellnummer Bezeichnung 6AT1735 0AA01 0AA0 Counter Modul CM 35 mit erweitertem FW Speicher 6AT1735 0AA00 0AAO Counter Modul CM 35 CM35 Counter Module B 2 4 J31069 D0416 U001 A5 7618 Glossary A Automation system C Configuring CPU DP master DP slave DP standard CM35 Counter Module 4 J31069 D0416 U001 A5 7618 An automation system is a programmable logic controller in a SIMATIC S7 system Configuring is the selection and combination of individual components of a programmable controller or the installation of required software e g the operating system on the M7 automation computer and the adjustment to spe cial applications e g by parameterizing the modules The CPU Central Processing Unit is a CPU of the programmable controller or the automation system with control and computing unit memory system program and interfaces to the I O modules There are two kinds of configuration the actual configuration i e the mod ules which are actually installed and the desired configuration The desired configuration is specified with STEP 7 or COM ET 200 Windows or COM PROFIBUS Windows This permits the operating system to detect incorrect configurations when it starts up When it has sending rights the DP master can send data to other stations in
58. ethod is to use a SIMATIC S5 95U DP master with integrated PROFIBUS DP interface 3 3 4 1 Hardware Prerequisites IM 308 C S5 95U master DP IM 153 1 IM 153 2 CM35 Counter Module Release 4 or later Note An FB 192 with release 3 can only be used with an IM 308 C starting with release 6 When release status 2 of the FB 192 is used all versions of the IM 308 C can be used starting with release status 3 Release 2 or later The maximum transmission speed is 9600 Kbaud to 1 5 Mbaud depending on the length of the cable Prerequisites for the coupling are an IM 153 1 MLFB no 6ES7 153 1AA02 0XB0 or later and CM35 modules MLFB no 6AT1 735 0AA01 0AAD release status 4 or later Prerequisites for the coupling are an IM 153 2 MLFB no 6ES7 153 2AA01 0XB0 release status 2 or later and CM35 modules MLFB no 6AT1 735 0AA01 0AA0 CM35 modules MLFB no 6AT1 735 0AA01 0AA0 release status 4 or later are required for the IM 153 2 interfaces MLFB no 6ES7 153 2AA02 0XB0 release status 5 or later 4 J31069 D0416 U001 A5 7618 3 17 Commissioning 3 3 4 2 Configuration COM PROFIBUS 3 18 The IM 308 C interface module or S5 95U DP master is parameterized with the COM PROFIBUS software With more recent versions of COM PROFIBUS you should be able to find the CM35 module in the under its order number 6AT1 735 0AA01 0AA0 Sec figure 3 4 If you cannot find the CM35 copy the type or GSD files from the
59. full function scope of the module can be utilized System function into the SFC 55 is available for the parameterization See reference manual 235 SIMATIC S7 300 Possible ae a Example CPU 312 IFM CPU 313 CPU 314 CPU 614 Distributed in The full function scope of the module can be utilized Parameterization is tegration into the performed with system function SFC 55 SIMATIC S7 Master S7 CPU with DP interface CP 443 5 Ext IM 467 CPU 315 2 DP PS PROFIBUS DP ET 200M oO oO IM 153 1 CM35 CM35 Counter Module 4 J31069 D0416 U001 A5 7618 1 3 Product Overview Distributed in Since no hardware interrupts are triggered on the SIMATIC S5 by tegration into the PROFIBUS DP the function scope is limited Only the operating modes SIMATIC S5 period duration measurement and timer can be used Parameterization is performed via I O direct accesses Possible up SenBen len Master PLC S5 95U MA PLC S5 115U PLC S5 135U PLC S5 155U via IM 308 C 5 115U PROFIBUS DP ET 200M oO oO
60. h channel If you specify 0 or 1 the channel does not use the scanning rate Table 5 8 Scanning rate factor Scanning Rate Factor Block Type O saae cn gt mm CM35 Counter Module 4 J31069 D0416 U001 A5 7618 Pulse Counter Operating Mode 5 2 2 Structure of the Parameter Blocks Tables 5 9 5 10 and 5 11 show the data structures of the three parameter blocks as they must be transferred with SFC55 calls to the CM35 The first word of the parameter blocks contains the control word The re quired assignment is entered as the initial value in the structures For transmission of the data see chapter 4 2 Parameter block 1 contains e The comparison or start values for channels 1 to 6 Table 5 9 Parameter block 1 Value OT ES sm HELL HE LO a CM35 Counter Module 4 J31069 D0416 U001 A5 7618 5 11 Pulse Counter Operating Mode Parameter block 2 contains e The comparison or start values for channels 7 and 8 e The bit coded settings For the switching reaction of the outputs For the direction of counting For the counting value after counter stop For interrupt generation For selection of scanning rate e The scanning rate factors for channels 1 to 6 Table 5 10 Parameter block 2 nn Se 7 0 C_Direction BOOL FALSE Counting direction 0 Up 1 Down 7 1 Enable_Mode BOOL FALSE Enable mode only applicable to automatic DO mode 0 Continuous enable 1 Enable contr
61. iphery The ET 200 periphery system is based on the draft of the PROFIBUS DP standard part 3 of DIN 19245 PROFIBUS is a bus system which networks PROFIBUS compatible pro grammable controllers and field devices at the cell and field level PROFIBUS is available with the protocols DP Distributed Periphery FMS Fieldbus Message Specification or TF Technological Functions The pulse duration specifies the minimum time an output must be set Signal modules SM provide the interface between the process and the pro grammable controller There are digital input and output modules analog input and output modules and special SMs e g the CM35 Centralized setup means that the process periphery and CPU are located in the same module rack or in expansion units in the same or an adjacent cabi net Didtributed setup means that the process periphery is not located directly with the CPU in the same module rack or in the same or adjacent switching cabinet Instead the process periphery and the CPU are located at a distance from each other and are connected with a communication bus e g fieldbus The SIMATIC Manager is the graphical user interface for SIMATIC users under Windows STARTUP is an operating mode of the CPU which covers the transition from STOP to RUN STARTUP is triggered with the operating mode switch on the CPU after power on or by operator input on the programmer STEP 7 is the programming language for the creation
62. irection Figure 8 1 How the CM35 controls the direction of traversing A positioning The positioning sequence is described below sequence 3 A q gt Parameterize encoder resolution Move axis to a position whose coordinate is known gt Set actual value gt Specify setpoint in increments gt Start axis with START command lt Hardware interrupt indicates that setpoint position has been reached lt Axis is switched off gt STOP command concludes positioning of the axis gt Specify new setpoint gt Start axis with START command lt Hardware interrupt shows that setpoint position has been reached lt Axis is switched off STOP command concludes positioning of the axis Transferred to CM35 module Executed by the CM35 module Symbols gt CM35 Counter Module 4 J31069 D0416 U001 A5 7618 8 3 Positioning Operating mode Moving the axes via the CPU Evaluating the encoder pulses 8 4 Under normal conditions one or more axes are stopped after the module has reported with a hardware interrupt that the destination setpoint position has been reached Note An axis can always be stopped in an emergency by setting the control bit to stop To move the axes without positioning the state of the digital outputs for forward and backward can be specified by the user program Asymmetric incremental encoders with two tracks displaced by 90 can be connected t
63. le a complete pa rameter block control word and parameterization data length of 14 bytes as data record 1 Below is an example for the transmission of the 1st parameter block from DB 20 pulse counting mode The CM35 has the logical base address 256 Table 4 3 Sample allocation for a data block DB 20 DB Name Type Initial Value Commentary Address 00 0 Para_ Para_Block_1_Data 1_Data STRUCT BEE 0 pee _ word m Parameter aa 1 pulse counting mode 2 0 Cmp_Start_Va WORD W 16 00 Comparison value start value lue_Chan_1 channel 1 4 0 Cmp_Start_Va WORD W 16 00 Comparison value start value lue_Chan_2 channel 2 6 0 Cmp_Start_Va WORD W 16 00 Comparison value start value lue_Chan_3 channel 3 8 0 Cmp_Start_Va WORD W 16 00 Comparison value start value lue_Chan_4 channel 4 10 0 Cmp_Start_Va WORD W 16 00 Comparison value start value lue_Chan_5 channel 5 12 0 Cmp_Start_Va WORD W 16 00 Comparison value start value lue_Chan_6 channel 6 CALL SFC55 REQ true Request to write IOID B 16 54 Area identifier for composite mod LADDR W 16 100 Logical address 256 RECNUM B 16 1 Data record number 1 RECORD _ P DB20 DBX 0 0 BYTE 14 Pointer to beginning of the block RET_VAL _ ret_val Error code BUSY busy 1 writing not concluded CM35 Counter Module 4 6 4 J31069 D0416 U001 A5 7618 Data Communication with the CM35 SFC 55 must continue to be called u
64. le encoder frequency is 1000 Hertz regardless of the edge evaluation selected Example of encoder selection Maximum traversing speed 20 mm sec Spindle incline path encoder revolution 10 mm revolution Edge evaluation Double Permissible encoder frequency 1000 Hz Steps _ Perm enc frequency e path enc revolution Encoder revolu Max traversing speed tion 1000 1 sec 10 mm revolution 500 revolution 20 mm sec Path encoder revolution 10mm Resolution 10 mr Steps enc revolution evaluation 500 2 CM35 Counter Module 4 J31069 D0416 U001 A5 7618 Positioning Operating mode 8 2 Parameterization CM35 Counter Module This chapter shows you how to use parameterization in positioning mode to adapt axis reaction to your task The parameter data are divided into nine parameter subblocks Each parame ter subblock must be transferred separately For the structure of the parameter subblocks see chapter 8 2 2 The description of the individual parameter data includes the number of the parameter block and subblock and the offset in the related structure Note An axis must be stopped before it can be reparameterized When you want to change an axis specific parameter this axis must be stopped When you want to change an axis overlapping parameter all axes must be stopped The new parameters take effect when the axis is started again For a description of th neral
65. lines AR of the SIMATIC S7 see manual on setting up 7 300 programmable controllers and CPU data must be adhered to during all mounting steps and the following instructions must be performed in the order specified CM35 Counter Module 4 J31069 D0416 U001 A5 7618 Commissioning How to install For how to mount the modules on the system see manual 70 or 140 A simplified version of installation is given here 1 Turn off all voltages on the SIMATIC S7 secure against switch on and label Make protective conductor connection or check it See AR Mount shield connecting element SAE The shield connecting element must be mounted directly under the slot of the CM35 on the mounting rail Each cable to be connected to the CM35 requires a shield clamp on the shield rail of the SAE Plug in bus connector See AR Abus connector is supplied with each CM35 Insert the bus connector on the module occupying the slot to the left of the CM35 Hang in CM35 See AR Secure CM35 with screw See AR Label CM35 See AR How to remove For how to set up replace modules in the system see manual 70 or 140 replace modules A simplified version of removal is given here 1 a nn A U N Switch the CPU to STOP Turn off the power supply Release the front plug connector and disconnect it Release the mounting screw on the module Swivel the module out of the mounting rail and remove it
66. lock no 2 subnumber 4 w mode Setpoint_Axis_4 DINT o L 0 Setpoint foraxis4 0000 Setpoint for axis4 0000 axis 4 CM35 Counter Module 4 J31069 D0416 U001 A5 7618 8 13 Positioning Operating mode 8 3 Starting and Stopping the Axes The following conditions must be met before an axis is started for the first time e The module is parameterized SF LED is off e The actual value for the axis to be started has been set e A setpoint was written for the axis to be started To start the axis write the start stop block to address module start address 2 Note Before an axis can be started again it must be stopped with a stop command Table 8 5 shows the contents of the start stop block The required assign ment ot the coordination byte is entered in the structure as an initial value aif of the bit assignment of the coordination byte see chapter 4 3 1 The write access of the start stop block must be programmed as a word access Table 8 5 Start stop block BER OO BE 1 0 CoordinationByte BYTE B 16 84 Start stop byte enable 1 C bit 0 positioning mode CM35 Counter Module 8 14 4 J31069 D0416 U001 A5 7618 Positioning Operating mode Example The CM35 has the module start address 256 L W 16 4184 Start axes 1 and 4 T PQW 258 Module start address 2 L W 16 8184 Stop axis 4 Axis 1 is not affected T PQW 258 Module start address 2 The axis stops when both bits
67. matisierungs und Antriebstechnik Gesch ftsgebiet Kombinationstechnik Anschrift W rzburger Stra e 121 D 90766 F rth Produktbezeichnung Counter Modul CM 35 MLFB Nr 6AT1735 0AA01 0AAO MLFB Nr 6AT1735 0AA00 0AAO Das bezeichnete Produkt stimmt mit den Vorschriften folgender Europ ischer Richtlinien berein 89 336 EWG Richtlinie des Rates zur Angleichung der Rechtsvorschriften der Mitgliedsstaaten ber die elektromagnetische Vertr glichkeit ge ndert durch 91 263 EWG 92 31 EWG und 93 68 EWG Weitere Angaben ber die Einhaltung dieser Richtlinie enth lt Anhang EMV Siemens Aktiengesellschaft F rth den 21 09 1999 u fh Hed iy Lr Unterschrift Hr Kronen Unterschrift Ltg A amp D MC PM2 Techn Ltg A amp D SE B1 Der Anhang EMV ist Bestandteil dieser Erkl rung Diese Erkl rung bescheinigt die bereinstimmung mit den genannten Richtlinien ist jedoch keine Zusicherung anderer Eigen schaften Die Sicherheitshinweise der mitgelieferten Produktdokumentation sind zu beachten CM35 Counter Module 4 J31069 D0416 U001 A5 7618 B 1 EC Declaration of Conformity SIEMENS Anhang EMV zur EG Konformitatserklarung Nr PE 0014 0999 Produktbezeichnung Counter Modul CM 35 MLFB Nr 6AT1735 0AA01 0AA0 MLFB Nr 6AT1735 0AA00 0AA0 Die Ubereinstimmung des bezeichneten Produkts mit den Vorschriften der Richtlinie 89 336 EWG wird nachgewiesen durch die vollst ndige Einhaltung folgender Normen harmonisi
68. mit Parameterized Parameterized 30 000 comparison value start value Start a Counting up Stop b Counting down Start Stop Figure 5 4 Use of the comparison value start value parameter delete counting value after stop CM35 Counter Module 4 J31069 D0416 U001 A5 7618 Pulse Counter Operating Mode Counting value The delete counting value variable can be used to specify which counting after counter stop value is to be indicated after stop Delete counting value at stop After the counting procedure has been stopped the counting value is set to the start value Delete counting value at start After the counting procedure has been stopped the current counting value is retained until the next start Parameterization applies to all channels Table 5 4 Delete counting value Variable Parameter Offset Data Value Range Block Type Delete_CountVal 2 7 5 Bool Delete counting value at stop Delete counting value at start Counting value 65 535 Old Counting counting value value before sto 30 000 Start Stat P value value 0 Start Stop Start Stop a Delete counting value at stop b Delete counting value at start Figure 5 5 Current counting value after a counter has stopped counting down CM35 Counter Module 4 J31069 D0416 U001 A5 7618 5 7 Pulse Counter Operating Mode Switching reaction You can choose between automatic oper
69. n of OB 40 contains the following information The variable OB40_MDL_ADDR contains the base address of the module which triggered the interrupt The variable OB40_POINT_ADDR contains information on the event which caused the interrupt The variable OB40_POINT_ADDR consists of four bytes The hardware in terrupt information of the CM35 in pulse counter mode is entered in the low byte local byte 11 of OB 40 By evaluating local byte 11 you can determine which channel triggered the interrupt Remember that more than one bit can be set Table 5 14 Assignment of the hardware interrupt information OB 40 local byte 11 0 9 oeeo o a ee sache man va ewer Stas conan va TS Tests mann va N oe onae N BEIN oee onae IT oee one IT e ooe CM35 Counter Module 4 J31069 D0416 U001 A5 7618 5 17 Pulse Counter Operating Mode 5 6 Reading the Counting Values In pulse counter mode you can read the current counting values from the CM35 To ensure data consistency the read access must be performed with one load command L PIW Table 5 15 shows the addresses of the individual channels for reading the counting value Table 5 15 Assignment of the output area for reading the counting values Offset to the Meaning Value Range Module Start Address Counting value 0 to 65535 channel 1 Counting value channel 2 Counting value channel 3 Counting value channel 4 Counting value channel 5 Cou
70. ng Mode 7 6 Reading the Status In timer mode you can read the status of the timers from the CM35 For example the user program can use this to determine which timers have expired and start them again Table 7 14 shows the address for reading the status Table 7 14 Offset to the Module Start Address Meaning Status of timer 1 Status of timer 2 Status of timer 3 Status of timer 4 Assignment of the output area for reading the status Value Range Timer is active Timer has expired and can be started again after a stop command Status of timer 5 Status of timer 6 Status of timer 7 Status of timer 8 Example S7 Timer mode Read timer status The CM35 has the module start address 256 L PIW256 Address 256 timer status T MW16 Save status CM35 Counter Module 7 14 4 J31069 D0416 U001 A5 7618 Positioning Operating mode CM35 Counter Module 4 J31069 D0416 U001 A5 7618 Positioning Operating mode 8 1 Function Description Synchronization 8 2 In this operating mode the CM35 supports controlled positioning with a switch off point An incremental encoder is connected to acquire the position The encoder pulses are acquired by the module with the correct sign in the traversing range from 2 147 483 648 to 2 147 483 647 Two digital outputs which are addressed by the CM35 based on direction are available for each of the four channels Traversing Range Low
71. ntil BUSY is reset SFC 55 should not be used in OB100 We recommend setting a flag bit startup identifier in OB100 instead SFC 55 should then be called based on this flag bit to parameterize the CM35 after the automation system is turned on If an error occurs while the function is being processed the error code is indi cated in parameter RET_VAL and BIE is set to 0 For a description of the parameterization of the system functions and the re turn values see STEP 7 reference manual 235 CM35 Counter Module 4 J31069 D0416 U001 A5 7618 4 7 Data Communication with the CM35 4 2 2 Parameterization via Direct I O Accesses Only SIMATIC S5 Assignment of the I O address area Use of the consis tency bit Transmission of parameter blocks Parameterization via direct accesses is only permitted in the period duration measurement and timer operating modes The analog I O address area contains 8 words The data must be written with word accesses The I O address area is used for parameterization as shown below Table 4 4 Assignment of the address area for parameterization via direct I O accesses Offset for the Description Module Start Address DO byte digital output control may not be written during parameterization 4 to 14 Parameterization data The consistency C bit in the control word is used with direct access para meterization to ensure consistency of the written values within
72. nting value channel 6 Counting value channel 7 Counting value channel 8 Example Pulse counter mode Read counting value of counting channel 4 The CM35 has the module start address 256 L PIW262 Address 256 6 counting value of channel 4 T MW16 Save the counting value CM35 Counter Module 5 18 4 J31069 D0416 U001 A5 7618 Period Duration Measurement Operating Mode CM35 Counter Module 4 J31069 D0416 U001 A5 7618 6 Period Duration Measurement Operating Mode 6 1 Function Description In this operating mode the CM35 uses period duration measurement to ac quire small frequencies The CM35 measures the exact time between two falling edges of the count ing signal by counting the pulses of an internal precision quartz reference frequency The period duration of the input signal is calculated from the counting value after a period divided by the reference frequency in kHz Example Counting value 100 Reference frequency 100 kHz standard value 100 1 msec 21 kHz 100 kHz Period duration 1 msec or frequency 1 kHz Measuring range At a measuring value width of 16 bits and a reference frequency of 100 kHz period duration measurements between 655 msec counting value 65500 and 1 msec counting value 100 can be performed with a resolution of 1 with out switching the range Note The resolution depends on the lower counting value i e the minim
73. o the CM35 Direction evaluation The CM35 determines the counting direction of the signal edges from the time sequence of the encoder signals Track A fe ee ee Track B oes EEE ge VE VB pn EN Counterclockwise Clockwise actual value is decremented actual value is incremented Figure 8 2 Direction evaluation Note The direction of rotation can be inverted with a parameter bit CM35 Counter Module 4 J31069 D0416 U001 A5 7618 Positioning Operating mode Edge evaluation You can parameterize whether the encoder pulses are to be evaluated once twice or four times 1 2 Track A All falling edges of track A Figure 8 3 Single evaluation of the encoder pulses 1 2 3 Track A All edges of track A Figure 8 4 Double evaluation of the encoder pulses 1 2 3 4 5 6 7 Track A Track B All edges of both tracks Figure 8 5 Quadruple evaluation of the encoder pulses Note The more edges are evaluated the better the resolution is For example the resolution of the same traversing path is four times higher with quadruple evaluation than with single evaluation Regardless of whether single double or quadruple evaluation is set both encoder tracks A and B must always be connected to the CM35 CM35 Counter Module 4 J31069 D0416 U001 A5 7618 8 5 Positioning Operating mode Encoder frequencies The permissib
74. object manager help information is available which you can call during every phase of parameterization either with the F1 key or with the Help button CM35 Counter Module 4 J31069 D0416 U001 A5 7618 Commissioning 3 3 2 Central Integration into the SIMATIC S7 300 Configuration Module address Setting the operating mode Commissioning CM35 Counter Module When used with an S7 300 the module is configured with STEP 7 with the application HW Config To add a CM35 to an existing project proceed as shown below 1 Start the SIMATIC Manager and open the desired project 2 In the left hand portion of the project screen select the SIMATIC 300 station to which you want to add the CM35 3 Select the menu command Edit gt Open Object This opens the HW Config application This application contains a screen with the hardware setup of the opened station 4 Select the CM35 from the module catalog of HW Config and place it in the module rack Based on its position on the mounting rail the required input and output ad dress areas are automatically assigned to the CM35 and entered in the config uration table When certain CPUs are used these address areas can be changed For de tails see manual 70 The operating mode of the CM35 must have already been set during the con figuration Proceed as shown below 1 In the configuration table select the line with the CM35 and select the menu command Edit gt O
75. ock Type Interrupt_ 2 7 6 Bool 0 No hardware interrupts Generation 1 Hardware interrupts enabled Upper counting limit Compari son value Start value No Counter Hardware hardware Counter start interrupt interrupt stop Figure 5 7 Hardware interrupt generation counting up CM35 Counter Module 4 J31069 D0416 U001 A5 7618 5 9 Pulse Counter Operating Mode Scanning rate 5 10 You can use the scanning rate factor to specify that the counting value does not change until the stated number of encoder pulses has occurred This increases the counting range of the encoder pulses by a multiple of the scanning rate factor Evaluation of the channel specific scanning rate factors must be enabled with the scanning rate group bit When a counting procedure starts the scanning rate factor is always started again The remaining pulses are not carried over from the previous counting procedure Counting 0 0 1 1 1 1 0 0 1 1 value 1 Encoder pulses 0 Counting pulses Counter start Counter start Counter stop Figure 5 8 Generation of the counting value with a scanning rate factor of 3 counting up Enabling of a scanning rate factor applies to all channels Table 5 7 Scanning rate Variable Parameter Offset Data Value Range Block Type Scanning 2 7 7 Bool 0 Scanning rate not enabled Rate 1 Scanning rate enabled The scanning rate factor can be specified for eac
76. ogrammable controllers with redundant setup SIMATIC S7 400H e Use with SIMATIC PCS 7 For additional information contact the SIMATIC hotline 4 J31069 D0416 U001 A5 7618 1 5 Product Overview 1 3 Hardware View of the module with CM35 front door Counter Module closed Module name SF LED Front door Release status Order number 6AT1 735 0AA01 0AA0 Figure 1 1 View of the front with front door closed View of the module with front door open Digital inputs 25 pin sub D socket Digital outputs 15 pin sub D socket Figure 1 2 View of the front with front door open CM35 Counter Module 1 6 4 J31069 D0416 U001 A5 7618 Product Overview Front plug The CM35 is equipped with the following front plug connectors for connec connector tion of the process I O e 25 pin sub D socket for connection of the input signals digital inputs The inputs are individually isolated from one another and can be used with a 5 V or 24 V signal level e 15 pin sub D socket with digital outputs and the connection for the exter nal supply voltage for the digital outputs The outputs are isolated against the module logic but are not isolated among one another They are powered with a supply voltage of 24 V DC SF LED The red SF LED on the front indicates that the module is not ready for opera tion This LED goes off when a valid parameterization was tran
77. ol by DO byte 75 Delete_CountVal BOOL TRUE Delete counting value 0 At stop 1 At start 7 6 BOOL FALSE Interrupt generation 0 none 1 active aal o 5 see a BE CM35 Counter Module 5 12 4 J31069 D0416 U001 A5 7618 Pulse Counter Operating Mode Parameter block 3 contains e The scanning rate factors for channels 7 and 8 Table 5 11 Parameter block 3 Para_ Para_Block_3_Data 3_Data STRUCT Se word ae Parameter nn no 3 counter mode ScanRate_F Chan_7 BYE B 16 0 Encoder scanning rate channel 7 30 0 ScanRate F Chan 8 F_Chan_8 nn Br O Encoder Encoder scanning rate channel 8 rate channel Encoder scanning rate channel 8 CM35 Counter Module 4 J31069 D0416 U001 A5 7618 5 13 Pulse Counter Operating Mode 5 3 Starting and Stopping the Counting Channels After the module has been parameterized you can start and stop the individ ual counting channels of the CM35 To do this write the start stop block to the address module start address 2 Table 5 12 shows the contents of the start stop block The required assign oordination byte is entered as the initial value in the structure aa scription of the bit assignment of the coordination byte see chapter 4 3 1 Write accesses to the start stop block must be programmed as word accesses Table 5 12 Start stop block e smo EEE EN 1 0 CoordinationByte a E Start stop byte enable 1 C bit 0 counter mod
78. one parameter block The CM35 does not evaluate the transferred values of one parameter block as long as the C bit is not set These values do not become valid until the con trol word is written with C bit 1 The following sequence must be used to transfer the pafameter blocks 1 Transfer the control word with C bit 0 2 Transfer all required data of the parameter block 3 Transfer the control word with C bit 1 Transfer next parameter block Note The channels may not be started or stopped by accesses to the control word while parameter blocks are being transferred The system must be in a de fined state before parameter blocks are transferred An example is shown below Timer operating mode Transmission of the 1st parameter block from DB 20 The CM35 has the module start address 128 CM35 Counter Module 4 J31069 D0416 U001 A5 7618 Data Communication with the CM35 Table 4 5 Sample allocation for a data block DB 20 dress Value 3 imema ove Amennemime instance Jove Bro imene O 5 insta tines BYTE BAT Amenmerimes Pins aE RAG PTnctasiorine 9 aS A men Inmehsenmmen 15 Tresen me von ums remis 2 F actor_Timer_ Factor_Timer 2 WORD W 16 01 Factor Factor for timer2 o timer 2 e ee word pene EA C bit ae block 1 timer operating mode A DB20 Open data block L DBWO Load control word with C bit 0 T PW 130 Module start address 2 L DBW2 Load tim
79. r a specific timer Table 7 3 Setting of the timer factor Factor Block acorns 2 m Interrupt Here you can specify the events for which an interrupt is to be generated generation You can evaluate the interrupt in the hardware interrupt OB Possible interrupt events are listed below Timer expired Timer failure The following can be selected for the interrupt No interrupt Group interrupt Selective interrupt A selective interrupt permits you to evaluate which timer triggered the inter rupt Parameterization applies to all timers Table 7 4 Parameterization of the timer Variable Parame Offset Data Value Range Interrupt ter Block Type Generation Timer_Expired 3 2 xxxx_xx00 No interrupt 2 xxxx_xx01 Group interrupt 2 xxxx_xx10 Selective interrupt Timer_Failure 3 2 xx00_xxxx No interrupt 2 xx01_xxxx Group interrupt 2 xx10_xxxx Selective interrupt CM35 Counter Module 4 J31069 D0416 U001 A5 7618 7 5 Timer Operating Mode 7 2 2 Structure of the Parameter Blocks Tables 7 5 Tables 7 5 LY 7 3 404 7 so the data structures of the three parameter blocks OW t be adad to the CM35 with SFC 55 calls or I O di rect accesses The first word of the parameter blocks contains the control word The required assignment is entered as an initial value in the structures When T O direct accesses are parameterized only with SIMATIC S5 the eptance structures must be transferred after the data stru
80. r more information on free address assignment see manual 70 Proceed as shown below 1 In the configuration table select the line with the CM35 and select the menu command Edit gt Object Properties 2 In the indicated dialog box open the tab Addresses and enter the desired start address If there are address overlaps with other modules you will be told this when you close the dialog box 3 Leave the dialog box open so that you can make the following settings of the module s operating mode The operating mode of the CM35 must have already been set during configu ration Proceed as shown below 1 If not already done select the line with the CM35 in the configuration table and select the menu command Edit gt Object Properties 2 In the dialog screen open the tab Operating Mode select the desired operating mode and confirm with OK For additional preparations before operation see manual 70 and user manual 231 CM35 Counter Module 4 J31069 D0416 U001 A5 7618 Commissioning 3 3 4 Distributed Integration into the SIMATIC S5 Integration on the SIMATIC S5 Note This section assumes that you have a knowledge of SIMATIC S5 and COM PROFIBUS The CM35 module can be linked as distributed I O to the SIMATIC S5 using PROFIBUS DP The modular ET 200M I O device is required to link the CM35 modules to PROFIBUS DP The SIMATIC S5 is connected to PROFIBUS DP with in terface IM 308 C Another m
81. ra Block_1_4_Data 1_4_Data STRUCT Setactual value foraxis4 actual value for Set actual value for axis4 4 au 0 a word ze Parameter block no 1 subnumber 4 positioning mode 20 0 Set_ActualValue_Axis 4 ActualValue_Axis 4 DNT o O L 0 Setactual value foraxisd actual value for Set actual value for axis4 4 CM35 Counter Module 8 12 4 J31069 D0416 U001 A5 7618 Positioning Operating mode Parameter block 2 contains The setpoints of axes 1 to 4 Table 8 4 Parameter block 2 f0 0 Para_ Para_Block_2_1 Data 2_1_Data STRUCT Setpoint axis o axis 1 Fr re word u a Parameter i as no 2 subnumber 1 en mode Setpoint_Axis_1 Ei 1140 sepointforais 000 Setpoint foraxis 000000 axis 1 140 Para_ Para_Block 2 2 Data 2_2 Data STRUCT Setpointaxis2 Setpoint axis2 0750 Bam 0 Pu word ze W 16 224 Parameter block no 2 subnumber 2 m mode 20 0 20 Setpoint_Axis2 Setpoint_Axis2 2 DINT o L 0 Setpoint for axis2 7575 Setpointforaxis2 axis 2 280 0 Para_Block_2 Para Block 23 Data Data STRUCT Setpoimsaxis3 Setpoint axis3 Ea 0 a word paac W 16 324 Parameter block no 2 subnumber 3 oo mode 20 0 20 Setpoint Axis 3 Setpoint_Axis 3 3 DNT o e 0 Setpoint foraxis3 Setpoint for axis3 07575 axis 3 420 Para_ Para Block 24 Data 2_4 Data STRUCT Setpointaxis4 Setpoint axis4 Bel 0 En word eg W 16 424 Parameter b
82. ransferred to the start information of OB 40 and OB 40 is called The hardware interrupt is acknowledged when OB 40 is exited The following local data are located in the start information of OB 40 OB40 MDL ADDR The base address of the module which trig gered the interrupt OB 40_POINT_ADDR Information on the event which triggered the interrupt Variable OB40_POINT_ADDR consists of four bytes The process interrupt information of the CM35 is entered in the low word local data bytes 10 and 11 of OB 40 For the allocation and description of this interrupt information see the description of the particular operating mode For a description of OB 40 see STEP 7 reference manual 235 4 J31069 D0416 U001 A5 7618 4 17 Data Communication with the CM35 Table 4 10 Hardware interrupts in the various operating modes Local Data of OB 40 Hardware Interrupts The function must have been activated before the interrupts are reported Local data word 6 Address of the module which triggered the hardware interrupt Local data byte 10 Operating Mode Pulse Counter Period Duration Timer for Positioning Measurement Selective Interrupt for Group Interrupt Bit 0 Reserved No hardware inter Timer 1 faulty Reserved rupts are reported in malfunction of a timer Bit this operating mode Timer 2 faulty disregard Bit 2 Timer 3 faulty disregard Bit 3 Timer 4 faulty disregard Bit 4 Timer 5 faulty disregard Bit 5 Timer
83. ration Word consistency has already been set for the CM35 in the type or GSD files in cluded in the configuration package i ID a Word Module Concistency Associated ID 71 T ii x Figure 3 6 Setting of the consistency via COM PROFIBUS For more information see the manual on the distributed I O system ET 200 CM35 Counter Module 4 J31069 D0416 U001 A5 7618 Commissioning 3 4 Reactions during Startup and in Case of Errors Warm restart Hot restart Reaction to failure of the S7 300 Module power supply CM35 Counter Module When a warm restart power on takes place the red group error LED SF on the front of the module stays on until the module is ready for operation i e until it has received valid parameters When the module firmware recognizes the CPU STOP state the parameters stored on the CM35 lose their validity Parameter memory and the input and output area are deleted This is indicated by the group error LED When the CPU assumes the STOP state running operation of the CM35 is terminated The digital outputs are switched off i e reset Although the operating mode is retained the parameters are no longer valid Since the CM35 is completely powered by the backplane bus of the SIMATIC S7 300 it has to be switched on together with the S7 300 CPU or IM module 4 J31069 D0416 U001 A5 7618 3 23 CM35 Counter Module 4 J31069 D0416 U001 A5 7618 Data
84. rk memory e Read write area of the load memory e System memory except for the MPI parameters and the diagnostic buffer Organization blocks are the interface between the CPU s operating system and the user program The organization blocks specify the sequence in which the user program is processed 1 A variable of a STEP 7 code block 2 A variable which specifies the reaction of a module one or more reactions per module Each module comes with a realistic basic setting You can change this basic setting with the STEP 7 tool HW Config There are two kinds of parameters static parameters and dynamic parame ters Parameterization sets the reaction of a module Programmable Logic Controller PROcess Fleld BUS is the German process and fieldbus standard which is specified in the PROFIBUS standard DIN 19245 This standard specifies the functional electrical and physical characteristics for a bit serial fieldbus system Each bus station must have an address which identifies it unambiguously to PROFIBUS PCs PGs or the ET 200 Hardheld have PROFIBUS address 0 The DP master and the DP slaves have a PROFIBUS address from 1 to 125 Glossary 3 Glossary PROFIBUS DP Pulse duration S Signal module Setup centralized Setup distributed SIMATIC Manager STARTUP STEP 7 STOP System function SFC Glossary 4 PROFIBUS DP is the PROFIBUS bus system with the DP protocol DP stands for distributed per
85. rom there without losing an impulse Table 5 1 Counting range Counting Range Lower Counting Upper Counting Counting Limit Limit Frequency Counter status Upper counting limit Lower counting limit gt Figure 5 1 Counting up with counter started CM35 Counter Module 5 2 4 J31069 D0416 U001 A5 7618 Pulse Counter Operating Mode Starting or stopping the counter Counting edge CM35 Counter Module The individual counting channels are started and stopped by the user pro gram After a counting channel is started the encoder pulses are counted After a counting channel is stopped the encoder pulses are no longer ac quired When a counter is started the CM35 turns on the related digital output When the comparison value is reached the digital output is switched off and a hardware interrupt is triggered Comparison value Digital output 0 Counter start Counter stop Figure 5 2 Switching the digital output counting direction up The counting value is changed with every falling edge on the related counter input Counting 0 1 2 3 4 5 6 7 8 8 8 value Encoder pulses k Counter start Counter stop Figure 5 3 Evaluation of the encoder pulses counting direction up 4 J31069 D0416 U001 A5 7618 5 3 Pulse Counter Operating Mode 5 2 Parameterization This chapter discusses possible parameterization in pulse counter operating
86. se SIMATIC S5 or standard DP master distributed Only word accesses to even addresses may be used to read access the de sired value Table 4 9 shows an example of the address allocation for reading the count ing values in pulse counter mode Table 4 9 Address allocation of the counting values for the pulse counter operat ing mode Offset to Meaning Value Range Module Start Address 0 Counting value channel 1 0 to 65535 2 Counting value channel 2 4 Counting value channel 3 6 Counting value channel 4 8 Counting value channel 5 Counting value channel 6 Counting value channel 7 Counting value channel 8 CM35 Counter Module 4 J31069 D0416 U001 A5 7618 4 15 Data Communication with the CM35 Example Pulse counter mode Read counting value of counting channel 4 The CM35 has module start address 256 L PIW 262 Address 256 6 read counting value channel 4 T MW8 Save the counting value CM35 Counter Module 4 16 4 J31069 D0416 U001 A5 7618 Data Communication with the CM35 4 3 5 Evaluating a Hardware Interrupt in OB 40 CM35 Counter Module Depending on the set operating mode and the selected parameterization you can specify that a hardware interrupt is to be triggered when certain events occur In this case a hardware interrupt OB OB 40 must exist on the CPU When a hardware interrupt occurs the user program is interrupted the data of the module are t
87. sferred to the module after a warm restart or hot restart and the BASP OD signal is no lon ger active The CM35 does not support diagnostic alarms and the STEP 7 diagnostic information CM35 Counter Module 4 J31069 D0416 U001 A5 7618 1 7 Product Overview 1 4 Module firmware Software 1 8 Software The firmware of the module offers four different operating modes Pulse counter Continuous counting with maximum counting frequencies of 10 KHz Period duration measurement Measurement of period durations between 1 msec and 2 6 sec with a reso lution of 1 on all 8 channels reference frequencies 100 KHz 50 kHz 25 kHz Timer 8 separate switch on times from 10 msec to 278 min Positioning 4 axes with a max of 23 increments up to a top frequency of 2 kHz The desired operating mode is selected via the configuration user interface Note The following applies when the CM35 is used to acquire frequencies For lower frequencies period duration measurement operating mode is recommended the period duration can be converted to a frequency For higher frequencies pulse counting operating mode is recom mended Depending on use on the SIMATIC S7 or decentralized on the SIMATIC S5 configuration of the module is performed with the SIMATIC Manager or with COM PROFIBUS CM35 Counter Module 4 J31069 D0416 U001 A5 7618 Product Overview 1 5 Technical Data VD CE Minimum puls
88. sign Siemens AG Automation and Drives Motion Control Systems Frauenauracher Strasse 80 D 91056 Erlangen Disclaimer of liability Although we have checked the contents of this manual for agree ment with the hardware and software described full agreement can not be guaranteed The information in this manual is checked at regular intervals and necessary corrections included in the next release Your ideas and suggestions are welcome Siemens AG 1997 2000 Subject to change without prior notice Siemens Aktiengesellschaft Foreword Purpose of this manual Contents of this manual Target readers Area of validity of this manual Hardware and soft ware prerequisites for this manual Additional source of information CM35 Counter Module This manual describes all steps required for the effective use of the CM35 counter module It presents the functionality of the CM35 concisely and log ically while you are familiarizing yourself with the module This manual describes the hardware and software of the CM35 It provides an introduction and can also be used as a reference work This manual has been written for the following circles of readers e Maintenance personnel e Programmers e Commissioning personnel e Service personnel This manual describes the functions of the CM35 counter module as they were at the time this manual was published We reserve the right to modify the functionality of the CM35 These
89. te to set outputs 1 3 and 5 T POW 256 Module start address 256 CM35 Counter Module 6 8 4 J31069 D0416 U001 A5 7618 Period Duration Measurement Operating Mode 6 5 Hardware Interrupt Evaluation Hardware interrupts are not generated in period duration measurement mode CM35 Counter Module 4 J31069 D0416 U001 A5 7618 6 9 Period Duration Measurement Operating Mode 6 6 Reading the Measured Values You can read the current measuring values of the CM35 in period duration measurement mode To ensure data consistency the read access must be performed with one load command L PIW When an overflow occurs the hex value FFFDH 65533 is transferred fre quency below the minimum frequency encoder interrupted and so on Measuring channels which have not yet been started are transferred with the value 0000H regardless of whether or not pulses are present on the input Table 6 8 shows the addresses of the individual channels for reading the mea sured value Table 6 8 Assignment of the output area for reading the measured values Offset to the Meaning Value Range Module Start Address 0 Period duration average value chan 0 to 65532 2 Period duration average value chan 4 Period duration average value chan 6 Period duration average value chan 8 Period duration average value chan Period duration average value chan Period duration average value chan ofl SI any my AJ SINJ e P
90. the PROFIBUS DP network and request data from other stations A master which conforms to part 3 of DIN standard E 19245 is called a DP master A DP slave may exchange data with the DP master via the PROFIBUS DP network only when requested by a DP master A slave which is used on the PROFIBUS bus with the PROFIBUS DP proto col and conforms to part 3 of the DIN standard E 19245 is called a DP slave The DP standard is the bus protocol of the ET 200 distributed I O system based on part 3 of the draft of DIN 19245 Glossary 1 Glossary Data block Default value Distributed I O de vices ET 200 Hardware interrupt Hot restart Glossary 2 Data blocks are data areas in the user program which contain the user data There are two kinds of data blocks global data blocks and instance data blocks Global data blocks can be accessed by all code blocks while instance data blocks are assigned to a certain FB call The default value is a realistic basic setting which is always used when no other value is entered Distributed I O devices are input output devices which are located decen trally at some distance from the CPU and are not installed in the central rack A few examples are listed below e ET 200M ET 200B ET 200C ET 200U e 5 95U with PROFIBUS DP slave interface PROFIBUS DP connects the distributed I O devices with the DP master The ET 200 is based on the PROFIBUS standard part 1 of DIN 19245 and the draft of
91. the new GSD files to the GSD directory and execute the menu com mand File gt Open GSD File Using the GSD files included with the configuration package has a drawback you will not be using the latest GSD file e g you may not be able to find other new modules The type files are only required for older COM PROFIBUS versions lt 3 2 In the future they will be completely replaced by the GSD files The module is configured as distributed I O on the SIMATIC S5 with COM PROFIBUS To add a CM35 to an existing DP master system proceed as shown below 1 Start COM PROFIBUS and open the desired master system 2 Open a DP slave ET 200M with IM 153 1 or set up a new one 3 Place the module in the ET 200M In the configuration table select the desired slot and select the button Order No In the dialog box Select select the order number of the CM35 6AT1 735 0AA01 0AAD and select the Accept button 4 Leave the configuration table open to set the addresses and operating mode which come next You can specify a start address for the input and for the output area This ad dress depends on the operating mode you want to use e Direct process inputs and outputs Addresses in the P or Q area Accesses only permitted via word load and transfer operations e Accesses via FB 192 No address specifications required For a detailed description of FB 192 and its manual see the manual of COM PROFIBUS Address ov
92. the operating mode CM35 Counter Module 4 J31069 D0416 U001 A5 7618 4 3 Data Communication with the CM35 Layout of the The control word is the first word of each parameter block The layout of the control word control word is shown below The bit numbering is specified for the data type word The low byte of word n has the byte address n 1 The high byte of word n has the byte address n Byte n Byte n 1 Start stop byte Coordination byte 15 14 13 12 11 10 9 8 7 65 43 2 1 0 XI XI XIX 0 Operating mode Parameter block number Consistency bit Start stop byte enable Parameter block subnumber X Disregard Table 4 2 shows the permissible allocations of the control word Table 4 2 Allocation of the control word for parameterization Bit Description Allocation Address Identifier 0001 Pulse counter operating mode for the set operating mode 0010 Period duration measurement operating mode 0011 Timer operating mode 0100 Positioning operating mode Number Parameter block 1 of the current parameter block Parameter block 2 Parameter block 3 Consistency bit i Write parameter block Accept parameter block via CM35 Only with parameterization via direct I O accesses Not applicable for parameterization via SFC 55 7 Start stop byte enable 0 Evaluate parameter data IE Evaluate start stop byte
93. tion of the actual value for set actual value is axis specific CM35 Counter Module 4 J31069 D0416 U001 A5 7618 Positioning Operating mode Table 8 2 Setting an actual value Variable Sub Off Data Value Range Set_ActualValue number set Type Set_ActualValue_Axis_1 2 147 483 648 to Setpoint When you specify the setpoint you transfer to the module the increment value at which the axis is to be positioned A hardware interrupt is generated when the axis reaches the setpoint position Setpoints are entered in the parameter blocks in twos complement representa tion as shown below 2 147 483 648 1 0 1 2 147 483 647 8000 0000 FFFF FFFF 0 Re IEFF FFFF Specification of the setpoint is axis specific Variable Parame Sub Off Data Value Range Setpoint ter Block number set Type x A to CM35 Counter Module 4 J31069 D0416 U001 A5 7618 8 9 Positioning Operating mode 8 2 2 Structure of the Parameter Blocks Tables 8 3 nd 8 4 st the data structures of the nine parameter subblocks which were combined into two parameter blocks Each parameter subblock must be transferred separately to the CM35 with an SFC 55 call The first word in the parameter subblocks contains the control word The required assignment is entered as an initial value in the structures Adhere to the information in chapter 4 2 concerning transmission CM35 Counter Module 8 10 4 J31069 D0416 U001 A5 7618
94. tion with the CM35 Order of When the CM35 recognizes that new data have been written in its address evaluation area the DO byte and the coordination byte are evaluated in the following order Evaluate DO byte and es gt conclude proc yte essing Evaluate Change in Start stop start stop byte coordination byte byte enable 1 and conclude processing Evaluate parameter block and conclude processing Consistency bit 1 Yes Y Conclude processing Conclude processing Note Remember that either a change in the DO byte or a change in the coordina tion byte is evaluated CM35 Counter Module 4 22 4 J31069 D0416 U001 A5 7618 Pulse Counter Operating Mode CM35 Counter Module 4 J31069 D0416 U001 A5 7618 Pulse Counter Operating Mode 5 1 Function Description In this operating mode the CM35 counts continuously up or down within the counting range 0 to 65535 when the counter is enabled When the counting value reaches the upper counting limit when counting up and an additional counting pulse occurs the counting value jumps to the lower counting limit and continues to count from there without losing an impulse When the counting value reaches the lower counting limit when counting down and an additional counting pulse occurs the counting value jumps to the upper counting limit and continues to count f
95. um period duration The reference frequency can be adjusted for measurement of longer period durations The following table shows the reference frequencies and the result ing measuring range Table 6 1 Measuring ranges Counting Lower Upper Reference Frequency Measuring Range Range Counting Counting Value Value 16 bits 100 65500 100 kHz 655 msec to 1 msec 1 53 Hz to 1 kHz 50 kHz 1 310 msec to 2 msec 0 76 Hz to 500 Hz 25 kHz 2 620 msec to 4 msec 0 38 Hz to 250 Hz CM35 Counter Module 6 2 4 J31069 D0416 U001 A5 7618 Period Duration Measurement Operating Mode Period number Starting and stop ping measurement CM35 Counter Module To eliminate inaccurate measurements you can also perform the measure ment over several periods of the input signal 1 to 40 An average value can be calculated at the end of the measuring interval Measuring interval 1st meas and meas 3ra meas 1st meas Input signal stat 1 Reference signal Figure 6 1 Principle of period duration measurement over 3 periods of the input signal The user program starts the individual channels After a channel is started the period duration is acquired based on the parameterization The channel must be stopped before a new measurement can be made 4 J31069 D0416 U001 A5 7618 6 3 Period Duration Measurement Operating Mode 6 2 6 4 Parameterization This chapter shows you available par
96. uman health Caution Commissioning is prohibited until it has been determined that the machine in which these components are to be installed meets the regulations of guide line 89 392 EWG 4 J31069 D0416 U001 A5 7618 3 1 Commissioning 3 2 Note The following rules must be adhered to ensure that EU guidelines 89 336 EWG have been met e The setup guidelines and safety notes in the manuals and supplementary documentation must be adhered to for both the programmable controller and the CM35 e To achieve maximum EMC immunity all signal lines to the CM35 must be shielded and applied to a grounded shield retainer rail e On the CM35 the cable shield may not be applied to the sub D plug con nector CM35 Counter Module 4 J31069 D0416 U001 A5 7618 Commissioning 3 1 Installation of the CM35 3 1 1 Mounting the CM35 Preparation Slot Physical setup Installation position CM35 Counter Module Before physical installation is begun the appropriate safety precautions must be taken and the following points complied with or clarified e Was the module still in its original packaging e Check the delivery for transportation damages e Check the delivery for completeness If you discover damages or deficiencies please contact your SIEMENS representative The S7 interface of the CM35 corresponds to the serial I O bus P bus of the SIMATIC S7 300 All slots on the SIMATIC S7 which can
97. uration table select the line with the CM35 and click the button Param N In the dialog box Parameterize select the field under Value in the first line of the table 5 and click the Select button In the next dialog box which appears select the desired operating mode and confirm with OK W Repeat this step in the second line of the table 8 with the same operating mode See figure 3 5 gt Inthe Parameterize dialog box click the OK button and close the configuration table with OK Fi Parameterize ET 2004 1M153 2 3 lt gt im Operating mode Period meas Time generator Positioning Parameter Value 2 Figure 3 5 Setting the operating mode with COM PROFIBUS Note When distributed integration into the SIMATIC S5 is used only the operat ing modes period duration measurement and timer time generator are permitted See chapter 1 2 For additional preparations before operation see the manual of COM PROFI BUS 4 J31069 D0416 U001 A5 7618 3 21 Commissioning Data consistency 3 22 When the distributed integration is used data consistency must be consid ered Data are called consistent when their contents belong together When you access the CM35 with load transfer commands only word ac cesses may be used and only even addresses may be accessed so that consis tency is ensured Data consistency is specified via the COM PROFIBUS configu
98. utio Note Highlights important information about the product its handling or a particular portion of the documentation which requires special attention Only qualified personnel may commission and operate the device For the purpose of the safety notes in this manual qualified personnel are those persons who are authorized to com mission ground and tag devices systems and electrical circuits in accordance with safety Qualified personnel standards Use as intended Adhere to the following Warning ZN The device may only be used for the individual applications included in the catalog and technical description When used with devices and components of other manufacturers these devices and components must be approved or recommended by Siemens Correct and safe operation of the product is dependent on proper transportation storage setup and installation and careful operator control and maintenance Brands SIMATIC is a registered brand of SIEMENS AG The other designations in this publication may be brands whose use by third parties may violate the rights of the owners Copyright Siemens AG 1997 2000 All rights reserved Passing on to third parties reproduction utilization and revelation of this document is not permitted without express permission Violators will be liable for damages All rights are reserved in particular rights created by a patent grant or registration of a utility model or de
99. writing address area data via direct I O accesses Table 4 11 Allocation of the I O address area for writing via direct I O accesses Offset to Output Area 16 Bytes Module Address by Word Do not write access during parameterization Byte 0 DO byte Byte 1 reserved Control digital outputs Always 0 0 off 1 on XXXX XXX Digital output 1 XXXX XX X Digital output 2 XXXX X XX Digital output 3 XXXX XXX Digital output 4 XXX XXXX Digital output 5 XX X XXXX Digital output 6 X XX XXXX Digital output 7 XXX XXXX Digital output 8 Byte 2 start stop byte Byte 3 coordination byte Bit allocation when starting stoppin XXXX Operating mode For SFC55 0 channels axes bit 3 7 1 0001 Pulse counter Operating mode 0010 Period duration Pulse counter period duration measurement timer measurement XXXX XXX Channell Ostop 1 start 0011 Timer XXXX XX X Channel2 0 stop 1 start 0100 Positioning XXXX X XX Channel3 0 stop 1 start XX XXXX 00 Start stop XXXX XXX Channel4 0 stop 1 start channels axes XXX XXXX Channel5 Ostop 1 start 01 Transfer parameter block 1 XX X XXXX Channel6 0 stop 1 start 10 Transfer parameter block 2 X XX XXXX Channel 7 0 stop 1 start 11 Transfer parameter block 3 XXX XXXX Channel 8 0 stop 1 start If the channel was already started the procedure X XX XXXX Consistency bit is continued when another 1 occurs With SIMATIC S7 SFC 55
Download Pdf Manuals
Related Search
Related Contents
actu-stat-janv-2012 Multiplexx 0000-0742 mobile device case Graco PD121385B User's Manual SMA GRID GATE - Installation Manual DICENTIS - Bosch Security Systems AOC L19W851B 19" Black LCD TV Operating Instructions 0.37 kW… 22 kW EGW Copyright © All rights reserved.
Failed to retrieve file