Foreword, Table of Contents User’s Information Product Overview CM35 Function Description Commissioning Counter Module Operating Modes Data Communication with the Manual CM35 This manual describes Pulse Counter Operating Mode the counter module with Period Duration Measurement order no. 6AT1 735-0AA01-0AA0 Operating Mode Timer Operating Mode Positioning Operating Mode...
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.
Foreword Purpose of this This manual describes all steps required for the effective use of the CM35 manual counter module. It presents the functionality of the CM35 concisely and log- ically while you are familiarizing yourself with the module. Contents of this This manual describes the hardware and software of the CM35.
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.
Product Overview Overview Function scope The CM35 is a multi- - channel counter module which can be used to imple- ment various tasks in the following operating modes. Pulse counter Period duration measurement With 8 channels Timer Positioning With 4 axes The selected operating mode applies to all channels of the CM35.
Product Overview Use on Programmable Controllers and Automation Systems Central integration The 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 Sample Configuration Modules Example: CPU 312 IFM...
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.
Product Overview IM 153-2 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.
Product Overview Hardware View of the module with CM35 front door Counter Module Module name closed SF LED Front door Release status Order number xxxxxxx (6AT1 735-0AA01-0AA0) Figure 1-1 View of the front with front door closed View of the module with front door open...
Product Overview Front plug The CM35 is equipped with the following front plug connectors for connec- connector tion of the process I/O. 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.
Product Overview Software Module The firmware of the module offers four different operating modes. firmware 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...
Product Overview Technical Data Digital inputs Type Pulse counter Number System Incremental Limit frequency Max. of 10 kHz 40 msec Minimum pulse duration (for high and low) Signal level 24 Volt signals: ² ² Signal : 15 to 30 Volt ²...
Product Overview Other Input voltage +5 V via P bus Current consumption Typ. 0.150 A UL/CSA/FM MLFB no. CM 35 counter module: 6AT1 735-0AA01-0AA0 or later Configuration package: 6AT1 735-0DA01-0YA0 or later CM35 Counter Module 1-10 (4) J31069-D0416-U001-A5-7618...
Function Description Function Overview Table 2-1 Operating modes Operating Function Limit Control the Hardware Mode Fre- Digital Interrupt quency Outputs Via ... for ... S5 Master Standard Master Pulse Counting up from 10 kHz Operating mode/ Comparison Not possible counter 0 to 65535 with CPU control value...
Function Description 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.
Function Description CM35 Counter Module (4) J31069-D0416-U001-A5-7618...
Commissioning This chapter provides all the information you will need for commissioning, including mounting, connection, configuration and parameterization. General safety Adherence to these safety notes is mandatory. Non- - adherence will void the notes 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.
Commissioning Note The following rules must be adhered to ensure that EU guidelines 89/336/EWG have been met. The setup guidelines and safety notes in the manuals and supplementary documentation must be adhered to for both the programmable controller and the CM35. To achieve maximum EMC immunity, all signal lines to the CM35 must be shielded and applied to a grounded shield retainer rail.
Check the delivery for transportation damages. Check the delivery for completeness. If you discover damages or deficiencies, please contact your SIEMENS representative. Slot The S7 interface of the CM35 corresponds to the serial I/O bus (P bus) of the SIMATIC S7-300.
Commissioning Table 3-1 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 Type of Setup Central Setup Distributed Setup 1-row 2-row Max. of 4-row 1 ·...
Commissioning Table 3-2 Requirements on the CM35 side With Use of Current requirements (5 V) from S7 Backplane Bus m · CM35 m · 150 mA m = Number of CM35 modules CM35 Counter Module (4) J31069-D0416-U001-A5-7618...
Commissioning 3.1.2 Mounting and Demounting the CM35 Rules No special protective measures (ESD guidelines) are required for installation of the CM35. Required tools 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).
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.
Commissioning Wiring the CM35 Digital inputs 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.
Commissioning Shield connecting element Figure 3-2 Shield connecting element CM35 Counter Module (4) J31069-D0416-U001-A5-7618...
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 Table 3-3 Wiring measurement and...
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 ²positioning² operating mode Signal Voltage Axis Track Connection to Pin ... Ground 14 / 21 Ground 3 / 10 Ground...
Commissioning 3.2.2 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 VCC1 Load voltage 24 V VCC1 Load voltage 24 V Digital output 1...
Commissioning 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...
Commissioning 3.3.1 Installation of the Object Manager for STEP 7 Prerequisites To install the object manager (OM), STEP 7 (starting with V3.2) must be installed correctly on your PG/PC. Installing the To install the object manager, proceed as shown below. object manager 1.
Commissioning 3.3.2 Central Integration into the SIMATIC S7-300 Configuration 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.
Commissioning 3.3.3 Distributed Integration into the SIMATIC S7 Configuration 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.
Commissioning 3.3.4 Distributed Integration into the SIMATIC S5 Note This section assumes that you have a knowledge of SIMATIC S5 and COM PROFIBUS. Integration on the The CM35 module can be linked as distributed I/O to the SIMATIC S5 using SIMATIC S5 PROFIBUS- - DP.
Commissioning 22.214.171.124 Configuration COM PROFIBUS 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 ET 200M under its order number 6AT1 735-0AA01-0AA0.
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 the new GSD files to the ²GSD² directory, and execute the menu com- mand ²File > Open GSD File.²...
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.
Commissioning Setting the The operating mode of the CM35 must have already been set during configu- operating mode ration. Proceed as shown below. 1. In the configuration table, select the line with the CM35, and click the button Param..2.
Commissioning Data consistency 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.
Commissioning Reactions during Startup and in Case of Errors Warm restart 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).
Data Communication with the CM35 Overview Address area 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.
Data Communication with the CM35 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 ®...
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²...
Data Communication with the CM35 Table 4-2 Allocation of the control word for parameterization, continued Description Allocation Address 8 to 11 Subnumber for parameter block 0000: Parameter subblock 0 0001: Parameter subblock 1 (axis 1) - - Only for ²positioning² mode 0010: Parameter subblock 2 (axis 2) - - Not applicable to the operating modes...
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 module 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).
Data Communication with the CM35 SFC 55 must continue to be called until 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 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.²...
Data Communication with the CM35 4.2.2 Parameterization via Direct I/O Accesses (Only SIMATIC S5) Parameterization via direct accesses is only permitted in the ²period duration measurement² and ²timer² operating modes. Assignment of the The analog I/O address area contains 8 words. The data must be written with I/O address area word accesses.
Data Communication with the CM35 Table 4-5 Sample allocation for a data block (DB 20) DB Ad- Name Type Initial Commentary dress Value Control_word WORD W#16#13 Parameter block 1/²timer² operating mode Timebase_Timer_1 BYTE B#16#01 Time base for timer 1 Timebase_Timer_2 BYTE B#16#01 Time base for timer 2...
Data Communication with the CM35 Wait time, OB1/ When distributed connection to the SIMATIC S5 is used, a wait time must be OB100 adhered to after an S5 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.
Data Communication with the CM35 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 S5, direct I/O accesses are al- ways used.
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 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.²...
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 W#16#0181...
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 Operating Mode Data Data Type Pulse counter Current counting value Word Period duration measurement Measured period duration Word Timer...
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 MW 8 // Save the counting value CM35 Counter Module...
Data Communication with the CM35 4.3.5 Evaluating a Hardware Interrupt in OB 40 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 transferred to the start information of OB 40, and OB 40 is called.
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...
Data Communication with the CM35 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 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...
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 Pulse counter: Parameter blocks 1 to 3 (With SFC55: Period duration measurement: Parameter block 1 2 to 12)
Data Communication with the CM35 Table 4-12 Allocation of the I/O address area when reading via direct I/O accesses Offset to the Input Area (16 Bytes) M d l Module Operating Mode Address Address (by Word) Pulse Counter Period Duration Timer Positioning Measurement...
Data Communication 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. Start Evaluate DO byte and Change in conclude proc- DO byte?
Pulse Counter Operating Mode 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.
Pulse Counter Operating Mode Starting The individual counting channels are started and stopped by the user pro- or stopping the gram. After a counting channel is started, the encoder pulses are counted. counter After a counting channel is stopped, the encoder pulses are no longer ac- quired.
Pulse Counter Operating Mode Parameterization This chapter discusses possible parameterization in ²pulse counter² operating 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.
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.²...
Pulse Counter Operating Mode Counting value 65,535 Upper counting limit Parameterized Parameterized 30,000 comparison value start value Start Stop Start Stop a) Counting up b) Counting down 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.
Pulse Counter Operating Mode Switching reaction You can choose between automatic operation 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.
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.
Pulse Counter Operating Mode Scanning rate 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.
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.
Pulse Counter Operating Mode Parameter block 2 contains: The comparison or start values for channels 7 and 8 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 The scanning rate factors for channels 1 to 6...
Pulse Counter Operating Mode Parameter block 3 contains: The scanning rate factors for channels 7 and 8 Table 5-11 Parameter block 3 Address Name Type Initial Value Commentary Para_Block_3_Data STRUCT +0.0 Control_word WORD W#16#31 Parameter block no. 3/ counter mode +2.0 ScanRate_F_Chan_7 BYTE...
Pulse Counter Operating Mode 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.
Pulse Counter Operating Mode 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: Note: A parameterization bit can be used to specify whether the DO byte is to control the enable or whether the enable is continuous.
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 Address Name Type Initial Value Commentary DO_Block STRUCT DO mode ² ² ² ² CPU control² ² ² ² : +0.0 Digital_Output_Chan_1 BOOL...
Pulse Counter Operating Mode 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 information of OB 40 contains the following information. - - The variable OB40_MDL_ADDR contains the base address of the module which triggered the interrupt.
Pulse Counter Operating Mode 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.
Period Duration Measurement Operating Mode 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.
Period Duration Measurement Operating Mode Period number 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.
Period Duration Measurement Operating Mode Parameterization This chapter shows you available parameterizations 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.
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 Variable:...
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.
Period Duration Measurement Operating Mode 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.
Period Duration Measurement Operating Mode 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...
Period Duration Measurement Operating Mode 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).
Timer Operating Mode Function Description Timer mode can be used to implement precisely defined switch- - on times for the 8 digital outputs of the counter module. Switch- -on times Times from 10 milliseconds to 278 minutes can be specified seperately for the switch- - on times.
Timer Operating Mode Parameterization 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. The descriptions of the individual parameter data include the number of the parameter block and the offset in the related structure.
Timer Operating Mode 7.2.1 Description of the Parameter Data Time base/ When you specify time base and factor, you determine how long a timer is factor switched on. The length of time the timer is switched on is the product of time base and factor.
Timer Operating Mode The factor can be specified for a specific timer. Table 7-3 Setting of the timer factor Variable: Parameter Offset Data Type Value Range Factor Block Factor_Timer_1 10.0 Word 1 to 65565 Factor_Timer_2 12.0 Word Factor_Timer_3 Word Factor_Timer_4 Word Factor_Timer_5 Word...
Timer Operating Mode 7.2.2 Structure of the Parameter Blocks Tables 7-5, 7-7 and 7-9 show the data structures of the three parameter blocks and how they must be transferred to the CM35 with SFC 55 calls or I/O di- rect accesses. The first word of the parameter blocks contains the control word.
Timer Operating Mode Parameter block 2 contains: - - The factor for timers 3 to 8 Table 7-7 Parameter block 2, data structure Address Name Type Initial Value Commentary Para_Block_2_Data STRUCT +0.0 Control_word WORD W#16#23 Parameter block no. 2 / timer mode +2.0 Factor_Timer_3...
Timer Operating Mode Parameter block 3 contains: - - The settings for interrupt generation Table 7-9 Parameter block 3, data structure Address Name Type Initial Value Commentary Para_Block_3_Data STRUCT +0.0 Control_word WORD W#16#33 Parameter block no. 3 / timer mode +2.0 Interrupt_Generation BYTE...
Timer Operating Mode Starting and Stopping the Timers After parameterizing the module, you can start and stop the individual timers of the 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.
Timer Operating Mode 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.
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.
Timer Operating Mode Hardware Interrupt Evaluation When in timer mode, the CM35 can trigger a hardware interrupt for the following events. - - Timer expired - - Timer failure The 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- lated input.
Timer Operating Mode Table 7-13 Allocation of the hardware interrupt information (OB 40/local data bytes 10 and 11) Local Meaning Value Range Byte Group Interrupt Selective Interrupt Failure of a timer Timer 1 failed Timer 2 failed Timer 3 failed Timer 4 failed Disregard Timer 5 failed...
Timer Operating Mode 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 Assignment of the output area for reading the status Offset to the...
Positioning Operating mode Function Description 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.
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...
Positioning Operating mode 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.
Positioning Operating mode Edge evaluation You can parameterize whether the encoder pulses are to be evaluated once, twice or four times. Track A All falling edges of track A Figure 8-3 Single evaluation of the encoder pulses Track A All edges of track A Figure 8-4 Double evaluation of the encoder pulses Track A...
Positioning Operating mode Encoder frequencies The permissible 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...
Positioning Operating mode Parameterization 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.
Positioning Operating mode 8.2.1 Description of the Parameter Data Edge evaluation When you make specifications for the edge evaluation, you determine and direction of whether only the edges of encoder track A are evaluated or the edges of both rotation encoder tracks.
Positioning Operating mode Table 8-2 Setting an actual value Variable: Para- Sub- Off- Data Value Range Set_ActualValue meter number Type Block Set_ActualValue_Axis_1 1 DWord - - 2,147,483,648 Set_ActualValue_Axis_2 1 12.0 DWord + 2,147,483,647 + 2,147,483,647 Set_ActualValue_Axis_3 1 18.0 DWord Set_ActualValue_Axis_4 1 24.0 DWord Setpoint...
Positioning Operating mode 8.2.2 Structure of the Parameter Blocks Tables 8-3 and 8-4 list 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.
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 Address Name Type Initial Value Commentary Para_Block_1_0_Data STRUCT Selection of the edge evaluation +0.0...
Positioning Operating mode Table 8-3 Parameter block 1 Address Name Type Initial Value Commentary +42.0 Para_Block_1_3_Data STRUCT Set actual value for axis 3 +0.0 Control_word WORD W#16#314 Parameter block no. 1; subnumber 3/ positioning mode +2.0 Set_ActualValue_Axis_3 DINT Set actual value for axis 3 +6.0 Res_6 ARRAY [0..7]...
Positioning Operating mode Parameter block 2 contains: - - The setpoints of axes 1 to 4 Table 8-4 Parameter block 2 Address Name Type Initial Value Commentary Para_Block_2_1_Data STRUCT Setpoint, axis 1 +0.0 Control_word WORD W#16#124 Parameter block no. 2; subnumber 1/ positioning mode +2.0 Setpoint_Axis_1...
Positioning Operating mode Starting and Stopping the Axes The following conditions must be met before an axis is started for the first time. The module is parameterized (SF LED is off). The actual value for the axis to be started has been set. A setpoint was written for the axis to be started.
Positioning Operating mode Example: The CM35 has the module start address 256. W#16#4184 // Start axes 1 and 4 PQW 258 // Module start address + 2 W#16#8184 // Stop axis 4 Axis 1 is not affected. PQW 258 // Module start address + 2 The axis stops when both bits are set to ²1²...
Positioning Operating mode 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.
Positioning Operating mode Note When controlling the digital outputs, the user program must ensure that ac- tive 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.
Positioning Operating mode 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.
Positioning Operating mode 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.
Literature Supplementary Below is a list of all manuals referred to in this manual. literature /70/ Manual: S7-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...
Literature CM35 Counter Module (4) J31069-D0416-U001-A5-7618...
Glossary Automation An automation system is a programmable logic controller in a SIMATIC S7 system system. Configuring 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).
Glossary Data block 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.
Glossary Incremental Incremental encoders count small increments to acquire paths, positions, encoder speeds, revolutions, and dimensions, among others. Memory reset A memory reset deletes the following memory of the CPU. Work memory Read/write area of the load memory System memory except for the MPI parameters and the diagnostic buffer Organization block Organization blocks are the interface between the CPU’s operating system (OB)
Glossary PROFIBUS-DP PROFIBUS- - DP is the PROFIBUS bus system with the DP protocol. DP stands for distributed periphery. 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.
Glossary System error 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. User The user program contains all instructions and declarations, and data for program signal processing via which a system or a process can be controlled.
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. Title of your manual:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Order number of your manual:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Please enter your personal evaluation from 1 (good) to 5 (poor).
Siemens AG Automation and Drives Motion Control Systems Frauenauracher Straße 80 Siemens AG, 2000 D-91056 Erlangen Subject to change without prior notice Siemens Aktiengesellschaft Bestell-Nr.: J31069-D0416-U001-A5-7618 Printed in the Federal Republic of Germany...