Clever Ax
Clever Ax
CleverAx
Single-Axis Motion Controller
         Safety Information                                      General Information
                                                                 The manufacturer accepts no liability for any
Persons supervising and performing the electrical
                                                                 consequences resulting from inappropriate, negligent or
installation or maintenance of a Drive and/or its external
                                                                 incorrect installation or adjustment of the optional
Option Unit must be suitably qualified and competent in
                                                                 operating parameters of the equipment or from
these duties. They should be given the opportunity to
                                                                 mismatching the Drive with the motor.
study and if necessary to discuss this User Guide before
work is started.                                                 The contents of this User Guide are believed to be
                                                                 correct at the time of printing. In the interests of a
The voltages present in the Drive and external Option
                                                                 commitment to a policy of continuous development and
Units are capable of inflicting a severe electric shock and
                                                                 improvement, the manufacturer reserves the right to
may be lethal. The Stop function of the Drive does not
                                                                 change the specification of the product or its
remove dangerous voltages from the terminals of the
                                                                 performance, or the contents of the User Guide, without
Drive and external Option Unit. AC supplies should be
                                                                 notice.
removed before any servicing work is performed.
                                                                 All rights reserved. No part of this User Guide may be
The installation instructions should be adhered to. Any
                                                                 reproduced or transmitted in any form or by any means,
questions or doubt should be referred to the supplier of the
                                                                 electrical or mechanical including photocopying,
equipment. It is the responsibility of the owner or user to
                                                                 recording or by any information storage or retrieval
ensure that the installation of the Drive and external Option
                                                                 system, without permission in writing from the
Unit, and the way in which they are operated and maintained
                                                                 publisher.
complies with the requirements of the Health and Safety at
Work Act in the United Kingdom and applicable legislation            Copyright      © November 1995
and regulations and codes of practice in the country in              Control Techniques Drives Ltd
which the equipment is used.
                                                                     Author:            U79
The Drive software may incorporate an optional Auto-                 Part Number:       0400-0003
start facility. In order to prevent the risk of injury to
personnel working on or near the motor or its driven                 Issue Code:        CXNU1
equipment and to prevent potential damage to                         Issue Date:        November 1995
equipment, users and operators, all necessary
precautions must be taken if operating the Drive in this
mode.
The Stop and Start inputs of the Drive should not be relied
upon to ensure safety of personnel. If a safety hazard could
exist from unexpected starting of the Drive, an interlock
that electrically isolates the Drive from the AC supply should
be installed to prevent the motor being inadvertently
started.
                                      7      Diagnostics                           7-1
Contents
                                      8      Configuring CleverAx                  8-1
1     Description               1-1   8.1    Position loop                          8-1
1.1   Main features             1-1   8.2    Manual or internal speed
1.2   Inputs and outputs        1-1          reference selection (Speed mode)       8-1
1.3   Software tools            1-1   8.3    Internal position reference            8-2
1.4   Control functions         1-2   8.4    Digital Lock                           8-3
                                      8.5    Digital Lock trigger and
2     Data                      2-1          Slave Index detection                  8-4
3     Mechanical Installation   3-1   8.6    Speed and position
                                             offset management                      8-5
4     Electrical Installation   4-1   8.7    Electronic cam                         8-6
4.1   Connections               4-1   8.8    PID and position loop                  8-7
RS232c
Host PC 0 1 2 3
                                                                                         RS485             4 5 6 7
                                                                                                           8 9 A B
                                                                                                           C D E F
                                                                           CleverAx
                               Sensor
                                                                                                              Console
                                                                                                              Enclosure
                    Master
                    Encoder
                   Encoder    Motor
                                                              Drive
CleverAx                                                                                                                  1-1
1.4               Control functions                         Digital Lock
                                                            Digital Lock allows the Drive to be synchronized in
Position loop                                               speed and phase with the master axis, using a master
                                                            encoder as reference. A reduction ratio is
Position loop control can be carried out in either of       programmable between –2 and +2, with a
the following ways:                                         resolution of 9 decimal places.
      Proportional and integral with feed-forward
      control                                               The controlled axis can be locked by the following:
      Proportional, integral and differential control              A digital input signal
                                                                   The master encoder index
The card controls the Drive using the torque or
speed input of the Drive.                                          The master encoder index masked from a
                                                                   digital input
                                                                                                       Digital
  Digital input                                                                                        output
                                     Special                                                           RS232
                                     function                                                          interface
                                                                                                       RS485
                                                                                  FF                   interface
                                     Position           Reference
                                     loop               control switch
                                     Position                                      PI                  Speed
                                     controller                                                        demand
                                     Digital
                                     lock
                                     Electronic
                                     cam
  Encoder 1                                                 Feedback
                                                            control
Encoder 2
1-2                                                                                                              CleverAx
                                              Serial interface
2           Data                                 Standard RS232C and RS485
CleverAx                                                                                        2-1
Control modules                                        PLC module
      Motion module                                         Function                Description
      PLC module
                                                       Constant scanning    The time between scanning
      Serial link                                                           cycles can be adjusted
Each module uses a set of parameters. The              Programming                    Relay logic
parameters are organized in logical areas as shown     method
in the following table.                                Type of control            Cyclical operation
                                                       Program memory              Internal EEPROM
Parameter map                                          Maximum number of                 999
                                                       instructions
 Parameters                  Description               Instruction type     High and low level instructions
                                                       Number of inputs                   19
P1 to P49          Motion parameters                   Number of outputs                  8
                                                       Number of internal                224
P50 to P73         PLC special register and            relays
                   PLC flags
                                                       Number of special                  96
                                                       internal relays            (P31
                                                                                   P31, P32 and P73)
                                                                                                P73
P74 to P81         Serial link parameters
                                                       Number of timers                   6
                                                       Number of counters                 3
P84 to P128        User parameters
                                                       Number of data                    46
                                                       registers                 (from P82 to P128)
                                                                                              P128
Parameter loading and saving                           Number of special                   25
                                                       registers             (all PLC and LINK parameters)
 Parameters       Description       Load      Save
                                     bit       bit     Number of Motion                   49
                                                       parameters
P11 to P30     Motion module        Auto      P73.12
                                                       Number of index                    1
               parameters
                                                       registers                        (P80
                                                                                         P80)
P32 to P49
                                                       Number of labels                  100
P73.10         PLC module flag      Auto      P73.12
               parameters
P73.11
P74            Link module          Auto      P73.12
               parameters
P100 to P128   User parameters     P73.19     P73.18
2-2                                                                                                     CleverAx
3           Mechanical Installation
Insert the CleverAx card in a slot of a standard 19"
rack, or panel-mount the card using a standard card
holder having screw terminals.
           Dimensions       mm          in
                                    15
Internal width          a    100   3 /16
                                    1
Height                  b    191   7 /2
                                    11
Height of pillars       c    144   5 /16
                                    3
External width          d    132   5 /16
CleverAx                                               3-1
                                            Connector side A
4          Electrical Installation           Pin      Function       Typ         Description
                                             No                       e
                                            1a     Speed reference    0    Speed reference output
4.1        Connections                             (non inverting)         signal applied to the Drive
                                            2a     Speed reference    0
                                                   (inverting)
                                            3a     AUX analog         0    Auxiliary analog output
                                                   output
                                                   (non inverting)
                                            4a     AUX analog         0
                                                   output
                                                   (inverting)
                                            5a           GND               Ground
                                            6a           +A0          I    Analog input 0
                                                                           (non inverting)
                                            7a           –A0          I    Analog input 0
                                                                           (inverting)
                                            8a           +A1          I    Analog input 1
                                                                           (non inverting)
                                            9a           –A1          I    Analog input 1
                                                                           (inverting)
                                            10a          RLB               Line receiver load resistor
                                            11a          RLA
                                            12a          RX           I    Serial communications line
                                                                           receiver
Figure 4–1    Locations of the connectors   13a          RX           I    Serial communications line
                                                                           receiver (inverting input)
                                            14a           TX          0    Serial communications line
                                                                           transmitter
                                            15a           TX          0    Serial communications line
                                                                           transmitter (inverting
                                                                           output)
                                            16a          +5V          0    Master encoder power
                                                                           supply
                                            17a          GND               Ground
                                            18a         +PhA2         I    Master encoder phase A
                                            19a         –PhA2         I
                                            20a         +PhB2         I    Master encoder phase B
                                            21a         –PhB2         I
                                            22a         +PhC2         I    Master encoder phase C
                                            23a         –PhC2         I
                                            24a          +5V          0    Slave encoder power
                                                                           supply
                                            25a          GND               Ground
                                            26a         +PhA1         I    Slave encoder phase A
                                            27a         –PhA1         I
                                            28a         +PhB1         I    Slave encoder phase B
                                            29a         –PhB1         I
                                            30a         +PhC1         I    Slave encoder phase C
                                            31a         –PhC1         I
                                            32a         +24V          I    CleverAx power supply
CleverAx                                                                                         4-1
Connector side C
Pin No     Function     Typ            Description
                         e
  1c         OUT 1       0    General purpose output
  2c        OUT 2       0     General purpose output
  3c        OUT 3       0     General purpose output
  4c        OUT 4       0     General purpose output
  5c        OUT 5        0    General purpose output
  6c     Servo enable    0    Enable the controlled
                              servodrive
  7c        OUT 7       0     General purpose output
  8c        OUT 8       0     General purpose output
  9c         GND              Ground
  10c        +24V        0    Internally connected to the
                              power supply
  11c         IN 1       I    General purpose input
  12c         IN 2       I    General purpose input
  13c         IN 3       I    General purpose input
  14c         IN 4       I    General purpose input
  15c         IN 5       I    General purpose input
  16c         IN 6       I    General purpose input
  17c         IN 7       I    General purpose input
  18c         IN 8       I    General purpose input
  19c    External        I    Digital lock external trigger
         trigger
  20c    Store Slave     I    Freeze Slave position and
         position             high speed counter P72
  21c    Store Master    I    Freeze Master position and
         position             high speed counter P71
  22c        IN 12       I    General purpose input
  23c        IN 13       I    General purpose input
  24c        IN 14       I    General purpose input
  25c        IN 15       I    General purpose input
  26c        IN 16       I    General purpose input
  27c        IN 17       I    General purpose input
  28c        IN 18       I    General purpose input
  29c    CleverAx        I    CleverAx enable signal
         ENABLE
  30c        GND              Ground
  31c       FAULT        0    Fault monitor terminal
  32c        GND              Ground
4-2                                                           CleverAx
              Master
              encoder
               Slave
              encoder
Servodrive
CleverAx                                       4-3
                                                       PLC instructions
5          Parameters                                  (ladder diagram program)
                                                         Mnemonic      Syntax            Description
CleverAx                                                                                                 5-1
   Mnemonic         Syntax             Description                  Mnemonic           Syntax            Description
RSHW                 RSHW       P2 = Right Shift of P3           WRMEM                WMEM       Writes P8 value into the
(LOGIC RIGHT         P2 P3                                       (Write Expansion )   P8,(512)
                                                                                      P8         Expansion port address
SHIFT WORD)                                                                           Direct     (512)
                                                                                      addressing
MOVW                MOVW        Load immediate
(MOVE WORD)           P8        (P8
                                 P8 = 200000)                    [Address range       WMEM       Writes P8 value at
                    200000                                       1 to 1024]           P8,P100
                                                                                      P8         Expansion port addressed
                                                                                      Indirect   by P100 content
JUMP               JUMP TEST Unconditioned jump to
                                                                                      addressing
                             label (test)
                                                                 RDPAR (Read          RDPAR        Reads the address (13)
START              START        Divides the area for cam
                                                                 parameter area)      P8,(13)
                                                                                      P8           content and store it in P8
                                co-ordinates from the
                                                                                      Direct       eg. if P13 = 255, then P8 =
                                ladder diagram program
                                                                                      addressing   255
XY=                XY=10,10     Cam co-ordinates
                                                                 [Address range       RDPAR        Reads the parameter value
BREAK              BREAK        Divides different cam table      1 to 128]            P8,P100
                                                                                      P8           at the address specified by
END                END          Defines the end of the                                Indirect     P100 and stores it in P8.
                                                                                                                         P8
(END PLC                        program                                               addressing   eg. if P100 = 13 and P13 =
PROGRAM)                                                                                           255, then P8 = 255
ANDST              ANDST        Logic AND between stack          RDPLC                RDPLC        Reads the PLC area address
(LOGIC AND)                     operands                         (Read PLC area)      P8,(200)
                                                                                      P8           (200) content and stores
ORST               ORST         Logic OR between stack                                Direct       it in P8
(LOGIC OR)                      operands                                              addressing   eg. if PLC instruction
SET                SET P32.0 Set bit 1 in P32 at 1 if stack                                        number 200 = 255, then
(SET BIT)                    is true                                                               P8 = 255
RES                RES P32.1    Set bit 1 in P32 at 0 if stack   [Address range       RDPLC        Reads the PLC area address
(RESET BIT)                     is true                          1 to 999]            P8,P100
                                                                                      P8           specified by the P100
                                                                                      Indirect     content and stores it in P8.
                                                                                                                            P8
WRPAR              WPAR         Writes P8 value into                                  addressing
(Write in          P8,(13)
                   P8           parameter area address 13                                          eg. if P100 = 200
parameter area)    Direct                                                                          and PLC instruction
                                eg. if P8 = 128,                                                   number 200 = 255,
                   addressing   then P13 = 128                                                     then P8 = 255
[Address range     WPAR         Writes P8 value into             RDMEM                RDMEM      Reads the Expansion port
1 to 128]          P8,P100      parameter area at the            (Read Expansion)     P8,(512)
                                                                                      P8         address (512) content and
                   Indirect     address specified by the                              Direct     stores it in P8
                   addressing   P100 content.                                         addressing
                                eg. if P8 = 128                  [Address range       RDMEM      Reads the Expansion port
                                and P100 = 13,                   1 to 1024]           P8,P100
                                                                                      P8         address specified by P100
                                then P13 = 128                                        Indirect   content and stores it in P8
WRPLC              WPLC         Writes P8 value into PLC                              addressing
(Write PLC area)   P8,(200)
                   P8           area address (200)
                   Direct       eg. P8 = 128, then PLC
                   addressing   instruction 200 = 128
[Address range     WPLC         Writes P8 value into PLC
1 to 999]          P8,P100
                   P8           area at the address
                   Indirect     specified by the P100
                   addressing   content
                                eg. if P8 = 128 and P100 =
                                200, then PLC instruction
                                number 200 = 128
5-2                                                                                                                    CleverAx
Ladder diagram instructions                                      Mnemonic              Hexadecimal        Effect
                                                                                          code              on
internal code                                                                                             Stack
CleverAx                                                                                                           5-3
 Parameter                    Description                   5.2         Serial Link module
  (and bit)
 P70, P73.7    P70 = Counter 0. P73.7 = 1 during the
               rising edge of the clock
                                                            Reserved parameters
  P71, P73.8   P71 = Counter on rising edge of input 11.     Parameter                    Description
               P73.8 = 1 resets P71
                                                                  P74      Serial communication address*
 P72, P73.9    P72 = Counter on rising edge of input 10.
               P73.9 = 1 resets P72                               P75      Specifies the parameter number
      P73.10   P73.10 = 1 sets PLC program for autoload           P76      Specifies the parameter value
               and autorun                                        P77      Specifies the position of the decimal point
      P73.11   Sampling times: 0 = 1ms, 1 = 0.5 ms                         in the parameter value
      P73.16   Zero Flag for arithmetic and logic                          P78 = 6 indicates acknowledge
               operations                                                  (set by the system)
      P73.17   P73.17 = 1 Start constant scan for PLC       Address format example
               program using parameter P49
                                                                  Set address = 01
               P49 is used only to sample the axis speeds
      P73.18   P73.18 = 1 saves Custom parameters*                H4A = 30 30 31 31     or     P74 = 808464689
      P73.19   P73.19 = 1 loads Custom parameters*                Hexadecimal format           Decimal format
                                                                  (if used)                    (if used)
      P73.27   P73.27 = 1 loads program stored in EEPROM
   P73.28      P73.28 = 1 stores program in EEPROM          When CleverAx is the Master of the system, P74
                                                            contains the address of the Slave module to be
      P73.29   P73.29 = 1 when Stack Error occurs
                                                            connected.
      P73.31   P73.31 = 1 erases stored program
                                                            When CleverAx is the Slave, P74 contains the
      P73.32   P73.32 = 1 executes the stored program
                                                            CleverAx address.
               P73.32 = 0 stops the running program
                                                             Parameter                    Description
* See Parameter map
                                                                  P80      Ladder diagram program instruction
                                                                           pointer (max 999)
                                                                  P81      Instruction pointed by P80
                                                                  P82      Character buffer. Contains the last
                                                                           character received on RS232 serial interface
                                                                P83,       Contains the numerical value that will be
                                                               P73.20      sent to the Serial Link when P73.20 is in
                                                                           transition from 0 to 1
                                                                P84,       Contains the address of the first character
                                                               P73.21      of the alphanumerical string that will be
                                                                           sent to the Serial Link when P73.21 is in
                                                                           transition from 0 to 1
                                                            Parameters P82,
                                                                        P82 P83 and P84 are fully available to
                                                            the user as general purpose registers when the
                                                            RS232 serial link is not used.
5-4                                                                                                             CleverAx
5.3          Motion module                                     Parameter                   Description
                                                                   P35      Position reference 3
The main functions of the Motion module are as
                                                                   P36      Position reference 4
follows:
                                                                   P37      Position reference 5
      Motion control
                                                                   P38      Position reference 6
      Speed control
      Position control                                             P39      Set point speed after digital lock disable
                                                                   P40      Position offset during digital lock
Parameters are used to set the configuration of the                         operations
motion and loop gains for each axis.
                                                                   P44      Position target after digital lock disable
                                                                   P45      Store location for Slave position when
Reserved parameters                                                         enabled the interrupt on the slave index
                                                                            occurrence
 Parameter                      Description
                                                                   P47      Number of the Cam table to be loaded
        P1     Master encoder position
                                                                   P48      Recovery position (monitor the absolute
       P2      Internal absolute position reference                         position )
       P3      Internal speed reference                            P49      PLC program constant scan or speed
       P4      Slave reference value                                        evaluation
       P5      Not used
       P6      Slave position offset
                                                              Description of the motion parameters
       P7      Slave speed offset                             The motion parameters have the following format
       P8      Slave encoder position                         and limits:
       P9      Loop position reference
                                                                  Position parameters
      P10      Position error
                                                                  Length: 32 bits
       P11     Digital lock ratio
                                                                  Maximum value: ±2 147 483 648 counts
      P12      Acceleration ramp                                  Counts = encoder steps × 4
      P13      Deceleration ramp
                                                                  Speed parameters
      P14      Max speed (for P2 and P6 during digital lock
               phasing)                                           Maximum value: 480000 counts per sec
      P15      Main analog output offset
                                                                  Acceleration parameters
      P16      Loop correction limit
                                                                  Expressed in counts per sec2
      P17      Maximum following error ( P32.1 flag )
      P18      Position compare 1 value                       P1
      P19      Position compare 2 value
                                                              Master encoder position
      P20      Position compare 3 value                       This parameter is the Master encoder step 32-bit
      P21      Position compare 4 value                       counter.
      P22      Freeze and store Slave position                The encoder signals from the Master encoder are
      P23      Freeze and store Master position               multiplied by four and stored in this register.
      P24      Master speed                                   This parameter is used in digital lock and cam
      P25      Slave speed                                    applications.
      P26      Manual speed
                                                              P2
      P27      Feed forward, derivative if P32.6 = 1
                                                              Internal absolute position reference
      P28      Proportional gain
                                                              This parameter is a 32-bit register that contains the
      P29      Integral gain
                                                              target position. When selected, the internal
      P30      Emergency position reference                   position references are set as follows:
      P31      Flag bit parameter                                 P31.13 = 0
      P32      Switch bit parameter                               P32.2 = 0
      P33      Position reference 1                               P32.3 = 1
      P34      Position reference 2
CleverAx                                                                                                                 5-5
P3                                                        P9
Internal speed reference                                  Position Loop reference
When the CleverAx is programmed to operate in             This parameter gives the position target value used
speed mode as follows:                                    as the position reference in the input to the control
      P32.2 = 0                                           loop.
      P32.3 = 0
                                                          P10
This parameter becomes the internal speed                 Position error
reference and is programmable to a maximum value
of 480000 counts per sec.                                 This parameter indicates a value which is the
                                                          difference between the position loop reference P9
If the encoder is directly fixed to the motor shaft,      and the actual Slave position P8.
                                                                                        P8
the motor speed is calculated as follows:
                                                          P11
                  P3                   60
Motor speed =          x                                  Digital lock ratio
                  4        Encoder steps per revolution
                                                          When P32.2 = 1, Digital lock is selected. The Slave
P4                                                        position reference P4 is calculated as the Master
Slave reference value                                     encoder position P1 multiplied by the content of P11.
                                                                                                            P11
This parameter is the Slave axis position reference       The ratio can be a value from 0 to 2 as a decimal
that is directly loaded in P9 (loop position              number with 9 decimal places.
reference) when the cam function is disabled
(P32.4
 P32.4 = 1).                                              P11 has to be programmed with the first ten digits of
                                                          the decimal part of the desired ratio value divided
P5                                                        by 10.
5-6                                                                                                     CleverAx
P14                                                    When P32.10 = 1 this parameter stores a position
Maximum speed during digital lock                      value that is compared with the actual position of
phasing                                                the Slave encoder
The slave axis must accelerate to follow the correct   When the actual position becomes greater than the
profile when any of the following conditions occurs:   value programmed in P19,
                                                                            P19 P31.3 = 1.
     P32.2 = 1 (Digital lock enabled)                  P20
     P6 ≠ 0 (Slave position offset enabled)            Position compare 3 value
     P2 ≠ 0 (Internal position reference enabled)
                                                       When P32.11 = 0, this parameter stores a position
The maximum speed during phasing is limited by         value that is compared with the actual position of
P14.
P14                                                    the Master encoder
This parameter sets the maximum following error        When the actual position becomes greater than the
allowed in the specific application.                   value programmed in P21,
                                                                            P21 P31.5 = 1.
The following error is computed as the difference
between the position reference and the actual          P22
position of the controlled axis and is contained in    Freeze and store Slave position
P10.
P10
                                                       Following a low-to-high transition at input 10
When the value of P10 becomes greater than the
                                                       (terminal 20c) the actual Slave position is stored in
value of P17,
         P17 P32.1 = 1.
                                                       P22.
                                                       P22
P18                                                    P23
Position compare 1 value                               Freeze and store Master position
When P32.9 = 0, this parameter stores a position
                                                       Following a low-to-high transition on input 11
value that is compared with the actual position of
                                                       (terminal 21c) the actual Master position is stored in
the Master encoder
                                                       P23.
                                                       P23
When P32.9 = 1 this parameter stores a position
value that is compared with the actual position of     P24
the Slave encoder                                      Master speed
When the actual position becomes greater than the      This parameter indicates the Master encoder speed
value programmed in P18,
                     P18 P31.2 = 1.                    in counts per sampling time
P19                                                    P25
Position compare 2 value                               Slave speed
When P32.10 = 0, this parameter stores a position      This parameter indicates the Slave encoder speed in
value that is compared with the actual position of     counts per sampling time
the Master encoder
CleverAx                                                                                                 5-7
P26                                                   P31
Manual speed                                          Flag bit parameter
This parameter sets the required axis speed in        The bits in this parameter are as follows:
counts per sec when operating in manual mode with:     Parameter                    Description
      P32.2 = 0                                         and bit
      P32.3 = 1                                           P31.1     Servo error
      P31.13 = 1                                          P31.2     Position compare P18
                                                          P31.3     Position compare P19
P27
                                                          P31.4     Position compare P20
Feedforward or derivative gain
                                                          P31.5     Position compare P21
Depending on the setting of P32.6,
                            P32.6 the value
                                                          P31.6     Slave index detect
programmed in this parameter is as follows:
                                                          P31.7     Master index detect
    When P32.6 = 0, P27 is the Feedforward gain
                                                          P31.8     Digital input 9 detect
    When P32.6 = 1, P27 is the loop Derivative gain
                                                          P31.9
P28                                                       P31.10    P31.10 = 0 indicates end of P2 profile
Proportional gain                                                   P31.10 = 1 indicates positioning in progress
                                                          P31.11    P31.11 = 0 indicates end of P6 Profile
P29                                                                 P31.11 = 1 indicates positioning in progress
Integral gain                                             P31.12    P31.12 = 1 indicates Digital Lock is in phase
                                                                    (active only when P32.27 = 0)
P30                                                       P31.13    P31.13 = 1 indicates Manual operation
Emergency position reference                                        P31.13 = 0 indicates Automatic operation
                                                          P31.14    Joystick clockwise
This parameter becomes the position reference
when P32.5 = 0. It is normally used during                P31.15    Joystick anti-clockwise
emergency management.                                     P31.16    Limit switch (automatically managed only
                                                                    when P2 is the position reference)
                                                          P31.17    Limit switch (automatically managed only
                                                                    when P2 is the position reference)
                                                          P31.18    Emergency
                                                          P31.19
                                                         P31.20
                                                          P31.21
                                                          P31.22
                                                          P31.23
                                                          P31.24
                                                          P31.26
                                                          P31.27    Select reference from P33
                                                          P31.28    Select reference from P34
                                                          P31.39    Select reference from P35
                                                          P31.30    Select reference from P36
                                                          P31.31    Select reference from P37
                                                          P31.32    Select reference from P38
5-8                                                                                                       CleverAx
P32                                                            Parameter                   Description
Switch bit parameter                                            and bit
The bits in this parameter are as follows:                       P32.26     Enables trigger on Master index masked by
                                                                            digital input 9
 Parameter                   Description                         P32.27     P32.27 = 0 enables digital lock phasing
  and bit
                                                                 P32.28     P32.28 = 0 enables digital lock ramps
    P32.1     P32.1 = 1 inverts the Slave reference
                                                                 P32.29
    P32.2     P32.2 = 1 enables Digital Lock
                                                                 P32.30
    P32.3     P32.3 = 0 selects source P3
                                                                  P32.31
              P32.3 = 1 selects source P2
                                                                  P32.32    P32.32 = 0 inserts filter (τ = 8ms) for
    P32.4     P32.4 = 0 inserts a cam                                       Derivative or Feedforward control
    P32.5     P32.5 = 0 selects emergency reference
                                                              P33
    P32.6     P32.6 = 0 selects Feedforward gain
                                                              Internal position reference 1
              P32.6 = 1 selects Derivative gain
    P32.7     Not used. P32.7 must always be = 1              A position reference value can be programmed into
                                                              this parameter and the following five Internal
    P32.8     P32.8 = 0 enables S-ramps using P2 as
              position reference
                                                              position reference parameters (P33
                                                                                               P33 to P38).
                                                                                                      P38
                                                              Simple position profiles can be created by selecting
    P32.9     P32.9 = 0 selects Master encoder                all or some of these parameters.
              comparator
              P32.9 = 1 selects Slave encoder comparator      To select P33 set P31.27 at 1.
    P32.10    P32.10 = 0 selects Master encoder
              comparator                                      P34
              P32.10 = 1 selects Slave encoder
                                                              Internal position reference 2
              comparator
                                                              To select P34 set P31.28 at 1.
    P32.11    P32.11 = 0 selects Master encoder
              comparator                                      P35
              P32.11 = 1 selects Slave encoder comparator     Internal position reference 3
    P32.12    P32.12 = 0 selects Master encoder
              comparator
                                                              To select P35 set P31.29 at 1.
              P32.12 = 1 selects Slave encoder                P36
              comparator
                                                              Internal position reference 4
    P32.13    P32.13 = 1 enables Trigger on the Slave
              index                                           To select P36 set P31.30 at 1.
    P32.14    P32.14 = 1 enables Trigger on the Master
              index                                           P37
    P32.15    P32.15 = 1 enables Trigger on digital input 9   Internal position reference 5
              (terminal 19c)
                                                              To select P37 set P31.31 at 1.
    P32.16    P32.16 = 1 enables CleverAx software
    P32.17    Reset                                           P38
    P32.18    Servo OK (input 18 on terminal 28c)             Internal position reference 6
    P32.19    P32.19 = 0 enables S--ramps using P3 as         To select P38 set P31.32 at 1.
              position reference
    P32.20    P32.20 = 0 enables S-ramps using P7 as          P39
              position reference                              Set point speed after digital lock
    P32.21                                                    disable
    P32.22    P32.22 = 0 starts the cam                       At the instant Digital Lock is enabled, P39 is set
    P32.23    P32.23 = 1 selects cam auto stop                equal to the Master encoder speed multiplied by the
    P32.24                                                    ratio programmed in P11.
                                                                                     P11 The value of P39 remains
                                                              unchanged if the Master encoder speed
    P32.25
                                                              subsequently changes or if the ratio is changed.
CleverAx                                                                                                              5-9
If speed or ratio is likely to change when Digital Lock   P47
is enabled, before disabling Digital Lock it is good      Cam table number
practice to load the actual slave encoder speed
value (held in P25)
               P25 into P39.
                           P39                            Contains the number of the cam table to be loaded
                                                          and executed
P40
Position offset during digital lock                       P48
operation                                                 Slave encoder position
This parameter allows a position offset to be added       This parameter is the Slave encoder step counter
to the controlled axis when Digital Lock is enabled.      and contains the absolute position of the Slave.
5-10                                                                                                  CleverAx
                                                           6.4       Serial ports
6             Commissioning
                                                           The RS232 port uses a 9-pin D-type connector for
                                                           connection to a PC for the following purposes:
6.1           Offset adjustment                                  Change parameter values
                                                                 Edit programs
Use the following procedure to set the offset:                   Change configuration
1.     Connect terminal 29c to +24V to enable the          The RS485 port is used for multi-drop systems.
       CleverAx.
                                                           The baud rate for both interfaces is set at 9600.
2.     Set P54.6 and P32.16 at 1 to enable the control
       software.                                           RS232 link
3.     Set P28 at a suitable value proportional gain.
                                                           Use a three-wire screened cable to connect the
4.     Monitor P10 (position error), and adjust P15        CleverAx card to a PC.
       (internal offset) to obtain the lowest value in
       P10.
       P10
6.2           Reset
During commissioning, it may be necessary to reset
the CleverAx card.
CleverAx                                                                                                        6-1
6.5        Start-up procedure                            6.6        Editing a PLC program
1.    Connect the CleverAx card to the PC.               1.    Connect the CleverAx card to the PC.
2.    Insert the diskette containing the CDT file into   2.    Insert the diskette containing the CDT file into
      the floppy diskette drive of the computer.               the floppy diskette drive of the computer.
3. Type CDT <CR> to start the CDT program. 3. Type CDT <CR> to start the CDT program.
4.    Press the F4 key on the keyboard to select         4.    Press the F5 key on the keyboard to select the
      Terminal Emulation.                                      editor
5.    Apply +24V to the CleverAx card. A welcome         5.    Write or edit the program
      message and the prompt ClAx> are displayed.
                                                         6.    Press the F6 key on the keyboard to compile the
Parameters can now be read and modified.                       program. The download function loads the
                                                               program into the CleverAx memory.
6-2                                                                                                     CleverAx
7            Diagnostics
CleverAx enabled
    Red LED 1
       Lit      Hardware enable signal and software enable
                command are present
      Unlit     Hardware enable signal not present or
                software enable command not received
24V supply
 Green LED
       Lit      24V supply applied
      Unlit     24V supply removed
CleverAx                                                     7-1
                                                          8.2      Manual or internal speed
8            Configuring CleverAx
                                                                   reference selection
                                                                   (Speed mode)
8.1          Position loop
                                                          CleverAx can operate in Speed mode to follow an
To evaluate error in the actual position, the position    internal or external speed reference value.
loop requires a position reference held in parameter
P4 to be compared with the motor position.
    P32.19
    Enable
    S ramp       P12
                 Acceleration
                 ramp
    P3           P13               S Ramp
    Internal     Deceleration
    speed        ramp
    reference
    From 8.3
    Internal
    position
    reference                                                                                  Speed and
    Ref P2                                                                                     offset
                                                                                               management
    P31.15
    Joystick                                                                   P32.2           P4
    Anti-        P12                                                           Digital lock    Slave
    clockwise    Acceleration                                                  selector        position
                 ramp                                                                          reference
    P26          P13
    Manual       Deceleration
    speed        ramp
CleverAx                                                                                                    8-1
8.3       Internal position reference
When Digital Lock is disabled, Manual mode is
disabled and P32.3 = 1. P2 then becomes the target
position reference.
 P31.27
 Parameter
 P33 selector
 P31.30
 Parameter
 P36 selector                               Digital lock
 P36
 Internal                                                                                                                Speed and
 position                                                                                                                offset
 reference 4          P3                                                                                                 management
                      Slave speed
 P31.31
 Parameter                                                     P32.2                                                     P4
 P37 selector                                                  Digital lock                                              Slave
                                                               selector                                                  position
                                                                                                                         reference
 P37
 Internal
 position
 reference 5
 P31.32
 Parameter
 P38 selector
 P38
 Internal
 position
 reference 6
8-2                                                                                                                             CleverAx
8.4            Digital Lock
Digital Lock can synchronize a Slave axis to a Master
axis in the following ways:
      Speed ratio
      Position
If the Master is already running, synchronisation is
possible with or without ramps.
                                                                                                     P4
P32.19                                                                                               Slave
Enable                                                                                               position
S ramp             P12                                                                               reference
                   Acceleration
                   ramp
                                                       =
 Position                         P12                       Phased
 phase                            Acceleration                         P31.12
 error                            ramp                                 Digital lock
                                                                       phased
                                  P13
P40                               Deceleration
Position                          ramp
offset during
digital lock
operation                         P14              P32.27
                                  Max speed        Digital lock
                                  during digital   phasing
                                  lock phasing
P44                P2
Position           Internal
target after       absolute
digital lock       position
disable            reference
 Master            P3             P32.3
 encoder           Internal       P2 or P3
 speed             speed          selector
                   reference
CleverAx                                                                                                          8-3
8.5          Digital Lock trigger and
             Slave Index detection
Digital Lock can be enabled in any of the following
ways:
       Setting P32.2 at 1
       Digital input signal (enabled by setting P32.15
       at 1) with a maximum delay of 5µs
       At the first occurrence of the Master encoder
       index (enabled by setting P32.14 = 1)
       At the first occurrence of the Master encoder
       index when digital input IN9 is logic high
       (enabled by setting P32.26 at 0 and P32.14
       at 0)
A pre-/post-trigger function is available using P40.
                                                P40
   P32.14
   Enable
   trigger on
   master
   index
      Master                                                     Enable
      encoder                                                    digital lock
      marker
                              P31.7            P32.26
                              Master           Enable
                              index            trigger on
                              detect           mask master
                                               index             Enable
      IN 9                                                       digital lock
High
                              P31.8            P32.15
                              Digital          Enable
                              input 9 detect   trigger on
                                               digital input 9
                                                                 Enable
                                                                 digital lock
                                               P32.13
                                               Enable
                                               trigger on
                                               slave Drive
                                                                 Enable
      Slave                                                      digital lock
      encoder
      marker
                                                                 P45
                              P31.6                              Store location
                                                                 for slave
                              Slave index
                                                                 position
                              detect
8-4                                                                               CleverAx
8.6        Speed and position offset
           management
    P32.20
    Enable
    S ramp
                  P12
                  Acceleration
                  ramp
    P7                                          S Ramp
    Slave speed   P13
    offset        Deceleration
                  ramp
                                                                            P32.5
                                                                            Emergency
    P32.8                                                                   reference
    Enable                                                                  selector
    S ramp        P12
                  Acceleration
                  ramp
    P6            P13                           S Ramp
    Slave         Deceleration                                                             PID and
    position      ramp                                                      If P32.5 = 1   position loop
    offset                                                                  P30 = P9
                  P14
                  Max speed
                  during digital
                  lock phasing
                                         =               P31.11
                                                         Profile
                                                         terminated
    Position
    reference                                                         Cam
    from
    selection     P4               P32.4
    block         Slave            Insert cam
                  reference
                  value
CleverAx                                                                                                   8-5
8.7          Electronic cam
Electronic cam describes the motion profile of the
Slave, in relation to the position of the Master.
      Position
      reference
      from                                                               Slave position
      selection      P4                                                  counter
                     Slave                                               reference
                     reference
                     value
                                       ds                                     ds
      P32.23                           dt                                     dt
      Select cam
      auto stop
      P32.22
      Enable cam
                                            Master position   Cam table pointer
                                            counter           When Mcp > X(px), px = px+1
                                            reference         When Mcp< X (px-1), px = px-1
                                            (Mpc)
      High
                                            Reset counter
      P47
      Cam table                             Module
      number                                Profile 1
                                            XY = X(1), Y(1)
                                            XY = X(2), Y(2)
                                            XY = X(n), Y(n)
                                            Module
                                            Profile n
                                            XY = X(1), Y(1)
                                            XY = X(2), Y(2)
                                            XY = X(n), Y(n)
8-6                                                                                                    CleverAx
8.8        PID and position loop
                                                                                             P32.32
                                                                                             Insert filter
                                                   Feed-forward
   Speed and
   position                                             Derivative
   offset                                                                P16                                 P15
   management                                                            Output                              Analog offset
                                                   P10                   limit
                       P9                          Position error
                       Position
                       loop                                              P28
                       reference                                         Proportional
                                                                         gain
                                                                                                                         Current
                       P32.16                      P8                                                                    reference
                       Enable                      Slave
                       CleverAx                    encoder
                       software                    position
   CleverAx
   enable
   input IN19
CleverAx                                                                                                                                         8-7
                                                               LABEL
9          Software Tools                                      The label format is as follows:
                                                               |LABEL
9.1        Terminal Emulation mode                         (The pipe character | must be the first character on
                                                           the line.)
           — command syntax
                                                               INSTRUCTION
Write a parameter
                                                           The instruction format is as follows:
Pxxx=value<CR>
                                                               Mnemonic
      P must be a capital letter
                                                               5 characters maximum
      xxx is the parameter number
                                                               10 blank characters maximum
      = is the equal sign
                                                               Capital letter P
      value is the desired setting value for the
      specified parameter                                      Parameter identification
      <CR> is the ENTER key                                The first letter of the mnemonic field must be the
      No spaces are allowed between characters.            first character of the line.
CleverAx                                                                                                     9-1
9.3        How to use the                                  F6 <comp>
           CDT program                                     Press this key to start the ladder diagram program
                                                           compiler
Text editor                                                The file in the editor is compiled. Two files are
                                                           created having the following extensions:
F1 key <new>                                                   .obj
Press this key to erase the loaded file and the                .hex
displayed text. The following message is displayed:        The filename is the same as that of the edited file. If
      THE COMMAND IS <NEW FILE> ARE YOU SURE Y/N ?         the edited file has no name, the compiled files are
                                                           named: NO_NAME.
F2 key <load>
                                                           The file having extension .ldg contains the source
Press this key to open a windows with all the files        code of the ladder diagram program
having extension .ldg listed.
                                                           The file having extension .obj contains the source
F3 key <save>                                              code, the compiled code and the stack value.
Press this key to save the current file. If the current    The file having extension .hex contains the
file has no name, the following message is displayed:      executable compiled code.
      FILE HAS NO NAME, SAVE TO ?
                                                           When compilation is completed, the following
If the file is already named, the file is saved with the   message is displayed:
message:                                                       DOWNLOADING file.ldg Y/N?
      SAVE “filename.ldg”                                      If Y is typed, the code is downloaded into the
F4 key <term>                                                  CleverAx card via the RS232 serial link.
                                                               If N is typed, no action occurs.
Press this key to select Terminal Emulation so that
the CleverAx card can be controlled using the RS232        F7 key <ink>
serial link.
                                                           Press this key allows to change the background
F5 key <editor>                                            colour of the screen.
Press this key to return to the editor from the            F8 key <debug>
Terminal Emulation and Compiler functions.
                                                           Press this key to run the debugger utility. Use the
                                                           arrows keys to modify parameter values.
                                                           F9 key <help>
                                                           Press this key to list descriptions of the function
                                                           keys.
9-2                                                                                                        CleverAx
9.4        How to use the                                F2 key <write>
           CMT program                                   Press this key to write the data into the destination
                                                         CleverAx card using the RS232 serial link.
Use the CMT program to copy automatically the
contents of the memory of one CleverAx card to           The following message is displayed:
the memory of another CleverAx card.                            Connect CleverAx destination and press any
                                                                key when ready
Command screen                                           Press a key. The process starts and the following
                                                         messages are displayed in sequence:
F1 key <read>                                                    >> Set PLC in STOP mode <<
Press this key to load parameter values (1 to 128) and          >> Disable PID loop control <<
PLC instructions (1 to 999) using the RS232 serial              Downloading Parameter area %100
link.                                                           Downloading PLC program %100
                                                                Saving parameter area and PLC instructions
The following message is displayed:
                                                                to EPROM
      Connect the CleverAx source and press any                 Ready for new operation
      key when ready
Press a key. The copy process starts and the             F9 key <help>
following messages are displayed in sequence:            Press this key to list descriptions of the function
      >> Set PLC in STOP mode <<                         keys.
      >> Disable PID loop control <<
      Uploading Parameter area %100                      F10 key <quit>
      Uploading PLC program into buffer                  Press this key to quit the CMT program and return to
      Processing data for Checksum test %100             DOS.
CleverAx                                                                                                       9-3
10            PID Algorithms
Proportional gain
                                        −6
Vout = Step error × KP × 1.192 × 10
Integral gain
     Vout
              = Step error × K |× K 1
      sec
Where:
     K1= 2.328 × 10–3 for 500µs sampling time
     K1= 1.164 × 10–3 for 1ms sampling time
Feed-forward gain
              K2
     K ff =
              VMAX
Where:
     K2 = 58.59 × 106 for 500µs sampling time
     K2 = 29.29 × 106 for 1ms sampling time
     VMAX = Maximum axis speed for 9.155V analog
     output
     VMAX unit is Step ÷ seconds
CleverAx                                           10-1
                                                    CDI 3
11         Applications                             Not used.
                                                    CDI 4
Notes
                                                    Joystick input for clockwise motor rotation
Digital inputs are identified by the
following notation:                                 If the joystick input is on, the speed is set at
     CDI 0 to CDI 18                                500 step/sec. If the joystick is still on the axis after
                                                    2 seconds, the speed will increase to 10,000
Digital outputs are identified by the               step/sec.
following notation:
                                                    When the joystick is released, the axis decelerates to
     CDO 0 to CDO 7                                 zero speed. This gives an inch function.
In the main body of this User Guide, the
                                                    CDI 5
digital inputs are identified as IN 1 to IN 19
and the digital outputs as OUT 1 to OUT 8.          Joystick input for counterclockwise motor rotation
The relationships between the notations             If the joystick input is on, the speed is set at
are as follows:                                     500 step/sec. If the joystick is still on the axis after
     CDI 0 = IN1 = P50.1 = pin 11c                  2 seconds, the speed will increase to 10,000
     CDI 1 = IN2 = P50.2 = pin 12c                  step/sec.
     CDI 18 = IN19 = P50.19 = pin 29c               When the joystick is released, the axis decelerates to
     CDO 0 = OUT1 = P54.1 = pin 1c                  zero speed. This gives an inch function.
     CDO 1 = OUT2 = P54.2 = pin 2c
     CDO 7 = OUT8 = P54.8 = pin 8c                  CDI 6
                                                    Automatic/Manual mode selector.
11.1 Linear Positioner with                         Apply logic 0 for Manual mode of operation.
     Auto Learning                                  Apply logic 1 for Automatic mode of operation.
CleverAx                                                                                               11-1
CDI 9                                                  CDI 16
Homing request.                                        Not used.
The motor rotates until the marker phase of the        Homing output signal.
encoder input of the CleverAx card is activated.
                                                       The output signal alternates between logic 0 and
This is set as position zero.
                                                       logic 1 during the homing procedure. When the
                                                       homing procedure is finished, the output signal is at
CDI 10
                                                       logic 1.
Homing sensor input.
                                                       CDO 1
This input must be normally closed.
                                                       Automatic/Manual mode.
CDI 11                                                     Logic 1 — Automatic mode
Clockwise limit switch input.                              Logic 0 — Manual mode
                                                       CDO 2
CDI 12
                                                       End positioning.
Counterclockwise limit switch input.
                                                       Logic 1 when positioning has finished.
CDI 13
                                                       CDO 3
Emergency stop input.
                                                       Not used.
This input should be connected to a normally closed
contact. When the contacts are opened, the
                                                       CDO 4
emergency procedure is started.
                                                       Not used.
This input is latching. To clear the emergency
condition power must be removed from the
                                                       CDO 5
CleverAx card.
                                                       Drive enable.
CDI 14
                                                       Connect to the Drive Enable input of the Drive.
Ramps selector.
                                                       CDO 6
Apply logic 0 to enable linear ramps.
Apply logic 1 to enable S-ramps.                       Saving position.
11-2                                                                                                CleverAx
Application description                                 Load and execute the program
The effects of this operation are as follows:           1.   At the DOS prompt, type: CDT.
     The motor rotates clockwise at a speed set in      2.   Press F2.
     parameter P26. The Homing output signal
     alternates between logic 0 and logic 1.            3.   Select the file Lin_Pos.Ldg.
                                                                             Lin_Pos.Ldg
     When the axis intercepts the Homing sensor,
     the input signal applied to CDI 10 is logic 0      4.   Press the Enter key.
     (contacts closed). The motor reverses its          5.   The file Lin_Pos.Ldg is displayed in Windows
     rotation and stops when its position                    Notepad.
     corresponds with the encoder c phase (marker
     pulse).                                            6.   Press F6 to start the compiler.
     The axis is in now in position 0. The Homing
     output signal is at logic 1.                       7.   At the prompt Downloading file Y/N? press Y .
Axis positioning                                        15. You may now remove power from the card.
                                                            When power is next applied, the application will
Note                                                        be automatically loaded from memory and run.
CleverAx                                                                                              11-3
                                      Non inverting reference                CDO 0 Homing
                                      Inverting reference                    CDO 1 Auto
                                      AUX analog output non inv              CDO 2 End positioning
                                      AUX analog output invert               CDO 3 Not used
                                      Ground                                 CDO 4 Not used
                                      Analog input 0 non invert              CDO 5 Drive enable
                                      Analog input 0 invert                  CDO 6 Saving position
                                      Analog input 1 non invert              CDO 7 Emergency
                                      Analog input 1 invert                  Ground
                                      RLB                                    +24V
                                      RLA                                    CDI 0
                                      RX                                     CDI 1
                                      RX                                     CDI 2
                                      TX                                     CDI 3 Not used
                                      TX                                     CDI 4 Joy CW
                                      +5V                                    CDI 5 Joy CCW
                                      Ground                                 CDI 6 Auto
                                      +PhA2 Master encoder                   CDI 7 Start motion
                                      -PhA2 Master encoder                   CDI 8 Position learning
                                      +PhB2 Master encoder                   CDI 9 Homing request
                                      -PhB2 Master encoder                   CDI 10 Home sensor
                                      +PhC2 Master encoder                   CDI 11 CW limit
                                      -PhC2 Master encoder                   CDI 12 CCW limit
                   Slave              +5V                                    CDI 13 Emergency
                  encoder
                                      Ground                                 CDI 14 S Ramps
                                      +PhA1 Slave encoder                    CDI 15 Save parameters
                                      -PhA1 Slave encoder                    CDI 16 Not used
                                      +PhB1 Slave encoder                    CDI 17 Drive healthy
                                      -PhB1 Slave encoder                    CDI 18 Enable
                                      +PhC1 Slave encoder                    Ground
                                      -PhC1 Slave encoder                    Fault
                                      +24V                                   Ground
Side A Side C
Figure 11–1 Connections to the CleverAx card for Linear Positioner with Auto Learning
11-4                                                                                                   CleverAx
*Linear Positioner
*Author: Control Techniques Soprel
*Date: 20 October 1993
**********************************
                                                   P73.32   P90.32                       Move word
LD    73.32                                                                              100000000
ANDN P90.32                                                                              P64
MOVW P64                      Set timer
100000000
                                                   P73.32
LD       P73.32                                                                             P90.32
OUT      P90.32
                                                   P73.32
LD       P73.32                                                                             P32.7
OUT      P32.7
                                                   P73.32
LD       P73.32                                                                             P32.3
OUT      P32.3
LD       P73.32                                    P73.32
                                                                                            P54.6
OUT      P54.6
**********************************
                                                   P50.14
LDN      P50.14               Emergency                                                    P31.18
OUT      P31.18
                                                   P32.5    P64.8
LDN      P32.5                                                                             P54.6
AND      P64.8
OUT      P54.8
                                                   P73.32
LD   P73.32                                                                                /P32.16
OUTN P32.16
END                                                                                         END
| NO EMERGENCY
********************************** No_Emergency
**********************************
                                                   P50.10
LD       P50.10                Enable homing                                                P90.10
OR       P90.10                request             P90.10
OUT      P90.10
                                                   P90.10 P32.16 P50.19 P54.6    P90.8     Jump
LD       P90.10               Test for homing                                              HOMING
AND      P32.16               function and jump
AND      P50.19               homing routine
AND      P54.19
ANDN     P90.8
JUMP     HOMING
**********************************
CleverAx                                                                                             11-5
                                                  P50.12
LDN      P50.12              Limit switch CW                                               P31.16
OUT      P31.16
                                                  P50.13
LDN      P50.13              Limit switch CCW                                              P31.17
OUT      P31.17
**********************************                P50.7
LD        P50.7                Automatic/manual                                            P31.13
OUTN P31.13                    selector           P50.7
LD        P50.7                                                                            P54.2
OUT       P54.2                Automatic/
                               Manual LED
**********************************
                                                  P31.10
LD        P31.10               End profiling                                               /P54.3
OUTN P54.3
**********************************
LD        P73.32                                  P73.32   P31.14   P31.15           Move word
ANDN P31.14                    Auto selection                                        4000
ANDN P31.15                    delay                                                 P66
MOVW P66                       Manual speed
4000                           in fast
**********************************
*THUMBWHEEL SWITCH DECODER
                                                  P50.1    P50.2    P50.3    P50.4
LD       P50.1              Code 1                                                        P92.1
ANDN     P50.2
ANDN     P50.3
ANDN     P50.4
OUT      P92.1
                                                   P50.1   P50.2    P50.3    P50.4
LDN      P50.1              Code 2                                                        P92.2
AND      P50.2
ANDN     P50.3
ANDN     P50.4
OUT      P92.2
                                                  P50.1    P50.2    P50.3    P50.4
LD       P50.1              Code 3                                                        P92.3
AND      P50.2
ANDN     P50.3
ANDN     P50.4
OUT      P92.3
                                                  P50.1    P50.2    P50.3    P50.4
LDN      P50.1              Code 4                                                        P92.4
ANDN     P50.2
AND      P50.3
ANDN     P50.4
OUT      P92.4
11-6                                                                                                CleverAx
LD      P50.1             Code 5             P50.1    P50.2    P50.3    P50.4
                                                                                     P92.5
ANDN    P50.2
AND     P50.3
ANDN    P50.4
OUT     P92.5
********************************
*AUTO LEARNING CONTROL
*ONLY IN MANUAL MODE
                                             P31.13   P50.9    P92.1            ADD WORD
LD      P31.13            POSITION 1
AND     P50.9             Auto learning                                         P99+P8 = P33
AND     P92.1
ADDW    P33, P99, P8
********************************
*RESET MULTI VALUE SELECTOR INDEX
                                             P73.32
                                                                                     /P31.27
LD      P73.32
                                             P73.32
OUTN    P31.27            <P31.27>                                                   /P31.28
LD      P73.32                               P73.32
OUTN    P31.28            <P31.28>                                                   /P31.29
LD      P73.32
                                             P73.32
OUTN    P31.29            <P31.29>                                                   /P31.30
LD      P73.32                               P73.32
OUTN    P31.30            <P31.30>                                                   /P31.31
LD      P73.32
                                             P73.32
OUTN    P31.31            <P31.31>                                                   /P31.32
LD      P73.32
OUTN    P31.32            <P31.32>
CleverAx                                                                                       11-7
                                                        P31.13   P50.8    P31.10   P92.2
LDN          P31.13                  Positioner at                                               P31.28
AND          P50.8                   POSITION 2 <P34>
ANDN         P31.10
AND          P92.2
OUTP         P31.28
                                                        P31.13   P50.8    P31.10   P92.3
LND          P31.13                  Positioner at                                               P31.29
AND          P50.8                   POSITION 3 <P35>
ANDN         P31.10
AND          P92.3
OUT          P31.29
                                                        P31.13   P50.8    P31.10   P92.4
LDN          P31.13                  Positioner at                                               P31.30
AND          P50.8                   POSITION 4 <P36>
ANDN         P31.10
AND          P92.4
OUT          P31.30
                                                        P31.13   P50.8    P31.10   P92.5
LDN          P31.13                  Positioner at                                               P31.31
AND          P50.8                   POSITION 5 <P37>
ANDN         P31.10
AND          P92.5
OUT          P31.31
                                                        P31.13   P50.8    P31.10   P92.6
LDN          P31.13                  Positioner at                                               P31.32
AND          P50.8                   POSITION 6 <P38>
ANDN         P31.10
AND          P92.6
OUT          P31.32
END END
**********************************
*HOMING PROCEDURE
                                                                                           HOMING
| HOMING
END END
**********************************
11-8                                                                                                      CleverAx
*PARAMETER RESET
| RESET_PAR                                                           REST_PAR
                                                   P73.32
LD   P73.32                                                                   /P32.16
OUTN P32.16
                                                   P73.32
LD   P73.32                                                           ADD WORD
ADDW P54, P99, P99                                                    P99+P99 = P54
                                                   P90.10
LD   P73.32                                                           ADD WORD
ADDW P90, P99, P99                                                    P99+P99 = P90
                                                   P73.32
LD   P73.32                                                                   /P31.6
OUTN P31.6
                                                   P73.32
LD       P73.32                                                               P90.16
OUT      P90.16
                                                   P73.32
LD       P73.32                                                               P90.17
OUT      P90.17
END END
**********************************
*POSITIONS SAVING PROCEDURE
LD       P73.2                                     P73.2
                                                                              P54.7
OUT      P54.7
END END
**********************************
CleverAx                                                                                11-9
11.2 Digital lock                                        CDI 12
                                                         Increase position offset.
This is a digital lock application with programmable
ratio between master and slave. Features are as          When logic 1 is applied, an offset will be added to
follows:                                                 the actual slave speed. This increments position
      Ratio is programmable by a thumbwheel switch       offset between the master and slave axes.
      or external PLC.
      Lock                                               CDI 13
      Unlock                                             Decrease position offset.
      Two different lock modes (with or without
      phasing recover)                                   When logic 1 is applied, an offset will be subtracted
                                                         to the actual slave speed. This decrements position
      Linear or S-ramp during the phasing lock
                                                         offset between the master and slave axes.
Inputs                                                   CDI 14
CDI   0                                                  Ramps selector.
CDI   1
                                                         Apply logic 1 to select linear ramps.
CDI   2
CDI   3                                                  Apply logic 0 to select S-ramps.
CDI 10
Digital lock enable.
CDI 11
Line speed selection.
11-10                                                                                                  CleverAx
Outputs                                                          Speed
CDO 1 Time
CDO 2                                                            Speed
                                                                                                     Speed set by
Supplies digit 1 of the thumbwheel switch during                                                     P14
                                                                                                                       Master speed
digit scan.                                                                                 b
CDO 3                                                                     a
                                                                                       Slave speed
Not used.
CDO 4
Not used.                                                                Area a = area b                                  Time
CDO 5
                                                                Figure 11–3          Digital lock with linear ramps —
Drive enable output                                                                  phase locked
CDO 6
Logic 1 when the slave axis is in phase with the master axis.    Speed
CleverAx                                                                                                                    11-11
         Master
        encoder
         Slave
        encoder
Servodrive
11-12                                                  CleverAx
                                                                            CDO 0 Power switch 3&5
                                                                            CDO 1 Power switch 2&4
                                                                            CDO 2 Power switch 1
                                                                            CDO 3 Not used
                                                                            CDO 4 Not used
                                                                            CDO 5 Drive enable
                                                                            CDO 6 Phased
                                                                            CDO 7 Emergency
                                                                            Ground
                                                                            +24V
                                                                            CDI 0 Switch 4&5
                                                                            CDI 1 Switch 4&5
                                                                            CDI 2 Switch 4&5
                                                                            CDI 3 Switch 4&5
                                                                            CDI 4 Switch 2&3
                                                                            CDI 5 Switch 2&3
                                                                            CDI 6 Switch 2&3
                                                                            CDI 7 Switch 2&3
                                                                            CDI 8 Switch 1
                                                                            CDI 9 Switch 1
                                                                            CDI 10 Digital lock enable
           Following error                                                  CDI 11 Line sped selection
                                                                            CDI 12 -Position offset
                                                                            CDI 13 +Position offset
                                                                            CDI 14 S Ramp
                                                                            CDI 15 Link to CDO 0
                                                                            CDI 16 Link to CDO 1
                                                                            CDI 17 Autophase enable
       Phase 1                                                              CDI 18 Enable
                                                                            Ground
                                                                            Fault
                                                                            Ground
+24V Side C
Figure 11–7 Side C connections to the CleverAx card for Digital Lock
CleverAx                                                                                              11-13
Digital lock
Author: Control Techniques Soprel
Date: 5 November 1993
**********************************
*SETUP
**********************************
                                     P54.6      JUMP
LD       P54.6
                                                SETUP_OK
JUMP SETUP_OK
**********************************
*SET MAXIMUM DELTA ERROR
**********************************            MOVE WORD
                                     P73.32
LD       P73.32                               512
MOVW P17                                      P17
512
**********************************
*
*LOAD 4096 IN P82
*
*SPEED FOR SPACE OFFSET
*
*CONTROLLER STEP / SEC.
*
**********************************
                                     P73.32   MOVE WORD
LD       P73.32
                                              4096
MOVW P82
                                              P82
4096
**********************************
*
*LOAD 10000 IN P83
*
*BASE SPEED STEPS / SEC.
*
**********************************
                                     P73.32   MOVE WORD
LD       P73.32
                                              10000
MOVW P83
                                              P83
10000
**********************************
*LOAD 256 IN P88
**********************************
                                     P73.32   MOVE WORD
LD       P73.32
                                              256
MOVW P88
                                              P88
256
**********************************
*LOAD 256 IN P89
**********************************
                                     P73.32   MOVE WORD
LD       P73.32
                                              256
MOVW P89
                                              P89
256
**********************************
*LOAD 16 IN P90
**********************************            MOVE WORD
LD       P73.32                      P73.32
                                              16
MOVW P90                                      P90
16
**********************************
*
*LOAD 15 IN P96
*
*MASK INPUT
*
*D10, D11, D12, D13
*
**********************************
11-14                                                      CleverAx
                                     P73.32            MOVE WORD
LD        73.32
                                                       15
MOVW P96
                                                       P96
15
**********************************
*
*LOAD 240 IN P97
*
*MASK INPUT
*
*D14, D15, D16, D17
*
**********************************                     MOVE WORD
LD        73.32                      P73.32
                                                       240
MOVW P97                                               P97
240
**********************************
*LOAD 768 IN P98
**********************************
LD        73.32                      P73.32            MOVE WORD
                                                       768
MOVW P98
                                                       P98
768
**********************************
*SET SWITCH BIT
**********************************   P73.32                   SET
LD        P73.32                                             P54.6
SET       P54.6
                                     P73.32                   SET
LD       P73.32
                                                             P32.27
SET      P32.27
                                                             RESET
                                     P73.32
LD       P73.32                                              P32.3
RES      P32.3
                                                       SETUP_OK
|SETUP_OK
**********************************
*
*CleverAx OK
*
**********************************   P73.32   P50.19
LD        P73.32                                             P32.16
AND       P50.19
OUT       P32.16
**********************************
*THUMBWHEEL SWITCH DECODER
*
*READING FIRST NUMBER
*P91 = (P50 AND P96)
*P99 = 100000
*P91 = P91*P99
**********************************
                                     P50.16            AND WORD
LD        P50.16
                                                       P96 AND P50
ANDW P91, P96, P50
                                                       = P91
LD     P50.16
                                     P50.16            MOVE WORD
MOVW P99
                                                       100000
100000
                                                       P99
LD   P50.16
                                     P50.16            MULTIPLY
MULW P91, P91, P99
                                                       WORD
                                                       P91*P99 = P91
**********************************
*READING SECOND NUMBER
*
*P92 = (P50 AND P96)
*
*P99 = 1000000
*P92 = P92*P99
**********************************
CleverAx                                                               11-15
                                     P50.17   AND WORD
LD   P50.17
                                              P96 AND P50
ANDW P92, P96, P50
                                              = P92
LD     P50.17                        P50.17   MOVE WORD
MOVW P99                                      1000000
1000000                                       P99
                                     P50.17   MULTIPLY
LD       P50.17
                                              WORD
MULW P92, P92, P99
                                              P92*P99 = P92
**********************************
*READING THIRD NUMBER
*P93 = (P50 AND 097) >>4
*P99 = 10000000
*P93 = P93*P99
**********************************            AND WORD
LD       P50.16                      P50.16
                                              P97 AND P50
ANDW P93, P97, P50
                                              = P93
LD   P50.16                          P50.16   DIVIDE WORD
DIVW P93, P93, P90                            P93 : P90 = P93
LD     P50.17
                                     P50.17   MOVE WORD
MOVW P99
                                              100000000
100000000
                                              P99
LD       P50.17                      P50.17   MULTIPLY
MULW P94, P94, P99                            WORD
**********************************            P94 * P99 = P94
*READING FIFTH NUMBER
*P95 = (P50 AND P98) >>8
*P99 = 1000000000
*P95 = P95*P99
**********************************
LD       P73.32                      P73.32   AND WORD
ANDW P95, P98, P50                            P98 AND P50
                                              = P95
LD   P73.32
DIVW P95, P95, P89                   P73.32   DIVIDE WORD
                                              P95 : P89 = P95
LD     P73.32
MOVW P99                             P73.32   MOVE WORD
1000000000                                    1000000000
                                              P99
LD   P73.32
MULW P95, P95, P99                   P73.32   MULTIPLY
                                              WORD
LD   P73.32                                   P95 * P99 = P95
RSHW P88, P88                                 SHIFT RIGHT
                                     P73.36
                                              WORD
LDN  P88.2                                    P88 = >
JUMP NO_COMPUTO                      P88.2
                                              JUMP
                                              NO_COMPUTO
11-16                                                           CleverAx
**********************************
*COMPUTING RATIO
*IF (TIMER P64 = 0)
*{
*P11 = P87
*}
*P86 = P87 P86 IS P87 (T-1)
*P87 = 0
*P87 = P87+P91
*P87 = P87+P92
*P87 = P87+P93
*P87 = P87+P94
*P87 = P87+P95
**********************************
                                     P73.1    ADD WORD
LD       P73.1
                                              P85 + P87 = P11
ANDW P11, P85, P87
LD       P88.2
LD       P88.2
LD       P88.2
LD       P88.2
LD       P88.2
                                     P88.2    ADD WORD
ADDW P87, P87, P91                            P87 + P91
                                              = P87
ADDW P87, P87, P92                            ADD WORD
                                              P87 + P92
                                              = P87
                                              ADD WORD
ADDW P87, P87, P93                            P87 + P93
                                              = P87
                                              ADD WORD
ADDW P87, P87, P94                            P87 + P94
                                              = 987
                                              ADD WORD
ADDW P87, P87, P95                            P87 + P95
**********************************            = P87
*IF (P86<>P87)
*{
*P64 = 12000
*}
**********************************
                                     P73.32   SUBTRACT
LD       P73.32
                                              WORD
SUBW P99, P86, P87
                                              P86 - P87 = P99
**********************************
NO_COMPUTO
**********************************            MOVE WORD
LD       P88.2                       P88.2
                                              65536
MOVW P88                                      P88
65536
CleverAx                                                        11-17
LD       P88.9              Multiplexing        P88.9
                                                                          P54.1
OR       P88.8              output to enable    P88.8
OR       P88.7              thumbwheel switch
OUT      P54.1                                  P88.7
LD       P88.6                                  P88.6
                                                                          P54.2
OR       P88.5                                  P88.5
OR       P88.4
OUT      P54.2                                  P88.4
LD       P73.32                                 P88.9
                                                                          P54.1
OUT      P54.3
**********************************
*
*Enable/disable D. lock
*
**********************************                                         SET
LD       P50.11                                 P50.11
                                                                          P32.27
SET      P32.2
                                                                           RESET
LDN      P50.11                                 P50.11
                                                                          /P32.27
RES      P32.2
**********************************
*
*Enable space auto phase
*
**********************************                                         SET
LDN P50.18                                      P50.18
                                                                          P32.27
SET      P32.27
                                                                           RESET
LD       P50.18                                 P50.18
                                                                          P32.27
RES      P32.27
**********************************
*
*Enable S ramp
*
**********************************
                                                P50.15
LD       P50.15                                                           P32.19
OUT P32.19
**********************************
*
*Slave speed after D.lock disable
*
**********************************
                                                P32.2    P51.2      ADD WORD
LDN P32.2
                                                                    P85 + P84 = P3
ANDN P51.2
ADDW P3, P85, P84
LD       P32.2                                  P32.2
                                                                          P51.2
OUT P51.2
**********************************
*
*Slave speed selector
*
**********************************                                ADD WORD
LD       P50.12                                 P50.12
                                                                  P83 + P85 = P84
ADDW P84, P83, P85
                                                P50.12           ADD WORD
LDN  P50.12                                                      P85 + P85 = P84
ADDW P84, P85, P85
11-18                                                                                CleverAx
**********************************
*
*Slave SPACE OFFSET
*
**********************************                                                      ADD WORD
LD         P50.13                                   P30.13
                                                                                        P85 + P82 = P7
ADDW P7, P85, P82
**********************************
*
*Digital lock phased
*
**********************************
LD        P31.12                                    P31.12
                                                                                                P54.7
OUT       P54.7
**********************************
*
*Maximum following error
*
**********************************
LD        P31.1                                     P31.1
                                                                                                P54.8
OUT       P54.8
                                                                                       END
END
                                                             CDO 2
Inputs
                                                             This output goes to logic 1 when a time-out error
CDI 0                                                        occurs when sending data to the slave Drive.
                                                                 Time-out error occurs when data transmission
Apply logic 0 to enable digital lock.                            is longer then 300msec.
      The CleverAx card sends the speed read from
      the master Drive to the slave Drive. The               CDO 3
      programmed ratio is applied.
                                                             This output goes to logic 1 when a time-out error
                                                             occurs when receiving data to the master Drive.
                                                                 Time-out error occurs when data transmission
                                                                 is longer than 300msec.
CleverAx                                                                                                  11-19
Application description                                   7.   Load Pr64 (Down-timer counter) of the Drive
                                                               with a value of 500 cycles. (This gives a
                                                               duration of 250msec.)
Serial link
                                                          8.   Set the Slave Drive address (2) at
CleverAx has two serial communications channels as
                                                               H4A = 30303131
follows:
                                                               (where H4A is Pr74 in hexadecimal)
     RS232 interface                                      9.   Set parameter Pr75 at 0 in order to send the
     Used for programming, writing application                 motor speed to the slave Drive.
     programs and communicating with a keypad or
     microterminal.                                       10. Set parameter Pr78 at 1 (Start reading).
1.   Load Pr64 (Down-timer counter) of the Drive          5.   The file LINK.LDG is displayed in Windows
     with a value of 500 cycles. (This gives a                 Notepad.
     duration of 250msec.)                                6.   Press F6 to start the compiler.
2.   Set the master Drive address (2) at                  7.   At the prompt Downloading file Y/N? press Y .
     H4A = 30303232
     (where H4A is Pr74 in hexadecimal)                   8.   When loading has finished press F5 followed by
                                                               F4.
3.   Set parameter Pr75 at 59 in order to read the
     motor speed.                                         9.   Check that P73.32 = 0 and P32.16 = 0.
4.   Set parameter Pr78 at 4 to start reading the         10. Set P73.10 at 1 (Autostart flag).
     motor speed.
                                                          11. Set P73.12 at 1 (Save parameters).
5.   The program now performs a scan of the values
     of Pr78 and Pr64.
                  Pr64 If the data reception is           12. Wait until both red LEDs become unlit.
     complete (Pr78
                 Pr78 = 6) before the time limit set in   13. Set P73.28 at 1 (Save program).
     Pr64,
     Pr64 output CD0 3 will remain at logic 0. If
     the data is not received in this time, output        14. Wait until both red LEDs become unlit.
     CD0 3 will go to logic 1.
                                                          15. You may now remove power from the card.
6.   When input CDI 0 is at logic 1, no other                 When power is next applied, the application will
     operation will occur. When input CDI 0 is at             be automatically loaded from memory and run.
     logic 0, the program computes the speed (Pr76
                                               Pr76
     × ratio) to send to the slave Drive.
11-20                                                                                                    CleverAx
                                            Non inverting reference                     CDO 0 Sending data
AUX analog output non inv CDO 2 Time out writing error
Ground CDO 4
RLB +24V
RX CDI 1
RX CDI 2
TX CDI 3
TX CDI 4
+5V CDI 5
Ground CDI 6
+5V CDI 13
Ground CDI 14
+24V Ground
Side A Side C
Figure 11–8 Connections to the CleverAx card for digital lock using the serial link
CleverAx                                                                                                 11-21
**********************************
*Digital speed lock using the serial link
*Author: Control Techniques Soprel
*Date: 15 December 1993
**********************************
                                                    P98.31                             JUMP
LD    P98.31                                                                           NO_SET
JUMP NO_SET
**********************************
*
*MAIN LOOP PROGRAM
*
*
**********************************
**********************************
*
*READ MASTER SPEED
*
*
**********************************
                                                    P98.32   P98.7   P98.9     JUMP
LDN P98.32
                                                                               RX_MASTER_SPEED
ANDN P98.7
ANDN P98.9
JUMP RX_MASTER_SPEED
**********************************
*WRITE SLAVE SPEED
**********************************                                             JUMP
LD       P98.32                                     P98.32   P98.7   P98.9
                                                                               TX_SLAVE_SPEED
ANDN P98.7
ANDN P98.9
JUMP TX_SLAVE_SPEED
|NO_TX_SLAVE_SPEED
                                                                             NO_TX_SLAVE_SPEED
**********************************
*RX AKNOWLDGE
**********************************
11-22                                                                                              CleverAx
**********************************
*RX AKNOWLDGE
**********************************
LD       P98.7                                  P98.7
                                                                  /P54.1
LD       P98.7
LD       P98.7
OUTN P54.1                                                        P54.2
OUT P54.2                                                       JUMP
JUMP RX_OK                                                      RX_OK
**********************************
*TX AKNOWLDGE
**********************************
                                                P98.9
LD       P98.9                                                    /P54.2
LD       P98.9
LD       P98.9
                                                                  P54.1
OUNT P54.2
OUT P54.1                                                       JUMP
JUMP TX_OK                                                      TX_OK
END                                                             END
**********************************
*END MAIN LOOP PROGRAM
**********************************
**********************************
*READ MASTER SPEED
**********************************
|RX_MASTER_SPEED                                         RX_MASTER_SPEED
LD       P73.32                                 P73.32
                                                                  P98.32
OUT      P98.32
                                                                END
END
CleverAx                                                                   11-23
**********************************
*WRITE SLAVE SPEED
**********************************
|TX_SLAVE_SPEED                                                      TX_SLAVE_SPEED
LD   P73.32                      P102 = (P76*256)
MULW P102 P108 P76                                          P73.32    MULTIPLY WORD
                                                                      P108*P76 =
                                                                      P102
LD   P73.32                      P102 = P102*RATIO                    MULTIPLY WORD
                                                            P73.32
MULW P102 P102 P110                                                   P102*P110 =
                                                                      P102
LD   P73.32                      P102 = P102+DECIMAL PART   P73.32    ADD WORD
ADDW P102 P102 P105                                                   P102+P105 =
                                                                      P102
LD   P73.32                                                 P73.32
                                                                              /P98.32
OUTN P98.32
                                                                           END
END
11-24                                                                                   CleverAx
**********************************
*TEST FOR DRIVE AKNOWDGE DURING TX
**********************************
|TX_OK                                                                   TX_0K
LD     P78.1      IF P78 = 3
                                     P78.1    P78.2    P78.3   P78.4
AND    P78.2                                                             P98.10
ANDN   P78.3
ANDN   P78.4
OUT    P98.10
                                     P73.1                               RESET
LD     P73.1      IF TIMER P64 = 0                                       P98.9
OR     P98.10     OR P78 = 3
RES    P98.9                         P98.10
                                                                       END
END
**********************************
*TEST FOR DRIVE AKNOWDGE DURING RX
**********************************
|RX_OK
                                                                         RX_0K
                                                                       END
END
CleverAx 11-25