Home

M340 EHC 0200 Manual..

image

Contents

1. Standard Symbol Type Bit Meaning Access CAPT_0_VALUE_S DINT Value captured in read register 0 CAPT_1_VALUE_S DINT Value captured in read register 1 COUNTER_CURRENT_VALUE_US UDINT Current counter value read during event CAPT_0_VALUE_US 2 UDINT Value captured in read register 0 CAPT_1_VALUE_US UDINT Value captured in read register 1 OUTPUT_O EBOOL forces OUTPUT_0 to read write level 1 OUTPUT_1 EBOOL forces OUTPUT_1 to read write level 1 OUTPUT_BLOCK_0_ENABLE EBOOL implementation of read write output O function block OUTPUT_BLOCK_1_ENABLE EBOOL implementation of read write output 1 function block FORCE_SYNC EBOOL counting function read write synchronization and start FORCE_REF EBOOL set to preset counter read write value FORCE_ENABLE EBOOL implementation of read write counter FORCE_RESET EBOOL reset counter read write SYNC_RESET EBOOL reset read write SYNC_REF_FLAG MODULO_RESET EBOOL reset MODULO_FLAG read write 35013355 07 2012 191 output frequency unit 5 Standard Symbol Type Bit Meaning Access FUNCTIONS_ENABLING INT VALID_SYNC BOOL 0 synchronization and read write start authorization for the counting function via the IN_SYNC input VALID_REF BOOL 1 operation authorization read write for the internal preset function VALID_ENABLE
2. ls a Pin description Pin number Symbol Description 1 24V_IN 24 VDC input for input supply 2 GND_IN 0 VDC input for input supply 5 Qo 1 QO output for counting channel 1 6 Qo 0 QO output for counting channel 0 7 Q1 1 Q1 output for counting channel 1 8 Q1 0 Q1 output for counting channel 0 9 24V_OUT 24 VDC input for output supply 10 GND_OUT 0 VDC input for output supply 224 35013355 07 2012 Starting the Application Inputs Wiring The encoder and the sensor are connected as follows BMX EHC 0200 Encoder Sensor OOOO aonana ODODO ouomnaaaonau EEE ITI IC aunan nanona ajoaoaonnaonna u bn The assignment of the 16 pins connector is as follows Encoder Sensor 35013355 07 2012 225 Starting the Application Description Pin number Symbol Description 1 2 7 8 24V_SEN 24 VDC output for sensor supply 5 6 13 14 GND_SEN 0 VDC output for sensor supply 15 16 FE Functionnal ground 3 IN_A Input A 4 IN_SYNC Synchronization input 9 IN_B Input B 10 IN_EN Enable input selected 11 IN_REF Homing input 12 IN_CAP Capture input Application Execution The table below shows the procedure for launching the application in standard mode Step Action 1 In the PLC menu click on Standard Mode 2 In the Build menu
3. 35013355 07 2012 51 BMX EHC 0200 Functionalities Update When the compare enable bit sOQWr m c 0 5 is setto 0 the comparison status register is deleted The comparison with capture 0 and capture 1 registers values is performed every time the registers are loaded The comparison with the counter current value is performed as follows Counting mode Registers updating Frequency Intervals of 10 ms Period measuring At the end of the period Ratio Intervals of 10 ms Event counting Period intervals defined by the user One shot counter Intervals of 1 ms Counter reloading Counter stops Threshold crossing Modulo loop Intervals of 1 ms Counter reloading or resetting to 0 Counter stops Threshold crossing Free large counter Intervals of 1 ms Counter reloading Threshold crossing Pulse width modulation Function not available in this mode 52 35013355 07 2012 BMX EHC 0200 Functionalities Modification of the Thresholds during the Operational Phase When the compare enable bit sQWr m c 0 5 is setto 0 the comparison status register is deleted When the compare_suspend bit sOQWr m c 0 6 is set to 1 the value of the comparison status register is frozen until the bit switches back to 0 The application may change threshold values without causing any disturbance when the compare suspend bit
4. Counter Status Bits in Pulse Width Modulation Mode The table below shows the composition of the counters sIWr m c 0 status word in pulse width modulation mode Bit Label Description SIWr m c 0 3 VALIDITY Validity bit is used to indicate that the output data frequency and duty cycle unter current value and compare status registers contain valid data If the bit is set to 1 the data is valid If the bit is set to 0 the data is not valid 98 35013355 07 2012 BMX EHC 0200 Functionalities Type of the IODDT Operating Limits Bit Label Description SIWr m c 0 4 HIGH_LIMIT The output frequency or the duty cycle is out of range high limit SIWr m c 0 5 LOW_LIMIT The output frequency or the duty cycle is out of range low limit In this mode the type of the IODDT must be T UNSIGNED_CPT_BMX The maximum output frequency is 4 kHz The maximum frequency that can be applied to the IN_SYNC input is 1 pulse every 5 ms The QO driver is source type therefore a load resistance is required to switch the output signal QO to 0 V using the correct frequency We recommend a load resistance of 250 Q The allowed duty cycle varies according to the frequency of the QO output The table below shows duty cycle values according to the selected frequency These values must be observed for normal operation Frequency Dut
5. Label Language object Type Period value IDr m c 2 Digital Period valid IWr m c 0 3 Binary Period low SIWr m c 1 0 Binary Period in window SIWr s del Binary Period high SIWr e122 Binary Period in low limit SIWr C025 Binary Period in high limit SIWr c 0 4 Binary Input A state Ir m c 4 Binary Input SYNC state SIr m c 6 Binary SYNC enable SQWr m c 0 0 Binary SYNC force SQr m c 4 Binary SYNC state SIWr m c 0 2 Binary SYNC reset SQr m c 8 Binary Output 0 state SIr m c 0 Binary Output 0 cmd SQr m c 0 Binary Output 1 state Ir m c 1 Binary Output 1 cmd SQr m c 1 Binary Output latch 0 state Ir m c 2 Binary Output latch 0 enable Qr m c 2 Binary Output latch 1 state SIr m c 3 Binary Output latch 1 enable SQr m c 3 Binary Low threshold value SQDr m c 2 Digital High threshold value SQDr m c 4 Digital Compare enable SQWr m c 0 5 Binary Compare suspend SQWr m c 0 6 Binary For a description of each language object refer to T_ UNSIGNED_CPT_BMX IODDT see page 180 35013355 07 2012 153 Debugging the Counting Modules Ratio Mode Debugging At a Glance The table below presents the ratio mode debugging elements Label Language object Type Ratio value SIDr m c 2 Digital Ratio valid SIWr m c 0 3 Binary Ratio low IWr m c 1 0 Binary Ratio in window SIWr rome eee Binary Ratio high SIWr vlz Binary Ratio in low limit SIWr 6
6. NOTE Click on in front of the derived variable Encoder to expand the I O objects list 35013355 07 2012 211 Application using Unity Pro Creating the Program for Managing the Counter Module At a Glance Two sections are declared in the MAST task e The Labelling Program section See Creating the Labelling Program in ST page 214 written in ST initiates and uses the Modulo Loop Counter Mode functions and I O objects e The Application section See Creating a Program in LD for Application Execution page 217 written in LD executes the counting start up and the operator screen animation Process Chart The following screen shows the process chart Function Enabling Threshold definitions Deflection Alarm ON Deflection Alarm OFF 212 35013355 07 2012 Application using Unity Pro Description of the Labelling Program Section The following table describes the different steps of the process chart Step Description Functions enabling Enables the Modulo Mode functions used in the application Threshold definitions The values of the thresholds on which depend the reflex outputs are defined in this step Process deflection Test if the capture value is greater than the deflection parameter Deflection Alarm ON If the result of the process deflection test is true the alarm is ON Deflection Alarm OFF If the result of the process deflecti
7. Example of Counting Module Implementation 198 35013355 07 2012 Description of the Application 14 Overview of the Application At a Glance The application described in this document is used for sticking labels on boxes The boxes are carried on a conveyor A label is stuck onto the box when the latter passes by the two dedicated points A sensor placed below the conveyor detects any new incoming box The boxes should arrive at constant intervals The conveyor motor is fitted with an encoder connected to a counting input module Any process deflection is monitored and displayed The application s control resources are based on an operator screen displaying all box positions the number of labeled boxes and the deflection monitoring 35013355 07 2012 199 Description of the application Illustration This is the application s final operator screen Sensor Start Stop 1stLabelling 2nd Labelling Point Point ayo M soii Pirro PaO o a u Deflection monitoring Box delay time a Process deflection i Box on time Operating Mode The operating mode is as follows A Start button is used to start the labelling process A Stop button interrupts the labelling process When the box arrives at the right time the Box on time indicator lights on In case of process deflection the box delay time is displayed If this time has been too lon
8. Polarity 0 SKWr m c 21 1 Polarity bit set to 0 Polarity bit set to 1 Polarity 1 SKWr m c 21 2 Polarity bit set to 0 Polarity bit set to 1 Fault recovery SKWr m c 21 0 Automatic reaction bit set to 1 Activated bit set to 0 Fallback 0 SKWr m c 21 3 None bit set to 0 With bit set to 1 Fallback 1 SKWr m c 21 4 None bit set to 0 With bit set to 1 Fallback value 0 SKWr m c 21 5 0 bit set to 0 1 bit set to 1 Fallback value 1 oe Wr m c 21 6 0 bit set to 0 1 bit set to 1 Output power supply fault ole z 3 a N WO General input output fault bit set to 0 Offline bit set to 1 128 35013355 07 2012 Configuration of the Counting Modules Label Address in the Configurable values configuration Pulse width O skWr m c 18 Edit value in the range 1 65535 Pulse width 1 sKkWr m c 20 Edit value in the range 1 65535 Event SkWr m c 0 Activated if activated is selected the entered Event number event number is coded on the most significant byte of this word Deactivated all bits of the most significant byte of this word are set to 1 35013355 07 2012 129 Configuration of the Counting Modules Modulo Loop Counter Mode Configuration At a Glance The configuration of a counting module is stored in the configuration constants SKW The parameters r m and c shown in the following t
9. Variables Used for the Application The following table shows the details of the variables used in the application Variable Type Definition Run EBOOL Startup request for the labelling process Stop EBOOL Stop the labelling process Last_Box_late BOOL The process is in deflection Nb_Box DINT Number of labelled boxes Position_0 BOOL Box at the beginning of the conveyor Position_1 BOOL Box with the first label Position_2 BOOL Box with the two labels First_Labelling_Point DINT Lower Threshold value Second_Labelling_Point DINT Upper Threshold value Deflection_Parameter DINT Deflection alarm triggering value Waiting_First_Part BOOL The first box is waited Waiting_Other_Parts BOOL The first box has already passed 210 35013355 07 2012 Application using Unity Pro The following screen shows the application variables created using the data editor Data Editor IC Variables JDT types _ Function blocks eS ilter Y Name V EDT DDT V IODDT Name Type w Addre Value Comment aa Deiecion p_Parameter DINT H Encoder T_UNSIG First_Labeling_Point DINT rs Last_Box_Late BOOL t p Nb_Box DINT 0 1 Position_0 BOOL b lt Position BOOL j Position 2 BOOL Run REAL 4 Second_Labelling_Point DINT 30 j Wainting_First_Part BOOL j Wainling_Other_Parts BOOL tone
10. 2 0 Display of BMX EHC xxxx Counting Module Error Fault Display Screen for BMX EHC 0200 Counting Modules Faults Diagnostics Display 0 00 0 cece ee ee LISt Of Errol eua dase wi eee pk a ee ey A ee ee A The Language Objects of the Counting Function The Language Objects and IODDT of the Counting Function Introducing Language Objects for Application Specific Counting Implicit Exchange Language Objects Associated with the Application Specific Function 00 00 ccc eects Explicit Exchange Language Objects Associated with the Application Specific FUNCHON saisis es hy ey cde SE Management of Exchanges and Reports with Explicit Objects Language Objects and IODDT Associated with the Counting Function of the BMX EHC xxxx Modules 0000 cece eee eee eee Details of Implicit Exchange Objects for the T_Unsigned_CPT_BMX and T_Signed_CPT_BMX types IODDTs 0 000 e eee eee Details of the Explicit Exchange Objects for the T_CPT_BMX type IODDT Device DDTs Associated with the Counting Function of the BMX EHC xxxx Modules 000 c cece eee eee eee Counter Device DDT Names 00000 e eee eee eee eee The IODDT Type T_GEN_MOD Applicable to All Modules Details of the Language Objects of the IODDT of Type T GEN_MOD 172 173 175 179 180 185 187 187 195 195 35013355 07 2012 Part V Chapter 14 Chapter 15 15 1
11. 0 none e 1 low 2 medium 3 high Input power supply fault SKkWr m c 2 8 General input output fault bit set to 0 Local bit set to 1 Input mode SKWr m c 9 This word can take the following values 0 A High B Low 1 A Pulse B Direction 2 normal quadrature 1 3 normal quadrature 2 4 normal quadrature 4 5 inverse quadrature 1 6 inverse quadrature 2 7 inverse quadrature 4 Scale factor SKWr m c 6 least significant byte Edit value in the range 1 255 Preset mode SKWr m c 10 least significant byte The least significant byte can take the following values e 0 rising edge at IN SYNC e 1 rising edge at IN_REF 2 rising edge at IN_SYNC and IN_REF e 3 first rising edge at IN SYNC and IN_REF at 1 e 4 first rising edge at IN_SYNC and IN_REF at 0 Capture 0 settings SKWr m c 16 1 Preset condition bit set to 0 Falling edge at the IN_CAP input bit set to 1 134 35013355 07 2012 Configuration of the Counting Modules Label Address in the configuration Configurable values Output block 0 SKWr m c 17 This word can take the following values e 0 off 1 low counter 2 counter in a window 3 High counter 4 pulse less than the lower threshold LT 5 pulse greater than the lower threshold LT e 6 pulse less than the upper threshold UT e 7 pulse greater than
12. At a Glance This section presents the configuration screen for BMX EHC 0200 counting modules Illustration The figure below presents the configuration screen for the BMX EHC 0200 module in modulo loop counter mode 1 2 3 4 5 2 channel generic counter Version 1 00 e Run Err 10 F BMX EHC 020 H Config By Adjust H tebug Faut Counter 0 oL Counter 1 Modulo L ia Symb Value Unit 0 Inul A Filler Wilhoul X 1 Imut B Filter Without S 2 Inout Syne Filter Without 7 3 Inout EN Filter Without X 4 Inout Supply Fault KWO 3028 General IO Fault X 5 Output Supply Fault _ KW0 3 0 2 9 General IO Fault x 6 Counting Interface KWO 30 9 A Up B Down z 7 Scaling Factor YKWO 3 0 8 8 Synchro Edge Rising edge on SYNC 9 CutputBlock 0 KWO30 1 Off z 10 OJiputBlock 1 KWO 3 0 19 Off ms 411 Pulsewidth 0 KWO 3 0 18 110 ms 12 Pulsewidth KWO3 0 20 10 13 Polarity 0 KWO 3 0 21 1 Polarity Bal 14 Polarity 1 KWO 3 0 21 2 Polarity Mi 15 Fault Recovery KWO 3 0 21 0 Laiched off xf 16 Fallback 0 AKW 30213 Without gt 471 Fallback 1 KWO30214 Without gt 18 Falback ValueO KW030215 gt 19 Fallback Value 1 WKWO 30216 gt 20 Event Enable 21 Event Number 1 H Function Modulo Loop a Task ST E W module4 E 0 3 BMXE NOTE When adding a BMX EHC 0200 in a local rack the defaut function is Frequ
13. Configuration of the Counting Modules Ratio Mode Configuration At a Glance The configuration of a counting module is stored in the configuration constants SKWw The parameters r m and c shown in the following tables represent the topologic addressing of the module Each parameter had the following signification e r represents the rack number e m represents the position of the module on the rack e c represents the channel number Configuration Objects The table below presents ratio mode configurable elements Label Address in the configuration Configurable values Counting mode SKWr m c 2 least significant byte The least significant byte of this word can take the following values in this mode e 4 ratio 1 mode e 5 ratio 2 mode IN_A input filter SKWr m c 3 least significant byte The least significant byte can take the following values e 0 none e 1 low 2 medium 3 high IN_B input filter SKWr m c 3 most significant byte The most significant byte can take the following values 0 none e 1 low 2 medium 3 high Input power supply fault SKWr m c 2 8 General input output fault bit set to 0 Local bit set to 1 Scale factor SKWr m c 6 least significant byte Edit value in the range 1 255 Absolute limit SKDr m c 12 Edit 35013355 07 2012 125 Configuration of the Coun
14. This section contains the following topics Topic Page Frequency Mode Debugging 151 Event Counting Mode Debugging 152 Period Measuring Mode Debugging 153 Ratio Mode Debugging 154 One Shot Counter Mode Debugging 155 Modulo Loop Counter Mode Debugging 156 Free Large Counter Mode Debugging 158 Pulse Width Modulation Mode Debugging 160 150 35013355 07 2012 Debugging the Counting Modules Frequency Mode Debugging At a Glance The table below presents the frequency mode debugging elements Label Language object Type Frequency value S IDr m c 2 Digital Frequency valid SIWr m c 0 3 Binary Frequency low SIWr m c 1 0 Binary Frequency in window S IWr m c 1 1 Binary Frequency high SIWr m c 1 2 Binary Frequency in high limit S IWr m c 0 4 Binary Input A state Ir m c 4 Binary Output 0 state Ir m c 0 Binary Output 0 cmd SQr m c 0 Binary Output 1 state SIr m c 1 Binary Output 1 cmd Qr m c 1 Binary Output latch 0 state Ir m c 2 Binary Output latch 0 enable SQr m c 2 Binary Output latch 1 state SIr m c 3 Binary Output latch 1 enable SQr m c 3 Binary Low threshold value SQDr m c 2 Digital High threshold value SQDr m c 4 Digital Compare enable SQWr m c 0 5 Binary Compare suspend SQWr m c 0 6 Binary For a description of each language object refer to T_ UNSIGNED_CPT_BMX IODDT see page 180 35013355 07 2012 151
15. v v Creation of DFBs in Derived FB Types Creation of Section in Programs Tasks MAST v v Creation of Section in Programs Events V O Events v v Creation of an animation table in Animation tables v v Creation of an operator screen in Operator screens v v Generation of project connection to API and switch to RUN mode 204 35013355 07 2012 Application using Unity Pro 15 2 Developing the Application Subject of this Section This section gives a step by step description of how to create the application using Unity Pro What Is in This Section This section contains the following topics Topic Page Creating the Project 206 Configuration of the Counting Module 207 Declaration of Variables 210 Creating the Program for Managing the Counter Module 212 Creating the Labelling Program in ST 214 Creating the I O Event Section in ST 216 Creating a Program in LD for Application Execution 217 Creating an Animation Table 219 Creating the Operator Screen 221 35013355 07 2012 205 Application using Unity Pro Creating the Project At a Glance Developing an application using Unity Pro involves creating a project associated with a PLC Procedure for Creating a Project The table below shows the procedure for creating the project using Unity Pro Step Action 1 Launch the Unity P
16. 15 2 Chapter 16 Quick Start Example of Counting Module Implementation 00020 e eee eee 197 Description of the Application 000 eeeee 199 Overview of the Application 0 00 c eee eee eee 199 Installing the Application Using Unity Pro 201 Presentation of the Solution Used 00 0 0 cee eee ee 202 Technological Choices Used 0000 e cece e eee 203 Process Using Unity Pro 1 2 fe eee ee 204 Developing the Application 0 0 0 0 eee ee 205 Creating the Project 0 0 e cece eee eee 206 Configuration of the Counting Module 0 0 0c eee ae 207 Declaration of Variables 0 uaau 210 Creating the Program for Managing the Counter Module 212 Creating the Labelling Program in ST anaana eee ee eee 214 Creating the I O Event Section in ST 00 000 e eee 216 Creating a Program in LD for Application Execution 217 Creating an Animation Table 0 000 cee eee eee eens 219 Creating the Operator Screen 1 0 0 eee 221 Starting the Application 00 eee eee eee 223 Execution of Application in Standard Mode 2 00 223 Sabi wea E Gos Seon een Bata at ee wena Rate ea ee aaa eee 227 35013355 07 2012 Safety Information A Important Information NOTICE Read these instructions carefully and look at the equipment to become familiar with the device bef
17. BMX EHC 0200 Functionalities Comparison At a Glance The comparison block operates automatically This block is available in certain counting modes Frequency Period measuring Ratio One shot counter Modulo loop counter Free large counter Comparison Thresholds The comparison block has two thresholds e The upper threshold upper th value double word sQDr m c 4 e The lower threshold lower _th_ value double word sQDr m c 2 The upper threshold value must be greater than the lower threshold value If the upper threshold is less than or equal to the lower threshold the lower threshold does not change but it is ignored This rule takes into account the format of the counter value Comparison Status Register The result of the comparison is stored in the compare status register SIWr m c 1 The values of the two capture registers and the current value of the counter are compared with the thresholds The possible results are e Low The value is less than the lower threshold value e Window The value is between the upper and lower thresholds or equal to one of the two thresholds e High The value is greater than the upper threshold The compare _enableregister IWr m c 1 consists of Status 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 register bit Compared Capture 1 Capture 0 Counter element Comparison result High Window Low High Window Low High Window Low
18. Polarity bit set to 1 Polarity 1 Polarity bit set to 0 Polarity bit set to 1 Fault recovery SKWr m c 2 Automatic reaction bit set to 1 Activated bit set to 0 Fallback 0 SkWr m c 2 None bit set to 0 With bit set to 1 Fallback 1 SkWr m c 2 None bit set to 0 With bit set to 1 Fallback value 0 SKWr m c 2 0 bit set to 0 1 bit set to 1 Fallback value 1 SKWr m c 2 0 bit set to 0 1 bit set to 1 Event number Output power supply SKWr m c 2 9 General input output fault bit set to 0 fault Offline bit set to 1 Pulse width 0 KWr m c 18 Edit value in the range 1 65535 Pulse width 1 KWr m c 20 Edit value in the range 1 65535 Event sKWr m c 0 Activated if activated is selected the entered event number is coded on the most significant byte of this word Deactivated all bits of the most significant byte of this word are set to 1 132 35013355 07 2012 Configuration of the Counting Modules Free Large Counter Mode Configuration At a Glance The configuration of a counting module is stored in the configuration constants SKWw The parameters r m and c shown in the following tables represent the topologic addressing of the module Each parameter had the following signification e r represents the rack number e m represents the position of the module on the rack e c represents the channel number Configurat
19. The bit is set to 1 when the counter rollovers the modulo and is The bit is reset to 0 when the command MODULO_RESET Qr m c 9 is received rising edge of the MODULO_RESET bit SIWr m c 0 2 SYNC_REF_FLAG The bit is set to 1 when the counter have been set to 0 and re started The bit is reset to 0 when the command SYNC_RESET Qr m c 8 is received rising edge of the SYNC_RESET bit SIWr m c 0 3 VALIDITY Validity bit is used to indicate that the counter current value and compare status registers contain valid data If the bit is set to 1 the data is valid If the bit is set to 0 the data is not valid Type of the IODDT In this mode the type of the IODDT must be T UNSIGNED_CPT_BMxX Operating Limits The maximum frequency that can be applied to the IN_SYNC input is 1 pulse every 5 ms The maximum frequency for the modulo event is once every 5 ms The maximum value for the defined modulo value and the counter is 4 294 967 295 NOTE You have to check the validity bit sIWr m c 0 3 before taking into account the numerical values such as the counter and the capture registers Only the validity bit at the high level set to 1 guarantees that the mode will operate correctly within the limits 90 35013355 07 2012 BMX EHC 0200 Functionalities BMX EHC 0200 Module Operation in Free Large Counter Mode At a Glance Basic Principle The use of the free large counter mod
20. click on Rebuild All Project Your project is generated and is ready to be transferred to the PLC When you generate the project you will see a results window If there is an error in the program Unity Pro indicates its location if you click on the highlighted sequence In the PLC menu click on Connection You are now connected to the PLC In the PLC menu click on Transfer project to PLC The Transfer project to PLC window opens Click on Transfer The application is transferred to the PLC 5 In the PLC click on Execute The Execute window opens Click on OK The application is now being executed in RUN mode on the PLC 226 35013355 07 2012 Index BMXEHC0200 78 C channel data structure for all modules T_GEN_MOD 195 195 channel data structure for counting modules T_SIGNED_CPT_BMX 180 185 T_UNSIGNED_CPT_BMX 180 185 configuring 111 Counting Events 70 D debugging 147 diagnosing 58 E event counting 76 F filtering 50 free large counter 91 frequency mode 74 functions 48 input interface blocks 49 installing 25 101 M M340 hardened 19 ruggedized 19 modulo loop counter 87 O one shot counter 84 P parameter settings 169 period measuring 78 pulse width modulation 98 Q quick start 197 R ratio 81 35013355 07 2012 227 Index S settings 139 4 GEN_MOD 195 195 M_CPT_STD_IN_2 187 T_M_CPT_STD_IN_8
21. have access to the I O derived variable Encoder 35013355 07 2012 215 Application using Unity Pro Creating the I O Event Section in ST At a Glance This section is called when the modulo value is reached Illustration of the Event Section The section below is part of the Event task Number of labelled boxes is incremented at the Modulo Event INC Nb_ Box Procedure for Creating an ST Section The table below shows the procedure for creating an I O Event Step Action 1 In Project Browser Program double click on Events 2 Right click on 1 0 Events then select New Event section Give your section a number for this example select 0 and then select ST language 3 Confirm with OK and the edition window appears 216 35013355 07 2012 Application using Unity Pro Creating a Program in LD for Application Execution At a Glance This section executes the counting start up and the operator screen animation Illustration of the Application Section The section below is part of the MAST task FBIA RS Makes the counter ten nob enabled Run Encoder FORCE_ENABLED S Q1 Sto RI Numeral current value is less than the Box at the start position on the Lower Threshold operator screen Encoder Counter_Low Position _0 I t Numeral current value is within the Box at the first labelling point on Thresholds the operator screen Encode
22. rising edge of the MODULO_RESET bit SIWr m c 0 2 SYNC_REF_FLAG The bit is set to 1 when the counter have been set to the preset value and re started The bit is reset to 0 when the command SYNC_RESET Qr m c 8 is received rising edge of the SYNC_RESET bit 96 35013355 07 2012 BMX EHC 0200 Functionalities Type of the IODDT Operating Limits Bit Label Description SIWr m c 0 3 VALIDITY Validity bit is used to indicate that the counter current value and compare status registers contain valid data If the bit is set to 1 the data is valid If the bit is set to 0 the data is not valid SIWr m c 0 4 HIGH_LIMIT The bit status changes in the lock on limits mode The bit is set to 1 when the counter reaches 2 147 483 647 The bit is reset to O when the counter presets or resets SIWr m c 0 5 LOW_LIMIT The bit status changes in the lock on limits mode The bit is set to 1 when the counter reaches 2 147 483 648 The bit is reset to O when the counter presets or resets In this mode the type of the IODDT must be T_SIGNED_CPT_BMX The shortest pulse applied to the IN_SYNC input is 100 us The maximum homing event frequency is once every 5 ms The counter value is between 2 147 483 648 and 2 147 483 647 NOTE You have to check the validity bit IWr m c 0 3 before taking into account the numerical values such as the counter and the c
23. we can see that the counter is set to the preset value at the IN_SYNC input s rising edge Then the counter decrements the counting register with every pulse applied to the IN_A input When the register is set to 0 the counter awaits a new signal from the IN_SYNC input The IN_A input pulses have no effect on the register value as long as the counter is set to 0 84 35013355 07 2012 BMX EHC 0200 Functionalities The enable function must be activated during the counting by e setting to 1 the force enable bit e setting to 1 the valid_enable bit and when the IN_EN input is at the high level When the enable function is deactivated the last value reported in the counting register is maintained and the counter ignores the pulses applied to the IN_A input However it does not ignore the IN_SYNC input status Each time the counter starts a downcounting operation the run bit switches to the high level It switches to the low level when the register value reaches 0 NOTE The pulses applied to IN_SYNC and IN_EN inputs are only taken into account when the inputs are enabled see page 64 The value defined by the user preset value is contained in the word 3MDr m c 6 The user may change this value by specifying the value of this word by configuring the parameter in the adjust screen or by using the WRITE PARAM IODDT_VAR1 Function IODDT_VAR1 is of the type T UNSIGNED _CPT_BMx This value change is only taken into account by the
24. 0 1 MODULO_FLAG Flag set to 1 by a modulo switch event SIWr m c 0 2 SYNC_REF_FLAG Flag set to 1 by a preset or synchronization event SIWr m c 0 3 VALIDITY The current numerical value is valid 68 35013355 07 2012 BMX EHC 0200 Functionalities Language object Standard symbol Meaning SIWr m c 0 4 HIGH_LIMIT The current numerical value is locked at the upper threshold value SIWr m c 0 5 LOW_LIMIT The current numerical value is locked at the lower threshold value Resetting the Flag Bits to 0 The user application must reset the flag bit to 0 if it is active by using the appropriate command bit from the following two bits sync_reset sIWr m c 8 event s flag bit to 0 e modulo reset IWr m c 9 bitto reset the modulo reached event s flag bit to 0 Location of Reset to 0 Commands The following table presents the sync_reset and modulo reset bits which are elements of the Qr m c d output command word bit to reset the synchronization or homing Language Standard symbol Meaning object Qr m c 0 OUTPUT_O Forces OUTPUT_0 to level 1 Qr m c 1 OUTPUT_1 Forces OUTPUT_1 to level 1 Qr m c 2 OUTPUT_BLOCK_O_ENABLE Implementation of output 0 function block Qr m c 3 OUTPUT_BLOCK_1_ENABLE Implementation of output 1 function block Qr m c 4 FORCE_SYNC Counting function synchronization and start Q
25. Address in the Value Default value configuration Calibration SMWr m c 14 Edit 0 factor 35013355 07 2012 143 Counting Module Settings Modulo Adjust Introduction Description The modulo concerns the modulo loop counter modes for the counting modules BMX EHC The following table shows the modulo adjust Number Address in the Value Default value configuration Modulo SMDx y v 10 Low Edit OxFFFF 144 35013355 07 2012 Counting Module Settings Setting the Hysteresis Value Introduction The hysteresis value concerns free large counter mode for module BMX EHC 0200 Description The following table shows the setting for the hysteresis value Number Address in the Value Default value configuration Hysteresis SMWr m c 9 Edit 0 release value 35013355 07 2012 145 Counting Module Settings 146 35013355 07 2012 Debugging the BMX EHC 0200 Counting Modules 11 Subject of this Chapter This chapter deals with the debugging settings applicable to BMX EHC 0200 modules These settings can be accessed from the Debug tab on the functional screens of the BMX EHC 0200 see page 106 modules What Is in This Chapter This chapter contains the following sections Section Topic Page 11 1 Debug Screen for BMX EHC xxxx Counting Modules 148 11 2 BMX EHC 0200 Module Debugging 150 35013355 07 201
26. BMX EHC 0200 Functionalities The user may change this value by specifying the value of this word e Inthe ajust screen e Inthe application by using the WRITE PARAM IODDT VAR1 Function IODDT VARI is of the type T SIGNED CPT BMX For further information you may see the homing function see page 62 and the capture function see page 66 The module configuration enables you to select the following homing conditions e Rising edge of the IN_SYNC input default e Rising edge of the IN_REF input e Rising edge of the IN_SYNC input at the IN_REF input s high level Homing No 4 consecutive homings homing IN_SYNC input 4 4 4 4 4 IN_REF input Time ATT gt 4 moment when the homing is carried out e First rising edge of the IN_SYNC input and high level at the IN_REF input No Homing only homing on the first rising edge IN_SYNC input 4 IN_REF input Time a gt moment when the homing is carried out e First rising edge of the IN_SYNC input and low level at the IN_REF input No Homing only homing on the first rising edge IN SYNC input 4 f f fLELFLfLfl IN_REF input Time 5 moment when the homing is carried out 35013355 07 2012 93 BMX EHC 0200 Functionalities Operation The trend diagram below illustrates the counting process for a fr
27. BOOL 2 authorization of the read write counter enable via the IN_EN input VALID_CAPT_O BOOL 3 capture authorizationin read write the capture 0 register VALID_CAPT_1 BOOL 4 capture authorizationin read write the capture 1 register COMPARE_ENABLE BOOL 5 comparators operation read write authorization COMPARE_SUSPEND BOOL 6 comparator frozen atits read write last value LOWER_TH_VALUE_S DINT lower threshold value read write UPPER_TH_VALUE_S DINT upper threshold value read write PWM_FREQUENCY_S DINT output frequency value read write unit 0 1 Hz LOWER_TH_VALUE_US UDINT lower threshold value read write UPPER_TH_VALUE_US UDINT upper threshold value read write PWM_FREQUENCY_US2 UDINT output frequency value read write unit 0 1 Hz PWM_DUTY INT duty cycle value of the read write 1 Signed application specific function ASF must be used 2 Unsigned application specific function ASF must be used Here below is all the signed ASF that must be used with a counter e e EHC 0200 e Free Large counter Mode e Ratio 1 e Ratio 2 Here below is all the unsigned ASF that must be used with a counter ees EHC 0200 e Event Counting Mode e Frequency Mode e Modulo Loop Counter Mode 192 35013355 07 2012 e One Shot Counter Mode e Period Measuring Mode e Pulse Width Modulation Mode Here below is all the signed ASF that must be used with a counter e EHC 0800 e Up
28. Down Counting Mode Here below is all the unsigned ASF that must be used with a counter e EHC 0800 Event Counting Mode e Frequency Mode e Modulo Loop Counter Mode e One Shot Counter Mode Explicit Device DDT instances Description Explicit exchanges Read Status only applicable to Modicon M340 I O channels are managed with RI EAD STS_QX EFB instance e Targeted channel address ADDR can be managed with ADDMX see Unity Pro Communication Block Library EF connect ADDMX OUT to ADDR e READ_STS_QxX see Unity Pro I O Management Block Library output parameter STATUS can be connected toa T M xxx yyy CH STS DDT instance variable to be created manually where e xxx represents the device type e yyy represents the function Example T M CPT STD CH STS The following table shows the T M CPT STD CH_STS status word bits Type Type Access STRUCT T M CPT STD CH STS 35013355 07 2012 193 The following table shows the T M CPT STD CH_STS status word bits Standard Symbol Type Bit Meaning Access CH_FLT INT EXTERNAL_FLT_INPUTS BOOL 0 external detected error at inputs read EXTERNAL_FLT_OUTPUTS BOOL 1 external detected error at outputs read INTERNAL_FLT BOOL 4 internal detected error channel read inoperative CONF_FLT BOOL 5 hardware or software configuration read detected error COM_FLT BOOL 6 bu
29. EHC 0200 Module and its Inputs and Outputs 34 Display and Diagnostics of the BMX EHC 0200 Counting Module 37 BMX EHC 0200 Module Wiring 39 35013355 07 2012 33 BMX EHC 0200 Characteristics for the BMX EHC 0200 Module and its Inputs and Outputs General Characteristics This table presents the general characteristics for the BMX EHC 0200 and BMX EHC 0200H see page 19 modules Module type 2 counting channels Maximum frequency at counting inputs 60 kHz Number of inputs outputs per counting channel Inputs 6 Type three 24 VDC inputs Outputs Two 24 VDC outputs Power Supply Sensor supply voltage 19 2 30 VDC Module consumption Does not take into account sensors or encoder consumption All inputs OFF Typical 15mA All inputs ON Typical 75mA Actuator supply current 500 mA maximum per output 2 A per module Power distribution to sensors Yes with short circuit and overload protection typical 300 mA short circuit limited to 2 5 A Hot replacement Yes under the following conditions The module may be removed and reinserted into its location while the rack is switched on but the counter may have to be revalidated when it is reinserted into its base Dimensions Width Module only 32 mm On the rack 32 mm Height Module only 103 76 mm On the rack 103 76 mm Depth Module only 92 mm On the rack 10
30. Faults screen can only be accessed in online mode The following diagram presents the counting modules configuration screen 1 2 2channel generic counter Versipn 1 00 e Run Err 10 F BMX EHC 0200 E Config F5 Adjust ffi Debug Faut e Counter Q Moc Counter 1 Modulo Label Symbol nput B Filter 2 Input Sync Filter hout 3 Input EN Filter fa tuts star nose General La Faull HKW 6 a ning e KWO309 hi o do a nchi 3 KIRT TS A ukaga Of oean Testo e ee RATAT 13 Polanty 0 YKAO 3021 4 Polarity AKW 30217 lOl al 16 Fallback Q 23021 3 Withou 17 Fallback 1 3021 4l Without 18 Eallback Value 0 215 9 Fallback Value 1 el EREL 7 Function 4 Modulo Loop Coun Task MAST Ba W module4_E 0 3 BMXE 108 35013355 07 2012 Screens The following table presents the parts of the various screens Number Element Function 1 Tabs The tab in the foreground indicates the mode in progress Configuration in this example Every mode can be selected using the respective tab The available modes are e Configuration e Adjust e Debug which can only be accessed in online mode e Faults which can only be accessed in online mode Module
31. Terminal Blocks to a BMX EHC 0200 Counting Mod le ru ees 2 neat eet ad Gt eis ae bh Pd Bae 30 How to Connect BMX EHC 0200 Module Connecting 16 Pin and 10 Pin Terminal Blocks sirana Meld a in a a Ra oh eae ei ee ere a 31 Chapter 5 BMX EHC 0200 Counting Module Hardware Implementation 4 cia we ee Rae ee eee es 33 Characteristics for the BMX EHC 0200 Module and its Inputs and Outputs 34 Display and Diagnostics of the BMX EHC 0200 Counting Module 37 BMX EHC 0200 Module Wiring 0 0 0 cece eee 39 35013355 07 2012 3 Part Ill Chapter 6 6 1 6 2 Part IV Chapter 7 Chapter 8 Chapter 9 9 1 9 2 Counting Module BMX EHC 0200 Functionalities BMX EHC 0200 Counting Module Functionalities BMX EHC 0200 Module Configuration 02e eee eee Input Interface BlockS 0 0 eee tee Programmable Filtering 0 cee eee eee COMPpatSONwesuios ea See Sis ea es oe tants le Output Block Functions 0 000 c eee eee Diagnostics srren ace rE nek 2 LA Gr RAG Se wag E Ene seme E a e dae eos Synchronization Homing Enable Reset to 0 and Capture Functions Modulo Flag and Synchronization Flag 2 00 00e0e Sending Counting Events to the Application 4 BMX EHC 0200 Module Operation Modes 0 0 e eee BMX EHC 0200 Module Operation in Frequency Mode BMX EHC 0200 Module Operation in Event Counting Mode BMX EHC 0200 Module Ope
32. The following illustration shows the application operator screen Sensor 1stLabelling 2nd Labelling Point Point al Number of labelled boxes a eee eS Deflection monitoring Box delay time a i Process deflection a Box on time NOTE To animate objects in online mode you must click on T By clicking on this button you can validate what is written 35013355 07 2012 221 Application using Unity Pro Procedure for Creating an Operator Screen The table below shows the procedure for creating the Start button Step Action 1 Inthe Project browser right click on Operator screens and click on New screen The operator screen editor appears 2 Click on the ie and position the new button on the operator screen Double click on the button and in the Control tab select the Run variable by clicking the button and confirm with OK Then enter the button name in the text zone The table below shows the procedure for inserting and animating the conveyor Step Action 1 In the Tools menu select Operator screens Library Double click on Machine then Conveyor Select the dynamic conveyor from the runtime screen and Copy Ctrl C then Paste Ctrl V it into the drawing in the operator screen editor The conveyor is now in your operator screen You now need a variable to animate the wheels Select your conveyor then click on F
33. Use IN_EN input Used to authorize counter operation IN_REF input Used for homing in advanced mode IN_CAP input Used for register capture 35013355 07 2012 49 BMX EHC 0200 Functionalities Programmable Filtering At a Glance The BMX EHC 0200 counting module s six inputs are compatible with the use of mechanical switches A programmable debounce filter with 3 levels low medium and high is available at every input Debounce Filter Diagram The figure below shows the debounce filter with a low filtering level Input 450 us 450 us lt gt lt gt Filtered signal In this mode the system delays all transitions until the signal is stable for 450 us Selecting the Filtering Level The table below specifies the characteristics of each input for the selected level of filtering Filtering level Input Maximum Minimum Maximum delay pulse frequency None IN_A IN_B 5 us 60 KHz IN_SYNC 5 us 200 Hz IN_EN 50 us IN_CAP IN_REF 50 us 200 Hz Low IN_A IN_B 450 us 1 KHz for bounces gt 2 KHz IN_EN 450 us J IN_SYNC IN_CAP IN_REF 500 us 200 Hz Resource IN_A IN_B 1 25 ms 350 Hz for bounces gt 1 KHz IN_EN 1 25 ms z IN_SYNC IN_CAP IN_REF 1 25 ms 200 Hz High IN_A IN_B 4 2 ms 100 Hz for bounces gt 250 Hz IN_EN 4 2 ms z F IN_SYNC IN_CAP IN_REF 4 2 ms 100 Hz 50 35013355 07 2012
34. WORD 1 Frequency read 2 EvtCounting 3 PeriodMeasuring 4 Ratio1 5 Ratio2 6 OneShotCounter 7 ModuleLoopCounter 8 FreeLargeCounter 9 PulseWidthModulation 10 UpDownCounting 11 DualPhaseCounting CH_HEALTH BOOL 0 channel is inactive read 1 channel is active ST_OUTPUT_0_ECHO EBOOL logical state of output 0 read 188 35013355 07 2012 Standard Symbol Type Bit Meaning Access ST_OUTPUT_1_ECHO EBOOL logical state of output 1 read ST_OUTPUT_BLOCK_0O EBOOL status of physical read counting output block 0 ST_OUTPUT_BLOCK_1 EBOOL status of physical read counting output block 1 ST_INPUT_A EBOOL status of physical read counting input A ST_INPUT_B EBOOL status of physical read counting input B ST_INPUT_SYNC EBOOL physical state of the read IN_SYNC input or IN_AUX ST_INPUT_EN EBOOL physical state of IN_EN read input enable ST_INPUT_REF EBOOL physical state of the read IN_REF input preset ST_INPUT_CAPT EBOOL physical state of read IN_CAP input capture COUNTER_STATUS INT RUN BOOL O the counter operates in read counting mode only MODULO_FLAG BOOL 1 flag setto 1 bya read modulo switch event SYNC_REF_FLAG BOOL 2 flag setto 1 by a preset read or synchronization event VALIDITY BOOL 3 the current numerical read value is valid HIGH_LIMIT BOOL 4 the current numeric
35. bit set to 0 With bit set to 1 Fallback valueO KWr m c 2 0 bit set to 0 1 bit set to 1 Fallback value 1 3KWr m c 2 0 bit set to 0 1 bit set to 1 Output power SKWr m c 2 9 General input output fault bit set to 0 supply fault Offline bit set to 1 Pulse width O SKWr m c 18 Edit value in the range 1 65535 Pulse width 1 SKkWr c 20 Edit value in the range 1 65535 Event SkWr m c 0 Activated if activated is selected the entered event Event number number is coded on the most significant byte of this word Deactivated all bits of the most significant byte of this word are set to 1 35013355 07 2012 121 Configuration of the Counting Modules Period Measuring Mode Configuration At a Glance The configuration of a counting module is stored in the configuration constants SKW The parameters r m and c shown in the following tables represent the topologic addressing of the module Each parameter had the following signification e r represents the rack number e m represents the position of the module on the rack e c represents the channel number Configuration Objects The table below presents the period measuring mode configurable elements Label Address in the configuration Configurable values Counting mode SKWr m c 2 least significant byte Period measuring mode The value of the least significant byte of this word is 3 IN_A input filter SKWr m
36. cause the application to operate in an unexpected manner Failure to follow these instructions can result in death serious injury or equipment damage 35013355 07 2012 43 BMX EHC 0200 The figure below shows the recommended circuit for high noise environment using the BMX XSP 0400 0600 0800 1200 electromagnetic protection kit ap BMX EHC 0200 counting module P eoeate fo ee e gt LEIE E E E E E ee CE EE E SE E EE E C7 e oe BMX XSP e e kit i Encoder ee 24 VDC fast sensors power supply 4 CAUTION selection could result to damage to the module POTENTIAL MODULE DAMAGE IMPROPER FUSE SELECTION Use fast acting fuses to protect the electronic components of the module from overcurrent and reverse polarity of the input output supplies Improper fuse Failure to follow these instructions can result in injury or equipment damage 44 35013355 07 2012 Counting Module BMX EHC 0200 Functionalities 35013355 07 2012 45 Counting Module BMX EHC 0200 Functionalities 46 35013355 07 2012 BMX EHC 0200 Counting Module Functionalities 6 Subject of this Chapter This chapter deals with functionalities and counting modes of the BMX EHC 0200 module
37. edge of the SQr m c 8 bit SIWr VALIDITY Validity bit is used to indicate that the counter current value events number and compare status registers contain valid data If the bit is set to 1 the data is valid If the bit is set to 0 the data is not valid SIWwr HIGH_LIMIT The bit is set to 1 when the number of received events exceeds the counter size The bit is reset to 0 at the next period if the limit is not reached SIWr LOW_LIMIT The bit is set to 1 when more than one synchronization is received within 5 ms period The bit is reset to 0 at the next period if the limit is not reached Type of the IODDT In this mode the type of the IODDT must be T UNSIGNED_CPT_BMX Operating Limits The module counts the pulses applied at the IN_A input every time the pulse duration is greater than 5 us without debounce filter The synchronization of the counter must not be done more than one time per 5 ms NOTE You have to check the validity bit IWr m c 0 3 before taking into account the numerical values such as the counter and the capture registers Only the validity bit at the high level set to 1 guarantees that the mode will operate correctly within the limits 35013355 07 2012 77 BMX EHC 0200 Functionalities BMX EHC 0200 Module Operation in Period Measuring Mode At a Glance Basic Principle Using the period measuring mode allows to e determine the durati
38. in this example 3 Symbol field This field contains the mnemonics of the variable This field may not be modified and can be accessed in both offline and online modes 4 Initial value field This field displays the value of the variable that the user has adjusted in offline mode This field is only accessible in online mode 5 Value field The function of this field depends on the mode in which the user is working e In offline mode this field is used to adjust the variable e In online mode this field is used to display the current value of the variable 6 Unit field This field contains the unit of each variable that may be configured This field may not be modified and can be accessed in both offline and online modes 35013355 07 2012 141 Counting Module Settings Setting the Preset Value Introduction Description The preset value concerns the following counting modes e for the BMX EHC 0200 module e one shot counter mode e free large counter mode The following table shows the preset value setting Number Address in the Value Default value configuration Preset value SMDr m c 12 Low Edit 0 142 35013355 07 2012 Counting Module Settings Setting the Calibration Factor Introduction The calibration factor concerns the frequency and ratio modes for the BMX EHC 0200 Description The following table shows the calibration factor setting Number
39. its limits event validation bit SQWr m c 1 2 Synchronization or counter homing event validation bit SQWr m c 1 3 Counter less than lower threshold event validation bit SQWr m c 1 4 Counter between the upper and lower thresholds event validation bit SQWr m c 1 5 Counter greater than upper threshold event validation bit SQWr m c 1 6 Capture 0 event validation bit SQWr m c 1 7 Capture 1 event validation bit Input Interface The event only has one input interface This interface is only updated at the start of the event task processing The interface consists of e The evt_ sources word SIWr m c 10 e The current value of the counter during the event or an approximate value contained in the counter value word SIDr m c 12 e The capt 0 val register sIDr m c 14 updated if the event is the capture 0 e The capt 1 val register sIDr m c 16 updated if the event is the capture 1 35013355 07 2012 71 BMX EHC 0200 Functionalities Operating Limits Each counter channel can produce a maximum of one event per millisecond but this flow may be slowed down by simultaneously sending events to several modules on the PLC bus Each counter channel has a four slot transmission buffer which can be used to store several events while waiting to be sent If the channel is unable to send all of the internally produced events the overrun_evt bit sIWr m c 10 8 of the evt_sources word is set to 1 72 35013355 07 2012 BMX EHC 0
40. language objects allowing its operation to be controlled and checked There are two types of language objects e Implicit Exchange Objects these objects are automatically exchanged on each cycle revolution of the task associated with the module e Explicit Exchange Objects these objects are exchanged on the application s request using explicit exchange instructions Implicit exchanges concern the inputs outputs of the module measurement results information and commands These exchanges enable the debugging of the counting modules Explicit exchanges enable the module to be set and diagnosed 35013355 07 2012 171 Implicit Exchange Language Objects Associated with the Application Specific Function At a Glance Reminders Figure An integrated application specific interface or the addition of a module automatically enhances the language objects application used to program this interface or module These objects correspond to the input output images and software data of the module or integrated application specific interface The module inputs SI and IW are updated in the PLC memory at the start of the task the PLC being in RUN or STOP mode The outputs Q and QW are updated at the end of the task only when the PLC is in RUN mode NOTE When the task occurs in STOP mode either of the following are possible depending on the configuration selected e outputs are set to fallback position fallback
41. level 1 Qr m c 1 OUTPUT_1 Forces OUTPUT_1 to level 1 Qr m c 2 OUTPUT_BLOCK_O_ENABLE Implementation of output 0 function block Qr m c 3 OUTPUT_BLOCK_1_ENABLE Implementation of output 1 function block Qr m c 4 FORCE_SYNC Counting function synchronization and start Qr m c 5 FORCE_REF Set to preset counter value 35013355 07 2012 65 BMX EHC 0200 Functionalities Capture Function Language Standard symbol Meaning object Qr m c 6 FORCE_ENABLE Implementation of counter SQr m c 7 FORCE_RESET Reset counter Qr m c 8 SYNC_RESET Reset SYNC_REF_FLAG Qr m c 9 MODULO_RESET Reset MODULO_FLAG The function is only activated by the rising edge of the force reset bit SQr m c 7 There is no valid reset bit because the function is not activated by any physical input This function allows to store the current counter value into a capture register upon an external condition Each BMX EHC 0200 module channel has 2 capture registers e captured e capturel The capture function is used in the following counting modes e Modulo loop counter e Free large counter In the modulo loop counter mode only the capture0 function is available The function enables to record the current counter value according to the synchroni sation condition If the IN_SYNC input receives the sensitive edge of synchronization see page 60 the current counter value is stored into the capt_0 v
42. mode e outputs are maintained at their last value maintain mode The following diagram shows the operating cycle of a PLC task cyclical execution y Intemal processing y Acquisition of inputs RUN STOP Yy Execution of the program Y Update of outputs 172 35013355 07 2012 Explicit Exchange Language Objects Associated with the Application Specific Function Introduction Explicit exchanges are performed at the user program s request using these instructions e READ_STS see Unity Pro I O Management Block Library read status words e WRITE_CMD see Unity Pro I O Management Block Library write command words e WRITE_PARAM see Unity Pro I O Management Block Library write adjustment parameters e READ_PARAM see Unity Pro I O Management Block Library read adjustment parameters e SAVE_PARAM see Unity Pro I O Management Block Library save adjustment parameters e RESTORE_PARAM see Unity Pro I O Management Block Library restore adjustment parameters These exchanges apply to a set of MW objects of the same type status commands or parameters that belong to a channel These objects can e provide information about the module for example type of error detected in a channel e have command control of the module for example switch command e define the module s operating modes save and restore adjustment parameters i
43. on 1 F then place it in the editor Double click on this contact then on a The Instance Selection window opens Validate the Inside structure checkbox and click on L in front of the Encoder variable and select Sync_Ref_Flag in the list Confirm with OK To use the RS block you must instantiate it Right click in the editor then click on Select data and on A Click on the Function and Function Block Types tab Click on Libset and select the RS block in the list then confirm with OK and position your block To link the Encoder Sync_Ref_Flag contact to the S Rnput of the RS block align the contact and the input horizontally click on and position the link between the contact and the input NOTE For more information on creating an LD section see Unity Pro online help click on then Unity then Unity Pro then Operate modes then Programming and LD editor 218 35013355 07 2012 Application using Unity Pro Creating an Animation Table At a glance An animation table is used to monitor the values of variables and modify and or force these values Only those variables declaredinVariables amp FB instances can be added to the animation table NOTE Note For more information consult the Unity Pro online help click then Unity then Unity Pro then Operate modes then Debugging and adjustment then Viewing and adjusting variables and Animation tables Procedure for Creating an Animation Table
44. set to 1 Synchronization edge SKWr m c 10 8 Rising edge at IN_SYNC bit set to 0 Falling edge at IN_SYNC bit set to 1 Time base SKWr m c 7 This word can take the following values e 0 0 1 5 1 15 2 10s e 3 1 min 120 35013355 07 2012 Configuration of the Counting Modules Label Address in the configuration Configurable values Output block 0 SKWr m c 17 This word can take the following values O off 1 low counter 2 counter in a window 3 High counter 4 pulse less than the lower threshold LT 5 pulse greater than the lower threshold LT 6 pulse less than the upper threshold UT 7 pulse greater than the upper threshold UT Output block 1 SKWr m c 19 This word can take the following values 0 off 1 low counter 2 counter in a window 3 High counter 4 pulse less than the lower threshold LT 5 pulse greater than the lower threshold LT 6 pulse less than the upper threshold UT 7 pulse greater than the upper threshold UT Polarity 0 SkWr m c 2 Polarity bit set to 0 Polarity bit set to 1 Polarity 1 SkWr m c 2 Polarity bit set to 0 Polarity bit set to 1 Fault recovery SkWr m c 2 Automatic reaction bit set to 1 Activated bit set to 0 Fallback 0 SkWr m c 2 None bit set to 0 With bit set to 1 Fallback 1 SkWr m c 2 None
45. such as level 1 packaging labeling the machine makes constant spacing between parts In case of a user application such as level 2 packaging labeling the counting module learns the incoming edge of each part 35013355 07 2012 21 Counting Module Frequency Generator The following table presents the frequency generator functionality for the Interface BMX EHC 0200 module User application type Mode Input frequency device Pulse width modulation The BMX EHC 0200 module may be interfaced with the following components mechanical switch 24 VDC two wire proximity sensor e e e 24 VDC three wire proximity sensor e 10 30 VDC encoder with push pull outputs 22 35013355 07 2012 Counting Module BMX EHC 0200 Hardware Implementation Subject of this Part This part presents the hardware implementation of the BMX EHC 0200 counting module What Is in This Part This part contains the following chapters Chapter Chapter Name Page 4 General Rules for Installing Counting Module BMX EHC 0200 25 5 BMX EHC 0200 Counting Module Hardware Implementation 33 35013355 07 2012 23 Counting Module BMX EHC 0200 Hardware Implementation 24 35013355 07 2012 General Rules for Installing Counting Module BMX EHC 0200 4 Subject of this Chapter This chapter presents the general rules for installing counting module BMX EHC 0200 What Is in This
46. than the lower threshold LT e 5 pulse greater than the lower threshold LT e 6 pulse less than the upper threshold UT 7 pulse greater than the upper threshold UT 118 35013355 07 2012 Configuration of the Counting Modules Label Address in the configuration Configurable values Output block 1 SKWr m c 19 This word can take the following values 0 off 1 low counter 2 counter in a window 3 High counter 4 pulse less than the lower threshold LT 5 pulse greater than the lower threshold LT 6 pulse less than the upper threshold UT 7 pulse greater than the upper threshold UT Polarity 0 SkWr G 2 Polarity bit set to 0 Polarity bit set to 1 Polarity 1 SkWr m c 2 Polarity bit set to 0 Polarity bit set to 1 Fault recovery SKWr G 2 Automatic reaction bit set to 1 Activated bit set to 0 Fallback 0 SkWr C 2 None bit set to 0 With bit set to 1 Fallback 1 SkWr m c 2 None bit set to 0 With bit set to 1 Fallback value 0 SKWr c 2 0 bit set to 0 1 bit set to 1 Fallback value 1 SKWr G22 0 bit set to 0 1 bit set to 1 Output power supply sKWr m c 2 9 General input output fault bit set to 0 fault Offline bit set to 1 Pulse width 0 SKWr c 18 Edit value in the range 1 65535 Pulse width 1 SKWr c 20 Edit value in the range 1 65535 Event SKkWr m c 0 Activated if act
47. 025 Binary Ratio in high limit SIWr c 0 4 Binary Input A state Ir m c 4 Binary Input B state sIr GS Binary Output 0 state Ir m c 0 Binary Output 0 cmd QOr m c 0 Binary Output 1 state S Ir m c 1 Binary Output 1 cmd Qr m c 1 Binary Output latch 0 state S Ir m c 2 Binary Output latch 0 enable Qr m c 2 Binary Output latch 1 state SIr m c 3 Binary Output latch 1 enable SQr m c 3 Binary Low threshold value SQDr m c 2 Digital High threshold value SQDr m c 4 Digital Compare enable SQWr m c 0 5 Binary Compare suspend SQWr m c 0 6 Binary For a description of each language object refer to T_SIGNED_CPT_BMX IODDT see page 180 154 35013355 07 2012 Debugging the Counting Modules One Shot Counter Mode Debugging At a Glance The table below presents the one shot counter mode debugging elements Label Language object Type Counter value IDr m c 2 Digital Counter valid SIWr m c 0 3 Binary Counter low IWr m c 1 0 Binary Counter in window SIWr m c 1 1 Binary Counter high SIWr m c 1 2 Binary RUN IWr m c 0 0 Binary Input A state Ir m c 4 Binary Input SYNC state SIr m c 6 Binary SYNC enable SQWr m c 0 0 Binary SYNC force SQr m c 4 Binary SYNC state SIWr m c 0 2 Binary SYNC reset SQr m c 8 Binary Input EN Ir m c 7 Binary EN enable SQWr m c 0 2 Binary Counter enable Qr m c 6 Binary Output 0 state Ir m c 0 Binary
48. 0_0 MODULO_RESET 0 Wi module4_ E 03 BMXE 148 35013355 07 2012 Debugging the Counting Modules Description of the Screen The following table presents the various parts of the above screen Number Element Function 1 Reference field This field contains the address of the variable in the application This field may not be modified 2 Label field This field contains the name of each variable that may be configured This field may not be modified 3 Tab The tab in the foreground indicates the current mode The current mode is therefore the debug mode in this example 4 Symbol field This field contains the mnemonics of the variable This field may not be modified Value field If the field has a downward pointing arrow you can select the value of each variable from various possible values in this field The various values can be accessed by clicking on the arrow A drop down menu containing all the possible values is displayed and the user may then select the required value of the variable If there is no downward pointing arrow this field simply displays the current value of the variable 35013355 07 2012 149 Debugging the Counting Modules 11 2 BMX EHC 0200 Module Debugging Subject of this Section This section deals with the debugging of the BMX EHC 0200 counting module modes What Is in This Section
49. 13 3 Device DDTs Associated with the Counting Function of the 187 BMX EHC xxxx Modules 13 4 The lODDT Type T_GEN_MOD Applicable to All Modules 195 35013355 07 2012 169 13 1 The Language Objects and IODDT of the Counting Function Subject of this Section This section describes the general features of the language objects and IODDT of the counting function What Is in This Section This section contains the following topics Topic Page Introducing Language Objects for Application Specific Counting 171 Implicit Exchange Language Objects Associated with the Application Specific 172 Function Explicit Exchange Language Objects Associated with the Application Specific 173 Function Management of Exchanges and Reports with Explicit Objects 175 170 35013355 07 2012 Introducing Language Objects for Application Specific Counting General The counting modules have only two associated IODDTs These IODDTs are predefined by the manufacturer and contains language objects for inputs outputs belonging to the channel of an application specific module The IODDT associated with the counting modules are of T_ Unsigned_CPT_BMX and T_Signed_CPT_BMxX types NOTE IODDT variables can be created in two different ways e Using the I O objects see Unity Pro Operating Modes tab e Using the Data Editor see Unity Pro Operating Modes Language Object Types Each IODDT contains a set of
50. 13355 07 2012 163 Display of Error Counting Module Faults Diagnostics Display At a Glance The diagnostic screens see page 105 on the module or channel are only accessible in connected mode When an un masked fault appears it is reported e inthe configuration screen of the rack with the presence of a red square in the position of the faulty counting module e inall screens at module level Description and Fault tabs e inthe module field with the LED e in all channel level screens Configuration Adjustment Debug and Fault tabs e inthe module zone with the LED e inthe channel zone with the fault LED e inthe fault screen that is accessed by the Fault where the fault diagnostics are described The fault is also signaled e On the module on the central display e by dedicated language objects CH_ERROR Ir m c ERR and MOD_ERROR Ir m MOD ERR 3MWr m MOD 2 etc and status words NOTE Even if the fault is masked it is reported by the flashing of the O LED and in the fault screen 164 35013355 07 2012 Display of Error Counting Module List of Error At a Glance The messages displayed on the diagnostics screens are used to assist with debugging These messages must be concise and are sometimes ambiguous as different faults may have the same consequences These diagnostics are on two levels module and channel the latter being the most explicit The lists below show the message
51. 187 T_SIGNED_BMX 180 T_SIGNED_CPT_BMX 185 T_UNSIGNED_CPT_BMX 180 185 terminal blocks connecting 25 installing 25 4 W wiring accessories 25 228 35013355 07 2012
52. 2 147 Debugging the Counting Modules 11 1 Debug Screen for BMX EHC xxxx Counting Modules Debug Screen for BMX EHC xxxx Counting Modules At a Glance This section presents the debug screen for BMX EHC eee counting modules A module s debug screen can only be accessed in online mode Illustration The figure below presents the debug screen for the BMX EHC 0200 module in modulo loop counter mode 1 2 3 4 5 2 channel generic counter Version 1 t Run Er l0 F BMX EHC 0200 H Config H Adjust Tin Debug Faut e Counter 0 Modulo L e Counter 1 Modulo L v y i vais ID9 3 0 2 Counter value m3 0200 0 COU CURRENT VALUE 0 1 40 30 03 Counter Valid m3_0200 0 COUNTER STATUS No 2 IW0301 0 Counter low m3 0200 0 COOMPARE STATUS No 3 IW0 30 1 1 Counter in window m3 0200 0 COOMPARE STATUS No 4 IW0 30 1 2 Counter high m3_0200_0 COOMPARE_STATUS No 5 IW03 0 0 5 Counter in low limit m3 0200 0 COUNTER STATU No 61 0 3 0 0 4 Counter in high limit m3 0200 0 COUNTER STATU No D0 3 0 4 Capture 0 value m3_0200_0 CAPT_0_VALUE 0 BI I0301T3 Capture 0 low m3_0200_0 COOMPARE STATUS No A030174 Capture 0 in window m3 0200 0 COOMPARE STATUS No 10 IWO3015 Capture 0 high m3 0200 0 COOMPARE STA
53. 2 Display of BMX EHC xxxx Counting Module Error 161 13 The Language Objects of the Counting Function 169 35013355 07 2012 101 Counting Module BMX EHC 0200 Software Implementation 102 35013355 07 2012 Software Implementation Methodology for BMX EHC xxxx Counting Modules 7 Installation Methodology At a Glance The software installation of the BMX EHC counting modules is carried out from the various Unity Pro editors e in offline mode e in online mode The following order of installation phases is recommended but it is possible to change the order of certain phases for example starting with the configuration phase Installation Phases The following table shows the different installation phases Phase Description Mode Declaration of variables Declaration of ODDT type variables for the Offline application specific modules and variables of the project Programming Project programming Offline Configuration Declaration of modules Offline Module channel configuration Entering the configuration parameters Offline Note All the parameters are configurable online except the event parameter Association Association of IODDTs with the channels Offline configured variable editor Build Project generation analysis and editing of links Offline Transfer Transfer project to PLC Online 35013355 07 2012 103 Software Implementation M
54. 200 Functionalities 6 2 BMX EHC 0200 Module Operation Modes Subject of this Section This section deals with the different counting modes of the BMX EHC 0200 module What Is in This Section This section contains the following topics Topic Page BMX EHC 0200 Module Operation in Frequency Mode 74 BMX EHC 0200 Module Operation in Event Counting Mode 76 BMX EHC 0200 Module Operation in Period Measuring Mode 78 BMX EHC 0200 Module Operation in Ratio Mode 81 BMX EHC 0200 Module Operation in One Shot Counter Mode 84 BMX EHC 0200 Module Operation in Modulo Loop Counter Mode 87 BMX EHC 0200 Module Operation in Free Large Counter Mode 91 BMX EHC 0200 Module Operation in Pulse Width Modulation Mode 98 35013355 07 2012 73 BMX EHC 0200 Functionalities BMX EHC 0200 Module Operation in Frequency Mode At a Glance Using the frequency mode allows you to measure an event frequency speed rate and flow Basic Principle In this mode the module monitors the pulses applied only to the IN_A input and calculates the number of pulses in time intervals of 1 s The current frequency is then shown in number of events per second hertz The counting register is updated at the end of each 10 ms interval Counter Status Bits in Frequency Mode The table below shows the composition of the counters sIWr m c 0 status word in frequency mode Bit Label Description SIWr m c 0 3 VALID
55. 21 35013355 07 2012 11 Overview 12 35013355 07 2012 General Information on the Counting Function 1 General Information on Counting Functions At a Glance The counting function enables fast counting using couplers Unity Pro screens and specialized language objects The general operation of expert modules also known as couplers is described in the section Presentation of the Counting Module Operation BMX EHC 0200 In order to implement the counting it is necessary to define the physical context in which it is to be executed rack supply processor modules etc and to ensure the software implementation see page 101 This second aspect is performed from the different Unity Pro editors e in offline mode e in online mode 35013355 07 2012 13 Counting Functions 14 35013355 07 2012 Presentation of Counting Module 2 Subject of this Chapter This chapter deals with the counting module BMX EHC 0200 of the Modicon M340 range What Is in This Chapter This chapter contains the following topics Topic Page General Information about Counting Module 16 General Information about the Counting Module Operation 17 Presentation of the BMX EHC 0200 Counting Module 18 Modicon M340H Hardened Equipment 19 35013355 07 2012 15 Counting Module General Information about Counting Module Introduction Counting module is standard format
56. 35013355 06 Modicon M340 with Unity Pro Counting Module BMX EHC 0200 User Manual 07 2012 Schneider Electric www schneider electric com The information provided in this documentation contains general descriptions and or technical characteristics of the performance of the products contained herein This documentation is not intended as a substitute for and is not to be used for determining suitability or reliability of these products for specific user applications It is the duty of any such user or integrator to perform the appropriate and complete risk analysis evaluation and testing of the products with respect to the relevant specific application or use thereof Neither Schneider Electric nor any of its affiliates or subsidiaries shall be responsible or liable for misuse of the information that is contained herein If you have any suggestions for improvements or amendments or have found errors in this publication please notify us No part of this document may be reproduced in any form or by any means electronic or mechanical including photocopying without express written permission of Schneider Electric All pertinent state regional and local safety regulations must be observed when installing and using this product For reasons of safety and to help ensure compliance with documented system data only the manufacturer should perform repairs to components When devices are used for applications with technical safety req
57. 4 5 mm Encoder compliance 10 30 VDC incremental encoder model with push pull at outputs Insulation voltage of the ground to the bus 1500 V RMS for 1 min Rack 24 V supply bus Current for the 24 V bus Typical 40 mA Rack 3 V supply bus Current for the 3 V bus Typical 200 mA Module Cycle Time ims 34 35013355 07 2012 BMX EHC 0200 4 WARNING OVERHEATING MODULE equipment damage Do not operate the BMX EHC 0200H at 70 C 158 F if the sensor power supply is greater than 26 4 V or less than 21 1 V Failure to follow these instructions can result in death serious injury or Input Characteristics This table presents the general characteristics of the input channels for the module Number of inputs per channel Six 24 VDC inputs Inputs IN A IN B IN SYNC IN EN IN REF IN CAP Voltage 30 VDC maximum At state 1 Voltage 11 VDC 30 VDC Current 5 mA up to 30 VDC At state 0 Voltage lt 5 VDC Current lt 1 5mA Current at 11 VDC gt 2mA Characteristics of Outputs This table presents the general characteristics of the output channels for the module Number of outputs per channel 2 Type source 24 VDC 0 5 A Voltage 19 2 30 VCC Minimum load current None Maximum load current Each point 0 5A Per module 2A Leakage current at state 0 0 1 mA maximum Voltage dro
58. 5 106 111 112 113 115 117 118 120 122 125 35013355 07 2012 Chapter 10 Chapter 11 11 1 11 2 Chapter 12 Chapter 13 13 1 13 2 13 3 13 4 One Shot Counter Mode Configuration 0 cece eee eee Modulo Loop Counter Mode Configuration 0 0080e ee Free Large Counter Mode Configuration 0000e eee Pulse Width Modulation Mode Configuration 0 5 BMX EHC xxxx Counting Module Settings Adjust Screen for BMX EHC 0200 Counting Modules Setting the Preset Value 1 0 0 2 eects Setting the Calibration Factor 1 0 0 0 cece eee ee Modulo Adj st isr Tenera of bod bebe eae bate Ae arent Setting the Hysteresis Value 1 2 2 2 000s Debugging the BMX EHC 0200 Counting Modules Debug Screen for BMX EHC xxxx Counting Modules Debug Screen for BMX EHC xxxx Counting Modules BMX EHC 0200 Module Debugging 0 eee eee eee Frequency Mode Debugging 0 ee eee eee eee eee Event Counting Mode Debugging cece eee eee Period Measuring Mode Debugging 0 eee eee eee Ratio Mode Debugging 20 cece eee eee eee One Shot Counter Mode Debugging 0 cence eee Modulo Loop Counter Mode Debugging ee eee eee Free Large Counter Mode Debugging 20e eee eee Pulse Width Modulation Mode Debugging
59. A line on the wheel is selected Press enter and the object properties window opens Select the Animation tab and enter the concerned variable by clicking on Bi in the place of MWO In our application this will be Encoder INPUT_A the physical input A state Confirm with Apply and OK Click on A to select the other lines one by one and apply the same procedure NOTE In the Instance Selection tick the IODDT checkbox and click on m to access the I O objects list The table below shows the procedure for inserting and animating a display Step Action Click on Aa and position it on the operator screen Double click on the text and select the Animation tab 2 Tick the Animated Object checkbox select the concernd variable by cliking on and confirm with OK 222 35013355 07 2012 Starting the Application 16 Execution of Application in Standard Mode At a Glance Standard mode working requires the use of a PLC and a BMX EHC 0200 with an encoder and a sensor linked to its inputs Outputs wiring The actuators are connected as follow BMX EHC 0200 ist Actuator 2nd Actuator moor T pooo aungana an 35013355 07 2012 223 Starting the Application The assignment of the 10 pins connector is as follow Fusible
60. C processor the Exchange in progress bit is set to 1 in SMWr m c Phase 2 Analysis of the data by the I O module and report PLC memory Status parameters Command parameters Adjustment parameters VO module memory or function memory integrated specific application Status parameters Command parameters Adjustment parameters When the data is exchanged between the PLC memory and the module acknowledgement by the module is managed by the ADJ_ ERR bit SMWr m c 1 2 This bit makes the following reports e 0 correct exchange e 1 faulty exchange NOTE There is no adjustment parameter at module level SMWr m c 0 XCH_ STS Standard symbol Type Access_ Meaning Address STS_IN_PROGR BOOL R Reading of channel status MWr m c 0 0 words in progress CMD_IN_PROGR BOOL R Command parameters MWr m c 0 1 exchange in progress ADJ_IN_PROGR BOOL R Adjust parameters MWr m c 0 2 exchange in progress 35013355 07 2012 177 Standard symbol Type Access _ Meaning Address RECONF_IN_PROGR BOOL R Reconfiguration of the MWr m c 0 15 module in progress NOTE If the module is not present or is disconnected explicit exchange objects READ_STS for example are not sent to the module STS_IN_ PROG MWr m c 0 0 0 but the words are refreshed Explicit Exchange Report
61. Chapter This chapter contains the following topics Topic Page Physical Description of the Counting Module 26 Fitting of Counting Modules 28 Fitting 10 Pin and 16 Pin Terminal Blocks to a BMX EHC 0200 Counting 30 Module How to Connect BMX EHC 0200 Module Connecting 16 Pin and 10 Pin 31 Terminal Blocks 35013355 07 2012 25 Counting Module BMX EHC 0200 General Rules for Installation Physical Description of the Counting Module Illustration The figure below present the counting module BMX EHC 0200 DOOWWIWILITI DOOUWUTILICI a POU UY WE O a BMX EHC 0200 Physical Elements of the Modules The table below presents the elements of the counting module BMX EHC 0200 Number Description 1 M odule state LEDs State LEDs at module level State LEDs at channel level 16 pin connector to connect the counter 0 sensors 16 pin connector to connect the counter 1 sensors 10 pin connector to connect Auxiliary outputs Sensor power supplies 26 35013355 07 2012 Counting Module BMX EHC 0200 General Rules for Installation Accessories The BMX EHC 0200 module requires the use of the following accessories e Two 16 pin terminal blocks e One 10 pin terminal block e One BMX XSP 0400 0600 0800 1200 electromagnetic compatibility kit see Modicon M340 Using Unity P
62. Current counter value is between lower SIWr m c 1 1 threshold sQDr m c 2 and upper threshold SQDr m c 4 COUNTER_HIGH BOOL R Current counter value greater than upper SIWr m c 1 2 threshold sQDr m c 4 CAPT_O_LOW BOOL R Value captured in register 0 is less than IWr m c 1 3 lower threshold SQDr m c 2 CAPT_O_WIN BOOL R Value captured in register 0 is between SIWr m c 1 4 lower threshold sQDr m c 2 and upper threshold sQDr m c 4 CAPT_O_HIGH BOOL R Value captured in register 0 is greater than IWr m c 1 5 upper threshold sQDr m c 4 CAPT_1_LOW BOOL R Value captured in register 1 is less than SIWr m c 1 6 lower threshold SQDr m c 2 CAPT_1_WIN BOOL R Value captured in register 1 is between SIWr m c 1 7 lower threshold sQDr m c 2 and upper threshold SQDr m c 4 CAPT_1_HIGH BOOL R Value captured in register 1 is greater than IWr m c 1 8 upper threshold 3QDr m c 4 35013355 07 2012 181 Event Sources lWr m c 10 Word The following table presents the meanings of the bits of the sIWr m c 10 word Standard symbol Type Access Meaning Language object EVT_SOURCES INT R Event sources field IWr m c 10 EVT_RUN BOOL R Event due to start of counter IWr m c 10 0 EVT_MODULO BOOL R Event due to modulo switch SIWr m c 10 1 EVT_SYNC_PRESET BOOL R Event due to synchronization or preset SIWr m c 10 2 EVT_COUNTER_LOW BOOL R Event due to coun
63. Debugging the Counting Modules Event Counting Mode Debugging At a Glance The table below presents the event counting mode debugging elements Label Language object Type Counter value IDr m c 2 Digital Counter valid IWr m c 0 3 Binary Counter low IWr m c 1 0 Binary Counter in window IWr m c 1 1 Binary Counter high SIWr Geks2 Binary Counter in low limit IWr m c 0 5 Binary Counter in high limit SIWr m c 0 4 Binary Input A state Ir m c 4 Binary Input SYNC state SIr m c 6 Binary SYNC enable SQWr m c 0 0 Binary SYNC force SQr m c 4 Binary SYNC state SIWr m c 0 2 Binary SYNC reset SQr m c 8 Binary Output 0 state SIr m c 0 Binary Output 0 cmd Qr c 0 Binary Output 1 state SIr m c 1 Binary Output 1 cmd SQr m c 1 Binary Output latch 0 state Ir m c 2 Binary Output latch 0 enable S Qr m c 2 Binary Output latch 1 state Ir m c 3 Binary Output latch 1 enable SQr m c 3 Binary Low threshold value SQDr m c 2 Digital High threshold value SQDr m c 4 Digital Compare enable SQWr m c 0 5 Binary Compare suspend SQWr m c 0 6 Binary For a description of each language object refer to T UNSIGNED_CPT_BMX lIODDT see page 180 152 35013355 07 2012 Debugging the Counting Modules Period Measuring Mode Debugging At a Glance The table below presents the period measuring mode debugging elements
64. E BOOL R W EVENT task call at start of the SQWr m c 1 0 counting function EVT_MODULO_ENABLE BOOL R W EVENT task call when there is a SQWr m c 1 1 counter reversal EVT_REF_ENABLE BOOL R W EVENT task call during counter SQWr m c 1 2 synchronization or preset EVT_COUNTER_LOW_ENABLE BOOL R W EVENT task call when the counter SQWr m c 1 3 value is less than lower threshold EVT_COUNTER_WINDOW_ENABLE BOOL R W EVENT task call when the counter is 3QWr m c 1 4 between the lower and upper threshold EVT_COUNTER_HIGH_ENABLE BOOL R W EVENT task call when the counter SQWr m c 1 5 value is greater than the upper threshold EVT_CAPT_O_ENABLE BOOL R W EVENT task call during capture in SQWr m c 1 6 register 0 EVT_CAPT_1_ENABLE BOOL R W EVENT task call during capture in SQWr m c 1 7 184 35013355 07 2012 Details of the Explicit Exchange Objects for the T_CPT_BMX type IODDT At a Glance Preset Values This section presents the explicit exchange objects for the T Unsigned _CPT BMX and T Signed CPT BMx types IODDTs which are applicable to all BMX EHC eeee counting modules They includes word type objects whose bits have a specific meaning These objects are described in detail below Sample variable declaration T Unsigned _ CPT_BMX andT_ Signed_CPT_BMx types IODDT_VAR1 NOTE e in general the meaning of the bits is given for bit status 1 e not all bits are used The table below shows the meaning of the s
65. EF Set to preset counter value Qr m c 6 FORCE_ENABLE Implementation of counter Qr m c 7 FORCE_RESET Reset counter Qr m c 8 SYNC_RESET Reset SYNC_REF_FLAG Qr m c 9 MODULO_RESET Reset MODULO_FLAG The following table presents the valid_ref bit in bold which is an element of the QWr m c 0 function enabling word Language object Standard symbol Meaning QWr m c 0 0 VALID_SYNC Synchronization and start authorization for the counting function via the IN_SYNC input sQWr m c 0 1 VALID_REF Operation authorization for the internal preset function SQWr m c 0 2 VALID_ENABLE Authorization of the counter enable via the IN_EN input sQWr m c 0 3 VALID_CAPT_O Capture authorization in the captureO register SQWr m c 0 4 VALID_CAPT_1 Capture authorization in the capture register SQWr m c 0 5 COMPARE_ENABLE Comparators operation authorization SQWr m c 0 6 COMPARE_SUSPEND Comparator frozen at its last value The following table presents the homing principle SQr m c 5 Edge Status of the Status of the counter valid ref bit SQWr m c 0 1 Homing condition edge Set to 0 Not preset depending on the configuration Homing condition edge Set to 1 Preset depending on the configuration Rising edge on force _ ref bit SettoOor1 Preset 35013355 07 2012 63 BMX EHC 0200 Functionalities Enable Function When the preset oc
66. EXCH_RPT The table below shows the report bits EXCH RPT SMWr m c 1 Standard symbol Type Access Meaning Address STS_ERR BOOL R Error reading channel status MWr m c 1 0 words 1 failure CMD_ERR BOOL R Error during a command MWr m c 1 1 parameter exchange 1 failure ADJ_ERR BOOL R Error during an adjust MWr m c 1 2 parameter exchange 1 failure RECONF_ERR BOOL R Error during reconfiguration of MWr m c 1 15 the channel 1 failure Counting Module Use The following table describes the steps realised between a Couting Module and the system after a power on Step Action 1 Power on The system sends the configuration parameters 3 The system sends the adjust parameters by WRITE_PARAM method Note When the operation is finished the bit MWr m c 0 2 switches to 0 If in the begining of your application you use a WRITE_PARAM command you must wait until the bit MWr m c 0 2 switches to 0 178 35013355 07 2012 13 2 Language Objects and IODDT Associated with the Counting Function of the BMX EHC xxxx Modules Subject of this Section This section presents the language objects and IODDTs associated with the counting function of BMX EHC eees modules What Is in This Section This section contains the following topics Topic Page Details of Implicit Exchange Objects for the T_Unsigned_CPT_BMX and 180 T_S
67. El F Station Eh Tg 0 PLC bus cy poe to 3 CANopen E seneeres fa Derived Data Types AEREE a Derived FB Types E PPSF ga Variables amp FB Instances E R 6a Communication a bosesbes fa Program eusdienae a Animation Tables IPERI Operator screens isiedesuae ga Documentation Double click on the PLC Bus directory Result the following screen appears Bus 0 BMX P34 2010 01 00 hd fil PLC bus LIDi 106 35013355 07 2012 Screens Step Action 3 Double click on the counting module Result the module screen appears 2 channel generic counter Version 1 00 6 amp Run Er 10 BMX EHC 0200 Hl Config Fi Adjust TH Debug Faut lo 1 Polarity 1 KIO 3021 21 Pol zi Fault Recovery KINO 3021 ON aiched off Fal KWO 3021 3 Without 7 Function Task module4_E HI0 3 BMXE 35013355 07 2012 107 Screens Description of the Counting Module Screens Introduction Description of the Screens The various available screens for the BMX EHC 0200 counting modules are Configuration screen Adjust screen Debug screen can only be accessed in online mode
68. FLT_OUTPUTS BOOL R External error at outputs SMWr m c 2 1 INTERNAL_FLT BOOL R Internal error channel inoperative SMWr m c 2 4 CONF_FLT BOOL R Hardware or software configuration error sMWr m c 2 5 COM_FLT BOOL R Bus Communication error SMWr m c 2 6 APPLI_FLT BOOL R Application error SMWr m c 2 7 Channel Error 3MWr m c 3 The table below presents the meaning of the error bits on the Wr m c 3 word Standard symbol Type Access Meaning Language object SENSOR_SUPPLY BOOL R Low input power supply for the sensors SMWr m c 3 2 ACTUATOR_SUPPLY_FLT BOOL R Output power supply failure SMWr m c 3 3 SHORT_CIRCUIT_OUT_O BOOL R Short circuit on output 0 SMWr m c 3 4 SHORT_CIRCUIT_OUT_1 BOOL R Short circuit on output 1 SMWr m c 3 5 186 35013355 07 2012 13 3 Device DDTs Associated with the Counting Function of the BMX EHC xxxx Modules Counter Device DDT Names Introduction This topic describes the Unity Pro Counter Device DDT The default device DDT name contains the following information e module input and or output X symbol e module insertion number symbol Example MOD CPT X The default device DDT type contains the following information e platform with e M for Modicon M340 e device type CPT for counter function STD for standard e direction e IN e OUT e max channel 2 or 8 Example For a Modicon M340 with 2 standard inputs T M_CPT_STD_IN
69. Hz The measured values are between 60 000 000 000 and 60 000 000 000 NOTE You have to check the validity bit sIWr m c 0 3 before taking into account the numerical values such as the counter and the capture registers Only the validity bit at the high level set to 1 guarantees that the mode will operate correctly within the limits 35013355 07 2012 83 BMX EHC 0200 Functionalities BMX EHC 0200 Module Operation in One Shot Counter Mode At a Glance Basic Principle Operation Using the one shot counter mode allows you to quantify a group of parts In this mode activating the synchronization function starts the counter which starting from a value defined by the user in the adjust screen preset value decreases with every pulse applied to the IN_A input until it reaches the value 0 Downcounting is made possible when the enable function is activated The counting register is thus updated every 1 ms One basic use of this mode is using an output to indicate the end of a group of operations when the counter reaches 0 The trend diagram below illustrates the counting process in one shot counter mode IN_A input pulses IN_SYNC input A f valid_syncbit IN_EN input valid_enablebit Current counter value i j User defined value preset value run counter operating bit In the trend diagram above
70. IN_A input Ir m c 4 INPUT_B BOOL R Physical state of IN_B input Ir m c 5 INPUT_SYNC BOOL R Physical state of the IN_SYNC input or SIr m c 6 IN_AUX INPUT_EN BOOL R Physical state of IN_EN input enable Ir m c 7 INPUT_REF BOOL R Physical state of the IN_REF input preset SIr m c 8 INPUT_CAPT BOOL R Physical state of IN_CAP input capture SIr m c 9 180 35013355 07 2012 Counter Status IlWr m c 0 Word The following table presents the meanings of the bits of the sIWr m c 0 status word Standard symbol Type Access Meaning Language object RUN BOOL R The counter operates in counting mode only SIWr m c 0 0 MODULO_FLAG BOOL R Flag set to 1 by a modulo switch event SIWr m c 0 1 SYNC_REF_FLAG BOOL R Flag set to 1 by a preset or synchronization event 3IWr m c 0 2 VALIDITY BOOL R The current numerical value is valid SIWr m c 0 3 HIGH_LIMIT BOOL R The current numerical value is locked at the SIWr c 0 4 upper threshold value LOW_LIMIT BOOL R The current numerical value is locked at the IWr m c 0 5 lower threshold value Comparison Status IWr m c 1 Word The following table presents the meanings of the bits of the sIwWr m c 1 status word Standard symbol Type Access Meaning Language object COUNTER_LOW BOOL R Current counter value less than lower SIWr m c 1 0 threshold SQDr m c 2 COUNTER_WIN BOOL R
71. ITY Validity bit is used to indicate that the counter current value frequency and compare status registers contain valid data If the bit is set to 1 the data is valid If the bit is set to O the data is not valid SIWr m c 0 4 HIGH_LIMIT The bit is set to 1 when the input frequency signal is out of range Type of the IODDT In this mode the type of the IODDT must be T UNSIGNED_CPT_BMxX 74 35013355 07 2012 BMX EHC 0200 Functionalities Operating Limits The maximum frequency that the module can measure on the IN_A input is 60 kHz Beyond 60 kHz the counting register value may decrease until it reaches 0 Beyond 60 kHz and up to the real cut off frequency of 100 kHz the module may indicate that it has exceeded the frequency limit When there is a variation in frequency the value restoration time is 1 s with a value precision of 1 Hz When there is a very significant variation in frequency an accelerator enables you to restore the frequency value with a precision of 10 Hz in 0 1 s The maximum duty cycle at 60 KHz is 60 NOTE You have to check the validity bit sIWr m c 0 3 before taking into account the numerical values such as the counter and the capture registers Only the validity bit at the high level set to 1 guarantees that the mode will operate correctly within the limits 35013355 07 2012 75 BMX EHC 0200 Functionalities BMX EHC 0200 Module Operation in Even
72. Module Presentation of the BMX EHC 0200 Counting Module At a Glance The BMX EHC 0200 counting module enables the counting or downcounting of pulses to be performed It has the following functions e Enable e Capture e Comparison e Homing or reset to 0 e 2 physical outputs Structure of a counter channel The following illustration shows the overall structure of a counter channel 18 35013355 07 2012 Counting Module Modicon M340H Hardened Equipment M340H The Modicon M340H hardened equipment is a ruggedized version of M340 equipment It can be used at extended temperatures 25 70 C 13 158 F and in harsh chemical environments This treatment increases the isolation capability of the circuit boards and their resistance to e condensation e dusty atmospheres conducting foreign particles e chemical corrosion in particular during use in sulphurous atmospheres oil refinery purification plant and so on or atmospheres containing halogens chlorine and so on The M340H equipment when within the standard temperature range 0 60 C 32 140 F has the same performance characteristics as the standard M340 equipment At the temperature extremes 25 0 C and 60 70 C 13 32 F and 140 158 F the hardened versions can have reduced power ratings that impact power calculations for Unity Pro applications If this equipment is operated outside the 25 70 C 13 158 F tem
73. Output 0 cmd SQr m c 0 Binary Output 1 state Ir m c 1 Binary Output 1 cmd Qr m c 1 Binary Output latch 0 state SIr m c 2 Binary Output latch 0 enable S Qr m c 2 Binary Output latch 1 state SIr m c 3 Binary Output latch 1 enable Qr m c 3 Binary Low threshold value SQDr m c 2 Digital High threshold value SQDr m c 4 Digital Compare enable SQWr m c 0 5 Binary Compare suspend SQWr m c 0 6 Binary For a description of each language object refer to T_ UNSIGNED_CPT_BMX IODDT see page 180 35013355 07 2012 155 Debugging the Counting Modules Modulo Loop Counter Mode Debugging At a Glance The table below presents the modulo loop counter mode debugging elements Label Language object Type Counter value IDr m c 2 Digital Counter valid IWr m c 0 3 Binary Counter low IWr m c 1 0 Binary Counter in window IWr m c 1 1 Binary Counter high SIWr m c 1 2 Binary Counter in low limit SIWr m c 0 5 Binary Counter in high limit SIWr m c 0 4 Binary Capture value IDr m c 4 Digital Capture low SIWr m c 1 3 Binary Capture in window SIWr m c 1 4 Binary Capture high SIWr m c 1 5 Binary Capture enable SQWr m c 0 3 Binary Input A state Ir m c 4 Binary Input B state Ir m c 5 Binary Input SYNC state SIr m c 6 Binary SYNC enable SQWr m c 0 0 Binary SYNC force SQr m c 4 Binary SYNC state SIWr m c 0 2 Binary SYNC reset SQWr m c 8 Bina
74. PUT BLOCK 1 ENABLE ie ll fos zal D IF Definition of the lower and upper threshold values Encoder LOWER TH VALUE First Labelling Point Encoder UPPER_TH_ VALUE Second_ Labelling Point Process Deflection Watching IF Encoder CAPT 0 VALUE gt deflection parameter true THI last_box late 1 Default light set ON Ed ELSE last_box late 0 Default light set OFF zal ND IF If the next part arrives just in the right time the green indicator lights on IF Encoder CAPT 0 VALUE 0 THEN Last Box On Target 1 Green light set ON ELSE Last Box On Target 0 Green light set OFF za De TE Procedure for Creating an ST Section The table below shows the procedure for creating an ST section for the application Step Action 1 In Project Browser Program Tasks double click on MAST 2 Right click on Section then select New section Give your section a name and select ST language 3 The name of your section appears and can now be edited by double clicking on it 4 To use the I O object right click in the editor then click on Data selection and on E Click on onthe front of the I O derived variable Encoder and the list of the I O objects appears Click on the one you need and confirm with OK NOTE In the Data selection windows the IODDT checkbox must be checked to
75. SIWr 6 1 3 Binary Capture 0 in window SIWr Carns Binary Capture 0 high SIWr ese Binary Capture 0 enable SQWr m c 0 3 Binary Capture 1 value IDr m c 16 Digital Capture 1 low SIWr cAI Binary Capture 1 in window SIWr Gads Binary Capture 1 high IWr m c 1 8 Binary Capture 1 enable SQWr m c 0 4 Binary Input A state Ir m c 4 Binary Input B state Ir m c 5 Binary IN_SYNC input SIr m c 6 Binary Modulo state IWr m c 0 1 Binary Modulo reset Qr m c 9 Binary SYNC state SIWr m c 0 2 Binary SYNC reset Qr m c 8 Binary Input EN Ir m c 7 Binary EN enable SQWr m c 0 2 Binary Counter enable SQr m c 6 Binary Input REF Ir m c 8 Binary REF enable SQWr m c 0 1 Binary REF force SQWr m c 5 Binary 158 35013355 07 2012 Debugging the Counting Modules Label Language object Type Input CAP SIr m c 9 Binary Output 0 state Ir m c 0 Binary Output 0 cmd SQr m c 0 Binary Output 1 state SIr m c 1 Binary Output 1 cmd SQr m c 1 Binary Counter reset SQr m c 7 Binary Output latch 0 state SIr m c 2 Binary Output latch 0 enable SQr m c 2 Binary Output latch 1 state SIr m c 3 Binary Output latch 1 enable SQr m c 3 Binary Low threshold value SQDr m c 2 Digital High threshold value SQDr m c 4 Digital Compare enable SQWr m c 0 5 Binary Compare suspend SQWr m c 0 6 Binary For a description of each language object refer to T_SIGNED_CPT_BMX IODDT see page 180 35013355 07 2012 159 Debugging the Co
76. SYNC l r m c 6 physical input or the force sync bit set to 1 This function is usable in the following counting modes Pulse width modulation to restart the output signal at the beginning phase at 1 Modulo loop counter to reset and start the counter One shot counter to preset and start the counter e Event counting to restart the internal time base at the beginning The user may configure the synchro edge parameter in the configuration screen by choosing from the following two possibilities to configure the sensitive edge that carries out the synchronization e Rising edge of the IN_SYNC input e Falling edge of the IN_SYNC input 60 35013355 07 2012 BMX EHC 0200 Functionalities The following table presents the force _ sync bit in bold which is an element of the Qr m c d output command word Language Standard symbol Meaning object Qr m c 0 OUTPUT_O Forces OUTPUT_0 to level 1 SQr m c 1 OUTPUT_1 Forces OUTPUT_1 to level 1 Qr m c 2 OUTPUT_BLOCK_O_ENABLE Implementation of output 0 function block Qr m c 3 OUTPUT_BLOCK_1_ENABLE Implementation of output 1 function block sQr m c 4 FORCE_SYNC Counting function synchronization and start Qr m c 5 FORCE_REF Set to preset counter value Qr m c 6 FORCE_ENABLE Implementation of counter Qr m c 7 FORCE_RESET Reset counter Qr m c 8 SYNC_RESET Reset SYNC_REF_FLAG Qr m c 9 MODULO_RESET Reset MODULO_FLAG The fo
77. TUS No 11 QW0 30 0 3 Capture 0 enable m3_0200_0 FUNCTIONS_ ENABLING 0 12 103 0 4 Input A m PUT_A 0 43 I0 3 0 5 Input B m3 0200 O JNPUT B 0 14 10 3 0 6 Input SYNC m3_0200_0 INPUT_SYNG 0 15 QWO 3000 SYNC enable m3_0200_0 FUNCTIONS ENABLING 0 x O0 3 0 4 SYNC force m3 0200 0 FORCE SYNC 0 IW0 30 0 2 SYNC state m3_0200_0 COUNTER_STATUS Yes 18 SYNC reset m SYNC_RESET 0 19 Q0 3 0 7 Input EN m PUT_EN 0 20 QWO 30 02 EN enable m3 0200 O FUNCTIONS ENABLING 0 21 Q0 3 0 6 Counter enable m3_0200_0 FORCE_ENABLE il 22 00 0 0 Output 0 state m3_0200_0 OUTPUT_0 Echo 0 23 Q0 3 0 0 Output Ocmd m3_0200_0 0UTPUT 0 0 24 10 3 0 1 Output 1 state m3_0200_0 QUTPUT_1_Echo 0 25 Q0 3 0 1 Output T cm OUTPU 0 26 Q030 7 Counter rese m3 02000 FORCE_RESE 0 2 1 030 2 Output latch Q state m3_0200_0 QUTPUT_BLOCK_0 0 28 Q0 3 0 2 Outputlaich 0 enable m3 _0200_0 0UTPUT BLOCK 0 ENABLE 0 29 10 3 0 3 Output latch T state m3_0200_0 OUTPUT BLOCK 0 4 a303 l Oupuilaich Tenable m3 0200 O OUTPUT BLOCK TENABLE 0 Function 31 QD0 3 0 2 Low threshold value m3 _0200_0 LOWER_TH_VALUE 0 Vodulalocpcoute 2 0D0 304 Tigh threshold value m3 0200 O UPPER TH VALUE 12 Viodulo Loop Courl 33 QW0 3 0 05 Compare enable m3_0200_0 FUNCTIONS_ ENABLING il z Task 34 QWO0 30 0 6 Compare suspend m3_0200_0 FUNCTIONS_ ENABLING 0 X MAST F 35 IA0 3 0 0 1 Modulo fag m3_0200_0 COUNTER_STATUS Yes 36 Q0 3 0 9 Modulo rese m3_020
78. The sensors have a supply fault O o The actuators have a supply fault amp Short circuit on output QO Short circuit on output Q1 The channels are operational The voltage is present at output QO OO The voltage is present at output Q1 O AE SE JE SE JE JE SE 0 0 OIOIOJ S 35013355 07 2012 37 BMX EHC 0200 ae is present at input O o O o Nee is present at input O e O e None is present at input O o O o NOE is present at input O o O Nee is present at input O o O ee is present at input O o O Legend LED on OLED off amp LED flashing slowly LED flashing fast An empty cell indicates that the state of the LED s is not taken into account 38 35013355 07 2012 BMX EHC 0200 BMX EHC 0200 Module Wiring At a Glance Field sensors The BMX EHC 0200 counting module uses the following e Two 16 pin connectors for the inputs e One 10 pin connector for the outputs 4 DANGER HAZARD OF ELECTRIC SHOCK e disconnect voltage supplying sensors and pre actuators before plugging unplugging the terminal block on the module e remove the terminal block before plugging unplugging the module on the rack Failure to follow these instructions will result in death or serious injury NOTE The two 16 pin connectors and the 10 pin connector
79. The table below shows the procedure for creating an animation table Step Action 1 Inthe Project browser right click on Animation tables The edit window opens Click on first cell in the Name column then on the E button and add the variables you require 35013355 07 2012 219 Application using Unity Pro Animation Table Created for the Application The following screen shows the animation table used by the application Table Fl Modify Force y k me tt hk E Name v Value Type w Comment 0 ENT DINT 4 Encoder COUNTER_CURRENT_VALUE DINT 4 Encoder EVT_MODULO_ENABLE BOOL 4 Encoder COMPARE_ENABLE BOOL 4 Encoder LOWER_TH_VALUE DINT 4 Encoder UPPER_TH_VALUE DINT 7 First_Labelling_Point DINT 4 Second_Labelling_Point DINT 4 Position_0 BOOL M Position_1 BOOL Position 2 BOOL te Nb_Box DINT os NOTE The animation table is dynamic only in online mode display of variable values 220 35013355 07 2012 Application using Unity Pro Creating the Operator Screen At a Glance The operator screen is used to animate graphic objects that symbolize the application These objects can belong to the Unity Pro library or can be created using the graphic editor NOTE For more information see Unity Pro online help click on then Unity then Unity Pro then Operate modes and Operator screens Illustration on an Operator Screen
80. What Is in This Chapter This chapter contains the following sections Section Topic Page 6 1 BMX EHC 0200 Module Configuration 48 6 2 BMX EHC 0200 Module Operation Modes 73 35013355 07 2012 47 BMX EHC 0200 Functionalities 6 1 BMX EHC 0200 Module Configuration Subject of this Section This section deals with the configuration of the BMX EHC 0200 module What Is in This Section This section contains the following topics Topic Page Input Interface Blocks 49 Programmable Filtering 50 Comparison 51 Output Block Functions 54 Diagnostics 58 Synchronization Homing Enable Reset to 0 and Capture Functions 60 Modulo Flag and Synchronization Flag 68 Sending Counting Events to the Application 70 48 35013355 07 2012 BMX EHC 0200 Functionalities Input Interface Blocks Description The BMX EHC 0200 counting module has six inputs e 3 fast inputs e 3 classic inputs Fast Inputs The table below presents the module s fast inputs Input Use with sensors Use with an encoder IN_A input Clock input for measurement or For signal A single upcounting IN_B input Second clock input for differential For signal B counting or measurement IN_SYNC input Main synchronization input used for For signal Z starting and homing Used for homing Classic Inputs The table below presents the module s classic inputs Input
81. _2 Adjustment Parameter limitation Adjustment parameters cannot be changed from the PLC application during operation no support of READ PARAM WRITE PARAM SAVE PARAM RESTORE PARAM Modifying the adjustment parameters of a channel from Unity Pro during a CCOTF operation causes the channel to be re initialized The concerned parameters are PRESET VALUE Preset value e CALIBRATION FACTOR Calibration Factor MODULO VALUE Modulo value e SLACK VAL Offset value e HYSTERESIS VALUE Hysteresis value 35013355 07 2012 187 List of Implicit Device DDT The following table shows the list of the Modicon M340 devices and their corresponding device DDT name and type Device DDT Name Device DDT Type Modicon M340 Devices MOD_CPT_2_ T_M CPT_STD_IN 2 BMX EHC 0200 MOD_CPT_8_ T_M CPT _STD IN 8 BMX EHC 0800 Implicit Device DDT Description The following table shows the T M CPT STD _IN_x status word bits Standard Symbol Type Meaning Access MOD_HEALTH BOOL 0 the module has a detected read error 1 the module is operating correctly MOD_FLT BYTE internal detected errors byte of the read module CPT_CH_IN ARRAY 0 x 1 of T M_ CPT _STD_CH_IN Array of structure The following table shows the T M CPT STD CH IN x 0 x 1 status word bits Standard Symbol Type Bit Meaning Access FCT_TYPE
82. ables represent the topologic addressing of the module Each parameter had the following signification e r represents the rack number e m represents the position of the module on the rack e c represents the channel number Configuration Objects The table below presents modulo loop counter mode configurable elements Label Address in the configuration Configurable values Counting mode SKWr m c 2 least significant byte Modulo loop counter mode The value of the least significant byte of this word is 7 IN_A input filter SKWr m c 3 least significant byte The least significant byte can take the following values 0 none e 1 low e 2 medium 3 high IN_A input filter SKWr m c 3 most significant byte The most significant byte can take the following values 0 none e 1 low 2 medium 3 high IN_SYNC input filter SKWr m c 4 least significant byte The least significant byte can take the following values 0 none e 1 low e 2 medium 3 high IN_EN input filter SKWr m c 4 most significant byte The most significant byte can take the following values 0 none e 1 low 2 medium 3 high 130 35013355 07 2012 Configuration of the Counting Modules Label Address in the Configurable values configuration Input power supply KWr m c 2 8 General input output fault bi
83. acknowledge if the fault storing is configured Internal error or channel self testing e module faulty e module missing or off e module running self test Module fault has gone down to channel level Refer to module level diagnostics Different hardware and software configurations Module fault has gone down to channel level Refer to module level diagnostics 166 35013355 07 2012 Display of Error Counting Module Fault indicated Other Possible interpretation and or action consequences Invalid software configuration Check and modify the configuration constants incorrect constant bit combination not associated with any configuration Communication error Check the connections between the racks Application fault refusal to configure Diagnose the fault more precisely or adjust 35013355 07 2012 167 Display of Error Counting Module 168 35013355 07 2012 The Language Objects of the Counting Function 13 Subject of this Chapter This chapter describes the language objects associated to the counting tasks as well as the different ways of using them What Is in This Chapter This chapter contains the following sections Section Topic Page 13 1 The Language Objects and IODDT of the Counting Function 170 13 2 Language Objects and IODDT Associated with the Counting 179 Function of the BMX EHC xxxx Modules
84. ains the following topics Topic Page Adjust Screen for BMX EHC 0200 Counting Modules 140 Setting the Preset Value 142 Setting the Calibration Factor 143 Modulo Adjust 144 Setting the Hysteresis Value 145 139 35013355 07 2012 Counting Module Settings Adjust Screen for BMX EHC 0200 Counting Modules At a Glance This section presents the adjust screen for BMX EHC 0200 counting modules Illustration The figure below presents the adjust screen for the BMX EHC 0200 module in modulo loop counter mode 1 2 3 4 5 6 2 channel generic counter Version 1 00 y Run Er l0 E BMX EHC 0200 Hl Cdnfg C Adjust EN Debug Faut ACounter 0 Modulo L 5 al Modulo L Counter fa Modulo Label Symbol Int value Value J Uni 0 Modulo_ m3_0200_0 Modulo VALU 15 15 Ls gt Function Modul L i Task MAST Bi module4_E 0 3 BMXE 140 35013355 07 2012 Counting Module Settings Description of the Screen The following table presents the various parts of the above screen Number Element Function 1 Label field This field contains the name of each variable that may be adjusted This field may not be modified and can be accessed in both local and online modes 2 Tab The tab in the foreground indicates the current mode The current mode is therefore the adjust mode
85. al Quadrature X4 Reverse Quadrature X1 Reverse Quadrature X2 Reverse Quadrature X4 35013355 07 2012 91 BMX EHC 0200 Functionalities The following table shows the upcounting and downcounting principle according to the selected configuration Selected configuration Upcounting condition Downcounting condition A Up B Down Rising edge at the IN_A input Rising edge at the IN_B input A Impulse B Direction Rising edge at the IN_A input and low state at the IN_B input Rising edge at the IN_A input and high state at the IN_B input Normal Quadrature X1 Rising edge at the IN_A input and low state at the IN_B input Falling edge at the IN_A input and low state at the IN_B input Normal Quadrature X2 Rising edge at the IN_A input and low state at the IN_B input Falling edge at the IN_A input and high state at the IN_B input Falling edge at the IN_A input and low state at the IN_B input Rising edge at the IN_A input and high level at the IN_B input Normal Quadrature X4 Rising edge at the IN_A input and low state at the IN_B input High state at the IN_A input and rising edge at the IN_B input Falling edge at the IN_A input and high state at the IN_B input Low state at the IN_A input and falling edge at the IN_B input Falling edge at the IN_A input and low state at the IN_B input Low state at the IN_A input and rising edge at the IN_B input Rising
86. al read value is locked at the upper threshold value LOW_LIMIT BOOL 5 the current numerical read value is locked at the lower threshold value 35013355 07 2012 189 Standard Symbol Type Bit Meaning Access COMPARE_STATUS INT COUNTER_LOW BOOL O current counter value read less than lower threshold LOWER_TH_VALUE COUNTER_WIN BOOL 1 current counter value is read between lower threshold LOWER_TH_VALUE and upper threshold UPPER_TH_VALUE COUNTER_HIGH BOOL 2 current counter value read greater than upper threshold UPPER_TH_VALUE CAPT_O_LOW BOOL 3 Value captured in read register 0 is less than lower threshold LOWER_TH_VALUE CAPT_O_WIN BOOL 4_ Value captured in read register 0 is between lower threshold LOWER_TH_VALUE and upper threshold UPPER_TH_VALUE CAPT_O_HIGH BOOL 5 Value captured in read register 0 is greater than upper threshold UPPER_TH_VALUE CAPT_1_LOW BOOL 6 Value captured in read register 1 is less than lower threshold LOWER_TH_VALUE CAPT_1_WIN BOOL 7 Value captured in read register 1 is between lower threshold LOWER_TH_VALUE and upper threshold UPPER_TH_VALUE CAPT_1_HIGH BOOL 8 Value captured in read register 1 is greater than upper threshold UPPER_TH_VALUE COUNTER_CURRENT_VALUE_S DINT Current counter value read during event 190 35013355 07 2012
87. al register sIDr m c 14 The valid capt_0 bit sQWr m c 0 3 must be set to 1 to operate When the synchronization is requiered at the same time with the valid_sync bit set to 1 the storage into the capt _0 val register occurs just before reseting the current counter value In the free large counter mode both capture0 and capturel registers are available The capture function always stores the current counter value into the capt _1 val register s1Dr m c 16 as soon as the IN_CAP input receives a rising edge The valid capt_1 bit sQWr m c 0 4 must be set to 1 to operate 66 35013355 07 2012 BMX EHC 0200 Functionalities The capture0 function can be configured as one of the following 2 conditions e Preset condition e Falling edge of the IN_CAP input The valid capt_0 bit sQWr m c 0 3 must be set to 1 to operate If the capture0 function is configured as the preset condition the function stores the current counter value into the capt _0 val register sIDr m c4 when the defined preset condition see page 62 occurs When the preset is requiered at the same time with the valid_ref bit set to 1 the storage into the capt_0 val register occurs just before loading the current counter value at the preset value In all cases the current counter value must be valid before the capture event the validity bit IWr m c 0 3 set to 1 35013355 07 2012 67 BMX EHC 0200 Functionalities Modulo Flag and Synchroni
88. apture registers Only the validity bit at the high level set to 1 guarantees that the mode will operate correctly within the limits 35013355 07 2012 97 BMX EHC 0200 Functionalities BMX EHC 0200 Module Operation in Pulse Width Modulation Mode At a Glance Basic Principle In this operating mode the module uses an internal clock generator to supply a periodic signal at the module s QO output Only the QO output is concerned by this mode as the Q1 output is independent of this mode The output block 0 enable command bit sOr m c 2 must be set to 1 in order to enable a modulation at the QO output The active validation function enables the operation of the internal clock generator that produces the output signal to be validated The active synchronization function enables the output signal to be synchronized by resetting to 0 the internal clock generator The wave form of the output signal depends on e The pwm frequency value QDr m c 6 it defines the frequency from 0 1 Hz value is equal to 1 to 4 KHz value is equal to 40 000 in increments of 0 1 Hz e The pwm duty value sOQWr m c 8 it defines the duty cycle from 5 value is equal to 1 to 95 value is equal to 19 in increments of 5 The following figure shows the operation of the module in the pulse width modulation mode Frequency Duty cycle QO output Validation function Synchronization function
89. are sold separately and are available in the BMX XTS HSC 20 connection kit The module has type 3 of CEI 1131 inputs that support signals from mechanical switching equipment such as e Contact relays e Push buttons e Limit switch sensors e Switches with 2 or 3 wires The equipment must have the following characteristics e Voltage drop less than 8 V e Minimum operating current less than or equal to 2 mA e Maximum current in blocked state less than or equal to 1 5 mA The module complies with most encoders that have a supply of between 10 and 30 V and push pull outputs NOTE The module s 24 V supply for sensors has thermal and short circuit protection 35013355 07 2012 39 BMX EHC 0200 Assignment of the 16 Pin Connector The figure below shows the physical location of the pin numbers for the 16 pin connector The symbol and description of each pin are described in the table below Pin number Symbol Description 1 2 7 8 24V_SEN 24 VDC output for sensors supply 5 6 13 14 GND_SEN 24 VDC output for sensors supply 15 16 FE Functional earth 3 IN_A Input A 4 IN_SYNC Synchronization input 9 IN_B Input B 10 IN_EN Enable input selected 11 IN_REF Homing input 12 IN_CAP Capture input 40 35013355 07 2012 BMX EHC 0200 Sensor Connections The example below shows sensors with applied to inputs IN_A and IN_B and equipment with applied to inputs IN_EN a
90. area Provides an abbreviation as a reminder of the module and module status in online mode LEDs Channel area Is used e By clicking on the reference number to display the tabs e Description which gives the characteristics of the device e 1 0 Objects which is used to presymbolize the input output objects e Faults which shows the device error in online mode e To select a channel e To display the Symbol name of the channel defined by the user using the variable editor General parameters area Allows you to select the counting function and the task associated with the channel e Function counting function among those available for the modules involved Depending on this choice the headings of the configuration area may differ By default no function is configured e Task defines the MAST or FAST task through which the channel s implicit exchange objects will be exchanged These choices are only possible in offline mode Parameters in progress area This area has various functionalities which depend upon the current mode e Configuration is used to configure the channel parameters e Adjust consists of various sections to be completed parameter values displayed according to the choice of counting function e Debug displays the status of the inputs and outputs as well as the various parameters of the current counting function e Faults displays the error that have occurred on the co
91. ation concerning the exchange in progress see page 177 e the exchange report see page 178 Current adjustment parameters The following diagram describes the management principle for an exchange Execution of an explicit exchange Exchange in progress Exchange report NOTE In order to avoid several simultaneous explicit exchanges for the same channel it is necessary to test the value of the word EXCH_STS SMWr m c 0 of the IODDT associated to the channel before calling any EF addressing this channel 174 35013355 07 2012 Management of Exchanges and Reports with Explicit Objects At a Glance Illustration When data is exchanged between the PLC memory and the module the module may require several task cycles to acknowledge this information All IODDTs use two words to manage exchanges EXCH STS SMWr m c 0 exchange in progress EXCH RPT MWr m c 1 report NOTE Depending on the localization of the module the management of the explicit exchanges MW0 0 MOD 0 O for example will not be detected by the application For in rack modules explicit exchanges are done immediately on t Bus and are finished before the end of the execution task So the RI example is always finished when the sMWO 0 mod 0 0 bit is che application he local PLC EAD_ STS for cked by the For remote bus Fipio for example explicit exchanges are not synchrono
92. bit set to 0 Local bit set to 1 Polarity 0 SKWr m c 21 1 Polarity bit set to 0 Polarity bit set to 1 Polarity 1 SKWr m c 21 2 Polarity bit set to 0 Polarity bit set to 1 Fault recovery 21 0 ole z 3 Q Automatic reaction bit set to 1 Activated bit set to 0 35013355 07 2012 137 Configuration of the Counting Modules Event number Label Address in the Configurable values configuration Fallback 0 SkWr m c 2 None bit set to 0 With bit set to 1 Fallback 1 SkWr m c 2 None bit set to 0 With bit set to 1 Fallback value 0 SkWr m c 2 0 bit set to 0 1 bit set to 1 Fallback value 1 SkWr m c 2 0 bit set to 0 1 bit set to 1 Output power supply KWr m c 2 General input output fault bit set to 0 fault Offline bit set to 1 Event SkWr m c 0 Activated if activated is selected the entered event number is coded on the most significant byte of this word Deactivated all bits of the most significant byte of this word are set to 1 138 35013355 07 2012 BMX EHC xxxx Counting Module Settings 1 0 Subject of this Chapter This chapter deals with the possible settings for the counting modes of the BMX EHC eeee modules These settings can be accessed from the Configuration tab on the functional screens of BMX EHC e e modules see page 108 What Is in This Chapter This chapter cont
93. bit set to 1 Pulse width 0 SKWr m c 18 Edit value in the range 1 65535 Pulse width 1 SKWr m c 20 Edit value in the range 1 65535 Event SKWr m c 0 Activated if activated is selected the entered event Event number number is coded on the most significant byte of this word Deactivated all bits of the most significant byte of this word are set to 1 126 35013355 07 2012 Configuration of the Counting Modules One Shot Counter Mode Configuration At a Glance The configuration of a counting module is stored in the configuration constants SKWw The parameters r m and c shown in the following tables represent the topologic addressing of the module Each parameter had the following signification e r represents the rack number e m represents the position of the module on the rack e c represents the channel number Configuration Objects The table below presents the one shot counter mode configurable elements Label Address in the configuration Configurable values Counting mode SKWr m c 2 least significant byte One shot counter mode The value of the least significant byte of this word is 6 IN_A input filter SKWr m c 3 least significant byte The least significant byte can take the following values 0 none e 1 low e 2 medium e 3 high IN_SYNC input filter SKWr m c 4 least significant byte The least significant byte can take
94. c 3 least significant byte The least significant byte can take the following values 0 none e 1 low 2 medium 3 high IN_SYNC input filter SKWr m c 4 least significant byte The least significant byte can take the following values 0 none e 1 low 2 medium 3 high Input power supply fault SKWr m c 2 8 General input output fault bit set to 0 Local bit set to 1 Resolution SKWr m c 8 most significant byte The most significant byte can take the following values 0 1 us e 1 100 us e 2 1 ms 122 35013355 07 2012 Configuration of the Counting Modules Label Address in the Configurable values configuration Mode SkWr m c 8 The least significant byte can take the following least significant values byte e 0 From one edge to the same edge at input IN_A e 1 From one edge to the opposite edge at input IN_A Time out SKDr m c 14 0 1 073 741 823 Output block 0 SKWr m c 17 This word can take the following values 0 off 1 low counter 2 counter in a window 3 High counter 4 pulse less than the lower threshold LT 5 pulse greater than the lower threshold LT 6 pulse less than the upper threshold UT e 7 pulse greater than the upper threshold UT Output block 1 SKWr m c 19 This word can take the following values 0 off 1 low counter 2 c
95. cal state of output Q1 S Ir m c 2 State of the output block function O SIr m c 3 State of the output block function 1 Ir m c 4 Electrical state of IN_A input sIr eS Electrical state of IN_B input sIr m c 6 Electrical state of IN_SYNC input Ir m c 7 Electrical state of IN_EN input SIr m c 8 Electrical state of IN_REF input S Ir m c 9 Electrical state of IN_CAP input 35013355 07 2012 59 BMX EHC 0200 Functionalities Synchronization Homing Enable Reset to 0 and Capture Functions Introduction This section presents the functions used by the various counting modes of the BMX EHC 0200 module e Synchronization function e Homing function e Enable function e Reset to 0 function e Capture functions Each function uses at least one of the following two bits e valid function bit Setting this bit to 1 allows you to take into account the occurrence of an external event which activates the function If this bit is set to 0 the event is not taken into account and does not activate the function The functions enabling word sQWr m c 0 contains all the valid_ function bits e force function bit Setting this bit to 1 allows you to activate the function irrespective of the status of the external event All the force function bits are Or m c 4 sQr m c 8 language objects Synchronization Function The synchronization function is used to synchronize the counter operation upon a transition applied to the IN_
96. curs consequently to the preset condition the application can react using e either the SYNC_REF_FLAG input IWr m c 0 2 see page 68 e or the EVT_SYNC_PRESET input IlWr m c 10 2 see page 70 This function is used to authorize changes to the current counter value depending on the status of the IN_EN physical input This function is used in the following counting modes Pulse width One shot co modulation Modulo loop counter unter e Free large counter The following table presents the force enable bit in bold which is an element of the sQr m c d output command word Language Standard symbol Meaning object Qr m c 0 OUTPUT_O Forces OUTPUT_0 to level 1 sAr c 1 OUTPUT_1 Forces OUTPUT_1 to level 1 Qr c 2 OUTPUT_BLOCK_0_ENABLE Implementation of output 0 function block Qr c 3 OUTPUT_BLOCK_1_ENABLE Implementation of output 1 function block Qr m c 4 FORCE_SYNC Counting function synchronization and start Qr c 5 FORCE_REF Set to preset counter value SQr c 6 FORCE_ENABLE Implementation of counter Qr c 7 FORCE_RESET Reset counter Qr m c 8 SYNC_RESET Reset SYNC_REF_FLAG Qr m c 9 MODULO_RESET Reset MODULO_FLAG The following table presents the valid_enab1e bit in bold which is an element of the SQWr m c 0 function enabling word Language Standard symbol Meaning object sQWr m c 0 0 VALID_SYNC Synchronization and start authorization
97. d a channel can not be desactivated to None General parameters area Allows you to select the counting function and the task associated with the channel e Function counting function among those available for the modules involved Depending on this choice the headings of the configuration area may differ By default Frequency Mode no function is configured e Task defines the MAST task through which the channel s implicit exchange objects will be exchanged These choices are only possible in offline mode Parameters in progress area This area has various functionalities which depend upon the current mode e Configuration is used to configure the channel parameters e Adjust consists of various sections to be completed parameter values displayed according to the choice of counting function NOTE The Input and Output fault parameters are set by default with the value Local or General IO Fault 116 35013355 07 2012 Configuration of the Counting Modules 9 2 Configuration of Modes for the BMX EHC 0200 Module Subject of this Section This section deals with the configuration of the modes of the BMX EHC 0200 counting modules What Is in This Section This section contains the following topics Topic Page Frequency Mode Configuration 118 Event Counting Mode Configuration 120 Period Measuring Mode Configuration 122 Ratio Mode Configuration 125 One Shot Co
98. de This mode counts the encoder input pulses The modulo value is the defined counting limit When the counting reaches the modulo value the counter restarts from 0 A positive transition of the capture signal triggers the count value capture in the capture register and the counter restarts from 0 In this application the modulo value is the constant interval between boxes and the capture signal is sent by the sensor The module reflex outputs are triggered when the counting exceeds defined thresholds Supervision screen Use of elements from the library and new objects Main supervision program This program contains two sections The first one which initiates and uses the Modulo Loop Counter Mode functions is developed using a Structured Text language ST e The Application section which allows operators screen animation is created in Ladder Diagram LD language 35013355 07 2012 203 Application using Unity Pro Process Using Unity Pro At a Glance The following logic diagram shows the different steps to follow to create the application A chronological order must be respected in order to correctly define all of the application elements Description Description of the different types Launching of Unit Pro and selection of the processor i y y Configuration of project in Configuration Y v Declaration of variables in Variables amp FB instances
99. e lower thresholds e Period Measuring mode e Ratio mode One Shot Counter mode e Modulo Loop Counter mode e Free Large Counter mode SIWr m c 10 EVT_COUNTER_HIGH Event due to counter being e Frequency mode greater than the upper e Event Counting mode threshold e Period Measuring mode e Ratio mode e One Shot Counter mode e Modulo Loop Counter mode e Free Large Counter mode SIWr m c 10 EVT_CAPT_O Event due to capture 0 e Modulo Loop Counter Mode e Free Large Counter mode 70 35013355 07 2012 BMX EHC 0200 Functionalities Address Standard Symbol Description Counting mode concerned SIWr m c 10 7 EVT_CAPT_1 Event due to capture 1 Free Large Counter mode SIWr m c 10 8 EVT_OVERRUN Event due to overrun Frequency mode Event Counting mode Period Measuring mode Ratio mode One Shot Counter mode Modulo Loop Counter mode Free Large Counter mode Enabling Events All the events sent by the module whatever their source call the same single event task in the PLC There is normally only one type of event indicated per call The evt_ sources word IWr m c 10 is updated at the start of the event task processing In order for a source to produce an event the validation bit corresponding to the event must be set to 1 Address Description SQWr m c 1 0 Start of counting event validation bit SQWr m c 1 1 Counter rollovering modulo 0 or
100. e is especially recommended for axis monitoring or labeling where the incoming position of each part has to be learned The upcounting or downcounting starts as soon as the homing function is completed The enable function must be activated during the counting by e Setting to 1 the force_enable bit SQr m c 6 e Setting to 1 the valid_enable bit SQWr m c 0 2 when the IN_EN input is at the high level When the enable function is deactivated the last value reported in the counting register is maintained and the counter ignores the pulses applied to the IN_A input However it does not ignore the preset condition In the free large counter mode the counter must be preset at least one time to operate The current counter value is load with the preset value each time the preset condition occurs The current counter can be recorded into the captureO register when the preset condition occurs or using the IN_CAP input The current counter value can be stored into the capture1 register using the IN_CAP input For further information you may see the synchronization function see page 60 and the capture function see page 66 In the free large counter mode the counting register is updated at 1 ms intervals Counting Configurations In this mode the user may select one of the following counting configurations A Up B Down default configuration A Impulse B Direction Normal Quadrature X1 Normal Quadrature X2 Norm
101. e second rising edge is detected The trend diagram below shows the operating mode of the edge to edge sub mode Period A Period B X A B Using the Synchronization Function IN_A input IN_SYNC input Current counter value The trend diagram below illustrates the period measurement counting process in edge to opposite mode when using the synchronization function A 1 C 2 B gt gt gt X A B 1 The falling edge of the IN_SYNC input stops measurement C 2 This pulse is not measured because the IN_SYNC input is not at the high level NOTE The valid sync bit sQWr m c 0 0 must be set to 1 to enable the IN_SYNC input If the IN_SYNC input is not wired the application must force the setting of the force sync bit sOr m c 4 to 1 to authorize the measurements 35013355 07 2012 79 BMX EHC 0200 Functionalities Counter Status Bits in Period Measuring Mode The table below shows the composition of the counters sIWr m c 0 status word in period measuring mode Bit Label Description SIWr m c 0 3 VALIDITY Validity bit is used to indicate that the counter current value period value and compare status registers contain valid data If the bit is set to 1 the data is valid If the bit is set to 0 the data is not valid SIWr m c 0 4 HIGH_LIMIT The bit is set to 1 wh
102. eactivated all bits of the most significant byte of this word are set to 1 136 35013355 07 2012 Configuration of the Counting Modules Pulse Width Modulation Mode Configuration At a Glance The configuration of a counting module is stored in the configuration constants SKWw The parameters r m and c shown in the following tables represent the topologic addressing of the module Each parameter had the following signification e r represents the rack number e m represents the position of the module on the rack e c represents the channel number Configuration Objects The table below presents the pulse width modulation mode configurable elements Label Address in the configuration Configurable values Counting mode SKWr m c 2 least significant byte Pulse width modulation mode The value of the least significant byte of this word is 9 IN_SYNC input filter SKWr m c 4 least significant byte The least significant byte can take the following values 0 none 1 low 2 medium 3 high Synchronization edge SKWr m c 10 8 Rising edge at IN_SYNC bit set to 0 Falling edge at IN_SYNC bit set to 1 IN_EN input filter SKWr m c 4 most significant byte The most significant byte can take the following values e 0 none e 1 low 2 medium 3 high Input power supply fault ole z 3 P N CO General input output fault
103. edge at the IN_A input and high level at the IN_B input High state at the IN_A input and falling edge at the IN_B input Reserve Quadrature X1 Falling edge at the IN_A input and low state at the IN_B input Rising edge at the IN_A input and low state at the IN_B input Reserve Quadrature X2 Falling edge at the IN_A input and low state at the IN_B input Rising edge at the IN_A input and high level at the IN_B input Rising edge at the IN_A input and low state at the IN_B input Falling edge at the IN_A input and high state at the IN_B input Reserve Quadrature X4 Falling edge at the IN_A input and low state at the IN_B input Low state at the IN_A input and rising edge at the IN_B input Rising edge at the IN_A input and high level at the IN_B input High state at the IN_A input and falling edge at the IN_B input Rising edge at the IN_A input and low state at the IN_B input High state at the IN_A input and rising edge at the IN_B input Falling edge at the IN_A input and high state at the IN_B input Low state at the IN_A input and falling edge at the IN_B input Homing Function This function allows to record the current _counter_value register in the capt_0 val register and or to set the current counter value register to the user predefined parameter preset value The value defined by the user as preset _value is contained in the sMDr m c 4 word 92 35013355 07 2012
104. ee large counter in the configuration by default IN_A input pulses IN_B input pulses Preset condition Enable condition IN_CAP input Va a Counter value 4 Preset value g Woda Time Capture0 value x1 X2 X3 Capture1 value X3 94 35013355 07 2012 BMX EHC 0200 Functionalities Behavior at the Counting Limits When the upper or lower limit is exceeded the counter behaves differently according to its configuration In the lock on limits default configuration the counting register maintains the limit value once it has been reached and the counting validity bit changes to 0 until the next preset condition occurs Counter value Lock on limits mode 2M Validity bit Homing event NOTE Overflow or underflow is indicated by two bits LOW_LIMIT and HIGH_LIMIT until the application reloads the counting value predefined by the user force ref bit set to 1 or preset condition true The upcounting or downcounting may therefore resume In the rollover configuration the counting register switches to the opposite limit value when one of the two limits is exceeded Counter value Rollover mode 2M 2M 2M 2M Y Validity bit Homing event 35013355 07 2012 95 BMX EHC 0200 Functionalities Slack Delete In the free large counter mode the coun
105. el via WRITE PARAM READ PARAM SAVE PARAM RESTORE PARAM e The ADJ ERR bit sMWr m c 1 2 specifies whether the adjustment parameters are accepted by the module If the exchange is correctly executed the bit is set to 0 e Rank 15 bits indicate a reconfiguration on channel c of the module from the console modification of the configuration parameters cold start up of the channel e Ther mand c bits indicates the following elements e ther bit represents the rack number e The m bit represents the position of the module in the rack e The c bit represents the channel number in the module NOTE r represents the rack number m the position of the module in the rack while c represents the channel number in the module NOTE Exchange and report words also exist at module level EXCH STS SMWr m MOD and EXCH_RPT 3MWr m MOD 1 as per IODDT type T_GEN_ MOD 176 35013355 07 2012 Example Execution Indicators for an Explicit Exchange EXCH_STS The table below shows the control bits of the explicit exchanges E Phase 1 Sending data by using the WRITE PARAM instruction PLC memory Status parameters Command parameters Adjustment parameters function memory VO module memory or integrated specific application Status parameters Command parameters p Adjustment parameters When the instruction is scanned by the PL
106. en the measured period exceeds the user defined timeout The bit is reset to 0 at the next period if the timeout is not reached SIWr m c 0 5 LOW_LIMIT The bit is set to 1 when more than one measure occurs within 5 ms period The bit is reset to 0 at the next period if the limit is not reached Type of the IODDT In this mode the type of the IODDT must be T UNSIGNED_CPT_BMxX Operating Limits The module can perform a maximum of 1 measurement every 5 ms The shortest pulse that can be measured is 100 us even if the unit defined by the user is 1 us The maximum duration that can be measured is 1 073 741 823 units of time unit defined by the user NOTE You have to check the validity bit sIWr m c 0 3 before taking into account the numerical values such as the counter and the capture registers Only the validity bit at the high level set to 1 guarantees that the mode will operate correctly within the limits 80 35013355 07 2012 BMX EHC 0200 Functionalities BMX EHC 0200 Module Operation in Ratio Mode At a Glance Ratio 1 Mode The ratio mode only uses the IN_A and IN_B inputs This counting mode consists of two sub modes e Ratio 1 is used to divide two frequencies Frequency IN_A Frequency IN_B and is useful for example in applications such as flowmeters and mixers e Ratio 2 is used to subtract two frequencies Frequency IN_A Frequency IN_B and is used in the same appl
107. ency mode 35013355 07 2012 113 Configuration of the Counting Modules Description of the Screen The following table presents the various parts of the above screen Number Element Function 1 Tab The tab in the foreground indicates the current mode The current mode is therefore the configuration mode in this example 2 Label field This field contains the name of each variable that may be configured This field may not be modified 3 Symbol field This field contains the address of the variable in the application This field may not be modified 4 Value field If this field has a downward pointing arrow you can select the value of each variable from various possible values in this field The various values can be accessed by clicking on the arrow A drop down menu containing all the possible values is displayed and the user may then select the required value of the variable 5 Unit field This field contains the unit of each variable that may be configured This field may not be modified 114 35013355 07 2012 Configuration of the Counting Modules BMX EHC 0200 Counting Module Configuration Screens in X80 Drop Introduction The various available screens for the BMX EHC 0200 counting modules are e Configuration screen e Adjust screen Description of the Screens The following diagram presents the counting modules configuration screen 1 EA 2 1 0 1 BMX EHC 0200 High Speed Count
108. er 2 Ch fA BMX EHC 0200 E Counter 0 Frequency Mode E Counter 1 Frequency Mode 4 i z I Configuration fF Adjust Label Symbol Value Input A filter Without General IO fault Output supply fault General IO fault Scaling factor 1 OutputBlock 0 Off OutputBlock 1 Pulsewidth 0 10 sewidth 1 10 Polarity 0 Polarity Polarity 1 Polarity Fault recovery Latched off Fallback 0 With Function Fallback 1 With Frequency Mode Fallback value 0 0 Fallback value 1 0 Task Event Disable MAST Event number RSE RSE RSE RSE RSE SER SERS 35013355 07 2012 115 Configuration of the Counting Modules The following table presents the parts of the various screens Number Element Function Tabs The tab in the foreground indicates the mode in progress Configuration in this example Every mode can be selected using the respective tab The available modes are e Configuration e Adjust Module area Provides an abbreviation as a reminder of the module and module status in online mode LEDs Is used e By clicking on the reference number to display the tabs e Device DDT Channel area Is used e By clicking on the reference number to display the tabs e Description which gives the characteristics of the device e To select a channel e To display the Symbol name of the channel defined by the user using the variable editor NOTE All channel are activated an
109. ery The counting module latches off the output channel and automatically attempts to recover the error and to resume operation on the channel when the error is corrected 56 35013355 07 2012 BMX EHC 0200 Functionalities In case of the fault recovery parameter is configured to Latched off ifan output channel has been latched off because of short circuit detection the counting module recovers the fault upon the following sequence is processed e The error has been corrected e You explicitly reset the fault To reset the error the application software must e Reset the output block enable bit if itis active e Command the ouput to 0 V depends on the polarity In case of the fault recovery parameter is configured to auto recovery an output channel that has been turned off because of error detection starts operating again as soon as the error is corrected No user intervention is required to reset the channels NOTE A minimum delay of 10 s occurs before the error is cleared in both latched off and auto recovery modes Output Polarity Programming It is possible to configure the polarity parameter for each output during the channel configuration polarity parameter configured as polarity The physical output is 24 VDC when the output is at the high level output_0 echo 1 e polarity parameter configured as polarity The physical output is 24 VDC when the output is at the low level output_0 echo 0 By defaul
110. ethodology for Counting Modules Phase Description Mode Adjustment Debugging Debug project from debug screens animation Online tables Debugging the program and adjustment parameters Documentation Building documentation file and printing Online miscellaneous information relating to the project Operation Diagnostic Displaying miscellaneous information necessary for Online supervisory control of the project Diagnostics of project and modules Key These various phases can also be performed in online mode 104 35013355 07 2012 Accessing the Functional Screens of the BMX EHC xxxx Counting 8 Modules Subject of this Chapter This chapter describes the various functional screens of the BMX EHC eee counting modules to which the user has access What Is in This Chapter This chapter contains the following topics Topic Page Accessing the Functional Screens of the BMX EHC 0200 Counting Modules 106 Description of the Counting Module Screens 108 35013355 07 2012 105 Screens Accessing the Functional Screens of the BMX EHC 0200 Counting Modules At a Glance This section describes how to access the functional screens of the BMX EHC 0200 counting modules Procedure To access the screens execute the following actions Step Action 1 Expand the Configuration directory in the project browser Result the following screen appears
111. for the counting function via the IN_SYNC input SQWr m c 0 1 VALID_REF Operation authorization for the internal preset function 64 35013355 07 2012 BMX EHC 0200 Functionalities Language Standard symbol Meaning object sQWr m c 0 2 VALID_ENABLE Authorization of the counter enable via the IN_EN input QWr m c 0 3 VALID_CAPT_O Capture authorization in the captureO register sQWr m c 0 4 VALID_CAPT_1 Capture authorization in the capture1 register QWr m c 0 5 COMPARE_ENABLE Comparators operation authorization QWr m c 0 6 COMPARE_SUSPEND Comparator frozen at its last value The following table presents the validation principle Condition Status of the 3Qr m c 6 valid_enable bit SQWr m c 0 2 and force_enable bit Status of the counter IN_EN set to 1 The 2 bits are setto 0 Not counting frozen IN_EN set to 1 bits is set to 1 At least one of the two Counting free Reset to 0 Function This function is used to load the value 0 into the counter via software command This function is used in the following counting modes e Free large counter e Modulo loop counter e One shot counter The following table presents the force reset bit in bold which is an element of the Qr m c d output command word Language Standard symbol Meaning object Qr m c 0 OUTPUT_O Forces OUTPUT_0O to
112. g a Process deflection indicator lights on 200 35013355 07 2012 Installing the Application Using Unity Pro 1 5 Subject of this chapter This chapter describes the procedure for creating the application described It shows in general and in more detail the steps in creating the different components of the application What Is in This Chapter This chapter contains the following sections Section Topic Page 15 1 Presentation of the Solution Used 202 15 2 Developing the Application 205 35013355 07 2012 201 Application using Unity Pro 15 1 Presentation of the Solution Used Subject of this section This section presents the solution used to develop the application It explains the technological choices and gives the application s creation timeline What Is in This Section This section contains the following topics Topic Page Technological Choices Used 203 Process Using Unity Pro 204 202 35013355 07 2012 Application using Unity Pro Technological Choices Used At a Glance There are several ways of writing a counter application using Unity Pro The one proposed uses the Modulo Loop Counter Mode available in the BMX EHC 0200 counting input module Technological Choices The following table shows the technological choices used for the application Objects Choices used Counter mode Use of the Modulo Loop Counter Mo
113. g Language object FORCE_SYNC BOOL R W Counting function synchronization and SQr m c 4 start FORCE_REF BOOL R W Set to preset counter value Qr C25 FORCE_ENABLE BOOL R W Implementation of counter Qr c 6 FORCE_RESET BOOL R W Reset counter Qr c 7 SYNC_RESET BOOL R W Reset SYNC_REF_FLAG Qr m c 8 MODULO_RESET BOOL R W Reset MODULO_FLAG Qr m c 9 FUNCTIONS ENABLING QWr m c 0 Word The following table presents the meanings of the bits of the sQWr m c 0 words Standard symbol Type Access Meaning Language object VALID_SYNC BOOL R W Synchronization and start authorization for sQWr m c 0 0 the counting function via the IN_SYNC input VALID_REF BOOL R W Operation authorization for the internal SQWr m c 0 1 preset function VALID_ENABLE BOOL R W Authorization of the counter enable via the 3QWr m c 0 2 IN_EN input VALID_CAPT_0O BOOL R W Capture authorization in the captureO SQWr m c 0 3 register VALID_CAPT_1 BOOL R W Capture authorization in the capture SQWr m c 0 4 register COMPARE_ENABLE BOOL R W Comparators operation authorization SQWr m c 0 5 COMPARE_SUSPEND BOOL R W Comparator frozen at its last value SQWr m c 0 6 35013355 07 2012 183 EVENT_SOURCES ENABLING QWr m c 1 Word The following table presents the meanings of the bits of the sQWr m c 1 words register 1 Standard symbol Type Access Meaning Language object EVT_RUN_ENABL
114. g edges of the IN_B input over a period of 1 s The counter value register sIDr m c 12 is updated at the end of each 10 ms interval An absolute limit value is declared on the configuration screen If this limit value is exceeded the counter value register sIDr m c 12 is disabled and the validity bit IWr m c 0 3 to0 Counter Status Bits in Ratio Mode The table below shows bits that are used by the status word 3IWr m c 0 when the counter is configured in ratio mode Bit Label Description SIWr m c 0 3 VALIDITY Validity bit is used to indicate that the counter current value ratio value and compare status registers contain valid data If the bit is set to 1 the data is valid If the bit is set to 0 the data is not valid SIWr m c 0 4 HIGH_LIMIT The bit signals a error when the ratio exceeds the absolute limit The bit is set to 1 when frequency to IN_A becomes too fast The bit is reset to 0 when the frequency to IN_A remains correct SIWr m c 0 5 LOW_LIMIT The bit signals a error when the ratio exceeds the absolute limit The bit is set to 1 when frequency to IN_B becomes too fast The bit is reset to 0 when the frequency to IN_B remains correct 82 35013355 07 2012 BMX EHC 0200 Functionalities Type of the IODDT In this mode the type of the IODDT must be T_SIGNED_CPT_BMX Operating Limits The maximum frequency that the module can measure on the IN_A and IN_B inputs is 60 k
115. g function loads the value predefined in the adjust screen preset value SMDr m c 6 into the counter when the preset condition defined by the preset mode parameter occurs This preset condition takes into account the IN_SYNC and IN_REF physical inputs to define the reference point of the process This function is only used in the free large counter mode The user may change the Preset Mode parameter in the configuration screen by choosing from the following five possibilities to configure the preset condition Rising edge of the IN_SYNC input Rising edge of the IN_REF input Rising edge of the IN_SYNC input and high level of the IN_REF input First rising edge of the IN_SYNC input and high level of the IN_REF input First rising edge of the IN_SYNC input and low level of the IN_REF input The following table presents the force_ref bit in bold which is an element of the Qr m c d output command word Language Standard symbol Meaning object SQr m c 0 OUTPUT_O Forces OUTPUT_0 to level 1 Qr m c 1 OUTPUT_1 Forces OUTPUT_1 to level 1 Qr m c 2 OUTPUT_BLOCK_0O_ENABLE Implementation of output 0 function block Qr m c 3 OUTPUT_BLOCK_1_ENABLE Implementation of output 1 function block 62 35013355 07 2012 BMX EHC 0200 Functionalities object Language Standard symbol Meaning SQr m c 4 FORCE_SYNC Counting function synchronization and start Qr m c 5 FORCE_R
116. he module MWr m MOD 2 MOD_FAIL BOOL R Internal error module inoperable MWr m MOD 2 0 CH_FLT BOOL R Inoperative channel s MWr m MOD 2 1 BLK BOOL R Terminal block incorrectly wired MWr m MOD 2 2 CONF_FLT BOOL R Hardware or software configuration error MWr m MOD 2 5 NO_MOD BOOL R Module missing or inoperative MWr m MOD 2 6 EXT_MOD_FLT BOOL R Internal error word of the module Fipio MWr m MOD 2 7 extension only MOD_FAIL_EXT BOOL R Internal detected fault module unserviceable MWr m MOD 2 8 Fipio extension only CH_FLT_EXT BOOL R Inoperative channel s Fipio extension only MWr m MOD 2 9 BLK_EXT BOOL R Terminal block incorrectly wired Fipio extension MWr m MOD 2 10 only 35013355 07 2012 195 Standard Symbol Type Access Meaning Address CONF_FLT_EXT BOOL R Hardware or software configuration error Fipio MWr m MOD 2 13 extension only NO_MOD_EXT BOOL R Module missing or inoperative Fipio extension MWr m MOD 2 14 only 196 35013355 07 2012 Quick Start Example of Counting Module Implementation V Subject of this Part This part presents an example of implementation of the counting modules What Is in This Part This part contains the following chapters Chapter Chapter Name Page 14 Description of the Application 199 15 Installing the Application Using Unity Pro 201 16 Starting the Application 223 35013355 07 2012 197
117. headings with suggestions for identifying issues List of the Module Error Messages The table below provides a list of the module error messages Fault indicated Possible interpretation and or action Module failure The module has a error Check the module mounting Change the module Faulty channel s One or more channels have a fault Refer to channel diagnostics Self test The module is running a self test Wait until the self test is complete Different hardware and software configurations There is a lack of compatibility between the module configured and the module in the rack Make the hardware configuration and the software configuration compatible Module is missing or off Install the module Fasten the mounting screws BMX EHC 0200 Module Error The table below provides a list of error that may appear on the BMX EHC 0200 module Language object Description SMWr m c 2 0 External fault at inputs SMWr m c 2 1 External fault at outputs SMWr m c 2 4 Internal error or self testing SMWr m c 2 5 Configuration Fault SMWr m c 2 6 Communication Error SMWr m c 2 7 Application fault SMWr m c 3 2 Sensor power supply fault SMWr m c 3 3 Actuator supply fault 35013355 07 2012 165 Display of Error Counting Module Language object Description SMWr m c 3 4 Short circuit on output O SMWr m c 3 5 Short ci
118. hresholds 15 Capture1 high value The output is high if the capture1 value is greater than the upper threshold NOTE The output 0 function block is inactive when using the counter in pulse width modulation mode Output Performances Output Properties In general these reflex actions act with a delay less than 0 6 ms The repeatability is about 0 3 ms Special boost functions e Counter Low function code 1 applied to Output Block O e Counter High function code 3 applied to Output Block 1 speed up timing Delay is less than 0 2 ms The repeatability is about 1 s The counting module BMX EHC 0200 enables output signals to be exchanged with two 24VCC field actuators It is possible to configure the following parameters for each output e The module response for fault recovery e The output polarity for each counting channel positive or negative polarity e The fallback mode and state for every module channel These three parameters are described in the following pages Fault Recovery response Outputs QO and Q1 are current limited 0 5 A maximum A thermal shutdown protects each output When a short circuit is detected on one of the output channels the counting module enables one of the two following actions according to the configuration e fault recovery parameter configured as latched off The counting module latches off the output channel e fault recovery parameter configured as autorecov
119. ications but which require more precise adjustment closer frequencies NOTE A positive value indicates that the frequency measured on the IN_A input is greater than the frequency measured on the IN_B input A negative value indicates that the frequency measured on the IN_A input is less than the frequency measured on the IN_B input The figure below shows BMX EHC 0200 module operation in Ratio 1 mode F A f B x1000 F A f B x1000 In this mode the counter evaluates the ratio between the number of rising edges of the IN_A input and the number of rising edges of the IN_B input over a period of 1 s The register value is updated every 10 ms An absolute limit value is declared on the configuration screen If this limit value is exceeded the counter value register sIDr m c 12 is disabled by setting the validity bit sIWr m c 0 3 to 0 If no frequency is applied to the IN_A or IN_B inputs the counter value register SIDr m c 12 is disabled by setting the validity bit sIWr m c 0 3 toO NOTE The ratio 1 mode presents the results in thousandths in order to have greater level of precision where 2 000 is displayed this corresponds to a value of 2 35013355 07 2012 81 BMX EHC 0200 Functionalities Ratio 2 Mode The figure below shows BMX EHC 0200 module operation in Ratio 2 mode In this mode the counter evaluates the difference between the number of rising edges of the IN_A input and the number of risin
120. igned_CPT_BMX types lODDTs Details of the Explicit Exchange Objects for the T_ CPT_BMX type IODDT 185 35013355 07 2012 179 Details of Implicit Exchange Objects for the T_Unsigned_CPT_BMX and T_Signed_CPT_BMX types lIODDTs At a Glance The tables below present the T Unsigned_CPT BMX andT Signed _CPT_BMX types IODDTs implicit exchange objects which are applicable to all BMX EHC eeee counting modules Counter Value and Sensor Values The table below presents the various IODDT implicit exchange objects Standard symbol Type Access Meaning Language object COUNTER_CURRENT_VALUE DINT R Current counter value IDr m c 2 CAPT_O_VALUE DINT R Counter value when captured in register O IDr m c 4 CAPT_1_VALUE DINT R Counter value when captured in register 1 SIDr m c 6 COUNTER_VALUE DINT R Current counter value during event IDr m c 12 CAPT_O_VAL DINT R Capture value 0 IDr m c 14 CAPT_1_VAL DINT R Capture value 1 S IDr m c 16 lr m c d Word The table below presents the meanings of the sIr m c d words Standard symbol Type Access Meaning Language object CH_ERROR BOOL R Channel error Ir m c ERR OUTPUT_0_Echo BOOL R Logical state of output 0 SIr m c 0 OUTPUT_1_Echo BOOL R Logical state of output 1 SIr m c 1 OUTPUT_BLOCK_0 BOOL R State of output block 0 Ir m c 2 OUTPUT_BLOCK_1 BOOL R State of output block 1 Ir m c 3 INPUT_A BOOL R Physical state of
121. in the Prefix for name zone 4 Now click on different Implicit I O object prefix addresses then Update grid button to see the names and addresses of the implicit I O objects H Overview a l0 objects 10 variable creation Prefixe for name Type Comment HO abject Ot Q0 108 Channel F CH 441 O0 1 0 9 gt HOLO Configuration F KW F KD I KF Selest al Ge BARN Sedona AMW AA ATOTO j KA FAOK Status F AMW PEE E QD 102 ADOL Parameter T MW M MID M AMF m EATA Command I MW I MD M MF Implicits r mw 6D M IF V O T OW FWAD F QF Update Update grid Filter on usage 35013355 07 2012 209 Application using Unity Pro Declaration of Variables At a Glance All of the variables used in the different sections of the program must be declared Undeclared variables cannot be used in the program NOTE For more information see Unity Pro online help click on then Unity then Unity Pro then Operate modes and Data editor Procedure for Declaring Variables The table below shows the procedure for declaring application variables Step Action 1 In Project browser Variables amp FB instances double click on Elementary variables 2 Inthe Data editor window select the box in the Name column and enter a name for your first variable Now select a Type for this variable When all your variables are declared you can close the window
122. input A Impulse B Direction Rising edge at the IN_A input and low state at the IN_B input Rising edge at the IN_A input and high state at the IN_B input Normal Quadrature X1 Rising edge at the IN_A input and low state at the IN_B input Falling edge at the IN_A input and low state at the IN_B input Normal Quadrature X2 Rising edge at the IN_A input and low state at the IN_B input Falling edge at the IN_A input and high state at the IN_B input Falling edge at the IN_A input and low state at the IN_B input Rising edge at the IN_A input and high level at the IN_B input Normal Quadrature X4 Rising edge at the IN_A input and low state at the IN_B input High state at the IN_A input and rising edge at the IN_B input Falling edge at the IN_A input and high state at the IN_B input Low state at the IN_A input and falling edge at the IN_B input Falling edge at the IN_A input and low state at the IN_B input Low state at the IN_A input and rising edge at the IN_B input Rising edge at the IN_A input and high level at the IN_B input High state at the IN_A input and falling edge at the IN_B input Reserve Quadrature X1 Falling edge at the IN_A input and low state at the IN_B input Rising edge at the IN_A input and low state at the IN_B input Reserve Quadrature X2 Falling edge at the IN_A input and low state at the IN_B input Rising edge at the IN_A input and high le
123. ion Objects The table below presents the free large counter mode configurable elements Label Address in the configuration Configurable values Counting mode SKWr m c 2 least significant byte Free large counter mode The value of the least significant byte of this word is 8 IN_A input filter SKWr m c 3 least significant byte The least significant byte can take the following values 0 none 1 low e 2 medium 3 high IN_B input filter SKWr m c 3 most significant byte The most significant byte can take the following values e 0 none e 1 low e 2 medium 3 high IN_SYNC input filter SKWr m c 4 least significant byte The least significant byte can take the following values e 0 none e 1 low 2 medium 3 high IN_EN input filter SKWr m c 4 most significant byte The most significant byte can take the following values e 0 none 1 low 2 medium 3 high 35013355 07 2012 133 Configuration of the Counting Modules Label Address in the configuration Configurable values IN_REF input filter SKWr m c 5 least significant byte The least significant byte can take the following values 0 none e 1 low e 2 medium 3 high IN_CAP input filter SKWr m c 5 most significant byte The most significant byte can take the following values
124. ivated is selected the entered Event number event number is coded on the most significant byte of this word Deactivated all bits of the most significant byte of this word are set to 1 35013355 07 2012 119 Configuration of the Counting Modules Event Counting Mode Configuration At a Glance The configuration of a counting module is stored in the configuration constants SKW The parameters r m and c shown in the following tables represent the topologic addressing of the module Each parameter had the following signification e r represents the rack number e m represents the position of the module on the rack e c represents the channel number Configuration Objects The table below presents the event counting mode configurable elements Label Address in the configuration Configurable values Counting mode SKWr m c 2 least significant byte Event counting mode The value of the least significant byte of this word is 2 IN_A input filter SKWr m c 3 least significant byte The least significant byte can take the following values 0 none 1 low 2 medium 3 high IN_SYNC input filter SKWr m c 4 least significant byte The least significant byte can take the following values 0 none e 1 low 2 medium 3 high Input power supply fault SKWr m c 2 8 General input output fault bit set to 0 Local bit
125. llowing table presents the valid_sync bit in bold which is an element of the QWr m c 0 function enabling word Language object Standard symbol Meaning sQWr m c 0 0 VALID_SYNC Synchronization and start authorization for the counting function via the IN_SYNC input SQWr m c VALID_REF Operation authorization for the internal preset function SQWr m c VALID_ENABLE Authorization of the counter enable via the IN_EN input SQWr m c VALID_CAPT_0O Capture authorization in the captureO register SQWr m c VALID_CAPT_1 Capture authorization in the capture1 register SQWr m c COMPARE_ENABLE Comparators operation authorization SQWr m c COMPARE_SUSPEND Comparator frozen at its last value 35013355 07 2012 61 BMX EHC 0200 Functionalities The following table presents the synchronization principle Edge Status of the Status of the counter valid_sync SQWr m c 0 0 bit Rising or falling edge on Set to 0 Not synchronized IN_SYNC depending on the configuration Rising or falling edge on Set to 1 Synchronized IN_SYNC depending on the configuration Rising edge on force sync Set to 0 or 1 Synchronized SQr m c 4 bit When the synchronization occurs the application can react using e either the SYNC_REF_FLAG input IWr m c 0 2 see page 68 e or the EVT_SYNC_PRESET input IlWr m c 10 2 see page 70 Homing Function This homin
126. module after one of the following conditions has been established e At the next synchronization if the counter is stopped run bit set to 0 e At the second synchronization if the counter is activated run bit set to 1 Counter Status Bits in One shot Counter Mode The table below shows bits that are used by the status word 3IWr m c 0 when the counter is configured in one shot counter mode Bit Label Description IWr m c 0 0 RUN The bit is set to 1 when the counter is running The bit is set to 0 when the counter is stopped SIWr m c 0 2 SYNC_REF_FLAG The bit is set to 1 when the counter has been set to the preset value and re started The bit is reset to 0 when the sync_reset command is received rising edge of the SQr m c 8 bit SIWr m c 0 3 VALIDITY Validity bit is used to indicate that the counter current value and compare status registers contain valid data If the bit is set to 1 the data is valid If the bit is set to 0 the data is not valid 35013355 07 2012 85 BMX EHC 0200 Functionalities Type of the IODDT Operating Limits In this mode the type of the IODDT must be T UNSIGNED_CPT_BMxX The maximum frequency that can be applied to the IN_SYNC input is 1 pulse every 5 ms The maximum value defined by the user preset value is 4 294 967 295 NOTE You have to check the validity bit sIWr m c 0 3 before taking into account the numerical values such as the counte
127. module that enable pulses from a sensor to be counted at a maximum frequency of 60 KHz BMX EHC 0200 The BMX EHC 0200 module has 2 channels This module may be installed in any available slot in a Modicon M340 PLC station rack Sensors Used The sensors used on each channel may be e 24 VDC two wire proximity sensors e Incremental signal encoders with 10 30 VDC output and push pull outputs Illustration The illustration below shows the following 1 Incremental encoder 2 Proximity sensors 3 Counting module BMX EHC 0200 W N en 16 35013355 07 2012 Counting Module General Information about the Counting Module Operation Introduction Characteristics The BMX EHC 0200 module is counting modules from the Modicon M340 modular PLC range They support all Unity Pro software functionalities This module have e Counting related functions comparison capture homing reset to 0 e Event generation functions designed for the application program e Outputs for actuator use contacts alarms relays The main characteristics of BMX EHC 0200 module are as follows Application Number of Number of Number of Maximum channels physical physical frequency per module inputs per outputs per channel channel e Counting 2 6 2 60 KHz e Downcounting e Up Down counting e Measurement Frequency meter e Frequency generator e Axis monitoring 35013355 07 2012 17 Counting
128. n 1 Inthe Project browser double click on Configuration then on 0 Bus X andon 0 BMX XBP Where 0 is the rack number Inthe Bus X window select a slot for example slot 1 and double click Choose the BMX HEC 0200 counting input module New Device Topological Address 01 i ancel hep Part Number Description F Basic Micro local drop Analog Communication Ele Counting BMX EMC 0200 2 channel generic counter BMX EMC 0800 8 channel generic counter Discrete Confirm with OK 35013355 07 2012 207 Application using Unity Pro Counting Module Configuration The table below shows the procedure for selecting the counting function and configuring the module reflex outputs Step Action 1 Inthe Bus X window double click on the BMX EHC 0200 counting input module 2 Select a channel for example Counter 0 and click 3 Select the module function Modulo Loop Counter Mode 4 In the Config tab configure the OutputBlock 0 reflex output with a pulse when the counting is greater than the Lower Threshold Pulse greater than LT and the OutputBlock 1 reflex output with a pulse when the counting is greater than the Upper Threshold Pulse greater tha
129. n UT Then click on the Event value and select Enable 2 channel generic counter BMX EHC 0200 Hl Config F Adjust S Counter 0 Modulo L D Counter Label Symbol Value Unit O Input A Filter Without x 4 Input B Filter Without 2 Input Sync Filter Without z 3 Input EN Filter Without gt 4 Input Supply Fault General lO Fault X 5 Output Supply Fault General IO Fault 6 Counting Interface A Up B Down T Scaling Factor il 8 Synchro Edge Rising edge on SYNG 9 OutputBlock 0 Pulse greater than LT 10 QuiputBlock 1 Pulse greater than UT 14 Pulsewidth 0 10 ms 12 Pulsewidth 1 10 ms 13 Polarity 0 Polarity z 14 Polarity Polarity E 15 Fault Recovery Latched of 16 Fallback 0 Without 17 Fallbaci Without gt 19 Fallback Value 1 20 Event Enable x 24 Event Number 0 4 F Function Modulo Loop Courl Task MAST M W module4_E 03 BMXE 5 Click on the Adjust tab and enter the modulo value for example 50 208 35013355 07 2012 Application using Unity Pro Declaration of I O objects The table below shows the procedure for declaring the I O Derived Variable Step Action 1 In the BMX EHC 0200 window click on the BMX EHC 0200 and then on the 1 0 objects tab 2 Click on the 1 0 object prefix address CH then on the Update grid button the channel address appears in the I O object grid 3 Click on the line SCHO 1 0 and then enter a channel name
130. n the process of application NOTE To avoid several simultaneous explicit exchanges for the same channel it is necessary to test the value of the word EXCH_STS MWr m c 0 of the IODDT associated to the channel before calling any EF addressing this channel NOTE Explicit Exchanges are not supported when Modicon M340 Analog and Digital I O modules are configured behind a M340 Ethernet Remote I O adapter module in a Quantum EIO Ethernet Configuration As a consequence it is not possible to setup a module s parameters from the PLC application during operation 35013355 07 2012 173 General Principle for Using Explicit Instructions The diagram below shows the different types of explicit exchanges that can be made between the application and module application MWr m c objects or MWr m MOD r objects 1 Status parameters BMX P34 20x0 BMX NOE 01x0l Command parameters Status parameters Current adjustment parameters Command parameters Initial adjustment parameters READ_STS at WRITE_CMD z WRITE_PARAM gt READ_PARAM SAVE_PARAM at bas RESTORE_PARAM Taai 1 Only with READ_STS and WRITE_CMD instructions Managing Exchanges During an explicit exchange check performance to see that the data is only taken into account when the exchange has been correctly executed To do this two types of information is available e inform
131. nd IN_SYNC IN_A input IN_B input IN_SYNC input synchronization input IN_EN input enable input kOoOnND Encoder Connection The example below shows an incremental encoder used for axis control and the three auxiliary inputs used especially for the 32 bit counter mode Encoder 10 30V Zz e A 3 B GND e T 4 1 STITT STOTT 2 1 Encoder inputs A B and Z 2 _IN_REF input homing input 3 IN_EN input enable input 4 IN_CAP input capture input 35013355 07 2012 41 BMX EHC 0200 Connecting Outputs and Output Supplies The figure below shows the connection of supplies and actuators to the 10 pin connector Fuse Fuse il 24 V supply for actuators 24 V supply for sensors Actuator for the QO output of counting channel 0 Actuator for the Q1 output of counting channel 0 Actuator for the QO output of counting channel 1 Actuator for the Q1 output of counting channel 1 oa hwnd Field Actuators The QO and Q1 outputs are limited by a maximum current of 0 5 A NOTE The Q0 and Q1 outputs have a thermal protection as well as short circuit protection Assignment of the 10 Pin Connector The figure below shows
132. ng module uses the following terminal blocks e Two 16 pin terminal blocks for the inputs e One 10 pin terminal block for supplies outputs Description of the 10 and 16 Pin Terminal Blocks The table below shows the characteristics of the BMX EHC 0200 terminal blocks Characteristic Available Type of terminal block Spring terminal blocks Number of wires accommodated 1 Number of wire minimum AWG 24 0 5 mm gauges z accommodated MAXIMUM AWG 17 1 mm Wiring constraints To insert and remove wires from the connectors use a 2 5 x 0 4 mm screwdriver to open the round receptacle by pushing on the corresponding plate Push the flexible plate down on the outside the side closest to the corresponding receptacle A screwing rotating or bending motion is not required 4 DANGER ELECTRICAL SHOCK Terminal blocks must be connected or disconnected with sensor and pre actuator voltage switched off Failure to follow these instructions will result in death or serious injury 35013355 07 2012 31 Counting Module BMX EHC 0200 General Rules for Installation 32 35013355 07 2012 BMX EHC 0200 Counting Module Hardware Implementation 5 Subject of this Chapter This chapter deals with the hardware characteristics of the BMX EHC 0200 module What Is in This Chapter This chapter contains the following topics Topic Page Characteristics for the BMX
133. ocks 4 DANGER ELECTRICAL SHOCK Terminal blocks must be connected or disconnected with sensor and pre actuator voltage switched off Failure to follow these instructions will result in death or serious injury A CAUTION UNEXPECTED BEHAVIOUR OF APPLICATION If two 16 pin terminal blocks are used each can be plugged into the middle or the top connector of the module Therefore despite the indicators on the terminal blocks and module it is possible to invert the two terminal blocks and thus create incorrect wiring Plugging the wrong connector could cause unexpected behaviour of the application Failure to follow these instructions can result in injury or equipment damage The following table shows the procedure for assembling the 10 pin and 16 pin terminal blocks onto a BMX EHC 0200 counting module Step Action 1 Plug the 10 pin terminal block into the bottom connector of the module 2 Plug the 16 pin terminal block into the middle connector of the module if it is used 3 Plug the 16 pin terminal block into the top connector of the module if it is used NOTE The three module connectors have indicators which show the proper direction to use for terminal block installation 30 35013355 07 2012 Counting Module BMX EHC 0200 General Rules for Installation How to Connect BMX EHC 0200 Module Connecting 16 Pin and 10 Pin Terminal Blocks At a Glance The BMX EHC 0200 counti
134. odule BMX EHC 0200 General Rules for Installation The following table describes the different elements which make up the assembly below Number Description 1 BMX EHC 0200 counting module 2 Standard rack Installing the Module on the Rack The following table shows the procedure for mounting the counting module in the rack Step Action Illustration Position the locating pins situated at the rear of the module on the bottom part in the corresponding slots in the rack Note Before positioning the pins make sure you have removed the protective cover see Modicon M340 Using Unity Pro Processors Racks and Power Supply Modules Setup Manual Swivel the module towards the top of the rack so that the module sits flush with the back of the rack It is now set in position Steps 1 and 2 Tighten the safety screw to ensure that the module is held in place on the rack Tightening torque Max 1 5 N m Step 3 35013355 07 2012 29 Counting Module BMX EHC 0200 General Rules for Installation Fitting 10 Pin and 16 Pin Terminal Blocks to a BMX EHC 0200 Counting Module At a Glance BMX EHC 0200 counting modules with 10 pin and 16 pin terminal block connections require either or both terminal blocks to be connected to the module These fitting operations assembly and disassembly are described below Installing the 10 Pin and 16 Pin Terminal Bl
135. on of an event e determine the time between two events e set and measure the execution time for a process This counting mode consists of two sub modes e Rising edge to falling edge mode edge to opposite allows you to measure the duration of an event e Rising edge to rising edge mode edge to edge allows you to measure the length of time between two events The user may also use the IN_SYNC input to enable or stop a measurement It is also possible to specify a time out value in the configuration screen This function allows to stop a measurement that exceeds this time out In this case the counting register is not valid until the next complete measurement The units used to measure the length of time of an event or between two events are defined by the user 1 us 100 us or 1 ms Edge to Opposite Mode IN_A input Pulse Current counter value In this sub mode the measurement is taken between the rising edge and the falling edge of the IN_A input The counting register is updated as soon as the falling edge is detected The trend diagram below shows the operating mode of the edge to opposite sub mode Duration A Duration B gt c 78 35013355 07 2012 BMX EHC 0200 Functionalities Edge to Edge Mode IN_A input Current counter value In this sub mode the measurement is taken between two rising edges of the IN_A input The counting register is updated as soon as th
136. on test is false the alarm is OFF 35013355 07 2012 213 Application using Unity Pro Creating the Labelling Program in ST At a Glance This section initiates and uses the Modulo Loop Counter Mode functions and objects Illustration of the Labelling _Program Section This section below is part of the MAST task It has no condiction defined for it so it is permanently executed Functions Enabling Authorizes Input SYNC to synchronize and start the counting function Encoder VALID SYNC Waiting First Part IF Waiting First Part THEN nb box 0 END IF Once the first part has passed below the sensor the other functions are enabled IF Waiting Other Parts THEN Authorizes captures into the Capture 0 register Encoder VALID CAPT 0 1 Authorizes comparators to produce its results Encoder COMPARE ENABLE 1 Call Event task when Counter Roll over Encoder EVT MODULO ENABLE 1 Encoder OUTPUT BLOCK _0 ENABLE 1 Enable the output block functions Encoder OUTPUT BLOCK 1 ENABLE 1 ELSE Function disabling when the conveyor is stopped Encoder VALID CAPT 0 0 Encoder COMPARE ENABLE 0 Encoder EVT MODULO ENABLE 0 Encoder OUTPUT BLOCK 0 ENABLE 0 214 35013355 07 2012 Application using Unity Pro Encoder OUT
137. ore trying to install operate or maintain it The following special messages may appear throughout this documentation or on the equipment to warn of potential hazards or to call attention to information that clarifies or simplifies a procedure The addition of this symbol to a Danger safety label indicates that an electrical hazard exists which will result in personal injury if the instructions are not followed personal injury hazards Obey all safety messages that follow this symbol to avoid possible injury or death A DANGER DANGER indicates an imminently hazardous situation which if not avoided will result in death or serious injury A WARNING WARNING indicates a potentially hazardous situation which if not avoided can result in death or serious injury This is the safety alert symbol It is used to alert you to potential 35013355 07 2012 7 PLEASE NOTE A CAUTION CAUTION indicates a potentially hazardous situation which if not avoided can result in minor or moderate injury NOTICE NOTICE is used to address practices not related to physical injury Electrical equipment should be installed operated serviced and maintained only by qualified personnel No responsibility is assumed by Schneider Electric for any consequences arising out of the use of this material A qualified person is one who has skills and knowledge related to the construction and operation of elec
138. ounter in a window 3 High counter 4 pulse less than the lower threshold LT 5 pulse greater than the lower threshold LT e 6 pulse less than the upper threshold UT e 7 pulse greater than the upper threshold UT Polarity 0 SkWr m c 2 Polarity bit set to 0 Polarity bit set to 1 Polarity 1 SkWr m c 2 Polarity bit set to 0 Polarity bit set to 1 Fault recovery ole z 5 Q N Automatic reaction bit set to 1 Activated bit set to 0 Fallback 0 SkWr m c 2 None bit set to 0 With bit set to 1 Fallback 1 SKWr m c 21 4 None bit set to 0 With bit set to 1 35013355 07 2012 123 Configuration of the Counting Modules Label Address in the configuration Configurable values Fallback value 0 SKWr m c 21 5 0 bit set to 0 1 bit set to 1 Fallback value 1 SKWr m c 21 6 0 bit set to 0 1 bit set to 1 Event number Output power supply SKWr m c 2 9 General input output fault bit set to 0 fault Offline bit set to 1 Pulse width O SKkWr c 18 Edit value in the range 1 65535 Pulse width 1 SkWr e220 Edit value in the range 1 65535 Event skWr m c 0 Activated if activated is selected the entered event number is coded on the most significant byte of this word Deactivated all bits of the most significant byte of this word are set to 1 124 35013355 07 2012
139. p at state 1 3 VDC maximum Output current short circuit Each point 1 5 A maximum Maximum load capacity 50 uF Short circuit and overload Channel protection 35013355 07 2012 35 BMX EHC 0200 Polarity for each output channel By default Normal logic on both channels User configuration Reverse logic for one or several channels Maximum inductive load The inductive load is calculated using the following formula L 0 5 PxF The formula above uses the following parameters L load inductance in Henry load current in Amperes e F switching frequency in Hertz 36 35013355 07 2012 BMX EHC 0200 Display and Diagnostics of the BMX EHC 0200 Counting Module At a Glance The BMX EHC 0200 counting module has LEDs that enable the status of the module to be viewed e Module state LEDs RUN ERR I O e State LEDs for inputs outputs of each channel IA IB IS IE IP IC QO and Q1 Illustration The following drawing shows the display screen of the BMX EHC 0200 module Fault Diagnostics The following table presents the various module states according to the LED states Module status LED indicators ERR RUN IO Qo Q1 The module is faulty or switched off The module has a fault The module is not configured O The module has lost communication
140. perature range the equipment can operate abnormally 4 CAUTION UNINTENDED EQUIPMENT OPERATION Do not operate M340H equipment outside of its specified temperature range Failure to follow these instructions can result in injury or equipment damage Hardened equipment has a conformal coating applied to its electronic boards This protection when associated with appropriate installation and maintenance allows it to be more robust when operating in harsh chemical environments 35013355 07 2012 19 Counting Module 20 35013355 07 2012 Presentation of the Counting Module Operation 3 Overview of BMX EHC 0200 Module Functionalities At a Glance This part presents the different types of user applications for the BMX EHC 0200 module Measurement The following table presents the measurement functionality for the BMX EHC 0200 module User application type Mode Speed measurement stream measurement Frequency Random events monitoring Event counting Pulse evaluation Speed control Period measuring Flow control Ratio Counting The following table presents the counting functionality for the BMX EHC 0200 module User application type Mode Grouping One shot counter Level 1 packaging labeling Modulo loop counter Level 2 packaging labeling Free large counter Accumulator Free large counter Axis control Free large counter NOTE In case of a user application
141. r Counter _Win Posttion 1 N Numeral current value is greater than Box at the second labelling point the Upper Thresholds on the operator screen Encoder Gounter_High Position 2 First part waiting Waiting_First_P art Encoder Swnc_Reset Waiting Other_Parts FBI_2 RS EN ENO RUN p S Qi RI Encoder Sync_Ref_Flag FBI_3 RS EN ENO S Qi Stop 1 35013355 07 2012 217 Application using Unity Pro Description of the Application Section e The first line is used to commande the counter e The other three lines are used to simulate the different box positions on the conveyor e The last part is used to control the variables which allow the function enabling See Illustration of the Labelling _Program Section page 214 e When Run switches to 1 Waiting First Part is setto T e Asensor signal triggers the flag Sync_ref flag which resets Waiting first part to 0 and sets Waiting other parts to l Procedure for Creating an LD Section The table below describes the procedure for creating part of the Application section Step Action 1 In Project Browser Program Tasks double click on MAST 2 Right click on Section then select New section Name this section Application then select the language type LD The Edit window opens To create the contact Encoder Sync_Ref_Flag click
142. r and the capture registers Only the validity bit at the high level set to 1 guarantees that the mode will operate correctly within the limits 86 35013355 07 2012 BMX EHC 0200 Functionalities BMX EHC 0200 Module Operation in Modulo Loop Counter Mode At a Glance The use of the modulo loop counter mode is recommended for packaging and labeling applications for which actions are repeated for series of moving objects Basic Principle In the upcounting direction the counter increases until it reaches the modulo value 1 the modulo value being defined by the user At the following pulse in the counting direction the counter is reset to 0 and the counting resumes In the downcounting direction the counter decreases until it reaches 0 At the next pulse in the counting direction the counter is reset to the the modulo value 1 the modulo value being defined by the user The downcounting may then be resumed The enable function must be activated during the counting by e Setting to 1 the force enable bit sOr m c 6 e Setting to 1 the valid enable bit sQWr m c 0 2 when the IN_EN inputis at the high level When the enable function is deactivated the last value reported in the counting register is maintained and the counter ignores the pulses applied to the IN_A input However it does not ignore the preset condition In the modulo loop counter mode the counter must be synchronized at least one time to operate The cu
143. r m c 5 FORCE_REF Set to preset counter value Qr m c 6 FORCE_ENABLE Implementation of counter Qr m c 7 FORCE_RESET Reset counter sQr m c 8 SYNC_RESET Reset SYNC_REF_FLAG Qr m c 9 MODULO_ RESET Reset MODULO_FLAG 35013355 07 2012 69 BMX EHC 0200 Functionalities Sending Counting Events to the Application At a Glance The event task number must be declared in the module s configuration screen to enable the events sending The BMX EHC 0200 module has eight event sources contained in the events source word at the address IWr m c 10 Address Standard Symbol Description Counting mode concerned SIWr m c 10 EVT_RUN Event due to start of One Shot Counter mode counting SIWr m c 10 EVT_MODULO Event due to counter being Modulo Loop Counter Mode equal to modulo value 1 or e Free Large Counter mode equal to value 0 SIWr m c 10 EVT_SYNC_PRESET Event due toa e Event Counting mode synchronization or counter Period Measuring mode homing e One Shot Counter mode e Modulo Loop Counter mode e Free Large Counter mode SIWr m c 10 EVT_COUNTER_LOW Event due to counter being e Frequency mode less than the lower e Event Counting mode threshold e Period Measuring mode e Ratio mode e One Shot Counter mode e Modulo Loop Counter mode e Free Large Counter mode SIWr m c 10 EVT_COUNTER_WINDOW Event due to counter being Frequency mode between the upper and e Event Counting mod
144. ration in Period Measuring Mode BMX EHC 0200 Module Operation in Ratio Mode BMX EHC 0200 Module Operation in One Shot Counter Mode BMX EHC 0200 Module Operation in Modulo Loop Counter Mode BMX EHC 0200 Module Operation in Free Large Counter Mode BMX EHC 0200 Module Operation in Pulse Width Modulation Mode Counting Module BMX EHC 0200 Software Implementation 0 0020 e ee eee eee Software Implementation Methodology for BMX EHC xxxx Counting Modules 55 Installation Methodology 0 00 cee eee eee eee Accessing the Functional Screens of the BMX EHC xxxx Counting Modules 200c cece e eee eee Accessing the Functional Screens of the BMX EHC 0200 Counting Modules j c00 Si sis Serene eee be id ee ee Description of the Counting Module Screens 2 00 Configuration of the BMX EHC 0200 Counting Modules Configuration Screen for BMX EHC xxxx Counting Modules Configuration Screen for BMX EHC 0200 Counting Modules in a Modicon M340 Local Rack e a a a ee BMX EHC 0200 Counting Module Configuration Screens in X80 Drop Configuration of Modes for the BMX EHC 0200 Module Frequency Mode Configuration 00 0 cece eee eee Event Counting Mode Configuration 0 cee eee eee Period Measuring Mode Configuration 00 cee eee eee Ratio Mode Configuration 0 000 c eect eee 101 103 103 10
145. rcuit on output 1 List of Channel Error Messages The table below gives the list of error messages at channel level Fault indicated Other consequences Possible interpretation and or action External fault or counting input fault encoder or proximity sensor supply fault e line break or short circuit of at least one encoder differential signal 1A 1B 1Z e specific fault on absolute encoder Outputs are set to 0 in automatic mode Invalid measurement message Check the sensor connections Check the sensor power supply Check the sensor operation Delete the fault and acknowledge if the fault storing is configured Counting pulses or incremental encoder preset or reset to acknowledge the Invalid measurement message Counting application fault measurement overrun e overspeed Outputs are set to 0 in automatic mode Invalid measurement message Diagnose the fault more precisely external causes Check the application again if necessary Delete the fault and acknowledge if the fault storing is configured Counting pulses or incremental encoder preset or reset to 0 to acknowledge the Invalid measurement message Auxiliary input output fault power supply e short circuit of at least one output Outputs are set to 0 in automatic mode Check the output connections Check the input output power supply 24V Diagnose the fault more precisely external causes Delete the fault and
146. resents the fault display screen for BMX EHC 0200 counting modules A module s fault display screen may only be accessed in online mode The figure below presents the fault display screen for the BMX EHC 0200 module in modulo loop counter mode q F Function Module p Cot Te Task CS x 1 2 3 4 2 channel generic counter Version 1 e r Run Er 10 Fi BMX EHC 0200 H Cenfig H Adjust fh Debug Fault Counter 0 Modulo L Counter 1 Modulo L y Internal faut External faut __ Other faut External Fault on Inputs External Fault on Outputs Input sensor supply low voltage Output sensor supply low voltage MW 0x3 MW Oxo W module4_E 03 BMXE 162 35013355 07 2012 Display of Error Counting Module Description of the Screen The following table presents the various parts of the above screen Number Element Function 1 Internal faults field This field displays the module s active internal faults 2 Tab The tab in the foreground indicates the current mode The current mode is therefore the fault display mode in this example External faults field This field displays the module s active external faults Other faults field This field displays the module s active faults other than internal and external faults 350
147. ro Processors Racks and Power Supply Modules Setup Manual NOTE The two 16 pin connectors and the 10 pin connector are available under the reference BMX XTS HSC 20 35013355 07 2012 27 Counting Module BMX EHC 0200 General Rules for Installation Fitting of Counting Modules At a Glance The counting modules are powered by the rack bus The modules may be handled without turning off power supply to the rack without damage or disturbance to the PLC Fitting operations installation assembly and disassembly are described below Installation Precautions Installation The counting modules may be installed in any of the positions in the rack except for the first two marked PS and 00 which are reserved for the rack s power supply module BMX CPS eee and the processor BMX P34 eee respectively Power is supplied by the bus at the bottom of the rack 3 3 V and 24 V Before installing a module you must take off the protective cap from the module connector located on the rack 4 DANGER HAZARD OF ELECTRIC SHOCK e disconnect voltage supplying sensors and pre actuators before plugging unplugging the terminal block on the module e remove the terminal block before plugging unplugging the module on the rack Failure to follow these instructions will result in death or serious injury The diagram below shows counting module BMX EHC 0200 mounted on the rack 28 35013355 07 2012 Counting M
148. ro software 2 Click on File then New to select a PLC New project Show all versions Min OS versioi Description Modicon M340 BMX P34 2000 02 10 CPU 340 20 Modbus BMX P34 2010 02 00 CPU 340 20 Modbus CANopen BMX P34 20102 02 10 CPU 340 20 Modbus CANopen2 BMX P34 2020 02 10 CPU 340 20 Modbus Ethernet BMX P34 2030 02 00 CPU 340 20 Modbus CANopen BMX P34 20302 02 10 CPU 340 20 Modbus CANopen2 Premium Quantum Quantum safety Project Setting Setting File To see all PLC versions click on the box Show all versions Select the processor you wish to use from those proposed To create a project with specific values of project settings check the box Settings File and use the browser button to localize the XSO file Project Settings file It is also possible to create a new one If the Settings File box is not checked default values of project settings are used Terminate your configuration insert a BMX EHC 0200 input module Modicon M340 with Unity Pro Counting Module BMX EHC 0800 User Manual Confirm with OK 206 35013355 07 2012 Application using Unity Pro Configuration of the Counting Module At a Glance Developing a counting application involves choosing the right module and appropriate configuration Module Selection The table below shows the procedure for selecting the counting input module Step Actio
149. rrent counter value is cleared each time the synchronization occurs The current counter value can be recorded into the captureO register see page 66 when the condition of synchronization occurs see page 60 The modulo value defined by the user is contained in the modulo_value word SMDr m c 4 The user may change this value by specifying the value of this word e Inthe ajust screen e Inthe application using the WRITE PARAM IODDT_ VAR1 Function IODDT_VAR1 is of the type T UNSIGNED CPT BMX The new modulo value is acknowledged if one of the two following conditions is met e The synchronization is activated e The counter rollovers the value 0 in the downcounting direction or the modulo value 1 this value is the modulo value recorded before editing the new modulo value in the upcounting direction 35013355 07 2012 87 BMX EHC 0200 Functionalities Counting Interface In this mode the user may select one of the following counting configurations e A Up B Down default configuration A Impulse B Direction Normal Quadrature X1 Normal Quadrature X2 Normal Quadrature X4 Reverse Quadrature X1 Reverse Quadrature X2 Reverse Quadrature X4 The following table shows the upcounting and downcounting principle according to the selected configuration Selected configuration Upcounting condition Downcounting condition A Up B Down Rising edge at the IN_A input Rising edge at the IN_B
150. ry Input EN Ir m c 7 Binary EN enable SQWr m c 0 2 Binary Counter enable Qr m c 6 Binary Output 0 state Ir m c 0 Binary Output 0 cmd SQr m c 0 Binary Output 1 state Ir m c 1 Binary Output 1 cmd SQr m c 1 Binary Counter reset SQr m c 7 Binary Output latch 0 state Ir m c 2 Binary Output latch 0 enable Qr m c 2 Binary Output latch 1 state Ir m c 3 Binary 156 35013355 07 2012 Debugging the Counting Modules Label Language object Type Output latch 01enable SQr m c 3 Binary Low threshold value SQDr m c 2 Digital High threshold value SQDr m c 4 Digital Compare enable SQWr m c 0 5 Binary Compare suspend SQWr m c 0 6 Binary Modulo state IWr m c 0 1 Binary Modulo reset SQr m c 9 Binary For a description of each language object refer to T_ UNSIGNED_CPT_BMX IODDT see page 180 35013355 07 2012 157 Debugging the Counting Modules Free Large Counter Mode Debugging At a Glance The table below presents the free large counter mode debugging elements Label Language object Type Counter value IDr m c 2 Digital Counter valid IWr m c 0 3 Binary Counter low IWr m c 1 0 Binary Counter in window SIWr GANAN Binary Counter high SIWr Geks2 Binary Counter in low limit SIWr c 0 5 Binary Counter in high limit SIWr c 0 4 Binary Capture 0 value SIDr m c 4 Digital Capture 0 low
151. s communication detected error read APPLI_FLT BOOL 7 application detected error read COM_EVT_FLT BOOL 8 communication event detected fault read OVR_EVT_CPU BOOL 9 CPU overflow event read OVR_CPT_CH BOOL 10 counter channel overflow read CH_FLT_2 INT SENSOR_SUPPLY BOOL 2 low input power supply for the read sensors ACTUATOR_SUPPLY BOOL 3 output power supply loss read SHORT_CIRCUIT_OUT_0O BOOL 4 short circuit on output O read SHORT_CIRCUIT_OUT_1 BOOL 5 short circuit on output 1 read 194 35013355 07 2012 13 4 The IODDT Type T_GEN_MOD Applicable to All Modules Details of the Language Objects of the IODDT of Type T_GEN_MOD Introduction Observations List of Objects All the modules of Modicon M340 PLCs have an associated IODDT of type T_GEN_MOD In general the meaning of the bits is given for bit status 1 In specific cases an explanation is given for each status of the bit Some bits are not used The table below presents the objects of the IODDT Standard Symbol Type Access Meaning Address MOD_ERROR BOOL R Module error bit lr m MOD ERR EXCH_STS INT R Module exchange control word MWr m MOD 0 STS_IN_PROGR BOOL R Reading of status words of the module in MWr m MOD 0 0 progress EXCH_RPT INT R Exchange report word MWr m MOD 1 STS_ERR BOOL R Event when reading module status words MWr m MOD 1 0 MOD_FLT INT R Internal error word of t
152. sOQWr m c 0 6 is set to 1 This functionality allows modifying the application thresholds without modifying the status register behaviour When this bit switches back to 0 the comparisons restart with new threshold values The following figure illustrates the actions of the compare enable bit SQWr m c 0 5 and the compare suspend bit sOWr m c 0 6 compare enable bit compare suspend bit upper _ th value X0 X1 X2 lower_th_value Y0 Y1 Y2 compare status register According to X0 YO 0 According to X1 Yt Maintain According to X2 Y2 35013355 07 2012 53 BMX EHC 0200 Functionalities Output Block Functions Output Function Blocks output_o bit Qr m c 0 Comparison status bits output_block_0 enable bit Qr m c 2 Locking time delay Reset to 0 Every channel in the counting module has two programmable output blocks that operate with the comparison status register and affect the behavior of physical outputs QO and Q1 There are two ways to control the output e From the application in this case the output corresponds to the status of the output bit from the output command bit e From the output function block in this case the user must enable the output block function Then the output corresponds to the status of the output bit from the function block The following figure shows the output function block QO output_0_echo bi
153. se starts when the counter value decreases and crosses the lower threshold value 1 Pulse greater than the lower threshold The output pulse starts when the counter value increases and crosses the lower threshold value 1 Pulse less than the upper threshold The output pulse starts when the counter value decreases and crosses the upper threshold value 1 Pulse greater than the upper threshold The output pulse starts when the counter value increases and crosses the upper threshold value 1 Counter stopped only in one shot counter mode The output changes to high if the counter is stopped Counter running only in one shot counter mode The output changes to high if the counter is running 10 Capture 0 low value The output is high if the capture 0 value is less than the lower threshold 11 Capture 0 value in a window The output is high if the capture 0 value is between the upper and lower thresholds or equal to one of the two thresholds 12 Capture 0 high value The output is high if the capture 0 value is greater than the upper threshold 35013355 07 2012 55 BMX EHC 0200 Functionalities Function code Programming 13 Capture1 low value The output is high if the capture1 value is less than the lower threshold 14 Capture1 value in a window The output is high if the capture1 value is between the upper and lower thresholds or equal to one of the two t
154. t sIr m c 0 Configurable between 1 and 65 535 ms 15 configurable modes output_block_0 bit sIr m c 2 Use of the Function Block Every physical output is controlled by two bits e output block 0 enable Qr m c 2 and output_0 Or m c 0 for block 0 e output block 1 enable Qr m c 3 and output_1 Qr m c 1 for block 1 The output _block_0 1 enable bit enables the operation of the function block 0 1 to be authorized when it is set to 1 When the bit is set to 0 Bit output block 0 1 is maintained at 0 54 35013355 07 2012 BMX EHC 0200 Functionalities The output_0 1 bitis applied at the logic output Q0 1 and must be set to 0 when the function block is used When the bit is set to 1 the output is forced to 1 In the operational modes where the block generates a pulse the pulse width can be configured thanks to the configuration screen Output Programming The table below shows the configurable functions Function code Programming 0 Disabled no direct action Default value 1 Low counter The output is high if the counter value is less than the low threshold Counter in a window The output is high if the counter value is between the upper and lower thresholds or equal to one of the two thresholds High counter The output is high if the counter value is greater than the upper threshold Pulse less than the lower threshold The output pul
155. t the two output channels are in positive polarity Output Fallback Modes The fallback modes are the predefined states to which the output channels revert when the channel is not controlled by the processor when communications are lost or when the processor is stopped for example The fallback mode of each output channel can be configured as one of the following modes e Fallback value With You may configure the fallback value to apply as 0 or 1 e Fallback value Without The output block function continues to operate according to the last received commands NOTE By default the fallback mode of the 2 output channels is with and the fallback value parameter is 0 35013355 07 2012 57 BMX EHC 0200 Functionalities Diagnostics Consistency Rules for Inputs Interface The input interface requires that the sensor power supply remains active for counting operations When the sensor power supply interrupts lasts 1 ms or less the counter remains stable In case of power interrupt is greater than 1 ms all counter values are disabled By default the sensor supply fault makes the CH_ERROR Ir m c ERR global status bit at the high level and the red led IO lighted The configuration screen allows to unlink the sensor supply fault to the CH_ ERROR bit by configuring the parameter Input Supply Fault as local instead of General IO Fault IODDT_VAR1 is of the type T Unsigned_CPT BMX orT Signed CPT BMX Consistenc
156. t Counting Mode At a Glance Using the event counting mode allows you to determine the number of events received in a scattered manner Basic Principle In this mode the counter assesses the number of pulses applied at the IN_A input at time intervals defined by the user The counting register is updated at the end of each interval with the number of events received It is possible to use the IN_SYNC input over a time interval provided that the validation bit is set to 1 This restarts the event counting for a new predefined time interval Depending on the selection made by the user the time interval starts at the rising edge or at the falling edge on the IN_SYNC input Operation The trend diagram below illustrates the counting process in event counting mode IN_A input il IN_SYNG input valid_sync bit Internal time F f i F base r User defined gt pe gt Current counter value x 4 5 76 35013355 07 2012 BMX EHC 0200 Functionalities Counter Status Bits in Event Counting Mode The table below shows the composition of the counters sIWr m c 0 status word in event counting mode Bit Label Description SIWwr SYNC_REF_FLAG The bit is set to 1 when the internal time base has been synchronized The bit is set to 0 when the sync_reset command is received rising
157. t set to 0 fault Local bit set to 1 Input mode SKkWr m c 9 This word can take the following values A High B Low A Pulse B Direction normal quadrature 1 normal quadrature 2 normal quadrature 4 inverse quadrature 1 inverse quadrature 2 inverse quadrature 4 ee2e eee 8 NOoRWONM O Scale factor SKWr m c 6 Edit value in the range 1 255 least significant byte Synchronization edge SKWr m c 10 Rising edge bit set to 0 most significant Falling edge bit set to 1 byte Output block 0 SkWr m c 17 This word can take the following values o 0 off 1 low counter 2 counter in a window 3 High counter 4 pulse less than the lower threshold LT 5 pulse greater than the lower threshold LT 6 pulse less than the upper threshold UT 7 pulse greater than the upper threshold UT Output block 1 SkWr m c 19 This word can take the following values e 0 off 1 low counter 2 counter in a window 3 High counter 4 pulse less than the lower threshold LT 5 pulse greater than the lower threshold LT 6 pulse less than the upper threshold UT 7 pulse greater than the upper threshold UT 35013355 07 2012 131 Configuration of the Counting Modules Label Address in the configuration Configurable values Polarity 0 oe Wr m c 2 Polarity bit set to 0
158. tatus bits Standard symbol Type Access Meaning Language object MODULO_VALUE DINT R W Modulo value SMDr m c 4 PRESET_VALUE DINT R W Preset value SMDr m c 6 CALIBRATION_FACTOR INT R W Calibration factor SMWr m c 8 10 to 10 unit 0 1 SLACK_VAL INT R W Offset value SMWr m c 9 Exchange Status EXCH_STS The table below shows the meaning of channel exchange status bits from the EXCH_STS channel SMWr m c 0 Standard symbol Type Access Meaning Language object STS_IN_PROG BOOL R Status parameter read in progress SMWr m c 0 0 ADJ_IN_PROG BOOL R Adjust parameter exchange in progress SMwr m c 0 2 RECONF_IN_PROG BOOL R Reconfiguration in progress SMWr m c 0 15 35013355 07 2012 185 Channel Report EXCH_RPT The following table presents the meanings of the report bits of the EXCH_RPT channel SMWr m c 1 Standard symbol Type Access Meaning Language object STS_ERR BOOL R Error while reading channel status SMWr m c 1 0 ADJ_ERR BOOL R Error while adjusting the channel SMwr m c 1 2 RECONF_ERR BOOL R Error while reconfiguring the channel SMWr m c 1 15 Channel Error CH_FLT The table below presents the meaning of the error bits on the CH_FLT channel SMWr m c 2 Standard symbol Type Access Meaning Language object EXTERNAL_FLT_INPUTS BOOL R External error at inputs SMWr m c 2 0 EXTERNAL_
159. ter may apply a hysteresis if the rotation is inverted The hysteresis parameter configured with the adjust screen defines the number of points that are not acknowledged by the counter during the rotation inversion This aims to take into account the slack between the encoder motor axis and the mechanical axis e g an encoder measuring the position of a mat This behavior is described in the following figure Hysteresis Hysteresis gt gt Encoder forward motion Encoder return motion Encoder forward motion 4 P 4 P 4 a Mechanical forward motion Mechanical return motion Mechanical forward motion 4 gt 4 pe gt Counter value gt The value defined by the user as the Hysteresis slack value is contained in the sMWr m c 9 word The user may change this value by specifying the value of this word this value is from 0 to 255 e Inthe adjust screen e Inthe application by using the WRITE PARAM IODDT VAR1 Function IODDT_VAR1 is of the type T SIGNED CPT BMX Counter Status Bits in Free Large Counter Mode The table below shows the composition of the counters sIWr m c 0 status word in free large counter mode Bit Label Description SIWr m c 0 1 MODULO_FLAG The bit status changes in the rollover mode The bit is set to 1 when the counter rollovers its limits 2 147 483 648 or 2 147 483 647 The bit is reset to 0 when the command MODULO_RESET Qr m c 9 is received
160. ter value being less than IWr m c 10 3 lower threshold EVT_COUNTER_WINDOW BOOL R Event due to counter value being between SIWr m c 10 4 the two thresholds EVT_COUNTER_HIGH BOOL R Event due to counter value being greater IWr m c 10 5 than upper threshold EVT_CAPT_0O BOOL R Event due to capture function 0 SIWr m c 10 6 EVT_CAPT_1 BOOL R Event due to capture function 1 IWr m c 10 7 EVT_OVERRUN BOOL R Warning lost event s SIWr m c 10 8 Output Thresholds and Frequency The table below presents the various IODDT implicit exchange objects Standard symbol Type Access Meaning Language object LOWER_TH_VALUE DINT R W Lower threshold value QDr m c 2 UPPER_TH_VALUE DINT R W Upper threshold value SQDr m c 4 PWM_FREQUENCY DINT R W Output frequency value unit 0 1 Hz SQDr m c 6 PWM_DUTY INT R W Duty cycle value of the output frequency SQDr m c 8 unit 5 Qr m c d Words The following table presents the meanings of the bits of the sQr m c d words Standard symbol Type Access Meaning Language object OUTPUT_O BOOL R W Forces OUTPUT_0 to level 1 SQr m c 0 OUTPUT_1 BOOL R W Forces OUTPUT_1 to level 1 SQr m c 1 OUTPUT_BLOCK_O_ENABLE BOOL R W Implementation of output O function block Or m c 2 OUTPUT_BLOCK_1_ENABLE BOOL R W Implementation of output 1 function block Or m c 3 182 35013355 07 2012 Standard symbol Type Access Meanin
161. the following values 0 none e 1 low e 2 medium e 3 high IN_EN input filter SKWr m c 4 most significant byte The most significant byte can take the following values 0 none e 1 low e 2 medium 3 high Input power supply fault SKkWr m c 2 8 General input output fault bit set to 0 Local bit set to 1 Scale factor SKWr m c 6 least significant byte Edit value in the range 1 255 35013355 07 2012 127 Configuration of the Counting Modules Label Address in the configuration Configurable values Synchronization edge SKWr m c 10 8 Rising edge bit set to 0 Falling edge bit set to 1 Output block 0 SKWr m c 17 This word can take the following values 0 off 1 low counter 2 counter in a window e 3 High counter e 4 pulse less than the lower threshold LT 5 pulse greater than the lower threshold LT e 6 pulse less than the upper threshold UT 7 pulse greater than the upper threshold UT Output block 1 SKWr m c 19 This word can take the following values 0 off 1 low counter 2 counter in a window e 3 High counter e 4 pulse less than the lower threshold LT 5 pulse greater than the lower threshold LT 6 pulse less than the upper threshold UT 7 pulse greater than the upper threshold UT
162. the physical location of the pin numbers for the 10 pin connector 42 35013355 07 2012 BMX EHC 0200 The symbol and description of each pin are described in the table below Pin number Symbol Description 1 24V_IN 24 VDC input for sensors supply 2 GND_IN 24 VDC input for sensors supply 5 Q0 1 Q1 output for counting channel 0 6 Qo 0 QO output for counting channel 0 7 Q1 1 Q1 output for counting channel 1 8 Q1 0 QO output for counting channel 1 9 24V_OUT 24 VDC input for actuators supply 10 GND_OUT 24 VDC input for actuators supply Safety Instructions 4 WARNING UNEXPECTED EQUIPMENT OPERATION Follow those instructions to reduce electromagnetic perturbations e adapt the programmable filtering to the frequency applied at the inputs or e use a shielded cable connected to the functional ground connected to pins 15 and 16 of the connector when using an encoder or a fast detector In a highly disturbed environment e use the BMX XSP 0400 0600 0800 1200 electromagnetic protection kit see Modicon M340 Using Unity Pro Processors Racks and Power Supply Modules Setup Manual See Modicon M340 using Unity Pro Processors Racks and Power Supply Modules BMX XSP xxx Protection Bar to connect the shielding without programmable filtering and e use a specific 24 VDC supply for inputs and a shielded cable for connecting the supply to the module Electromagnetic perturbations may
163. the upper threshold UT Output block 1 SKWr m c 19 This word can take the following values 0 off 1 low counter 2 counter in a window e 3 High counter e 4 pulse less than the lower threshold LT 5 pulse greater than the lower threshold LT 6 pulse less than the upper threshold UT e 7 pulse greater than the upper threshold UT Polarity 0 SkWr m c 2 Polarity bit set to 0 Polarity bit set to 1 Polarity 1 SkWr m c 2 Polarity bit set to 0 Polarity bit set to 1 Fault recovery SKWr m c 2 Automatic reaction bit set to 1 Activated bit set to 0 Fallback 0 SkWr m c 2 None bit set to 0 With bit set to 1 Fallback 1 SkWr m c 2 None bit set to 0 With bit set to 1 Fallback value 0 SKWr m c 2 0 bit set to 0 1 bit set to 1 Fallback value 1 SKWr m c 2 0 bit set to 0 1 bit set to 1 Output power supply KWr m c 2 9 General input output fault bit set to 0 fault Offline bit set to 1 35013355 07 2012 135 Configuration of the Counting Modules Label Address in the Configurable values configuration Pulse width O SkWr m c 18 Edit value in the range 1 65535 Pulse width 1 SKWr m c 20 Edit value in the range 1 65535 Event SkWr m c 0 Activated if activated is selected the entered Event number event number is coded on the most significant byte of this word D
164. ting Modules Label Address in the configuration Configurable values Output block 0 SKWr m c 17 This word can take the following values off low counter counter in a window High counter pulse less than the lower threshold LT pulse greater than the lower threshold LT pulse less than the upper threshold UT pulse greater than the upper threshold UT eoceoeeve0e e Noaguhwnio Output block 1 SKWr m c 19 This word can take the following values 0 off low counter counter in a window High counter pulse less than the lower threshold LT pulse greater than the lower threshold LT pulse less than the upper threshold UT 7 pulse greater than the upper threshold UT eeeeeee oaKRWONM Polarity 0 SKWr m c 21 1 Polarity bit set to 0 Polarity bit set to 1 Polarity 1 SKWr m c 21 2 Polarity bit set to 0 Polarity bit set to 1 Fault recovery ole Wr m c 21 0 Automatic reaction bit set to 1 Activated bit set to 0 Fallback 0 SKWr m c 21 3 None bit set to 0 With bit set to 1 Fallback 1 SKWr m c 21 4 None bit set to 0 With bit set to 1 Fallback value 0 SKWr m c 21 5 0 bit set to 0 1 bit set to 1 Fallback value 1 0 bit set to 0 1 bit set to 1 Output power General input output fault bit set to 0 supply fault Offline
165. trical equipment and its installation and has received safety training to recognize and avoid the hazards involved 35013355 07 2012 About the Book A At a Glance Document Scope This manual describes the hardware and software implementation of counting module BMX EHC 0200 for Modicon M340 PLCs and X80 drops Validity Note This documentation is valid from Unity Pro V7 0 Product Related Information A WARNING UNINTENDED EQUIPMENT OPERATION The application of this product requires expertise in the design and programming of control systems Only persons with such expertise should be allowed to program install alter and apply this product Follow all local and national safety codes and standards Failure to follow these instructions can result in death serious injury or equipment damage User Comments We welcome your comments about this document You can reach us by e mail at techcomm schneider electric com 35013355 07 2012 10 35013355 07 2012 Introduction to the Counting Function Subject of this Part This part provides a general introduction to the counting function and the operating principles of the BMX EHC 0200 What Is in This Part This part contains the following chapters Chapter Chapter Name Page 1 General Information on the Counting Function 13 Presentation of Counting Module 15 Presentation of the Counting Module Operation
166. uirements the relevant instructions must be followed Failure to use Schneider Electric software or approved software with our hardware products may result in injury harm or improper operating results Failure to observe this information can result in injury or equipment damage 2012 Schneider Electric All rights reserved 35013355 07 2012 Table of Contents Safety Information 00 0c eee 7 About the BOOK iiicieeeta ea iia aa tee eae eas 9 Part Introduction to the Counting Function 11 Chapter 1 General Information on the Counting Function 13 General Information on Counting Functions 0000 13 Chapter 2 Presentation of Counting Module 15 General Information about Counting Module 5 16 General Information about the Counting Module Operation 17 Presentation of the BMX EHC 0200 Counting Module 18 Modicon M340H Hardened Equipment 00 eee eee 19 Chapter 3 Presentation of the Counting Module Operation 21 Overview of BMX EHC 0200 Module Functionalities 21 Part Il Counting Module BMX EHC 0200 Hardware Implementation 2 2 0 0 0c eee ee 23 Chapter 4 General Rules for Installing Counting Module BMX EHC 0200 2 2 cee eee 25 Physical Description of the Counting Module 26 Fitting of Counting Modules 00 00 c eee eee 28 Fitting 10 Pin and 16 Pin
167. unter Mode Configuration 127 Modulo Loop Counter Mode Configuration 130 Free Large Counter Mode Configuration 133 Pulse Width Modulation Mode Configuration 137 35013355 07 2012 117 Configuration of the Counting Modules Frequency Mode Configuration At a Glance The configuration of a counting module is stored in the configuration constants SKW The parameters r m and c shown in the following tables represent the topologic addressing of the module Each parameter had the following signification e r represents the rack number e m represents the position of the module on the rack e c represents the channel number Configuration Objects The table below presents the frequency mode configurable elements Label Address in the Configurable values configuration Counting mode SkWr m c 2 Frequency mode The value of the least least significant significant byte of this word is 1 byte IN_A input filter SkWr m c 3 The least significant byte can take the following least significant values byte e 0 none e 1 low e 2 medium 3 high Input power supply SKWr m c 2 8 General input output fault bit set to 0 fault Local bit set to 1 Scale factor SKWr m c 6 Edit value in the range 1 255 least significant byte Output block 0 SKkWr m c 17 This word can take the following values 0 off 1 low counter 2 counter in a window e 3 High counter e 4 pulse less
168. unting Modules Pulse Width Modulation Mode Debugging At a Glance The table below presents the pulse width modulation mode debugging elements Label Language object Type Frequency valid SIWr m c 0 3 Binary Frequency in low limit S IWr m c 0 5 Binary Frequency in high limit IWr m c 0 4 Binary PWM frequency SQDr m c 6 Digital PWM duty SQWr m c 8 Digital Input SYNC state SIr m c 6 Binary SYNC enable SQWr m c 0 0 Binary SYNC force SQr m c 4 Binary Input EN Ir m c 7 Binary EN enable SQWr m c 0 2 Binary Counter enable SQr m c 6 Binary Output latch 0 enable Qr m c 2 Binary Output 0 state Ir m c 0 Binary Output 0 cmd SQr m c 0 Binary Output 1 state Ir m c 1 Binary Output 1 cmd SQr m c 1 Binary For a description of each language object refer to T UNSIGNED_CPT_BMX lIODDT see page 180 160 35013355 07 2012 Display of BMX EHC xxxx Counting Module Error 12 Subject of this Chapter This chapter deals with the display of possible errors for the BMX EHCeeee modules What Is in This Chapter This chapter contains the following topics Topic Page Fault Display Screen for BMX EHC 0200 Counting Modules 162 Faults Diagnostics Display 164 List of Error 165 35013355 07 2012 161 Display of Error Counting Module Fault Display Screen for BMX EHC 0200 Counting Modules At a Glance Illustration This section p
169. unting channels 35013355 07 2012 109 Screens 110 35013355 07 2012 Configuration of the BMX EHC 0200 Counting Modules 9 Subject of this Chapter This chapter deals with the configuration of the BMX EHC 0200 counting modules This configuration can be accessed from the Configuration tab on the functional screens of BMX EHC 0200 see page 108 modules What Is in This Chapter This chapter contains the following sections Section Topic Page 9 1 Configuration Screen for BMX EHC xxxx Counting Modules 112 9 2 Configuration of Modes for the BMX EHC 0200 Module 117 35013355 07 2012 111 Configuration of the Counting Modules 9 1 Configuration Screen for BMX EHC xxxx Counting Modules Subject of this Section This section presents the configuration screen for BMX EHC esee counting modules in a Modicon M340 local rack and in X80 drop What Is in This Section This section contains the following topics Topic Page Configuration Screen for BMX EHC 0200 Counting Modules in a Modicon 113 M340 Local Rack BMX EHC 0200 Counting Module Configuration Screens in X80 Drop 115 112 35013355 07 2012 Configuration of the Counting Modules Configuration Screen for BMX EHC 0200 Counting Modules in a Modicon M340 Local Rack
170. us with the execution task so the detection is possible by the application The illustration below shows the different significant bits for managing exchanges Reconfiguration bi Adjustment bit 2 Command bit 1 Y Status bit 0 EXCH RPT MWr m c 1 EXCH_STS MWr m c 0 Status parameters READ_STS Command parameters WRITE_CMD WRITE PARAM Adjustment parameters READ PARAM SAVE PARAM RESTORE PARAM t 15 35013355 07 2012 175 Description of Significant Bits Each bit of the words EXCH_ STS SMWr m c 0 and EXCH RPT MWr m c 1 is associated with a type of parameter e Rank 0 bits are associated with the status parameters e The STS _IN_ PROGR bit SMWr m c 0 0 indicates whether a read request for the status words is in progress e The STS_ERR bit sMWr m c 1 0 specifies whether a read request for the status words is accepted by the module channel e Rank 1 bits are associated with the command parameters e The CMD_IN_ PROGR bit sMWr m c 0 1 indicates whether command parameters are being sent to the module channel e The CMD ERR bit sMWr m c 1 1 specifies whether the command parameters are accepted by the module channel e Rank 2 bits are associated with the adjustment parameters e The ADJ_IN_ PROGR bit SMWr m c 0 2 indicates whether the adjustment parameters are being exchanged with the module chann
171. vel at the IN_B input Rising edge at the IN_A input and low state at the IN_B input Falling edge at the IN_A input and high state at the IN_B input Reserve Quadrature X4 Falling edge at the IN_A input and low state at the IN_B input Low state at the IN_A input and rising edge at the IN_B input Rising edge at the IN_A input and high level at the IN_B input High state at the IN_A input and falling edge at the IN_B input Rising edge at the IN_A input and low state at the IN_B input High state at the IN_A input and rising edge at the IN_B input Falling edge at the IN_A input and high state at the IN_B input Low state at the IN_A input and falling edge at the IN_B input 88 35013355 07 2012 BMX EHC 0200 Functionalities Operation The trend dithe modulo counting process in the configuration by default IN_A counting In_B downcounting IN_A input pulses IN_B input pulses IN_SYNC input t 4 ft valid_sync bit Counter value Modulo value IN X1 X2 Time 0 Y gt CaptureO value X1 X2 X3 35013355 07 2012 89 BMX EHC 0200 Functionalities Counter Status Bits in Modulo Loop Counter Mode The table below shows the composition of the counters sIWr m c 0 status word in modulo loop counter mode Bit Label Description SIWr m c 0 1 MODULO_FLAG
172. y Rules for Outputs Interface The output interface requires that the actuator power supply remains active for output blocks functions operations When the actuator supply voltage is insufficient the ouputs are held to 0 V By default the actuator supply fault makes the CH_ERROR Ir m c ERR global status bit at the high level and the red led IO lighted The configuration screen allows to unlink the actuator supply fault to the CH_ ERROR bit by configuring the parameter Output Supply Fault as local instead of General IO Fault IODDT_VAR1 is of the type T Unsigned_CPT BMX orT Signed CPT BMX Explicit channel status words The table below presents the composition of the sMWr m c 2 and sMWr m c 3 status words Status Word Bit position Designation SMWr m c 2 0 External fault at inputs 1 External fault at outputs 4 Internal error or self testing 5 Configuration Fault 6 Communication Error 7 Application fault 58 35013355 07 2012 BMX EHC 0200 Functionalities Status Word Bit position Designation SMWr m c 3 2 Sensor supply fault 3 Actuator supply fault 4 Short circuit on output QO 5 Short circuit on output Q1 10 Data All input output statuses are provided in the channel data bits The table below shows the channel data bits Input Output data field Designation S Ir m c 0 Logical state of output QO Ir m c 1 Logi
173. y cycle 0 1 250 Hz 95 5 251 500 Hz 90 10 501 1 000 Hz 80 20 1001 1 500 Hz 70 30 1501 2 000 Hz 60 40 2 001 2 500 Hz 50 2 5001 4 000 Hz 50 See following note NOTE If the frequency and the duty cycle do not respect this table the output and the validity bit IWr m c 0 3 remains in the low state NOTE You have to check the validity bit sIWr m c 0 3 before taking into account the numerical values such as the counter and the capture registers Only the validity bit at the high level set to 1 guarantees that the mode will operate correctly within the limits NOTE From 2501 Hz to 4000 Hz the 50 ratio is not guaranteed on output 35013355 07 2012 99 BMX EHC 0200 Functionalities 100 35013355 07 2012 Counting Module BMX EHC 0200 Software Implementation IV Subject of this Part This part describes the software implementation and functions of the BMX EHC 0200 counting module NOTE This part concerns also the Modicon M340H What Is in This Part This part contains the following chapters Chapter Chapter Name Page 7 Software Implementation Methodology for BMX EHC xxxx 103 Counting Modules 8 Accessing the Functional Screens of the BMX EHC xxxx 105 Counting Modules 9 Configuration of the BMX EHC 0200 Counting Modules 111 10 BMX EHC xxxx Counting Module Settings 139 11 Debugging the BMX EHC 0200 Counting Modules 147 1
174. zation Flag At a Glance This section presents the operation of the bits relating to the following events e Synchronization or counter homing event depending on the counting mode e Counter rollovers the modulo or its limits in forward or reverse The table below presents the counting modes that may activate synchronization homing and modulo events Flag Counting mode concerned sync_ref flag bit SIWr m c 0 2 Free Large counter When the counter presets Modulo loop counter When the counter resets One shot counting When the counter presets and starts modulo_flag bit IWr m c 0 1 e Modulo loop counter When the counter rollovers the modulo or 0 Free large counter When the counter rollovers its limits Operation of the Flag Bits The synchronization or homing event s flag bit is set to 1 when a counter synchroni zation or homing occurs The modulo event s flag bit is set to 1 in the following counting modes e Modulo loop counter mode the flag bit is set to 1 when the counter rollovers the modulo e Free large counter mode the flag bit is set to 1 when the counter rollovers its limits in forward or reverse Location of the Flag Bits The following table presents the modulo flag and sync ref flag bits which are elements of the 31Wr m c d status word Language object Standard symbol Meaning SIWr m c 0 0 RUN The counter operates in one shot mode only IWr m c

Download Pdf Manuals

image

Related Search

Related Contents

Trebs MT-066 flashlight  Manual do Utilizador do Nokia 1661/1662  C-860L 取扱説明書    How to create Profiles (Libraries) User Manual  HRSA HSMES Database User Manual 5.0  

Copyright © All rights reserved.
Failed to retrieve file