Home
        Modicon M340 with Unity Pro - Counting Module BMX EHC 0800
         Contents
1.                                          register 1       Standard symbol Type  Access   Meaning Language object   EVT_COUNTER_WINDOW_ENABLE   BOOL   R W EVENT task call when the counter    QWr m c 1 4  is between the lower and upper  threshold   EVT_COUNTER_HIGH_ENABLE BOOL   R W EVENT task call when the counter    QWr m c 1 5  value is greater than the upper  threshold          CAPT 0 ENABLE BOOL  R W EVENT task call during capture in    OWr m c 1 6  register 0          CAPT 1 ENABLE BOOL  R W EVENT task call during capture in    OWr m c 1 7             156      100000000318 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         T Signed        BMX types IODDTs which are applicable to all BMX EHC           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        BMX and    Signed        BMX   types IODDT VARI     NOTE     e in general  the meaning of the bits is given for bit status 1     e notall bits are used     The table below shows the meaning of the status bits                             Standard symbol Type Access  Meaning Language object   MODULO VALUE DINT R W Modulo value  MDr m c 4   PRESET VALUE DINT R W Preset value  MDr m c 6   CALIBRATION FACTOR INT R W Calibration factor  MWr m c 8 
2.                                      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           EIO0000000318 07 2012    181          Application using Unity Pro       The following screen shows the application variables created using the data editor           Data Editor       Variables JDT ypes 1 Function blocks pes          ilter  T Name     V EDT  _ DDT  v IODDT    Name              Comment                eflection p  Parameter DINT  H A  Encoder T  UNSIG       First Labeling Point DINT                            E Last Box Late BOOL   1 9 Nb Box DINT 0  4 Posiion 0 BOOL   1 4  Position 1 BOOL   1    Position 2 BOOL   B9 Run REAL         Second Lebelling  Point DINT 30     Waining First Part BOOL   bee ainting_Other_Parts BOOL   ad                                  NOTE  Click on x in front of the derived variable Encoder to expand the I O objects  list                 182   100000000318 07 2012  
3.                           BMX EHC 0800 Module Operation in Frequency Mode                BMX EHC 0800 Module Operation in Event Counting Mode            BMX EHC 0800 Module Operation in One Shot Counter Mode          BMX EHC 0800 Module Operation in Modulo Loop Counter Mode         BMX EHC 0800 Module Operation in Upcounting and Downcounting  Mode EIS aE tmr PEOR athe    eine E  BMX EHC 0800 Module Operation in Dual Phase Counting Mode       BMX EHC 0800 Counting Module Software  Implementation                                Software Implementation Methodology for the   BMX EHC 0800 Counting                                  Installation Methodology                                        Accessing the Functional Screens of the BMX EHC xxxx  Counting                                             Accessing the Functional Screens of the BMX EHC 0800 Counting  MOdUul S e etd cede che bee aoa oboe le lea         atte  Description of the Counting Module                                      Configuration of the BMX EHC 0800 Counting Module    Configuration Screen for BMX EHC xxxx Counting Modules            Configuration Screen for the BMX EHC 0800 Counting Module in     Modicon M340 Local                                               Configuration Screen for the BMX EHC 0800 Counting Module in X80  Drop    ee ed eer ae sted  Configuration of Modes for the BMX EHC 0800 Module               Frequency Mode                                                             Event Counting Mode Co
4.                     132  Dual Phase Counting Mode Debugging                            133  Chapter 12 Display of BMX EHC xxxx Counting Module Error      135  Fault Display Screen for the BMX EHC 0800 Counting Module         136  Faults Diagnostics Display                                      138  List of Errors  ot eb ERI eR eosin bh adnate ations 139  Chapter 13 The Language Objects of the Counting Function       141  13 1 The Language Objects and IODDT of the Counting Function           142  Introducing Language Objects for Application Specific Counting              143  Implicit Exchange Language Objects Associated with the Application   Specific  Encore ote ater uterus fed             144  Explicit Exchange Language Objects Associated with the Application   Specific FUNCION    x      RERUM E aA alee 145  Management of Exchanges and Reports with Explicit Objects           147  13 2 Language Objects and IODDT Associated with the Counting Function of  the BMX EHC xxxx Modules                                     151  Details of Implicit Exchange Objects for the T_Unsigned_CPT_BMX and  T Signed CPT BMX types IODDTS                              152  Details of the Explicit Exchange Objects for the T        BMX type IODDT 157  18 3 Device DDTs Associated with the Counting Function of the  BMX EHC xxxx Modules                                        159  Counter Device DDT                                               159  13 4 The IODDT Type T GEN MOD Applicable to All Modules  
5.                     ETIN  H  Function   Modulo Loop a       Task     ST                                        WW module4    8103                  NOTE  When adding a BMX EHC 0800 in a local rack the defaut function is  Frequency mode         100000000318 07 2012 103    Configuration of the Counting Module       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           104      100000000318 07 2012    Configuration of the Counting Module       Configuration Screen for the BMX EHC 0800 Counting Module in X80 Drop    Introduction    The various available scree
6.              BMX EHC 0800    The table below presents the elements of the counting module                    Module Number Description  BMX EHC 0800 1 Module state LEDs   e State LEDs at module level  e State LEDs at channel level  2 20 pin connector compatible with discrete    inputs outputs          Accessories    The BMX EHC 0800 module requires the use of a BMX FTB 2000 2010 2020  terminal block and a BMX XSP 0400 0600 0800 1200 electromagnetic compatibility  kit  see Modicon M340 Using Unity Pro  Processors  Racks  and Power Supply    Modules  Setup Manual         26    E100000000318 07 2012       BMX EHC 0800 Counting Module  General Rules for Installation       Fitting of Counting Module    At a Glance    The counting module is powered by the rack bus  The module may be handled  without turning off power supply to the rack  without causing any danger and without  there being any risk of damage or disturbance to the PLC     Fitting operations  installation  assembly and disassembly  are described below     Installation Precautions    Installation    The counting module 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 eese  and the processor  BMX P34        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    
7.            166  Details of the Language Objects of the IODDT of Type T GEN MOD    166  Part V Quick Start  Example of Counting Module                1                                         169  Chapter 14 Description of the                                              171  Overview of the                                                           171  E100000000318 07 2012 5       Chapter 15 Installing the Application Using Unity Pro             173    15 1 Presentation of the Solution                                        174  Process Using Unity                                             174   15 2 Developing the Application                                     176  Creating the                                                        177  Configuration of the Counting                                       178  Declaration of                                                         181   Creating the Program for Managing the Counter Module              183   Creating the Labelling Program in                                185   Creating the I O Event Section in                                 187   Creating a Program      LD for Application Execution                 188   Creating an Animation Table                                   191   Creating the Operator Screen                                   193  Chapter 16 Starting the Application                            195  Execution of Application in Standard                                  195    j    mr 197         1000000
8.          Type Application Number of   Number of Number of Maximum  channels physical physical frequency  per module   inputs        outputs per   channel channel                0800    Counting 8 2 in single 0 10 KHz  e Downcounting mode  e Frequency meter 3 in special     Encoder interface dual phase  mode                        100000000318 07 2012    17       BMX EHC 0800 Counting Module       Presentation of the BMX EHC 0800 Counting Module    At a Glance    The BMX EHC 0800 counting module enables the counting or downcounting of  pulses to be performed  It has the following functions     16 bits structure    Enable   Capture   Comparison   Load to preset value or reset to 0    The following illustration shows the 16 bits structure of a counter channel     s Vif 1A    vh       COUNTER mm           Comparator    Counter Threshold  Or  record Threshold    1 record  16 bits  register       The diagram above is applicable for the following 5 counting modes     Frequency mode   Event counting mode   One shot counter mode  Modulo loop counter mode  Up and down counter mode       18    EIO0000000318 07 2012    BMX EHC 0800 Counting Module       32 bits structure  The following illustration shows the 32 bits structure using 2 channels     Comparator    1 record Counter Threshold  32 bits Or    register    record Threshold       The illustration shown above is only applicable for the dual phase counter mode     In this mode  with the counting module it is possible to merge 2 singl
9.        100000000318 07 2012 81    BMX EHC 0800 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 sub mode  the counting register maintains the limit value and the  counting validity bit changes to 0     Counter value Lock on limits mode       Validity bit                        Homing event    NOTE  Overflow and underflow are indicated by two bits LOW LIMIT and   HIGH LIMIT until the application reloads the counting value predefined by the user     orce sync bitsetto 1 or preset condition true   The upcounting or downcounting  may therefore be resumed     In the rollover sub mode  the counting register automatically switches to the limit  value opposed to overflow     Counter value Rollover mode    de  0 NX     32K      32K          Validity bit            Homing event       82 E100000000318 07 2012    BMX EHC 0800 Functionalities       Counter Status Bits in Up and Down Counting Mode    The table below shows the composition of the counters  IWr m c 0 status word  in up and down counting mode        Bit    Label Description        IWr 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    32 768 or 432 767     The bit is reset to O when the command   MODULO RESET  20         9  is received  rising  edge of the MODULO RESET bit          IWr m c 0 2    SYNC REF FLAG
10.        STS   MWr  m c 0  of  the IODDT associated to the channel before calling any EF addressing this channel        146    EIO0000000318 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   MWr 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   MWO   0  MOD 0 0 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 synchronous 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 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 REA
11.       BMX EHC 0800 Functionalities       BMX EHC 0800 Module Operation in One Shot Counter Mode    At a Glance  Using the one shot counter mode allows you to quantify a group of parts     Basic Principle    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 O   Downcounting is made possible when the enable function is activated  The counting  register is thus updated every 5 ms        74   100000000318 07 2012    BMX EHC 0800 Functionalities       Operation    IN  A input  pulses     IN  AUX input  valid syncbit  force enablebit    Counter value    User defined value   preset value     Operation of the  counter    The trend diagram illustrates the one shot counter mode process                 F                                      i       dol                                                           In the trend diagram above  we can see that the counter starts downcounting at the  IN  AUX input s rising edge  The counter loads the value defined by the user and  decrements the counting register with every pulse applied to the IN A input  When  the register is set to O  the counter awaits a new signal from the IN AUX input  The  IN  A input pulses have no effect on the register value as long as the counter is set  to 0     The force enable command must be at the high level during the counti
12.       variable creation    Prefixe for name       Type     Comment        VO object E 600 1 0 8    Channel Ie  CH 114  O0 1 0 9    AWO LO  Configuration     KW T 96KD    96KF Seleat all   PISO T HT                TOTO  System T       t5   WO    11    Status                    Hef YODI 102  2  QD0 1 0 4  Parameter    AMW    96MD     MF      DO 105    Command                          Implicits           T  ID T 96lF  FHA            00   96QF                   Update    Update grid    Filler on usage               180      100000000318 07 2012    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        Variables Used for the Application    The following table shows the details of the variables used in the application                
13.      100000000318 07 2012 53       BMX EHC 0800 Functionalities       Programmable Filtering    At a Glance    The BMX EHC 0800 counting module s two  or three  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 in low mode     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 Minimum Maximum  pulse frequency   None IN  A  IN B 50 us 10 KHz   IN AUX 50 us 40 Hz   Low IN  A   IN B  450 us 1 KHz   for bounces    2 KHz IN  AUX 450 us 40 Hz   Resource IN  A  IN B 1 25 ms 350 Hz   for bounces    1 KHz IN  AUX 1 25 us 40 Hz   High IN A  IN B 4 2 ms 100 Hz   for bounces    250 Hz IN  AUX 42 ms 40 Hz                      54    E100000000318 07 2012       BMX EHC 0800 Functionalities       Comparison    At a Glance    The comparison block operates automatically when it is enabled  It is available in all  the BMX EHC 0800 module s counting modes     It compares the current value of the counter together with the capture value at the  defined threshold     Comparison Threshold    The comparison block
14.      Configuration of the Counting Module       Up and Down Counting Mode Configuration    At a Glance    The configuration of a counting module is stored in the configuration constants              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     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 up and down counting mode configurable elements                    Label Address in the Configurable values  configuration  Counting mode  KWr m c 2 Up and down counting mode  The value of the   least significant   least significant byte of this word is 5   byte   IN  A input filter  KWr m c 3 The least significant byte can take the   least significant   following values   byte     0                1 low      2               e 3 high   IN  AUX input filter  KWr m c 4 The least significant byte can take the   least significant   following values   byte     0                1 low      2  medium   e 3 high   Input power supply  KWr m c 2 8   General input output error  bit set to 0   error Local  bit set to 1        oe    Counting operation Wr m c 11 0  Overrun locking  bit set to 0     Reversal  bit set to 1                Synchronization edge Wr m c 10 8  Rising edge  bit set to O            High  Falling edge  bit set to 1   Event  KWr m c 0 Activ
15.      Dual Phase Counter mode   IWr m c 10 7  EVT          1 Event due to capture 1    IWr m c 10 8   EVT OVERRUN Event due to overrun  e Frequency Counter mode     Event Counter mode     One Shot Counter mode     Modulo Loop Counter mode     Up and Down Counter mode     Dual Phase Counter mode                         66   100000000318 07 2012    BMX EHC 0800 Functionalities       Enabling Events    Input Interface    Operating Limits    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   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    OWr m c 1 0 Start of counting event validation bit     OWr m c 1 1 Counter rollovering modulo  0 or its limits event  validation bit     OWr m c 1 2 Synchronization or counter homing event  validation bit     OWr m c 1 3 Counter less than threshold event validation bit     OWr m c 1 4 Counter equal to threshold event validation bit     OWr m c 1 5 Counter greater than threshold event validation  bit     OWr m c 1 6 Capture 0 event validation bit        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 Theevt sources Word   IWr m 
16.      ERR bit      MWr m c 1 2      This bit makes the following reports        0  correct exchange    e 1 faulty exchange        NOTE  There is no adjustment parameter at module level                 The table below shows the control bits of the explicit exchanges           STS     MWr m c 0    Standard symbol Type                 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          EIO0000000318 07 2012                                  Standard symbol Type  Access  Meaning Address          IN PROGR BOOL  R Adjust parameters  MWr m c 0 2  exchange in progress   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         MWr m c 0 0    0   but the words are refreshed     Explicit Exchange Report  EXCH_RPT    The table below shows the report bits     EXCH RPT   MWr m c 1         READ STS for example  are not sent to the module  575 IN PROG                               the channel   1   failure     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
17.      For a description of each language object referto T UNSIGNED CPT BMXIODDT     see page 152         130      100000000318 07 2012    Debugging the Counting Module       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 reset  Or m c 7 Binary  Counter enable  Or m c 6 Binary  Counter low  IWr m c 1 0 Binary  Counter equal  IWr m c 1 1 Binary  Counter high  IWr m c 1 2 Binary  Capture value  IDr m c 4 Digital  Capture low  IWr m c 1 3 Binary  Capture equal  IWr m c 1 4 Binary  Capture high  IWr m c 1 5 Binary  Capture enable  OWr m c 0 3 Binary  Input A state  Ir m c 4 Binary  Input AUX state  Ir m c 6 Binary  SYNC enable  OWr m c 0 0 Binary  SYNC force  Or m c 4 Binary  SYNC state  IWr m c 0 2 Binary  SYNC reset  Or m c 8 Binary  Threshold value  ODr m c 2 Digital  Compare enable  OWr m c 0 5 Binary  Compare suspend SQWr m c 0 6 Binary  Modulo state  IWr m c 0 1 Binary  Modulo reset  Or m c 9 Binary                   For a description of each language object referto T UNSIGNED CPT BMXIODDT   see page 152         E100000000318 07 2012 131    Debugging the Counting Module       Up and Down Counting Mode Debugging                                                                                     At a Glance   The tabl
18.    1 low       2  medium    e 3  high        Input power supply  error     KWr m c 2 8    General input output error  bit set to 0   Local  bit set to 1        Synchronization edge     KWr m c 10 8   most significant byte     Rising edge at the IN SYNC input  bit set to 0   Falling edge at the IN SYNC input  bit set to 1        Time base    SKWr m c 7    This word can take the following values      0 0 15       1 15       2 105    e 3 1min       Event  Event number          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              EIO0000000318 07 2012    109    Configuration of the Counting Module       One Shot Counter Mode Configuration    At a Glance    The configuration of a counting module is stored in the configuration constants               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     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 significan
19.    Counter in high limit m3 0200 0 COUNTER STATUS No   00304 Capture    value m3 0200             0 VALUE 0   8                   Capture O low m COOMPARE STATUS No  He 9103014   Capture 0 in window   m3 0200 Q COOMPARE STATUS No  10      30 15   Capture 0 high m3 0200                     STATUS No  11   amp QWO 300 33   Capture 0 enable m3 0200 O FUNCTIONS ENABLING 0     12   10 3 0 4 Input m3 0200                 0  1300305 Input B m3 Q200               0  14  30306 Input SYNC m3 0200 O INPUT  SYNC 0   15  QWO 3000   SYNC enable m3 0200 O FUNCTIONS  ENABLING 0       1600304 SYNG force m3 0200 0 FORCE SYNC 0  17  10 3002   SYNC state m3_0200_0 COUNTER_STATUS Yes   18   Q0 3 08 SYNC reset m3 Q200 O SYNC RESET  0  9     Q030 7 Input EN mj 0200 O INPUT     0  E   QWO 3002  EN enable m3 0200 O FUNCTIONS ENABLING 0     XQ0306 Counter enable m3 0200 O FORCE ENABLE 1  122   0000 Output state m3_0200_0 OUTPUT_0_Echo 0   23  0 300 Output    cmd m3 0200 0 OUTPUT O   0  24  1030 1 Output 1 state m3 0200 O QUTPUT 1 Echo 0  125 Q0 30 1 Output        m3 0200 O QUTPUT 1   0   26  Q0 30 7 Counter           md 0200   FORCE RESE     2f  4 0302 Output latch 0 state m3 0200 O OUTPUT BLOCK 0 0  2 Qupd BERT suse  me COO OUTPUT             0  utput latch 1 state m UIPUT BL  4   0         0         Ouipullah Tenable   m3 0200 0 OUTPUT BLOCK L ENABLE      Function  31   QD0 3 0 2 Low threshold value   m3_0200_0 LOWER_TH_VALUE 0          32   0003 0 4       High threshold value   m UPPER TH VALUE 2  
20.    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   e PRESET VALUE  Preset value     CALIBRATION FACTOR  Calibration Factor   e MODULO VALUE  Modulo value      SLACK VAL  Offset value   e HYSTERESIS VALUE  Hysteresis value                                        EIO0000000318 07 2012    159       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  error    read       1  the module is operating  correctly       MOD FLT    BYTE    internal detected errors byte of the  module    read       CPT CH IN          ARRAY  0   x 1  of T M CPT STD CH IN    Array of structure             The following table shows the 1          CPT    ST       D CH IN x 0   x 1  status word bits        Standard Symbol    Type    Bit   Meaning    Access       FCT TYPE    WORD    1   Frequency       2   EvtCounting       3   PeriodMeasuring   4   Ratio1   5   Ratio2   6   OneShotCounter   7   ModuleLoopCo
21.    The bitis 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  ofthe 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        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  32 767   The bit is reset to 0 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  32 768   The bit is reset to 0 when the counter presets or  resets              Type of the IODDT    Operating Limits    In this mode  the type of the IODDT must be T_SIGNED_CPT_BMX     The maximum frequency applied to the IN_A input is 10 kHz     Pulses applied at the IN_A input  after a change of direction  are only upcounted or  downcounted after a delay that corresponds to the delay in acknowledging the  IN_AUX input status due to the level of filtering programmable on this input     Preset value must be between    32 768 and  32 767     NOTE  You have to check the validity bit   1Wr m c 0 3  before taking into   account the numerical values such as the counter and the capture registers  Only   the validi
22.    read  COUNTER CURRENT   UDINT Current counter value during   read  VALUE US  event           0 VALUE US  UDINT Value captured in register O   read                            162   100000000318 07 2012                                                                                                 Standard Symbol Type Bit   Meaning Access  CAPT  1 VALUE US  UDINT Value captured in register 1   read  OUTPUT 0 EBOOL forces OUTPUT 0 to level 1   read   write  OUTPUT 1 EBOOL forces OUTPUT 1 to level 1   read   write  OUTPUT BLOCK 0 ENABLE EBOOL implementation of output O   read   write  function block  OUTPUT BLOCK 1 ENABLE EBOOL implementation of output 1   read   write  function block  FORCE SYNC EBOOL counting function read   write  synchronization and start  FORCE REF EBOOL set to preset counter value  read   write  FORCE ENABLE EBOOL implementation of counter   read   write  FORCE RESET EBOOL reset counter read   write  SYNC RESET EBOOL reset SYNC REF FLAG read   write  MODULO RESET EBOOL reset MODULO FLAG read   write  FUNCTIONS ENABLING  INT    VALID SYNC BOOL 0   synchronization and start read   write  authorization for the  counting function via the  IN  SYNC input  VALID REF BOOL  1 operation authorization for   read write  the internal preset function  VALID ENABLE BOOL 2   authorization of the counter   read   write  enable via the IN EN input  VALID          0 BOOL 13   capture authorization in the   read   write  capture 0 register  VALID          1 BOOL  4   captu
23.   10  to  10   unit   0 1     SLACK_VAL INT R W Offset value  MWr m c 9                Exchange Status  EXCH STS    The table below shows the meaning of channel exchange status bits from the           STS channel   MWr  m c  0                              Standard symbol Type Access   Meaning Language object  STS_IN_PROG BOOL R Status parameter read in progress  MWr m c 0 0  ADJ IN PROG BOOL R Adjust parameter exchange in progress  Mwr m c 0 2  RECONF IN PROG BOOL R Reconfiguration in progress  MWr m c 0 15                EIO0000000318 07 2012    157       Channel Report           RPT  The following table presents the meanings of the report bits of the          RPT                channel   MWr m c 1    Standard symbol Type Access  Meaning Language object  STS ERR BOOL R Error while reading channel status  MWr m c 1 0  ADJ ERR BOOL R Error while adjusting the channel  Mwr m c 1 2  RECONF ERR BOOL R Error while reconfiguring the channel  MWr m c 1 15                      Channel Error               The table below presents the meaning of the error bits on the      FLT channel    MWr m c 2                                          Standard symbol Type Access   Meaning Language object  EXTERNAL FLT INPUTS BOOL R External error at inputs  MWr m c 2 0  EXTERNAL FLT OUTPUTS   BOOL R External error at outputs  MWr m c 2 1  INTERNAL FLT BOOL R Internal error  channel inoperative  MWr m c 2 4  CONF FLT BOOL R Hardware or software configuration error    MWr m c 2 5  COM FLT BOOL R Bus Co
24.   Application using Unity Pro       Creating the Program for Managing the Counter Module    At a Glance    Process Chart    Two sections are declared in the MAST task     e The Labelling Program section  See Creating the Labelling Program in  ST  page 185   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 188   written in LD  executes the counting start up and the    operator screen animation     The following screen shows the process chart            Function  Enabling    Threshold  definitions    Deflection  Alarm ON           Deflection  Alarm OFF       EIO0000000318 07 2012    183    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 deflection test is false  the alarm is OFF              184   100000000318 07 2012    Application using Unity Pro       Creating the Label
25.   R Error during reconfiguration of    MWr m c 1 15          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        E100000000318 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        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 152  T Signed CPT BMX types IODDTs  Details of the Explicit Exchange Objects for the T        BMX type IODDT 157             E100000000318 07 2012 151       Details of Implicit Exchange Objects for the T Unsigned CPT BMX and  T Signed CPT BMX types IODDTs    At a Glance    The tables below present the T Unsigned                      T Signed        BMX   types IODDTs implicit exchange objects which are applicable to all BMX EHC eeee  counting modules     Counter Va
26.   Scale factor    SKWr m c 6   least significant  byte     Edit  value in the range 1   255        Event  Event number          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           108      100000000318 07 2012       Configuration of the Counting Module       Event Counting Mode Configuration    At a Glance    The configuration of a counting module is stored in the configuration constants            The parameters       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                 1 low       2  medium    e 3  high        IN  AUX input filter    SKWr m c 4   least significant byte     The least significant byte can take the following  values       0              
27.   Topic Page  BMX EHC 0800 Module Operation in Frequency Mode 70  BMX EHC 0800 Module Operation in Event Counting Mode 72  BMX EHC 0800 Module Operation in One Shot Counter Mode 74  BMX EHC 0800 Module Operation in Modulo Loop Counter Mode 77  BMX EHC 0800 Module Operation in Upcounting and Downcounting Mode 80  BMX EHC 0800 Module Operation in Dual Phase Counting Mode 84            100000000318 07 2012 69    BMX EHC 0800 Functionalities       BMX EHC 0800 Module Operation in Frequency Mode    At a Glance    Basic Principle    Using the frequency counting mode allows you to measure the flow frequency   speed  rate and control     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 1s  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    Type of the IODDT    Operating Limits    The table below shows the composition of the counters  1Wr m c 0 status word  in frequency mode        Bit Label Description        IWr m c 0 3 VALIDITY 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 0  the data is not valid         IWr m c 0 4 HIGH LIMIT The bit is set to 1 when the input frequency signal  is out of range                    
28.   supervisory control of the project       Diagnostics of project and modules             Key              These various phases can also be performed in online mode          94    EIO0000000318 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        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 0800 Counting Modules 96  Description of the Counting Module Screens 98                  100000000318 07 2012 95    Screens       Accessing the Functional Screens of the BMX EHC 0800 Counting Modules          At a Glance  This section describes how to access the functional screens of the BMX EHC 0800  counting module   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                      Station  E            Tg 0  PLC bus    e           5g 3  CANopen              Derived Data Types     PEREPERE      Derived FB Types   E  P      Variables  amp  FB Instances  B p      Communication      m   u Program       PP      Animation Tables              Operator screens    e                 Documentation             Double click on the PLC Bus directory   Result  the following sc
29.  0800  counting module     What Is in This Section   This section contains the following topics                                Topic Page  Frequency Mode Configuration 108  Event Counting Mode Configuration 109  One Shot Counter Mode Configuration 110  Modulo Loop Counter Mode Configuration 111  Up and Down Counting Mode Configuration 112  Dual Phase Counting Mode Configuration 113               100000000318 07 2012 107    Configuration of the Counting Module       Frequency Mode Configuration    At a Glance    The configuration of a counting module is stored in the configuration constants                 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     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  configuration    Configurable values       Counting mode    SKWr m c 2   least significant  byte     Frequency mode  The value of the least  significant byte of this word is 1        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       2  medium    e 3  high        Input power supply  error    SKWr m c 2 8    General input output error  bit set to 0   Local  bit set to 1      
30.  2 8 5  a      i 4     E a n  Counting channel 1  lt  o      5     Counting channel 2  lt  D 62    f _     Counting channel 3       8 121 pubs  9         Counting channel 4  lt  ru            117 ae  Counting channel 5  lt    12    Q4         1 ao  24    1    7      Counting channel 6 18112 IE     17 B  or dir   4  e i 4 gt   eturn  2 2        21241      Fuse  24 VDC                Channels 0 to 5 are still used in single mode     Channel 7 is no longer available     Incremental encoder   10 30VDC          100000000318 07 2012    45    BMX EHC 0800       Safety Instructions       A 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    specific 24 VDC supply for inputs and a shielded cable for connecting the  supply to the module     Electromagnetic perturbations may cause the application to operate in an  unex
31.  22   100000000318 07 2012       BMX EHC 0800 Counting Module  Hardware Implementation       Subject of this Part    This part presents the hardware implementation of the BMX EHC 0800 counting    module     What Is in This Part     This part contains the following chapters                       Chapter Chapter Name Page  4 General Rules for Installing BMX EHC 0800 Counting Module 25  5 BMX EHC 0800 Counting Module Hardware implementation 37          EIO0000000318 07 2012    23       BMX EHC 0800 Counting Module Hardware Implementation          24    EIO0000000318 07 2012       General Rules for Installing  BMX EHC 0800 Counting Module    4       Subject of this Chapter    This chapter presents the general rules for installing the BMX EHC 0800 counting    module     What Is in This Chapter     This chapter contains the following topics                       Terminal Block       Topic Page  Physical Description of the Counting Module 26  Fitting of Counting Module 27  Fitting a 20 Pin Terminal Block to a BMX EHC 0800 Counting Module 29  How to Connect the BMX EHC 0800 Counting Module  Connecting a 20 Pin 33          EIO0000000318 07 2012    25       BMX EHC 0800 Counting Module  General Rules for Installation       Physical Description of the Counting Module    Illustration    The figure below present the counting module BMX EHC 0800     Physical Elements of the Module                                                                                                               
32.  4A 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 mounted on the rack                100000000318 07 2012    27    BMX EHC 0800 Counting Module  General Rules for Installation       The following table describes the different elements which make up the assembly    below        Number Description       1 BMX EHC 0800 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             28    EIO0000
33.  Application Specific Counting 143       Implicit Exchange Language Objects Associated with the Application Specific 144  Function       Explicit Exchange Language Objects Associated with the Application Specific 145  Function             Management of Exchanges and Reports with Explicit Objects 147             142   100000000318 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 BMX 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 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 enab
34.  Counting  Module is x xod ar      xam taxe bach Uu dis  Physical Description of the Counting                                   Fitting of Counting Module                                       Fitting a 20 Pin Terminal Block to a BMX EHC 0800 Counting Module      How to Connect the BMX EHC 0800 Counting Module  Connecting a 20   Pin Terminal Block 2           ter p                 E bs  BMX EHC 0800 Counting Module Hardware                  1                                           Characteristics of the BMX EHC 0800 Module and its Inputs            Display and Diagnostics of the BMX EHC 0800 Counting Module        BMX EHC 0800 Module                                                   23    25  26    29         100000000318 07 2012       Part Ill  Chapter 6  6 1    6 2    Part IV    Chapter 7    Chapter 8    Chapter 9  9 1    9 2    BMX EHC 0800 Counting Module Functionalities    BMX EHC 0800 Counting Module Functionalities         BMX EHC 0800 Module Configuration                             Input Interface Blocks                                          Programmable                                                         COMPANSON win    ee oe            ener nio dos    ER ae os  Diagnostics                Se eee ee A ee S  Synchronization  Enable  Reset to 0 and Capture Functions            Modulo Flag and Synchronization                                     Sending Counting Events to the                                              BMX EHC 0800 Module Operation           
35.  Creation of an operator screen  in  Operator screens       v             Generation of project  connection to         and  switch to RUN mode             EIO0000000318 07 2012    175    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 177  Configuration of the Counting Module 178  Declaration of Variables 181  Creating the Program for Managing the Counter Module 183  Creating the Labelling Program in ST 185  Creating the I O Event Section in ST 187  Creating a Program in LD for Application Execution 188  Creating an Animation Table 191  Creating the Operator Screen 193             176   100000000318 07 2012    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 Pro software        2    Click on File then New to select a PLC     New project    Show all versions       OK    PLC Min OS versio Description              ModconM34            BMX P34 1000  BMX P34 2000 02 10   CPU 340 20 Modbus Help  BMX P34 2010 CPU 340 2
36.  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    IWr m c 0 0   MODULO_FLAG BOOL R Flag set to 1 by a modulo switch event  IWr m c 0 1   SYNC REF FLAG BOOL R Flag set to 1 by a preset or synchronization    IWr m c 0 2  event   VALIDITY BOOL R The current numerical value is valid  IWr m c 0 3   HIGH LIMIT BOOL R The current numerical value is locked at the    IWr m c 0 4  upper threshold value   LOW LIMIT BOOL R The current numerical value is locked    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  1TWr     m c 1 status                                                       word    Standard symbol Type Access   Meaning Language object   COUNTER LOW BOOL R Current counter value less than lower  IWr m c 1 0  threshold   0Dr m c 2    COUNTER WIN BOOL R Current counter value is between lower  IWr m c 1 1  threshold   0Dr m c 2  and upper  threshold   0Dr m c 4    COUNTER HIGH BOOL R Current counter value greater than upper  IWr m c 1 2  threshold   0Dr m c 4    CAPT 0 LOW BOOL R Value captured in register O is less than  IWr m c 3  lower threshold   0Dr  m c 2    CAPT 0 WIN BOOL R Value captured in register 0 is between  IWr m c 4  lower threshold   0Dr  m c 2  and upper  th
37.  Syne Filter ithout     Pinout EN Filter Without X  4   Input Supply Fault General IO Fault z   5   Output Supply Fault General  O Fault z  5   Counting Interface   Up  B   Down     7   Scaling Factor 1  8   Synchro Edge Rising edge on SYNC        9                      0 Pulse   greater than LT     10 lock 1 Pulse   greater than UT v   11  Pulsewidth    10 ms  12  Pulsewidth 10  gt   ms  13  Polarity 0 Polarity       i Eo arity Polarity   x   ault Recovery alched off    16  Fallback Q Without     117 Eallbact  Without x   18  Fallback Value Q              Value 1 z   20  Event Enable X  21  Event Number 0  Ta eee  F   Function   Modulo Loop Cour w  Task   MAST ivi  W module4 E 8103              5 Click on the Adjust tab and enter the modulo value  for example 50              100000000318 07 2012    179       Application using Unity Pro       Declaration of I O objects    The table below shows the procedure for declaring the     Derived Variable                            Step Action   1      the BMX EHC 0800 window  click on the BMX EHC 0800 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 1 0 object grid   3 Click on the line  CHO 1 0 and then enter a channel name in the Prefix for  name zone   4 Now click on different Implicit     object prefix addresses then Update grid    button to see the names and addresses of the implicit I O objects      H  Overview 1     6  objects    
38.  The least significant byte can take the  following values       0                 1 low    e 2  medium    e 3                Input power supply  error           KWr m c 2 8       General input output error  bit set to 0   Local  bit set to 1           EIO0000000318 07 2012    113       Configuration of the Counting Module          Label    Address in the  configuration    Configurable values       Input mode     KWr m c 9    This word can take the following values   0  A   High  B   Low   1       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     KWr m c 6   least significant  byte     Edit  value in the range 1   255        Synchronization edge     KWr m c 10 8    Rising edge  bit set to O   Falling edge  bit set to 1        Counting operation    SKWr m c 11 0    Overrun locking  bit set to 0   Reversal  bit set to 1        Event  Event number          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           114      100000000318 07 2012          BMX EHC 0800 Counting Module    Adjusts 1 0       Subject of this Chapter  This chapter deals with the possible adjusts for the counting modes of the  BMX EHC 0800 module  These adjusts can be accessed from the Configuration 
39.  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 IODDT 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                EIO0000000318 07 2012    93    Software Implementation Methodology for the BMX EHC 0800 Counting Module                      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  
40.  deflection indicator lights on        172   100000000318 07 2012       Installing the Application Using    Unity Pro    15       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 174  15 2 Developing the Application 176          EIO0000000318 07 2012    173       Application using Unity Pro       15 1 Presentation of the Solution Used       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        174   100000000318 07 2012    Application using Unity Pro       Description    Description of the different types        Launching of Unit Pro  and  selection of the processor          y Y       Configuration of project  in  Configuration       y Y       Declaration of variables  in  Variables  amp  FB instances       v          Creation of DFBs  in  Derived FB Types                   Creation of Section  in  Programs Tasks MAST       Y v          Creation of Section  in  Programs Events V O Events          y Y       Creation of an animation table  in  Animation tables          Y      
41.  following chapters                       Chapter Chapter Name Page  1 General Information on the BMX EHC 0800 Counting Function 13  Presentation of BMX EHC 0800 Counting Module 15  Presentation of the BMX EHC 0800 Counting Module 21  Operation             EIO0000000318 07 2012       11    Overview          12    EIO0000000318 07 2012       General Information on the  BMX EHC 0800 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 0800     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 91     This second aspect is performed from the different Unity Pro editors     e in offline mode  e in online mode       EIO0000000318 07 2012    13    BMX EHC 0800 Counting Functions            100000000318 07 2012       Presentation of BMX EHC 0800  Counting Module 2       Subject of this Chapter    This chapter deals with the BMX EHC 0800 counting mode 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 Infor
42.  from the outside when the cover is closed  This side  features the commercial product references  an abbreviated description of the  module as well as a blank section for customer labeling    e One side that is visible from the inside when the cover is open  This side shows  the terminal block connection diagram        EIO0000000318 07 2012 35    BMX EHC 0800 Counting Module  General Rules for Installation          36      100000000318 07 2012       BMX EHC 0800 Counting Module  Hardware implementation    5       Subject of this Chapter    This chapter deals with the harware characteristics and diagnostics of the  BMX EHC 0800 module     What Is in This Chapter     This chapter contains the following topics                    Topic Page  Characteristics of the BMX EHC 0800 Module and its Inputs 38  Display and Diagnostics of the BMX EHC 0800 Counting Module 40  BMX EHC 0800 Module Wiring 43          EIO0000000318 07 2012       37       BMX EHC 0800       Characteristics of the BMX EHC 0800 Module and its Inputs    General Characteristics    This table presents the general characteristics for the BMX EHC 0800 and    BMX EHC 0800H  see page 20  modules                    Module type 8 counting channels   Counter size 16 bits   Maximum frequency at counting inputs 10 kHz   Number of inputs outputs per counting   Inputs 2 inputs in single mode   channel 3 inputs in special dual phase mode  Outputs 0       Power Supply    Sensor supply voltage    19 2   30 VDC          Module con
43.  function is used to authorize changes to the counter value via software    command     This function is used in the following counting modes     e Dual phase counting  e Up and down counting  e Modulo loop counter  e One shot counter    The following table presents the   orce enable bit in bold which is an element of  the  Qr m c d output command word                          Language Standard symbol Meaning   object    Or m c 0                0 Forces OUTPUT 0 to level 1    Or m c 1  OUTPUT_1 Forces OUTPUT  1 to level 1     0   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    Or m c 4  FORCE SYNC Counting function synchronization and  start    Or m c FORCE REF Set to preset counter value       FORCE ENABLE    Implementation of counter       FORCE RESET    Reset counter        Or m c  SYNC RESET    Reset SYNC  REF  FLAG       X   e  5  3  o                      SOr m c        MODULO RESET       Reset MODULO FLAG       The function is activated by setting the   orce enable bit to 1  There is no  valid enable bit because the function is not activated by any physical input           60    E100000000318 07 2012          BMX EHC 0800 Functionalities       Reset to 0 Function    Capture 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 Dual phase counting   e Up and down countin
44.  has one threshold only  Its value is contained in the  lower th value double word   0Dr  m c   2      The threshold format is identical to the counter value format     Comparison Status Register  The result of the comparison is stored in the comparison status register     The value of the capture register and the current value of the counter are compared  with the thresholds     The possible results are     e Low  The counter value is less than the lower threshold value   e Equal  The counter value is equal to the threshold   e High  The counter value is greater than the threshold     The comparison status register consists of        Position of 15  14 13 12   11 1091817 6 5 4 3 2 1 0  the status  register bit       Compared Capture Counter  element       Comparison High   Equal   Low   High   Equal   Low  result                                                             Update    When the compare enable bitis set to O  the comparison status register is  deleted     When the compare suspend bit is set to 1  the comparison status register is  frozen at its last value     The comparison with capture register value is performed every time the registers are  loaded          100000000318 07 2012 55    BMX EHC 0800 Functionalities       The comparison with the counter current value is performed as follows        Counting mode    Comparison register update       Frequency    Period intervals of 10 ms       Event counting    Period intervals defined by the user       Modulo loop co
45.  list of the module error messages        Error indicated    Possible interpretation and or action        Module failure    The module has a error   Check the module mounting  Change the module        Inoperative channel s     One or more channels have a error   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 0800 Module Errors    The table below provides a list of errors that may appear on the BMX EHC 0800    module        Language object   Description                                MWr m c 2 0 External error at inputs   MWr m c 2 4 Internal error or self testing    MWr m c 2 5 Configuration Error   MWr m c 2 6 Communication Error   MWr m c 2 7 Application error   MWr m c 3 2 Sensor power supply error             EIO0000000318 07 2012    139    Display of Error  Counting Module       List of Channel Error Messages    The table below gives the list of error messages at channel level        Error indicated  Other  consequences     Possible interpretation and or action        External error or counting input error       encoderor proximity sensor supply  error   e line break or 
46.  represents the rack number   e The m bit represents the position of the module in the rack   e Thec bit represents the channel number in the module                                   NOTE  r represents the rack number  m the position of the module in the rack  while     represents the channel number in the module     NOTE  Exchange and report words also exist at module level EXCH STS    MWr m MOD and EXCH          MWr m MOD 1 as per IODDT type T GEN MOD                 148   100000000318 07 2012       Example    Execution Indicators for an Explicit Exchange  EXCH STS    Phase 1  Sending data by using the WRITE PARAM instruction       PLC memory                      Status parameters       Command parameters       Adjustment parameters             When the instruction is scanned by the PLC processor  the Exchange in progress  bit is set to 1 in  MWr     m c           VO module memory or  integrated specific application  function memory       Status parameters       Command parameters            Adjustment parameters          Phase 2  Analysis of the data by the     module and report        PLC memory                      Status parameters       Command parameters          Adjustment parameters             VO module memory or  integrated specific application  function memory       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   
47.  result in injury or equipment damage        NOTE  The module connector have indicators which show the proper direction to  use for terminal block installation        32      100000000318 07 2012    BMX EHC 0800 Counting Module  General Rules for Installation       How to Connect the BMX EHC 0800 Counting Module  Connecting a 20 Pin  Terminal Block    At a Glance  There are 3 types of 20 pin terminal blocks     e               2010 screw clamp terminal blocks   e BMX FTB 2000 caged terminal blocks   e BMX FTB 2020 spring terminal blocks     Cable Ends and Contacts  Each terminal block can accommodate     e Bare wires  e Wires with DZ5 CE type cable ends  T        Description of the 20 Pin Terminal Blocks  The table below shows the description of the 3 types of 20 pin terminal blocks                                                                                   Screw clamp terminal Caged terminal blocks Spring terminal blocks  blocks   Illustration   Number of wires 2 1 1   accommodated   Number of   minimum   AWG 24  0 34 mm     wire gaug    2   es accom    MAXIMUM   AWG 16  1 5            modated                   EIO0000000318 07 2012 33    BMX EHC 0800 Counting Module  General Rules for Installation          Screw clamp terminal  blocks    Caged terminal blocks    Spring terminal blocks       Wiring constraints    Screw clamps have slots that   accept    e flat tipped screwdrivers  with a diameter of 5 mm       posidriv n  1 cross tipped  screwdrivers     Screw clamp te
48.  tab in the foreground indicates the current mode  The current mode is  therefore the adjust mode 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           EIO0000000318 07 2012    117    Counting Module adjusts       Adjust the Preset Value    Introduction    Description    The preset value concerns the following counting modes     e forthe BMX EHC 0800 module   e dual phase counting mode  e up and down counting mode     The following table shows the preset value adjust              Number Address in the Value Default value  configuration  Preset value  MDr m c 12  Low    Edit 0                   118    EIO0000000318 07 2012       Counting Module adjusts       Adjust the Calibration Factor    Introduction    The calibration factor concerns the frequency mode for the BMX EHC 0800 m
49.  the numerical values such as the counter and the capture registers  Only  the validity bit    the high level  set to 1  guarantees that the mode will operate  correctly within the limits        76      100000000318 07 2012    BMX EHC 0800 Functionalities       BMX EHC 0800 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    The counter increases with every pulse applied to the IN  A input until it reaches the  modulo value  1  the modulo value being defined by the user  At the following pulse   the counter is reset to 0 and the counting resumes     In the modulo loop counter mode  the counter must be synchronized at least one  time to operate  The current counter value is cleared each time the synchronization                   The current counter value can be recorded into the captureO register  see page 61   when the condition of synchronization occurs  see page 58      The modulo value defined by the user is contained in the modulo value word    MDr m c 4   The user may change this value by specifying the value of this word     e In the adjust screen  e In      application  using the WRITE PARAM IODDT VARI1  Function   IODDT VARI is of the type T UNSIGNED                         The force enable command must be at the high level during the counting  When  this command is at the low leve
50. 0     Event Counting Mode  Frequency Mode   Modulo Loop Counter Mode  One Shot Counter Mode    Explicit Device DDT instances Description    Explicit exchanges  Read Status    only applicable to Modicon M340 I O channels    are managed with READ STS OX EFB instance        Targeted channel address  ADDR  can be managed with ADDMX  see Unity Pro   Communication  Block Library  EF  connect ADDMX OUT to ADDR   READ STS       see Unity Pro       Management  Block Library  output  parameter  STATUS         be connected to a  T M        yyy CH STS  DDT  instance  variable to be created manually   where    e xxx represents the device type           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                      164    EIO0000000318 07 2012          The following table shows the T M              l 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      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 bus communication detected error   read  APPLI_FLT BOOL  7 application detected error read  COM_EVT_F
51. 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 O  the data is not valid                    78 EIO0000000318 07 2012       BMX EHC 0800 Functionalities       Type of the IODDT    Operating Limits    In this mode  the type of the IODDT must be T UNSIGNED CPT BMX     The maximum frequency applied to the IN A input is 10 kHz     The shortest pulse applied to the IN         input varies according to the level of  filtering selected     The maximum frequency that can be applied to the IN AUX input is 1 pulse every  5 ms     The maximum frequency for the modulo event is once every 5 ms     The minimum acceptable modulo value varies according to the frequency at the  IN  A input  E g   for a frequency of 10 kHz applied to the IN A input  the modulo  must be greater than 50     The maximum modulo value is 65 535     NOTE  When the modulo value is configured to 0  it is possible to count up to  65 536     NOTE  You have to check the validity bit   1Wr 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          100000000318 07 2012    79    BMX EHC 0800 Functionalities       BMX EHC 0800 Module Operation in Upcounting and Downcounting Mode    At a Glance    Basic Princi
52. 0 Modbus CANopen  BMX P34 20102 CPU 340 20 Modbus CANopen2  BMX P34 2020 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 Configuration  of the Counting Module  page 178              Confirm with OK             100000000318 07 2012    177       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 Action       1 In the Project browser double click on Configuration then      0 Bus X  and      0 BMX XBP      Where 0 is the rack number        In the Bus X window  select a slot  for example slot 1  and double click                         3 Choose the BMX HEC 0800 counti
53. 000318 07 2012       BMX EHC 0800 Counting Module  General Rules for Installation       Fitting a 20 Pin Terminal Block to a BMX EHC 0800 Counting Module    At a Glance    The BMX EHC 0800 counting module with 20 pin terminal block connections  require the latter to be connected to the module  These fitting operations  assembly  and disassembly  are described below     Installing the 20 Pin Terminal Block    The following table shows the procedure for assembling the 20 pin terminal block  onto a BMX EHC 0800 counting module            ETT ED                                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        Assembly procedure        Step Action   1 Once the module is in place on the rack  install the terminal block by inserting the terminal block encoder   the rear lower part of the terminal  into the module   s encoder  the front lower part of the module   as  shown above    2 Fix the terminal block to the module by tightening the 2 mounting screws located on the lower and upper    parts of the terminal block   Tightening torque  0 4 N m                       NOTE  If the screws are not tightened  there is a risk that the terminal block will not  be properly fixed to the module        E100000000318 07 2012 29    BMX EHC 0800 Counting Module  General Rules for Installation       Coding the 20 Pin Ter
54. 00318 07 2012       Safety Information A       Important Information    NOTICE    Read these instructions carefully  and look at the equipment to become familiar with  the device before 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     1 This is the safety alert symbol  It is used to alert you to potential                   EIO0000000318 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 Schnei
55. 0800  module     What Is in This Chapter   This chapter contains the following sections                 Section Topic Page  6 1 BMX EHC 0800 Module Configuration 52  6 2 BMX EHC 0800 Module Operation Modes 69                     100000000318 07 2012 51    BMX EHC 0800 Functionalities       6 1    BMX EHC 0800 Module Configuration       Subject of this Section  This section deals with the configuration of the BMX EHC 0800 module     What Is in This Section     This section contains the following topics                                   Topic Page  Input Interface Blocks 53  Programmable Filtering 54  Comparison 55  Diagnostics 57  Synchronization  Enable  Reset to 0 and Capture Functions 58  Modulo Flag and Synchronization Flag 63  Sending Counting Events to the Application 66          52      100000000318 07 2012       BMX EHC 0800 Functionalities       Input Interface Blocks                               Description  The BMX EHC 0800 counting module has three fast inputs   Fast Inputs  The table below presents the module s fast inputs   Input Use with available sensors Use with an encoder  IN A input Clock input for measurement or single upcounting For signal A  IN  B input Second clock input for differential counting or For signal B  From the following measurement  channel  IN  AUX input Multi function input used for  For signal Z      synchronization Used for preset     preset and start     reset and record     capture      counting direction  upcounting downcounting  mode
56. 11 2 BMX EHC 0800 Module Debugging       Subject of this Section    This section deals with the debugging of the BMX EHC 0800 counting module  modes     What Is in This Section   This section contains the following topics                                Topic Page  Frequency Mode Debugging 128  Event Counting Mode Debugging 129  One Shot Counter Mode Debugging 130  Modulo Loop Counter Mode Debugging 131  Up and Down Counting Mode Debugging 132  Dual Phase Counting Mode Debugging 133               100000000318 07 2012 127    Debugging the Counting Module       Frequency Mode Debugging                                                          At a Glance  The table below presents the frequency mode debugging elements   Label Language object Type  Frequency value  IDr m c 2 Digital  Frequency valid  IWr m c 0 3 Binary  Frequency low  IWr m c 1 0 Binary  Frequency equal  IWr m c 1 1 Binary  Frequency high  IWr m c 1 2 Binary  Frequency in high limit  IWr m c 0 4 Binary  Input A state  Ir m c 4 Binary  Threshold value  ODr m c 2 Digital  Compare enable  OWr 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 152    128   100000000318 07 2012    Debugging the Counting Module       Event Counting Mode Debugging    At a Glance  The table below presents the event counting mode debugging elements                                                              Label Language object Type   Counter value  
57. D PARAM  SAVE PARAM    RESTORE PARAM          t 15        EIO0000000318 07 2012    147       Description of Significant Bits    Each bit of the words          STS   MWr 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        STS ERR bit   MWr 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 MD IN PROGR bit  sMWr m c 0 1  indicates whether command  parameters are being sent to the module channel   e The CMD ERR bit   MWr m c 1 1  specifies whether the command  parameters are accepted by the module channel        e          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 channel  via  WRITE PARAM  READ PARAM  SAVE PARAM  RESTORE PARAM    e The ADJ ERR bit   MWr 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 O     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 The     mand cbits indicates the following elements    e ther bit
58. EF FLAG    The bitis setto 1 when the internal time base has  been synchronized    The bit is set to    when the sync reset  command is received  rising edge of the  SQr m c 8 bit          IWr     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         IWr     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            IWr        LOW LIMIT       The bit is set to 1 when more than one  synchronization is received within 25 ms period   The bit is reset to O at the next period if the limit  is not reached        Type of the IODDT    In this mode  the type of the IODDT is T UNSIGNED CPT BMX     Operating Limits    The module counts the pulses applied at the IN  A input every time the pulse is at    least 50 us  without debounce filter      Pulses within 100 ms from synchronization are lost     The synchronization of the counter must not be done more than one time per 25 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          100000000318 07 2012    73 
59. EIO000000031 8 03    Modicon M340 with Unity    Pro  Counting Module BMX EHC O800  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 safe
60. IDr m c 2 Digital  Counter valid  IWr m c 0 3 Binary  Counter low  IWr m c 1 0 Binary  Counter equal  IWr m c 1 1 Binary  Counter high  IWr m c 1 2 Binary  Counter in low limit  IWr m c 0 5 Binary  Counter in high limit  IWr m c 0 4 Binary  Input A state  Ir m c 4 Binary  Input AUX state  Ir m c 6 Binary  SYNC enable  OWr m c 0 0 Binary  SYNC force  Or m c 4 Binary  SYNC state  IWr m c 0 2 Binary  SYNC reset  OWr m c 8 Binary  Threshold value  ODr m c 2 Digital  Compare enable  OWr m c 0 5 Binary  Compare suspend SQWr m c 0 6 Binary                For a description of each language object refer to T UNSIGNED        BMXIODDT   see page 152           100000000318 07 2012 129    Debugging the Counting Module       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  IWr m c 0 3 Binary  RUN  IWr m c 0 0 Binary  Counter reset  Or m c 7 Binary  Counter enable  Or m c 6 Binary  Counter low  IWr m c 1 0 Binary  Counter equal  IWr m c 1 1 Binary  Counter high  IWr m c 1 2 Binary  Input A state  Ir m c 4 Binary  Input AUX state  Ir m c 6 Binary  SYNC enable  OWr m c 0 0 Binary  SYNC force  Or m c 4 Binary  SYNC state  IWr m c 0 2 Binary  SYNC reset  OWr m c 8 Binary  Threshold value  ODr m c 2 Digital  Compare enable  OWr m c 0 5 Binary  Compare suspend SQWr m c 0 6 Binary           
61. IDr m c 4 Digital  Capture low  IWr     133 Binary  Capture equal  IWr m c 1 4 Binary  Capture high  IWr m c 1 5 Binary  Capture enable  OWr m c 0 3 Binary  Input A state  Ir m c 4 Binary  Input B state  Ir m c 5 Binary  Input AUX state  Ir m c 6 Binary  SYNC enable  OWr m c 0 0 Binary  SYNC force  Or m c 4 Binary  SYNC state  IWr m c 0 2 Binary  SYNC reset  Or m c 8 Binary  Threshold value  ODr m c 2 Digital  Compare enable  OWr m c 0 5 Binary  Compare suspend SQWr m c 0 6 Binary  Modulo state  IWr m c 0 1 Binary  Modulo reset  Or m c 9 Binary                For a description of each language object referto T UNSIGNED        BMXIODDT   see page 152           100000000318 07 2012 133    Debugging the Counting Module          134   100000000318 07 2012       Display of BMX EHC xxxx  Counting Module Error 1 2       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 the BMX EHC 0800 Counting Module 136  Faults Diagnostics Display 138  List of Errors 139                     100000000318 07 2012 135    Display of Error  Counting Module       Fault Display Screen for the BMX EHC 0800 Counting Module    At a Glance    This section presents the fault display screen for the BMX EHC 0800 counting  module  A module s fault display screen may only be accessed in online mode     Illustration    The figure bel
62. In this mode  the type of the IODDT must be T UNSIGNED CPT BMX     The maximum frequency that the module can measure on the IN  A input is 10 kHz   Beyond 10 kHz  the counting register value may decrease until it reaches O     At 10 KHz  the duty cycle is 40  to 60      NOTE  You have to check the validity bit   1Wr m c 0 3  before taking into   account the numerical values such as the counter and the capture registers  Only   the validity bit    the high level  set to 1  guarantees that the mode will operate  correctly within the limits        70    EIO0000000318 07 2012    BMX EHC 0800 Functionalities       The following diagram presents the BMX EHC counting module operation in  frequency mode        8 channel generic counter                         Adjust         Config                1 BMX        0800    BSEC   G Counter 1  25 Counter 2 Label Symbol Value Unit  13 Counter    Input A Filter Without     Counter 4 Input Supply Fault General IO Fault   D Counter 5 Scaling Facter 1     3 Counter 6 Event Disable       Fy Counter 7 Event Number    E d                            lela                                              AON aO                E  gt    Function   Frequency Mode        Task   MAST lv                                                          EIO0000000318 07 2012 71    BMX EHC 0800 Functionalities       BMX EHC 0800 Module Operation in Event Counting Mode    At a Glance    Basic Principle    Operation    IN  A input    IN  AUX input    valid sync bit    Intern
63. LT 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 0 BOOL short circuit on output 0 read  SHORT CIRCUIT OUT 1 BOOL short circuit on output 1 read    100000000318 07 2012 165          13 4    The IODDT Type T GEN MOD Applicable to       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 detected error bit 9elr m MOD ERR   EXCH STS INT R Module exchange control word 9eMWr m MOD O   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 detected errors word of the module  MWr m MOD 2   MOD_FAIL BOOL R module inoperable  MWr m MOD 2 0   CH_F
64. LT 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 anomaly  MWr m MOD 2 5   NO_MOD BOOL R Module missing or inoperative  MWr m MOD 2 6   EXT_MOD_FLT BOOL R Internal detected errors word of the module  MWr m MOD 2 7   Fipio extension only    MOD_FAIL_EXT BOOL R Internal detected error  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           166    E100000000318 07 2012                               only        Standard Symbol Type Access   Meaning Address   CONF FLT EXT BOOL R Hardware or software configuration anomaly  MWr m MOD 2 13   Fipio extension only    NO_MOD_EXT BOOL R Module missing or inoperative  Fipio extension    MWr m MOD 2 14          EIO0000000318 07 2012    167             168   100000000318 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 171  15 Installing the Application Using Unity Pro 173  16 Starting the Application 195          EIO0000000318 07 2012    169       Example of Counti
65. V power supply for sensors  sensors   Functional earth  for shield   20 19 Functional earth  for shield continuation  continuation                   Sensor Connection Example  The example below shows the most complete application using sensors                                                                                                                                                                                                                                                                    L                          ET 24   e           Counting channel 0   210    ae  o 3l Su  Counting channel 1 4    412       5     Counting channel 2  lt     6   2 EE  7 zo  Counting channel 3  lt  lal 812    9   gt    Counting channel 4      1112 ao  11 pli   Counting channel 5  lt  z 12    17    on  13 com  Counting channel 5  lt     4 o f EE  18     Counting channel 7 4 2 1612     SES  Q    1 24VDC bs Fuse     18  211 19         44   100000000318 07 2012       BMX EHC 0800       Encoder Connection Example    The example below shows an incremental encoder connection used for axis control  connected to the counter s channel 6 used in dual phase counting mode                                                                                                                                                                                                                                                                            treni rens  GESESa ee es     1     Counting channel O  lt    21  
66. Wr 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  ODr m c 2  UPPER TH VALUE DINT R W Upper threshold value  ODr m c 4  PWM FREQUENCY DINT R W Output frequency value  unit   0 1 Hz   ODr m c 6  PWM DUTY INT R W Duty cycle value of the output frequency  ODr m c 8   unit 2 596    Qr m c d Words  The following table presents the meanings of the bits of the sor  m  c  d words   Standard symbol Type Access  Meaning Language  object  OUTPUT 0 BOOL R W Forces OUTPUT_0 to level 1  Or m c 0  OUTPUT 1 BOOL R W Forces OUTPUT_1 to level 1  Or m c 1  OUTPUT BLOCK 0 ENABLE  BOOL R W Implementation of output 0 function block    Or m c 2  OUTPUT BLOCK 1 ENABLE  BOOL R W Implementation of output 1 function block    Or m c 3                            154   100000000318 07 2012                                           Standard symbol Type Access   Meaning Language  object  FORCE SYNC BOOL R W Counting function synchronization and  Or m c 4  start  FORCE REF BOOL R W Set to preset counter value Qr    5  FORCE ENABLE BOOL R W Implementation of counter   0      6  FORCE RESET BOOL R W Reset counter Qr c 7  SYNC RESET BOOL R W Reset SYNC_REF_FLAG  Or m c 8  MODULO RESET BOOL R W Reset MODULO_FLAG  Or m c 9       FUNCTIONS ENABLING   QWr m c 0 Word    T
67. able presents the valid sync bitin bold which is an element of the   OWr m c 0 function enabling word              Language Standard symbol Meaning   object    OWr m c 0 0   VALID SYNC Synchronization and start  authorization for the counting function  via the IN SYNC input    OWr m c 0 1  VALID REF Operation authorization for the internal    preset function       SQWr m c 0     VALID_ENABLE    Authorization of the counter enable via the  IN_EN input          sQWr m c 0 3   VALID          0 Capture authorization      the captureO  register   OWr m c 0 4   VALID          1 Capture authorization in the capture1    register       SQWr m c 0     COMPARE_ENABLE    Comparators operation authorization          SQWr m c 0        COMPARE_SUSPEND       Comparator frozen at its last value          EIO0000000318 07 2012    59          BMX EHC 0800 Functionalities       Enable Function    The following table presents the synchronization principle        Edge    Status of the  valid sync bit    Status of the counter       Rising or falling edge on IN  AUX   depending on the configuration     Set to 0    Not synchronized                   Rising or falling edge on IN  AUX   Set to 1 Synchronized   depending on the configuration   Rising edge on   orce sync bit   Set to 0 or 1 Synchronized       When the synchronization occurs  the application can react using   e either the SYNC REF FLAG input   IWr m c 0 2   see page 63   e orthe EVT SYNC PRESET input   IlWr m c 10 2   see page 66      This
68. abs   e Device DDT  3 Channel area Is used           clicking on the reference number  to display the tabs   e Description which gives the characteristics of the device   e Device DDT     To select a channel      To display the Symbol  name of the channel defined by the user  using the  variable editor    NOTE  All channel are activated and a channel can not be desactivated to None  4 General Allows you to select the counting function and the task associated with the  parameters area 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 is configured      Task  defines the MAST task through which the channel s implicit exchange  objects will be exchanged   These choices are only possible in offline mode   5 Parameters in This area has various functionalities which depend upon the current mode        Configuration  is used to configure the channel parameters      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           106      100000000318 07 2012       Configuration of the Counting Module       9 2 Configuration of Modes for the BMX EHC 0800  Module       Subject of this Section    This section deals with the configuration of the modes for the BMX EHC
69. ailable  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 area    Provides an abbreviation as a reminder of the module and module status in online  mode  LEDs         Channel area    Is used    e Byclicking on the reference number  to display the tabs   e Description which gives the characteristics of the device          Objects which is used to presymbolize the input output objects   e Faults which shows the device errors  in online mode         To select a channel      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       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  di
70. al time base    Current counter value    Using the event counting mode allows you to determine the number of events  received in a scattered manner     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 optionally use the IN AUX input over a time interval  provided that  the validation bit is set to 1  This leads to restarting 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 AUX input     The trend diagram illustrates the counting process in event counting mode                                                                                                                         1 2 3 4 1 2 1 2 3 4 5        FLAI         4 Userdefined      441        User defined                 X   4 5                When the synchronization occurs  the application can react using    e either the SYNC REF FLAG input   IWr m c 0 2   see page 63   e or the EVT SYNC PRESET input   IlWr m c 10 2   see page 66         72    EIO0000000318 07 2012    BMX EHC 0800 Functionalities       Counter Status Bits in Event Counting Mode    The table below shows the composition of the counters  IWr m c 0 status word  in event counting mode        Bit    Label    Description        IWr     SYNC R
71. as 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        20    EIO0000000318 07 2012       Presentation of the    BMX EHC 0800 Counting Module    Operation    3       Overview of BMX EHC 0800 Module Functionalities    At a Glance    Measurement    Counting    This part presents the different types of user applications for the BMX EHC 0800    module     The following table presents the measurement functionality for the BMX EHC 0800          module   User application type Mode  Speed measurement stream measurement   Frequency          Random events monitoring       Event counting       The following table presents the counting functionality for the BMX EHC 0800    module        User application type    Mode       Grouping    One shot counter       Level 1 packaging labeling    Modulo loop counter       Accumulator    Up and down counting       Encoder interface          Dual phase counting       NOTE  In case of a user application such as level 1 packaging labeling  the machine    makes constant spacing between parts          100000000318 07 2012    21          BMX EHC 0800 Counting Module          Interface  The BMX EHC 0800 module may be interfaced with the following components   e mechanical switch  e 24 VDC two wire proximity sensor  e 24 VDC three wire proximity sensor  e 10 30 VDC encoder with push pull outputs 
72. ated  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           112    EIO0000000318 07 2012       Configuration of the Counting Module       Dual Phase Counting Mode Configuration    At a Glance    The configuration of a counting module is stored in the configuration constants               The parameters       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 dual phase counting mode configurable elements        Label    Address in the  configuration    Configurable values       Counting mode    SKWr m c 2   least significant  byte     Dual phase counting mode  The value of the  least significant byte of this word is 6        IN_A input filter     KWr m c 3   least significant  byte     The least significant byte can take the  following values       0                 1 low       2 medium    e 3  high        IN  B input filter    SKWr m c 3   most significant  byte     The most significant byte can take the  following values       0                 1 low       2 medium    e 3  high        IN  AUX input filter    SKWr m c 4   least significant  byte    
73. c 10    e The current value of the counter during the event  or an approximate value   contained in the counter current value word   IDr m c 12    e Thecapt 0 val register  sIDr m c 14  updated if the event is the capture 0     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 two slot transmission buffer which can be used to store  several events while waiting to be sent     If the counter channel is unable to send all of the internally produced events  the  overrun evt bit  address  1Wr m c 10 8 0fthe events source word is set  to 1        EIO0000000318 07 2012    67    BMX EHC 0800 Functionalities       The following two points should be taken into account before using the  Counter   equal    Counter high  and  Counter low  events    e For frequency mode  due to the accuracy     1 Hz   a frequency near the  threshold can cause redundant events    e For counting function modes  when the counter matches the threshold value  the  input frequency must be lower than 400 Hz in order to detect the event        68   100000000318 07 2012    BMX EHC 0800 Functionalities    6 2 BMX EHC 0800 Module Operation Modes          Subject of this Section    This section deals with the different counting modes of the BMX EHC 0800 module     What Is in This Section   This section contains the following topics                                 
74. coder Sync_Ref_Flag  click on 1   then place it in    the editor  Double click on this contact then on m The Instance  Selection window opens  Validate the Inside structure checkbox and    click on LJ 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      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          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         190    EIO0000000318 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 declared in variables  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      Procedur
75. d high  state at the IN  B input    Low state atthe IN A input and falling edge  atthe IN B input           EIO0000000318 07 2012    85       BMX EHC 0800 Functionalities       Operation    IN  A input  pulses     The trend diagram below illustrates the counting process for the dual phase counting  mode in default configuration                                                                                         IN B input  pulses    7  IN  AUX input F    4    force enablebit  Counter value   32K A  Predefined value  Time  0 s  gt     1       Capture value   32K      1   2       Slack Delete  In the free large counter mode  the counter 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    86    EIO0000000318 07 2012    BMX EHC 0800 Functionalities       This behavior is described in the following figure                       Hysteresis Hysteresis     lt   gt     gt   Encoder forward motion Encoder return motion Encoder forward motion   gt        4     Mechanical forward motion Mechanical return motion Mechanical forward motion                   Counter value                            The value defined by the user as the Hysteresis  slack  value is contained in  the  MW
76. d 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  deflection parameter true  TH       last box late  1    Default light set ON                    ELSE last box late  0    Default light set OFF               1    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         END IF       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 BrowserNProgram 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     object  right click in the editor then click on Data selection    and on n     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  have access to the I O derived variable Encoder           186   100000000318 07 2012    Application us
77. der 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 electrical equipment and its installation  and has received safety  training to recognize and avoid the hazards involved          100000000318 07 2012       About the Book A       At a Glance    Document Scope    This manual describes the hardware and software implementation of the  BMX EHC 0800 counting module for Modicon M340 PLCs and X80 drops     Validity Note  This document 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        EIO0000000318 07 2012          10    E100000000318 07 2012       Introduction to the BMX EHC 0800  Counting Function       Subject of this Part    This part provides a general introduction to the counting function and the operating  principles of the module     What Is in This Part     This part contains the
78. e below presents the up and down counting mode debugging elements   Label Language object Type   Counter value  IDr m c 2 Digital  Counter valid  IWr m c 0 3 Binary  Counter reset  Or m c 7 Binary  Counter enable  Or m c 6 Binary  Counter low  IWr m c 1 0 Binary  Counter equal  IWr m c 1 1 Binary  Counter high  IWr m c 1 2 Binary  Counter in low limit  IWr m c 0 5 Binary  Counter in high limit  IWr m c 0 4 Binary   Input A state  Ir m c 4 Binary   Input AUX state  Ir m c 6 Binary   SYNC force  Or m c 4 Binary   SYNC state  IWr m c 0 2 Binary   SYNC reset  Or m c 8 Binary  Threshold value  ODr m c 2 Digital  Compare enable  OWr m c 0 5 Binary  Compare suspend SQWr m c 0 6 Binary   Modulo state  IWr m c 0 1 Binary   Modulo reset  Or m c 9 Binary  For a description of each language object refer to T SIGNED               IODDT   see page 152     132   100000000318 07 2012    Debugging the Counting Module       Dual Phase Counting Mode Debugging    At a Glance  The table below presents the dual phase counting mode debugging elements                                                                                            Label Language object Type   Counter value  IDr m c 2 Digital  Counter valid  IWr m c 0 3 Binary  Counter reset  Or m c 7 Binary  Counter enable  Or m c 6 Binary  Counter low  IWr m c 1 0 Binary  Counter equal  IWr m c 1 1 Binary  Counter high  IWr m c 1 2 Binary  Counter in low limit  IWr m c 0 5 Binary  Counter in high limit  IWr m c 0 4 Binary  Capture value  
79. e channels into  1 dual phase channel  As such  it is possible to build up to 4 encoder interfaces        EIO0000000318 07 2012 19    BMX EHC 0800 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     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  temperature 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 h
80. e for Creating an Animation Table  The table below shows the procedure for creating an animation table        Step Action       1 In the 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                      100000000318 07 2012 191    Application using Unity Pro       Animation Table Created for the Application  The following screen shows the animation table used by the application     Table                              Modify Force                                 v   Value Type       Comment          1                         0          DINT     4   Encoder COUNTER  CURRENT  VALUE   DINT      48 Encoder EVT MODULO ENABLE BOOL     4  Encoder  COMPARE ENABLE BOOL     4 Encoder LOWER TH VALUE DINT       Encoder UPPER TH VALUE DINT  d First Labelling Point DINT   lt  Second Labelling Point DINT     49 Position 0 BOOL  7 48 Position 1 BOOL     49 Position 2 BOOL  1   49 Nb Box DINT                  NOTE  The animation table is dynamic only in online mode  display of variable    values        192    E100000000318 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    th
81. e 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 module has type 3 inputs that support signals from mechanical switching  equipment such as contact relays  push buttons  limit switch sensors and two or  three wire switches that have     e a voltage drop of less than 8V   e current when ON more than or equal to 2 mA   e current when OFF up to 1 5 mA     The module complies with all encoders that have a supply of between 10 and  30 VDC and push pull outputs  Shielding is required if there is no filtering     The following table describes the assignment of the 20 pin wiring terminal                             IN  A input for channel 0 2 1 IN  AUX input for channel 0  IN A input for channel 1 or   4 3 IN  AUX input for channel 1  IN  B input for channel 0   IN  A input for channel 2 6 5 IN  AUX input for channel 2  IN  A input for channel 3 or   8 7 IN  AUX input for channel 3  IN  B input for channel 2   IN  A input for channel 4 10 9 IN  AUX input for channel 4  IN  A input for channel 5 or   12 11 IN  AUX input for channel 5  in B input for channel 4   IN  A input for channel 6 14 13 IN  AUX input for channel 6                   EIO0000000318 07 2012    43       BMX EHC 0800                IN  A input for channel 7 or   16 15 IN  AUX input for channel 7   IN  B input for channel 6   VDC   power supply for 18 17 Return   24 
82. e user program s request using these   instructions    e READ STS  see Unity Pro       Management  Block Library   read status words    e WRITE         see Unity Pro       Management  Block Library   write command  words    e WRITE             see Unity Pro  I O Management  Block Library   write  adjustment parameters    e READ             see Unity Pro  I O Management  Block Library   read  adjustment parameters    e SAVE             see Unity Pro  I O Management  Block Library   save  adjustment parameters    e RESTORE PARAM  see Unity Pro       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  in 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          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 i
83. efined by the user is once every  25 ms     NOTE  You have to check the validity bit   1Wr 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        EIO0000000318 07 2012    89    BMX EHC 0800 Functionalities          90    EIO0000000318 07 2012       BMX EHC 0800 Counting Module    Software Implementation    IV       Subject of this Part    This part describes the software implementation and functions of the  BMX EHC 0800 counting module     What Is in This Part   This part contains the following chapters                                            EIO0000000318 07 2012    Chapter Chapter Name Page  7 Software Implementation Methodology for the BMX EHC 0800 93  Counting Module  8 Accessing the Functional Screens of the BMX EHC xxxx 95  Counting Modules  9 Configuration of the BMX EHC 0800 Counting Module 101  10 BMX EHC 0800 Counting Module Adjusts 115  11 Debugging the BMX EHC 0800 Counting Module 123  12 Display of BMX EHC xxxx Counting Module Error 135  13 The Language Objects of the Counting Function 141  91       BMX EHC 0800 Counting Module Software Implementation          92      100000000318 07 2012       Software Implementation  Methodology for the  BMX EHC 0800 Counting Module    7       Installation Methodology    At a Glance    The software installation of the BMX EHC      counting modules is
84. en Unity  then  Unity Pro  then Operate modes  and Operator screens      Illustration on an Operator Screen  The following illustration shows the application operator screen            Sensor       1stLabelling     2nd Labelling  Point Point    al Number of         labelled boxes  a eee              Deflection monitoring    Box delay time a i    Process deflection a  Box on time                                                NOTE  To animate objects in online mode  you must click on m   By clicking on this  button  you can validate what is written          100000000318 07 2012 193    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 andclick on New  Screen   The operator screen editor appears    2    Click on the     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 
85. g   e Modulo loop counter   e One shot counter    The following table presents the   orce reset bitin bold which is an element of the   Or m c d output command word                                            Language Standard symbol Meaning   object    Or m c 0   OUTPUT 0 Forces OUTPUT 0 to level 1    Or m c 1   OUTPUT 1 Forces OUTPUT 1 to level 1    Or m c 2   OUTPUT BLOCK 0 ENABLE   Implementation of output 0 function block    Or m c 3   OUTPUT BLOCK 1 ENABLE   Implementation of output 1 function block    Or m c 4              SYNC Counting function synchronization and  start    Qr m c 5   FORCE REF Set to preset counter value    Or m c 6   FORCE ENABLE Implementation of counter   SQr m c 7 FORCE_RESET Reset counter    Or m c 8  SYNC_RESET Reset SYNC_REF_FLAG    Or m c 9  MODULO_RESET Reset MODULO_FLAG          The function is activated by the rising edge of the force reset bit  There is no  valid_reset bit because the function is not activated by any physical input     This function is used to load the current counter value into the capt 0 val register   SIDr m c 14  at the same condition defined by the synchro edge parameter  configured in the configuration screen  see page 58      Each BMX EHC 0800 module channel has one capture register     This function is used in the following counting modes   e Dual phase counting  e Modulo loop counter       EIO0000000318 07 2012    61       BMX EHC 0800 Functionalities       The synchronization and capture functions may be enabled 
86. g 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 0800 module has eight event sources contained in the  events source word    the address  IWr m c 10   Address Standard Symbol Description Counting mode concerned   IWr m c 10 0  EVT RUN Event due to start of One Shot Counter mode  counting    IWr m c 10 1  EVT MODULO Event due to counter being       Modulo Loop Counter mode  equal to modulo value   1 or   e Up and Down Counter mode  equal to value 0     Dual Phase Counter mode   IWr m c 10 2  EVT SYNC PRESET   Event due to a    Event Counter mode  synchronization or counter      One Shot Counter mode  homing  e Modulo Loop Counter mode     Dual Phase Counter mode   IWr m c 10 3   EVT COUNTER LOW   Event due to counter being   e Frequency Counter mode  less than threshold     Event Counter mode     One Shot Counter mode     Modulo Loop Counter mode     Up and Down Counter mode     Dual Phase Counter mode   IWr m c 10 4  EVT COUNTER _ Event due to counter being  WINDOW equal to threshold    IWr m c 10 5   EVT COUNTER HIGH   Event due to counter being   e Frequency Counter mode  greater than threshold     Event Counter mode     One Shot Counter mode     Modulo Loop Counter mode     Up and Down Counter mode     Dual Phase Counter mode   IWr m c 10 6  EVT CAPT O Event due to capture 0  e Modulo Loop Counter mode     Up and Down Counter mode
87. he 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    QWr m c 0 0  the counting function via the IN SYNC  input   VALID REF BOOL  R W Operation authorization for the internal  OWr m c 0 1  preset function   VALID ENABLE BOOL  R W Authorization of the counter enable via the    OWr m c 0 2  IN  EN input   VALID           0 BOOL  R W Capture authorization in the captureO  OWr m c 0 3  register   VALID  CAPT 1 BOOL  R W Capture authorization in the capture1  OWr m c 0 4  register   COMPARE ENABLE BOOL  R W Comparators operation authorization  OWr m c 0 5   COMPARE SUSPEND BOOL  R W Comparator frozen at its last value  OWr m c 0 6       EVENT SOURCES ENABLING   QWr m c 1 Word    The following table presents the meanings of the bits of the            m c 1 words                                      Standard symbol Type  Access   Meaning Language object   EVT_RUN_ENABLE BOOL   R W EVENT task call at start of the  OWr m c 1 0  counting function   EVT MODULO ENABLE BOOL   R W EVENT task call when there is a  OWr m c 1 1  counter reversal   EVT REF ENABLE BOOL   R W EVENT task call during counter  OWr m c 1 2  synchronization or preset            COUNTER LOW ENABLE BOOL   R W EVENT task call when the counter    QWr m c 1 3  value is less than lower threshold          EIO0000000318 07 2012    155  
88. he terminal block to the module     Terminal block Module                Empty slots             Slots filled with studs    Slots filled with studs J                  Empty slots                         J                                  The diagram below shows an example of coding configuration with which it is not  possible to fit the terminal block to the module     Terminal block Module                Empty slot        Slots filled with studs    Slots filled with studs 1      27           Empty slots                                           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           EIO0000000318 07 2012    31    BMX EHC 0800 Counting Module  General Rules for Installation            A CAUTION       DESTRUCTION OF THE MODULE    Code the terminal block as described above to prevent the terminal block from  being mounted on another module     Plugging the wrong connector could cause the module to be destroyed   Failure to follow these instructions can result in injury or equipment damage              CAUTION          UNEXPECTED BEHAVIOUR OF APPLICATION    Code the terminal block as described above to prevent the terminal block from  being mounted on another module     Plugging the wrong connector could cause unexpected behaviour of the  application        Failure to follow these instructions can
89. ic Page  11 1 Debug Screen for BMX EHC xxxx Counting Modules 124  11 2 BMX EHC 0800 Module Debugging 127          EIO0000000318 07 2012    123       Debugging the Counting Module       11 1 Debug Screen for BMX EHC xxxx Counting  Modules       Debug Screen for the BMX EHC 0800 Counting Module    At a Glance    This section presents the debug screen for the BMX EHC 0800 counting module  A  module s debug screen can only be accessed in online mode        124   100000000318 07 2012    Debugging the Counting Module       Illustration    The figure below presents the debug screen for the BMX EHC 0800 module in  modulo loop counter mode                                                                                                                                                                                                                                                                                                                                 2 channel generic counter Version  1      BMX EHC 0800  H  Config  ni Debug     Fault 1    e Counter 0   Modulo L       Counter 1   Modulo L v    y     Reference Label   Symbol Value  0   ID 302 Counter value m3 0200 0 COU CURRENT VALUE 10  11 4030 03   Counter Valid m3 0200 O COUNTER STATUS No  2  103010   Counterlow m3 0200 0 COOMPARE STATUS No  3  51 0 30 1 1   Counter in window m3 0200 0 COOMPARE STATUS No  4  40 30 12   Counter high    0200 0 COOMPARE STATUS No  519103005   Counter in low imi m3 0200 0 COUNTER STATUS No     W03004
90. independently        Status of the  valid capt 0  bit    QWr m c 0 3     Status of the  valid sync bit    QWr m c 0 0     Behavior while the capture condition  condition defined by the    synchro edge parameter  is true       Current counter value    Capture register value   SID r m c 14                             Set to 0 Set to 0 No change No change  Set to 0 Set to 1 Reload or clear No change  Set to 1 Set to 0 No change Reload with current counter value  Set to 1 Set to 1 Reload or clear Reload with current counter value    The storage will occur just before  reseting the counter value           62    E100000000318 07 2012       BMX EHC 0800 Functionalities       Modulo Flag and Synchronization Flag    At a Glance    This section presents the operation of the bits relating to the following events     e Counter synchronization event    e Counter rollovers the modulo or its limits in forward or reverse     The table below presents the counting modes that may activate synchronization and    modulo events        Flag    Counting mode concerned       sync ref flag bit    IWr m c 0 2     Dual phase counting  When the counter presets  and  re starts   Up and down counting  When the counter presets  and  re starts   Modulo loop counter  When the counter resets  One shot counter  When the counter presets and   re starts   Event counting  When the internal time base  restarts to the beginning        modulo flag bit  sIWr m c 0 1          Dual phase counting  When the counter rollo
91. ing 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    29     INC Nb Box      Procedure for Creating an ST Section  The table below shows the procedure for creating an I O Event        Event       Step    Action       1    In Project Browser Program   double click on Events       2    Right click on I O Events then select New Event section  Give your section    a number  for this example select 0  and then select ST language             Confirm with OK and the edition window appears              EIO0000000318 07 2012    187    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        188   100000000318 07 2012    Application using Unity Pro       Illustration of the Application Section    The section below is part of the MAST task        Makes ihe counter  enabled    Encoder             ENABLED                  FBI 1  RS      EN ENO      Run    S Q1            RI                Numeral current value is less than the  Lower Threshold    Encoder  Counter Low    Box at the start position on the  operator screen    Position 0    M       Numeral current value is within the  Thresholds                                Win          Box at 
92. is value by specifying the value of this  word     e In the adjust screen  e In      application  using the WRITE PARAM IODDT VAR1  Function   IODDT VARI is ofthe type T Signed CPT BMX        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   Normal Quadrature X4   Reverse Quadrature X1   Reverse Quadrature X2   Reverse Quadrature X4        84   100000000318 07 2012    BMX EHC 0800 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 atthe IN  A input and low state  atthe 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 atthe IN  A input and low state  atthe IN B input   Rising edge at the IN  A input and high level  atthe IN B input        N
93. l  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 AUX input status  In all cases  the counting resumes when  the command reverts to the high level     In this mode  the counting register is updated at 5 ms intervals   Unlike for the BMX EHC 0200 module  there is no downcounting          100000000318 07 2012 77    BMX EHC 0800 Functionalities                Operation  The trend diagram below illustrates the modulo counting process   IN  A input  pulses  2 2 2 2 2 7 2 2  IN  AUX input F  I F                          valid  sync bit      force enablebit                                  Counter value 4  Modulo value                        X2             X1           Time  0      Capture value x1   2 X3                   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               Wr m c 0 1 MODULO FLAG 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                 Wr 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                    Wr m c 
94. le the debugging of the  counting modules     Explicit exchanges enable the module to be set and diagnosed        EIO0000000318 07 2012    143       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  50 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 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      Y    Execution of the program          Y  Update of outputs                            144      100000000318 07 2012       Explicit Exchange Language Objects Associated with the Application Specific  Function    Introduction    Explicit exchanges are performed at th
95. ling 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 th the other    functions are enabled       sensor     IF Waiting Other Parts  THEN           Authorizes captures into the Capture 0 register    Encoder VALID CAPT 0  1       Authorizes comparators to produce its results         Encoder                     Call    _ ENABLE  1              Event task when Counter Roll over                     Encoder EVT MODULO ENABLE  1          Enable the output block functions    Encoder OUTPUT BLOCK 0 ENABLE  1   Encoder OUTPUT BLOCK 1 ENABLE  1   ELSE                                          Function disabling w    Encoder     hen the conveyor is stopped      VALID CA    PT  0 20       Encoder                       ENABLE  0          Encoder EVT MODU                           0                Encoder OUTPUT B                       0 ENABLE  0               100000000318 07 2012    185    Application using Unity Pro          Encoder OUTPUT BLOCK 1 ENABLE  0                END IF    Definition of the lower an
96. locked at the  4 upper threshold value   SIWr m c  LOW_LIMIT The current numerical value is locked at the  5 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 bit to reset the synchronization event s flag bit to 0     modulo reset bit to reset the modulo event s flag bit to 0    Location of Reset to 0 Commands    The following table presents the sync reset        modulo reset bits which are  elements of the  Qr  m  c  d output command word                                   Language Standard symbol Meaning   object    Or m c 0                0 Forces OUTPUT 0 to level 1    Or m c 1  OUTPUT_1 Forces OUTPUT  1 to level 1    Qr m c 2  OUTPUT BLOCK 0 ENABLE   Implementation of output 0 function  block    Or 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             REF Set to preset counter value    Or m c 6             ENABLE Implementation of counter                64    EIO0000000318 07 2012    BMX EHC 0800 Functionalities                   Language Standard symbol Meaning   object    Or m c 7 FORCE RESET Reset counter   Or m c 8   SYNC RESET Reset SYNC REF FLAG   Qr m c 9   MODULO RESET Reset MODULO FLAG                        100000000318 07 2012 65    BMX EHC 0800 Functionalities       Sending Countin
97. ltage    11 VDC   30 VDC       Current    4 5 mA  up to 30 VDC        At state 0 Voltage     lt  5 VDC          Current       1 5 mA             Current at 11 VDC        gt  2 mA            100000000318 07 2012    39          BMX EHC 0800       Display and Diagnostics of the BMX EHC 0800 Counting Module    At a Glance  The BMX EHC 0800 counting module has LEDs that enable the following to be  viewed   e the status of the module  RUN  ERR       e the input status of every channel  Illustration    The following drawing shows the display screen of the BMX EHC 0800 module     Clock Inputs    Aux Inputs          40   100000000318 07 2012    BMX EHC 0800       Fault Diagnostics  The following table enables the diagnostics of errors according to the various LEDs        Module status LED indicators  RUN  ERR           C1 C2 C3 C4 C5 C6 C7                                  The module is inoperative or  switched off       The module has an error       The module is not configured       The module has lost  communication       The sensors have a supply error       ee 900 o       212     o     The channels are operational          The voltage is present at input e  IN  A of counter 0          The voltage is present at input e  IN  A of counter 1          The voltage is present at input e  IN  A of counter 2          The voltage is present at input o  IN_A of counter 3          The voltage is present at input     IN_A of counter 4          The voltage is present at input e  IN  A of counte
98. lue and Sensor Values  The table below presents the various IODDT implicit exchange objects                                                                                         Standard symbol Type  Access   Meaning Language  object  COUNTER CURRENT VALUE  DINT    Current counter value  IDr m c 2  CAPT 0 VALUE DINT    Counter value when captured in register O    IDr m c 4  CAPT 1 VALUE DINT    Counter value when captured in register 1   SIDr m c 6  COUNTER VALUE DINT    Current counter value during event  IDr C2  CAPT 0 VAL DINT    Capture value 0  IDr c 14  CAPT 1 VAL DINT    Capture value 1  IDr c 16  9elr m c d Word  The table below presents the meanings of the  1r 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  Ir m c 0  OUTPUT 1 Echo BOOL R Logical state of output 1  Ir 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 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  Ir 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    Ir m c 8  INPUT CAPT BOOL R Physical state of IN CAP input  capture   Ir m c 9                               152   100000000318 07 2012       Counter Status  
99. mation about the Counting Module Operation 17  Presentation of the BMX EHC 0800 Counting Module 18  Modicon M340H  Hardened  Equipment 20          EIO0000000318 07 2012       15       BMX EHC 0800 Counting Module       General Information about Counting Module    Introduction    The BMX EHC 0800 counting module is a standard format module that enable  pulses from a sensor to be counted at a maximum frequency of 10 KHz     This module has 8 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 24 VDC three 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  BMX EHC 0800 counting module                         16 E100000000318 07 2012    BMX EHC 0800 Counting Module       General Information about the Counting Module Operation    Introduction    Characteristics    The BMX EHC 0800 module is a counting module from the Modicon M340 modular  PLC range  It support all Unity Pro software functionalities     This module has     e Counting related functions  comparison  capture  homing  reset to O   e Event generation functions designed for the application program  e Outputs for actuator use  contacts  alarms  relays     The main characteristics of this module are as follows        
100. minal Block  When a 20 pin terminal block is installed on a module dedicated to this type of  terminal block  you can code the terminal block and the module using studs  The  purpose of the studs is to prevent the terminal block from being mounted on another  module  Handling errors can then be avoided when replacing a module     Coding is done by the user with the STB XMP 7800 guidance wheel s studs  You  can only fill the 6 slots in the middle of the left side  as seen from the wiring side  of  the terminal block  and can fill the module s 6 guidance slots on the left side    To fit the terminal block to the module  a module slot with a stud must correspond to  an empty slot in the terminal block  or a terminal block with a stud must correspond  to an empty slot in the module  You can fill up to and including either of the   6 available slots as desired    The diagram below shows a guidance wheel as well as the slots on the module used  for coding the 20 pin terminal blocks     yy        _   _                         7 Guidance wheel       C    V P                                                                                AE       E  Detachable stud    D         a        e  Guidance slots                                                                               Module slots       30   100000000318 07 2012    BMX EHC 0800 Counting Module  General Rules for Installation       The diagram below shows an example of a coding configuration that makes it  possible to fit t
101. mmunication error  MWr m c 2 6  APPLI      BOOL R Application error  MWr m c 2 7       Channel Error   MWr m c 3    The table below presents the meaning of the error bits on the 5       Wr m c 3 word                                   Standard symbol Type Access  Meaning Language  object  SENSOR SUPPLY BOOL R Low input power supply for the sensors  MWr m c 3 2  ACTUATOR SUPPLY FLT   BOOL R Output power supply failure  MWr m c 3 3  SHORT CIRCUIT OUT 0   BOOL R Short circuit on output 0  MWr m c 3 4  SHORT CIRCUIT OUT 1  BOOL R Short circuit on output 1  MWr m c 3 5          158    EIO0000000318 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        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 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                        
102. nfiguration                               One Shot Counter Mode                                                       Modulo Loop Counter Mode Configuration                          Up and Down Counting Mode                                                   Dual Phase Counting Mode                                                       91    93  93    95  96    101  102    103    105  107  108  109  110  111  112  113       EIO0000000318 07 2012          Chapter 10 BMX EHC 0800 Counting Module Adjusts             115  Adjust Screen for BMX EHC 0800 Counting Module                 116  Adjust the Preset                                                 118  Adjust the Calibration                                                 119  Modulo  Adjust      iret t e deme de re Er d d TU 120  Adjust the Hysteresis Value                                     121  Chapter 11 Debugging the BMX EHC 0800 Counting Module      123  11 1 Debug Screen for BMX EHC xxxx Counting Modules                 124  Debug Screen for the BMX EHC 0800 Counting Module              124  11 2 BMX EHC 0800 Module                                                  127  Frequency Mode                                                       128  Event Counting Mode                                                    129  One Shot Counter Mode                                                  130  Modulo Loop Counter Mode                                                131  Up and Down Counting Mode                          
103. ng  When  this command is at the low level  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 AUX input status  In all cases  the counting resumes when  the command reverts to the high level        EIO0000000318 07 2012    75    BMX EHC 0800 Functionalities       Counter Status Bits in One shot Counter Mode    The table below shows the composition of the counters  1Wr m c 0 status word  in one shot counter mode     Type of the IODDT    Operating Limits       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         IWr 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           In this mode  the type of the IODDT is T UNSIGNED CPT BMX     The maximum frequency that can be applied to the IN AUX input is 1 pulse every    25 ms     The maximum preset value is 65 535     NOTE  You have to check the validity bit   1Wr m c 0 3  before taking into  account
104. ng Module Implementation          170   100000000318 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        E100000000318 07 2012 171    Description of the application       Illustration  This is the application s final operator screen     Sensor Start Stop       1stLabelling     2nd Labelling  Point Point          D          e    nE mer           Deflection monitoring                     Box delay time Ln i    Process deflection      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 long  a Process
105. ng input module  New Device  Topological Address 0 1 TET  ancel  Help  Part Number Description      Basic Micro local drop  E  Analog  EF    Communication  Az Counting       BMX EMC 0200    2 channel generic counter  BMX EMC 0800   8 channel generic counter       Discrete                        4 Confirm with OK                 178   100000000318 07 2012       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 In the Bus X window  double click on the BMX EHC 0800 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          the OutputBlock 1 reflex output with a pulse when the counting is greater than the  Upper Threshold  Pulse   greater than UT  Then click      the Event value  and select Enable   2 channel generic counter             F1 BMX EHC 0800 191 Config    5 Adjust   BS  Counter 0       D Counter  Label Symbol Value Unit  0   Input A Filter Without T  1 p t    hout     nput
106. nize the counter operation upon a  transition applied to the IN  AUX physical input or the   orce sync bit set to 1     This function is used in the following counting modes    e Dual phase counting   e Modulo loop counter   e One shot counter   e Event counting   e Up and down counting  using the   orce sync bit only     In all of the counting modes specified above  with the exception of the up and down  counting mode  the user may configure the synchro edge parameter in the  configuration screen by choosing from the following two possibilities to configure the  external event    e Rising edge of the IN AUX input   e Falling edge of the IN AUX input       58   100000000318 07 2012    BMX EHC 0800 Functionalities       The following table presents the   orce sync bit      bold which is an element of the   Or m c d output command word                                            Language Standard symbol Meaning   object    Or m c 0 OUTPUT 0 Forces OUTPUT 0 to level 1    Or m c 1 OUTPUT 1 Forces OUTPUT 1 to level 1    Or m c 2 OUTPUT BLOCK 0 ENABLE   Implementation of output 0 function block    Or m c 3 OUTPUT BLOCK 1 ENABLE   Implementation of output 1 function block    Or m c 4 FORCE SYNC Counting function synchronization  and start    Or m c 5 FORCE REF Set to preset counter value    Or m c 6 FORCE ENABLE Implementation of counter    Or m c 7 FORCE RESET Reset counter    Or m c 8 SYNC RESET Reset SYNC REF FLAG    Or m c 9 MODULO RESET Reset MODULO FLAG          The following t
107. now in your operator screen  You now need a variable to    animate the wheels  Select your conveyor then click on     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 B  in the place of  MWO    In our application  this will be Encoder INPUT     the physical input A state   Confirm with Apply and OK              Click on 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          E and confirm with OK           194      100000000318 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 0800 with an  encoder and a sensor linked to its inputs     Inputs Wiring    The encoder and the sensor are connected as follows   BMX EHC 0800    Sensor    Encoder                                                             Description    Pin number Symbol Description   1 IN  AUX Input for channel 0  2 IN  A Input for channel 0  3 IN  AUX Inpu
108. ns for the BMX EHC 0800 counting module are     Configuration screen  Adjust screen    Debug screen  can only be accessed in online mode   Faults screen  can only be accessed in online mode     The following diagram presents the counting modules configuration screen     1       2 channel generic counter  Versipn  1 00                          0800                       N                Function        Modulo Loop Coun        Config    H Adjust   n Debug    Fault      7    Run      10             Task            MAS          W                                                                                                                                                                Label Symbol  npul B Filter  L2   Input Sync Filter hout  3  Input EN Filter            General  E Fauli WK  e        309  ET       WKWO3Q0B8 H  nchro Edge  L3                       XKWD3017 TOF              Bloc    3019              EM          13  Polanty 0   KWO 30211  4  Polarity AKW 30 21 2         at   16  Fallback Q 3021 3  Withou  14 Fallback 1 3021 4 Withoul  48  Eallback Value 0 215   9 Fallback Value 1 6                                     W  module4 E 03  BMX E                   98    EIO0000000318 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 av
109. ns for the BMX EHC 0800 counting module are   e Configuration screen  e Adjust screen    Description of the Screens  The following diagram presents the counting modules configuration screen     1         12 102   BMX EHC 0800    High Speed Counter 8 Ch     E  BMX EHC 0800  Counter 0   Modulo Loop Counter Mode  Counter 1     Frequency Mode  Counter 2     Frequency Mode          SIE     yaus   aL  Counter 3     Frequency Mode   Input A fiter     MEM out  Counter 4     Frequency Mode  B Input AUX filter Without  Counter 5     Frequency Mode ZA        supply fout BENE General IO fault   3   Scaling factor 1  Counter 6     Frequency Mode ne ane a      ET E        Y         A  Counter 7     Frequency Mode mp    3   sing        5   Event 2 Disable   6   Event number        Configuration EF  Adjust      iJ      D  ug        HU  HD 10          Function     Modulo Loop Counter Mode v    Task                   100000000318 07 2012 105    Configuration of the Counting Module       The following table presents the parts of the various screens                             progress area       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      Configuration  e Adjust  2 Module area Provides an abbreviation as a reminder of the module and module status in online  mode  LEDs    Is used      Byclicking on the reference number  to display the t
110. odule     Description    The following table shows the calibration factor adjust                       Number Address in the Value Default value  configuration   Calibration SMWr m c 14 Edit 0   factor          EIO0000000318 07 2012    119       Counting Module adjusts       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                   120    EIO0000000318 07 2012       Counting Module adjusts       Adjust the Hysteresis Value    Introduction    The hysteresis value concerns dual phase counting mode for BMX EHC 0800    module     Description    The following table shows the adjust for the hysteresis value                       Number Address in the Value Default value  configuration   Hysteresis  MWr m c 9 Edit 0    release value           EIO0000000318 07 2012    121       Counting Module adjusts          122   100000000318 07 2012       Debugging the BMX EHC 0800  Counting Module    11       Subject of this Chapter    This chapter deals with the debugging settings applicable to the BMX EHC 0800  module  These settings can be accessed from the Debug tab on the functional  screens of the BMX EHC 0800  see page 96  module     What Is in This Chapter     This chapter contains the following sections                       Section Top
111. odule error has gone down to channel level   Refer to module level diagnostics        Invalid software configuration       incorrect constant   e bitcombination not associated with  any configuration    Check and modify the configuration constants        Communication error    Check the connections between the racks        Application error  refusal to configure  or adjust          Diagnose the error more precisely              140    EIO0000000318 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 142  13 2 Language Objects and IODDT Associated with the Counting 151  Function of the BMX EHC xxxx Modules    13 3 Device DDTs Associated with the Counting Function of the 159  BMX EHC xxxx Modules    13 4 The IODDT Type T GEN MOD Applicable to     Modules 166          EIO0000000318 07 2012    141          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
112. ormal Quadrature X4    Rising edge at the IN  A input and low  state at the IN  B input   High state at the IN    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 atthe IN  A input and low state  atthe IN B input    Low state at the IN A input and rising edge  atthe IN B input    Rising edge atthe IN  A input and high level  atthe IN B input    High state at the IN  A input and falling  edge at the IN B input        Reverse 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  atthe IN B input        Reverse 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  atthe IN B input    Falling edge at the IN A input and high  state at the IN  B input        Reverse 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  atthe IN B input    High state at the IN A input and rising edge  atthe IN B input    Falling edge at the IN A input an
113. ow presents the fault display screen for the BMX EHC 0800 module in  modulo loop counter mode     E         9            2 channel generic counter Version  1  e 7       Run Em 10      4                     E  BMX EHC 0800  H  Genfig  1    Adjust   d Debug 1   Fault    e Counter 0   Modulo L     Counter 1   Modulo L                   Y  Internal fault External faut                             4 Other fault      External Fault on Inputs     External Fault on Outputs     Input sensor supply low voltage     Output sensor supply low voltage          MW  0x3 MW                            4       Function   Modul p Cour          Task     MA We                            W module4 E                            136   100000000318 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              EIO0000000318 07 2012    137    Display of Error  Counting Module       Faults Diagnostics Display    At a Glance    The diagnostic screens  
114. pected manner     Failure to follow these instructions can result in death  serious injury  or  equipment damage           46      100000000318 07 2012       BMX EHC 0800       The figure below shows the recommended circuit for a highly disturbed environment  using the BMX XSP 0400 0600 0800 1200 electromagnetic protection kit           BMX EHC 0800 counting module             9 9                        gt           o    o                                                                                      XSP       kit                                               Encoder    24 VDC fast sensors  power supply                                                                                                    CAUTION       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  selection could result to damage to the module        Failure to follow these instructions can result in injury or equipment damage                100000000318 07 2012 47    BMX EHC 0800          48    EIO0000000318 07 2012       BMX EHC 0800 Counting Module  Functionalities          EIO0000000318 07 2012    49    BMX EHC 0800 Counting Module Functionalities          50      100000000318 07 2012       BMX EHC 0800 Counting Module  Functionalities 6       Subject of this Chapter    This chapter deals with functionalities and counting modes of the BMX EHC 
115. ple    Operation    Using the upcounting and downcounting mode allows for an accumulation   upcounting or downcounting operation on a single input     In this mode  the counting starts with the   orce sync software command  On the  rising edge  the counting register is updated with the preset value predefined by the  user  The preset value is contained in the preset value word  MDr m c  6    The user may change this value by specifying the value of this word     e In the adjust screen  e In      application  using the WRITE PARAM IODDT VAR1  Function   IODDT VARI is ofthe type T SIGNED CPT BMX           The following processing occurs at each pulse applied to the IN  A input     e Pulse counting if the IN AUX input is high  e Pulse downcounting if the IN AUX input is low    The   orce enable software command must be at the high level during the  counting  When this command is at the low level  the last value reported in the  counting register is maintained and the counter ignores the pulses applied to the  IN A input  The counting resumes when the command reverts to the high level     Counting values vary between    32 768 and 432 767     The trend diagram below illustrates the modulo up  amp  down counting mode process        80    EIO0000000318 07 2012    BMX EHC 0800 Functionalities             IN  A input  pulses                 IN  AUX input                   force sync bit          force enablebit    Counter value A               32K    Preset value             v  32K  
116. project to PLC window opens  Click on Transfer  The application is  transferred to the PLC              In the PLC  click on Execute  The Execute window opens  Click on       The  application is now being executed  in RUN mode  on the PLC           196    EIO0000000318 07 2012             Index          A    Adjusts  115    BMXEHC0800  18    C  channel data structure for all modules  T  GEN  MOD  766  166  channel data structure for counting modules  T  SIGNED CPT BMX  152  157  T UNSIGNED CPT BMX  152  157  configuring  101  Counting Events  66    D    debugging  123  diagnosing  57  dual phase counting  84    E    event counting  72    F    filtering  54  frequency mode  70    functions  52    input interface blocks  53  installing  25  91    M    M340  hardened  20  ruggedized  20  modulo loop counter  77    O    one shot counter  74    P    parameter settings  141    Q    quick start  169    GEN_MOD  166  166  M_CPT_STD_IN_2  159  M_CPT_STD_IN_8  159  SIGNED_BMX  152          T  T_  T  T  T        EIO0000000318 07 2012    197    Index       T SIGNED CPT BMX  157  T UNSIGNED CPT         152  157  terminal blocks   coding  30   connecting  25   installing  25    U    upcounting and downcounting  80    W    wiring accessories  25       198      100000000318 07 2012    
117. r 5          The voltage is present at input e  IN  A of counter 6          The voltage is present at input e  IN  A of counter 7                                                   100000000318 07 2012 41    BMX EHC 0800          Module status    LED indicators       RUN    ERR    yo    AO    A1    A2    A3    A4    A5  A6    7       The channels are operational       The voltage is present at input  IN  AUX of counter 0       The voltage is present at input  IN  AUX of counter 1       The voltage is present at input  IN  AUX of counter 2       The voltage is present at input  IN  AUX of counter 3       The voltage is present at input  IN  AUX of counter 4       The voltage is present at input  IN  AUX of counter 5       The voltage is present at input  IN  AUX of counter 6       The voltage is present at input  IN  AUX of counter 7       e                                                                         Legend       o LED on       O LED off        amp  LED flashing slowly        amp  LED flashing fast          An empty cell indicates that the state of the LED s  is not taken into account          42    EIO0000000318 07 2012       BMX EHC 0800       BMX EHC 0800 Module Wiring    At a Glance    Field Sensors    Pin Assignments    The BMX EHC 0800 counting module uses a standard BMX FTB 2000 2010 2020  20 pin connector  wiring terminal       4 DANGER       HAZARD OF ELECTRIC SHOCK    e disconnect voltage supplying sensors and pre actuators before plugging    unplugging th
118. r 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 In the adjust screen  e In      application by using the WRITE PARAM IODDT VAR1  Function   IODDT VAR1 is of the type T Signed CPT BMX        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 and the counting validity bit changes to 0 until the next preset condition occurs     Counter value Lock on limits mode       Validity bit                        Homing event    NOTE  Overflow and underflow are indicated by two bits LOW LIMIT and  HIGH LIMIT until the application reloads the counting value predefined by the user     force ref      set to 1 or preset condition true   The upcounting or downcounting  may therefore resume        EIO0000000318 07 2012    87    BMX EHC 0800 Functionalities       In the rollover configuration  the counting register automatically switches to the limit    value opposed to overflow    Counter value          Rollover mode             Validity bit         Homing event    Counter Status Bits in Dual Phase Counting Mode    The table below shows the composition of the counters  Iwr m c 0 status word    in dual phase counting mode        Bit    Label    Description        IWr     MODULO FLAG    The bit status changes in the rollover mode    The bit i
119. re authorization in the   read   write  capture 1 register  COMPARE ENABLE BOOL  5   comparators operation read   write  authorization  COMPARE SUSPEND   BOOL 6   comparator frozen at its last   read   write  value  LOWER TH VALUE S  DINT lower threshold value read   write  UPPER  TH VALUE S  DINT upper threshold value read   write  PWM FREQUENCY  81 DINT output frequency value read   write   unit 2 0 1 Hz   LOWER TH VALUE US  UDINT lower threshold value read   write  UPPER  TH VALUE US  UDINT upper threshold value read   write          EIO0000000318 07 2012    163                   Standard Symbol Type Bit   Meaning Access   PWM  FREQUENCY  US  UDINT output frequency value read   write   unit 2 0 1 Hz    PWM DUTY INT duty cycle value of the read   write  output frequency  unit   5                        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      EHC 0200     Free Large counter Mode  Ratio 1  Ratio 2    Here below is all the unsigned ASF that must be used with a counter           EHC 0200     Event Counting Mode  Frequency Mode   Modulo Loop Counter Mode  One Shot Counter Mode  Period Measuring Mode  Pulse Width Modulation Mode    Here below is all the signed ASF that must be used with a counter           EHC 0800     Up Down Counting Mode    Here below is all the unsigned ASF that must be used with a counter        EHC 080
120. reen appears        si  PLC bus    Bus      BMX P34 2010 01 00 M                                                  m  979                                                                   96        00000000318 07 2012          Screens          Step    Action          Double click on the counting module   Result  the module screen appears        2 channel generic counter Version  1 00           Run Em        Io          BMX EHC 0800        Config    E  Adjust    9 Debug    Faut                 Counter                                                                                                   7    Function   Modulo Loop Courk                                                                      Counter         Symbol   Value Unit     ithout              houi                 Filter Without  L3  Input EN Filter Without    4   ly Fault     General lO Fault  5 y Faull 2 a  A  Up  B   Down  7 Scaling Factor        308  E Synchro Edge     Rising edge on SYNG      AKNI 5 TOf ms  11  Pulsewicth 0 9 3018  10 ms    2 Pulsewidth   KWO 3020  10       13  Polarity HKW 11l Polarity        14  Polarity 1 AKNO 30 21 2 Polarity       3021 01 aiched off        16  Fallback Q AKWA 30 21 3  Without x  hack 1        30 21 4  Without              Value Q                               I           4     80 3 BMX E                        100000000318 07 2012    97    Screens       Description of the Counting Module Screens    Introduction    Description of the Screens    The various available scree
121. reen for the BMX EHC 0800 Counting Module in a Modicon  M340 Local Rack                                                                                                                                     At a Glance  This section presents the configuration screen for the BMX EHC 0800 counting  module   Illustration   The figure below presents the configuration screen for the BMX EHC 0800 module  in modulo loop counter mode   1 2 3 4 5   2 channel generic counter Version  1 00 e        Run Em  O   E  BMX EHC 080     Config         Adjust               1    Faut                   0 oL       Counter 1   Modulo L   De EE Value Unit   0 Inul A Filler Wilhoul     1 Imut B Filter Without    2  Inout Sync Filter Without x  3  Inout EN Filter Without    4  Inout Supply Fault       5KW0 3028  General IO Fault    5  O tput Supply Fault          3029  General lO Fault     6  Counting Interface        KWO 30 9 A  Up       Down    7  Scaling Factor XKWO 308  8   Synchro Edge Rising edge on SYNC    9   C itputBlock 0 XKWO301    Off z    10  OJiputBlock 1 XKWO3019  Of ms  11 Pulsewidlh 0  KWO 3 0 18   10 ms  12   Pulsewidth XKWO3020   10     13         0  XKWO03021 1                      14   Polarily 1  KW030212   Polarity    gt    16 Fault Recovery  KWO 3 0 21 0   Laiched off xf  16  Fallback 0 AKW 30213   Without       17  Falback 1  KWO30214   Without  gt    48 Falback Value O0      5KN0 30215       19  Fallback Value 1 WKWO 30216  gt     20   Event   Enable    121  Event Number 1       
122. reshold   0Dr m c 4    CAPT 0 HIGH BOOL R Value captured in register 0 is greater than    IWr m c 5  upper threshold   ODr  m c 4    CAPT 1 LOW BOOL R Value captured in register 1 is less than  IWr m c 1 6  lower threshold   0Dr  m c 2    CAPT 1 WIN BOOL R Value captured in register 1 is between  IWr m c 7  lower threshold  QDr m c 2  and upper  threshold   0Dr m c 4    CAPT 1 HIGH BOOL R Value captured in register 1 is greater than    IWr m c 8  upper threshold   ODr  m c 4           EIO0000000318 07 2012    153             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          SOURCES INT R Event sources field  IWr m c 10   EVT RUN BOOL    Event due to start of counter   IWr m c 10 0   EVT MODULO BOOL  R Event due to modulo switch  IWr m c 10 1   EVT SYNC PRESET BOOL  R Event due to synchronization or preset  IWr m c 10 2          COUNTER LOW BOOL    Event due to counter value being less than    IWr m c 10 3  lower threshold          COUNTER WINDOW  BOOL     Event due to counter value being between    IWr m c 10 4  the two thresholds   EVT  COUNTER HIGH BOOL    Event due to counter value being greater  IWr m c 10 5  than upper threshold   EVT CAPT 0 BOOL    Event due to capture function 0  IWr m c 10 6          CAPT 1 BOOL    Event due to capture function 1  IWr m c 10 7          OVERRUN BOOL  R Warning  lost event s   I
123. rminal blocks  have captive screws  On the  supplied blocks  these screws  are not tightened     Caged terminal blocks have   slots that accept    e flat tipped screwdrivers  with a diameter of 3 mm       posidriv n  1 cross tipped  screwdrivers     Caged terminal blocks have  captive screws  On the  supplied blocks  these  screws are not tightened     The wires are connected by  pressing on the button  located next to each pin   To press on the button  you  have to use a flat tipped  screwdriver with a maximum  diameter of 3 mm        Maximum screw  tightening torque          0 5 N m        0 5 N m           4 DANGER          ELECTRICAL SHOCK    The terminal block 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           34   100000000318 07 2012    BMX EHC 0800 Counting Module  General Rules for Installation       Connection of 20 Pin Terminal Blocks    The following diagram shows the method for opening the 20 pin terminal block door  so that it can be wired                                               NOTE  The connection cable is installed and held in place by a cable clamp  positioned below the 20 pin terminal block     Labeling of 20 Pin Terminal Blocks    The labels for the 20 pin terminal blocks are supplied with the module  They are to  be inserted in the terminal block cover by the customer     Each label has two sides     e One side that is visible
124. rror or self testing        Configuration Fault       Communication Error       Application error       NIN  OO  oci A O     MWr m c 3 Sensor supply error                   All input output statuses are provided in the channel data bits   The table below shows the channel data bits                       Input Output data field Designation    Ir m c 4 Electrical state of IN  A input   Ir m c 5 Electrical state of IN  B input   Ir m c 6 Electrical state of IN  AUX input             EIO0000000318 07 2012    57    BMX EHC 0800 Functionalities       Synchronization  Enable  Reset to 0 and Capture Functions    Introduction    This section presents the functions used by the various counting modes of the  BMX EHC 0800 module    e Synchronization function   e Enable function   e Reset to 0 function   e Capture function    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 O   the event is not taken into account and does not activate the function  The  functions enabling Word   OWr 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  Qr m c 4    Qr m c 8 language objects     Synchronization Function    The synchronization function is used to synchro
125. s not  possible to setup a module s parameters from the PLC application during operation          100000000318 07 2012 145       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 01  01                Command parameters    Status parameters             Current adjustment  parameters    Command parameters                         Initial adjustment  parameters             READ STS       WRITE CMD   gt   WRITE PARAM     READ PARAM  SAVE PARAM          RESTORE PARAM   gt                        1  Only with READ STS and WRITE        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 information concerning the exchange in progress  see page 149   e the exchange report  see page 150           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   
126. s 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   SQr m c  9  is received  rising edge of the   MODULO RESET bit          IWr     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   SQr m c 8  is received  rising edge of the SYNC RESET  bit          IWr     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         IWr     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 0 when the counter presets            IWr        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 0 when the counter presets           88    E100000000318 07 2012       BMX EHC 0800 Functionalities       Type of the IODDT    Operating Limits    In this mode  the type of the IODDT must be T SIGNED  CPT BMX     The maximum frequency applied to the IN A and IN B inputs is 10 kHz     The shortest pulse applied to the IN AUX input is defined according to the level of  filtering applied to the input     The maximum loading frequency for the value pred
127. see page 95  on the module or channel are only accessible  in connected mode  When an un masked error appears  it is reported     in the configuration screen of the rack  with the presence of a red square in the  position of the inoperative counting module    in all screens at module level  Description and Fault tabs     e in      module field with the LED    in all channel level screens  Configuration  Adjustment  Debug and Fault  tabs     e      the module zone with the LED   e in      channel zone with the error LED    in the fault screen that is accessed by the Fault where the fault diagnostics are  described     The error is also signaled     On the module  on the central display   by dedicated language objects       ERROR   Ir m c ERR  and  MOD ERROR   Ir m MOD ERR    MWr m MOD 2  etc  and status words           NOTE  Even if the error is masked  it is reported by the flashing of the I O LED and  in the fault screen        138      100000000318 07 2012    Display of Error  Counting Module       List of Errors    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 errors 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 headings with suggestions for identifying issues     List of the Module Error Messages    The table below provides a
128. short circuit of at least  one encoder differential signal  1A   1B  1Z       specific error 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 error and acknowledge if the error storing  is configured    Counting pulses or incremental encoder  preset or  reset to acknowledge the Invalid measurement  message        Counting application error      measurement overrun      overspeed    Outputs are set to 0 in automatic  mode   Invalid measurement message     Diagnose the error more precisely  external  causes     Check the application again  if necessary    Delete the error and acknowledge if the error storing  is configured    Counting pulses or incremental encoder  preset or  reset to 0 to acknowledge the Invalid  measurement message        Auxiliary input output error       power supply     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 error more precisely  external causes   Delete the error and acknowledge if the error storing  is configured       Internal error or channel self testing      module inoperative   e module missing or off   e module running self test    Module error has gone down to channel level   Refer to module level diagnostics        Different hardware and software  configurations    M
129. splays the status of the inputs and outputs  as well as the various  parameters of the current counting function    e Faults  displays the errors that have occurred on the counting channels           EIO0000000318 07 2012    99       Screens          100   100000000318 07 2012       Configuration of the  BMX EHC 0800 Counting Module    9       Subject of this Chapter    This chapter deals with the configuration of the BMX EHC 0800 counting module   This configuration can be accessed from the Configuration tab on the functional  screens of BMX EHC 0800  see page 98  module     What Is in This Chapter   This chapter contains the following sections                       Section Topic Page  9 1 Configuration Screen for BMX EHC xxxx Counting Modules 102  9 2 Configuration of Modes for the BMX EHC 0800 Module 107          EIO0000000318 07 2012    101       Configuration of the Counting Module       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 the BMX EHC 0800 Counting Module in a Modicon 103  M340 Local Rack  Configuration Screen for the BMX EHC 0800 Counting Module in X80 Drop 105          102   100000000318 07 2012       Configuration of the Counting Module       Configuration Sc
130. sumption    Does not take into account sensors or  encoder consumption   e Allinputs OFF  typical  15 mA      All inputs ON  typical  80 mA       Power distribution to sensors    No       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 104 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  Cycle Time 5ms          38    E100000000318 07 2012       BMX EHC 0800             WARNING       OVERHEATING MODULE    is greater than 26 4 V or less than 21 1 V        equipment damage     Do not operate the BMX EHC 0800H at 70  C  158  F  if the sensor power supply    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    Two 24 VDC inputs       Inputs  IN A  IN AUX Voltage    30 VDC       At state 1 Vo
131. t byte  of this word is 3        IN_A input filter    SKWr m c 3   least significant byte     The least significant byte can take the following values      0                 1 low       2 medium       3  high        IN  AUX input filter     KWr m c 4   least significant byte     The least significant byte can take the following values      0                 1 low       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                 1 low       2 medium    e 3  high        Input power supply error    o     KWr m c 2 8    General input output error  bit set to 0   Local  bit set to 1        Scale factor    oe    Wr m c 6  east significant byte          Edit  value in the range 1   255        Synchronization edge    SKWr m c 10 8   High     Rising edge  bit set to 0   Falling edge  bit set to 1        Event  Event number             o    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           110    E100000000318 07 2012       Configuration of the Counting Module       Modulo Loop Counter Mode Configuration    At a Glance    The configuration of a counting module is stored in the configuration constants               The parameters       and c shown in the following tables represent the topologic  addressing of 
132. t for channel 1                        100000000318 07 2012 195    Starting the Application                                                             Pin number Symbol Description   4 IN AorIN B Input for channel 1 or Input for channel 0  5 IN  AUX Input for channel 2   6 IN A Input for channel 2   7 IN  AUX Input for channel 3   8 IN Aor IN B Input for channel 3 or Input for channel 2  9 IN  AUX Input for channel 4   10 IN  A Input for channel 4   11 IN  AUX Input for channel 5   12 IN A or IN B Input for channel 5 or Input for channel 4  13 IN  AUX Input for channel 6   14 IN  A Input for channel 6   15 IN  AUX Input for channel 7   16 IN Aor IN B Input for channel 7 or Input for channel 6  17 24V SEN Return   24 V power supply for sensors  18 VDC VDC   power supply for sensors   19  20 FE Functional earth  for shield continuation             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  click on Rebuild   11 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  
133. tab  on the functional screens of BMX EHC 0800 module  see page 98      What Is in This Chapter   This chapter contains the following topics                                   Topic Page  Adjust Screen for BMX EHC 0800 Counting Module 116  Adjust the Preset Value 118  Adjust the Calibration Factor 119  Modulo Adjust 120  Adjust the Hysteresis Value 121  115       EIO0000000318 07 2012    Counting Module adjusts       Adjust Screen for BMX EHC 0800 Counting Module                                                                               At a Glance  This section presents the adjust screen for BMX EHC 0800 counting module   Illustration  The figure below presents the adjust screen for the BMX EHC 0800 module in  modulo loop counter mode   1 2 3 4 5 6  2 channel generic counter Version  1 00         7     y Run Em 10     BMX EHC 0800      Canfig    Fi Adjust        Debug   e Faut        e ERU       x y y    Gouter      Modol Label Symbol            Vaus   Uni  U   Modulo  m3 0200 0 Modulo VALU   15 15  t     gt    Function   Modulo Loop Courl   Task   MAST ae  module4_E 803                            116   100000000318 07 2012    Counting Module adjusts       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
134. the first labelling point on  the operator screen    Position _1    Pom                                              Numeral current value is greater than Box at the second labelling poini  the Upper Thresholds on the operator screen  Encoder  Counter  High Position _2           FBI_2  RS        First part waiting      EN ENO     RUN Waiting First Part    8 1               RI  Encoder  Sync_Ref_Flag iie       FBI_3  RS      EN ENO      Waiting Other Parts  5 at  Stop                                     100000000318 07 2012         89    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 185   e When Run switches to    1     Waiting First Partis setto    T    e    sensor signal triggers the flag Sync ref flag which resets  Waiting first partto 0 andsetsWaiting other parts       1      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 En
135. 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 4        IN_A input filter    SKWr m c 3   least significant  byte     The least significant byte can take the  following values       0                 1 low       2 medium       3                IN  AUX input filter    SKWr m c 4   least significant  byte     The least significant byte can take the  following values       0                 1 low       2 medium    e 3                Input power supply error    o     KWr m c 2 8    General input output error  bit set to 0   Local  bit set to 1        Scale factor    Wr m c 6  east significant  yte     Tz       Edit  value in the range 1   255        Synchronization edge    SKWr m c 10 8    Rising edge  bit set to 0   Falling edge  bit set to 1        Event  Event number             oe    Wr 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           EIO0000000318 07 2012    111  
136. the upper  threshold value  LOW LIMIT BOOL 5   thecurrent numerical value   read            100000000318 07 2012    161             Standard Symbol Type Bit   Meaning Access    COMPARE STATUS  INT  COUNTER LOW BOOL  O  current counter value less read  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 0 LOW BOOL 13   Value captured in register O   read    is less than lower threshold   LOWER TH VALUE                    CAPT 0 WIN BOOL 14   Value captured in register O   read  is between lower threshold   LOWER TH VALUE  and  upper threshold   UPPER TH  VALUE        CAPT 0 HIGH BOOL  5   Value captured in register O   read  is greater than upper  threshold   UPPER TH VALUE        CAPT 1 LOW BOOL 16            captured in register 1   read  is less than lower threshold   LOWER TH VALUE        CAPT 1 WIN BOOL  7   Value captured in register 1   read  is between lower threshold   LOWER TH VALUE  and                         upper threshold   UPPER TH VALUE   CAPT 1 HIGH BOOL 18            captured in register 1   read  is greater than upper  threshold   UPPER TH VALUE   COUNTER CURRENT   DINT Current counter value during   read  VALUE 51 event           0 VALUE 81 DINT Value captured in register O   read  CAPT 1 VALUE 81 DINT Value captured in register 1
137. ts  335003005   Compare enable m3_0200_0  FUNCTIONS ENABLING    Task   34   QW0 3 0 0 6   Compare suspend m3_0200_0 FUNCTIONS_ENABLING 0        35 WWO 300 1   Modulo flag m3 0200 O COUNTER  STATUS Yes   36  0 309 Modulo rese m3 0200 0 MODULO  RESET     module4 E 0 3                            EIO0000000318 07 2012 125    Debugging the Counting Module       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           126      100000000318 07 2012       Debugging the Counting Module       
138. ty bit at the high level  set to 1  guarantees that the mode will operate  correctly within the limits        EIO0000000318 07 2012    83    BMX EHC 0800 Functionalities       BMX EHC 0800 Module Operation in Dual Phase Counting Mode    At a Glance    The dual phase counting mode is available for channels 0  2  4  and 6  channels 1   3  5 and 7 become inactive   It behaves like the up and down counting mode and  uses up to three physical inputs  It enables simultaneous upcounting and  downcounting     Basic Principle    In the Dual phase counting mode  the counter must be synchronized at least one  time to operate  The current counter value is preset each time the synchronization  occurs  The current counter value can be recorded into the capture0 register when  the condition of synchronization occurs     For further information  you may see the synchronization function  see page 58  and  the capture function  see page 61      The   orce enable software command must be at the high level during the  counting  When this command is at the low level  the last value reported in the  counting register is maintained and the counter ignores the pulses applied to the  IN AandIN    inputs  The counting resumes when the command reverts to the high  level     Counting values vary between the limits  2 147 483 648 and  2 147 483 647  31 bit  word and one sign bit      The preset value is predefined by the user and is contained in the preset value  word  SMDr m c 6   The user may change th
139. ty requirements  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          100000000318 07 2012       Table of Contents          Part      Chapter 1    Chapter 2    Chapter 3    Part Il    Chapter 4    Chapter 5    Safety Information                                 About the                                               Introduction to the BMX EHC 0800 Counting  Function wii ee ee das wy                  General Information on the BMX EHC 0800 Counting                 3a errs   ahd         ay                Rn Fm TR  General Information on Counting                                             Presentation of BMX EHC 0800 Counting Module        General Information about Counting Module                         General Information about the Counting Module Operation             Presentation of the BMX EHC 0800 Counting Module                 Modicon M340H  Hardened                                                Presentation of the BMX EHC 0800 Counting Module  Operation                       eee eee       Overview of BMX EHC 0800 Module Functionalities                   BMX EHC 0800 Counting Module Hardware                1                                          General Rules for Installing BMX EHC 0800
140. unter                   8   FreeLargeCounter  9   PulseWidthModulation  10   UpDownCounting             11   DualPhaseCounting    read       CH_HEALTH    BOOL    0   channel is inactive       1   channel is active    read       ST OUTPUT 0 ECHO    EBOOL    logical state of output 0    read             ST OUTPUT 1 ECHO       EBOOL          logical state of output 1    read          160    E100000000318 07 2012                                                                                  is locked at the lower  threshold value       Standard Symbol Type Bit   Meaning Access  ST OUTPUT BLOCK 0 EBOOL status of physical counting   read  output block 0  ST OUTPUT BLOCK 1 EBOOL status of physical counting   read  output block 1  ST INPUT A EBOOL status of physical counting   read  input A  ST INPUT B EBOOL status of physical counting   read  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 ofthe IN REF   read  input  preset   ST INPUT CAPT EBOOL physical state of IN  CAP read  input  capture   COUNTER STATUS  INT  RUN BOOL 0        counter operates in read  counting mode only  MODULO FLAG BOOL  1 flag set to 1 by a modulo read  switch event  SYNC_REF_FLAG BOOL 2        setto 1 byapresetor read  synchronization event  VALIDITY BOOL 3  the current numerical value   read  is valid  HIGH_LIMIT BOOL 4  the current numerical value   read  is locked at 
141. unter       One shot counter       dual phase counting       Up and down  counting          One of the following conditions     intervals of 5 ms   counter reloading or resetting to O  counting direction change  counter stops   crossing of threshold          56      100000000318 07 2012       BMX EHC 0800 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 an error makes the      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 an error to the  CH ERROR bit by configuring the parameter Input Supply Fault as local  instead of General IO Fault           In all cases  after having executed the READ STS  IODDT VARI1  instruction  the  application provides the  MWr m c 2 and  MWr m c 3 standard status words  including the supply an error information        IODDT VARI is ofthe type T Unsigned CPT BMXOrT Signed CPT BMX     Explicit channel status words    IO Data    The table below presents the composition of the sMWr m c 2 and  MWr m c 3  status words        Status Word Bit position Designation        MWr m c 2 External error at inputs       Internal e
142. vers  its limits   Up and down counting  When the counter  rollovers its limits   Modulo loop counter  When the counter rollovers  the modulo or 0        You can use these 2 flags without declaring any event task in configuration screen   These 2 flag bits are refreshed by the task declared with the module channel  MAST    or FAST task      Operation of the Flag Bits    The synchronization event s flag bit is set to 1 when a counter synchronization    occurs     The modulo event s flag bit can be set to 1      the following counting modes     e Dual phase counting  The flag bit is set to 1 when the counter rollovers its limits    in forward or reverse    e Up and down counting  The flag bit is set to 1 when the counter rollovers its limits    in forward or reverse    e Modulo loop counter  The flag bit is set to 1 when the counter rollovers the    modulo          100000000318 07 2012    63       BMX EHC 0800 Functionalities       Location of the Flag Bits    The following table presents the modulo flag and sync ref flag bits which  are elements of the  TWr m c d status word        Language  object    Standard symbol    Meaning       SIWr m c   0    RUN    The counter operates in one shot mode  only                       IWr m c  MODULO FLAG Flag set to 1 by a modulo switch event  1    IWr m c  SYNC REF FLAG Flag set to 1 by a preset or   2 synchronization event   SIWr m c  VALIDITY The current numerical value is valid   3   SIWr m c  HIGH_LIMIT The current numerical value is 
    
Download Pdf Manuals
 
 
    
Related Search
    
Related Contents
Manual de usuario  Samsung LD190N  Manual - Dupline  User Manual  Handbuch - Aupperle Land  Manual Ética Centro Costarricense de Producción Cinematográfica  Mode d`emploi - Ville de Rezé  Home Decorators Collection 2792305410 Instructions / Assembly    Copyright © All rights reserved. 
   Failed to retrieve file