YOKOGAWA POSITIONING MODULE PLC-01e by crisentena5992

VIEWS: 53 PAGES: 268

									Technical       Introduction to
Information     Programming for
                Positioning Modules
TI34M6K01-01E




                                        TI34M6K01-01E
                                      2004.9.20 1st Edition
CONTENTS
                 1.    Overview Of Positioning Control.............................................................1
                       1.1     What is Positioning Control? ................................................................. 1
                       1.2     Examples of Positioning Control............................................................ 1
                       1.3     Examples of Drive Mechanisms ............................................................ 3
                       1.4     Servo Systems ...................................................................................... 6
                       1.5     Machine Configurations for Positioning Control .................................... 7
                       1.6     Principle of Servo Systems.................................................................... 9
                       1.7     Types of Positioning Control................................................................ 10
                       1.8     Speed Control...................................................................................... 11
                       1.9     Absolute Positioning and Incremental Positioning............................... 11
                       1.10    Speed Profiles of Positioning Actions .................................................. 12
                 2.    Types of FA-M3 Positioning Modules and their Features .....................14
                       2.1     Positioning Module Models F3NC01-0N (1 axis) and F3NC02-0N
                               (2 axis)................................................................................................. 16
                       2.2     Positioning Module (with pulse output) Models F3NC11-0N and
                               F3NC12-0N ......................................................................................... 19
                       2.3     Positioning Module (with analog voltage output) Models F3NC51-
                               0N and F3NC52-0N............................................................................. 26
                       2.4     Positioning Module (with multi-channel pulse output) Models
                               F3YP04-0N and F3YP08-0N ............................................................... 33
                       2.5     Positioning Module (with multi-channel pulse output) Models
                               F3YP14-0N and F3YP18-0N ............................................................... 35
                 3. Sample Programs for Positioning Modules...........................................41
                       3.1     System Example.................................................................................. 41
                       3.2     Sample Programs for F3NC02-0N Module.......................................... 42
                               3.2.1     F3NC02-0N Operation Procedure...................................................... 42
                               3.2.2     Calculation of Registered Parameters ............................................... 44
                               3.2.3     Reading Module Status ...................................................................... 48
                               3.2.4     Registering Parameters...................................................................... 50
                               3.2.5     Reset Error ......................................................................................... 55
                               3.2.6     Jogging ............................................................................................... 57
                               3.2.7     Origin Search...................................................................................... 60
                               3.2.8     PTP Movement (execution by direct command) ................................ 62
                               3.2.9     PTP Movement (execution by number command)............................. 67
                               3.2.10 2-axis Linear Interpolation Movement (execution by direct
                                      command) .......................................................................................... 72
                               3.2.11 Pattern Operation (and 2-axis linear interpolation) ............................ 76
                       3.3     Sample Programs for F3NC12-0N ...................................................... 81
                               3.3.1     F3NC12-0N Operation Procedure...................................................... 81
                               3.3.2     Calculation of Registered Parameters ............................................... 82
                               3.3.3     Reading Module Status ...................................................................... 84
                               3.3.4     Registering Parameters...................................................................... 86
                               3.3.5     Reset Error ......................................................................................... 89




TI 34M6K01-01E                                                                                                                                        i
           3.3.6     Jogging ............................................................................................... 91
           3.3.7     Origin Search...................................................................................... 95
           3.3.8     PTP Movement................................................................................. 101
           3.3.9     Linear Interpolation Movement......................................................... 108
           3.3.10 En-route Operation............................................................................113
           3.3.11 Circular Interpolation .........................................................................117
     3.4   Sample Programs for F3NC52-0N .................................................... 123
           3.4.1     F3NC52-0N Operation Procedure.................................................... 123
           3.4.2     Calculation of Registered Parameters ............................................. 124
           3.4.3     Reading Modules Status .................................................................. 127
           3.4.4     Registering Parameters.................................................................... 129
           3.4.5     Reset Error ....................................................................................... 133
           3.4.6     Servo ON.......................................................................................... 135
           3.4.7     Jogging ............................................................................................. 137
           3.4.8     Origin Search.................................................................................... 142
           3.4.9     PTP Movement................................................................................. 149
           3.4.10 Linear Interpolation Movement......................................................... 157
           3.4.11 En-route Operation........................................................................... 162
           3.4.12 Circular Interpolation ........................................................................ 166
     3.5   Program Examples for F3YP08-0N ................................................... 173
           3.5.1     F3YP08-0N Operation Procedure .................................................... 173
           3.5.2     Calculation of Registered Parameters ............................................. 174
           3.5.3     Reading Module Status .................................................................... 175
           3.5.4     Registering Parameters.................................................................... 176
           3.5.5     Reset Error ....................................................................................... 178
           3.5.6     Jogging ............................................................................................. 180
           3.5.7     Origin Search.................................................................................... 184
           3.5.8     PTP Movement................................................................................. 190
           3.6.9     Linear Interpolation Movement......................................................... 197
     3.6   Sample Programs for F3YP18-0N ..................................................... 203
           3.6.1     F3YP18-0N Operation Procedure .................................................... 203
           3.6.2     Calculation of Registered Parameters ............................................. 205
           3.6.3     Reading Module Status .................................................................... 208
           3.6.4     Registering Parameters and Saving to Flash Memory .................... 210
           3.6.5     Reset Error ....................................................................................... 215
           3.6.6     Jogging ............................................................................................. 217
           3.6.7     Origin Search.................................................................................... 221
                     3.6.7-1 Origin Search ..................................................................... 221
                     3.6.7-2 Automatic Origin Search..................................................... 227
           3.6.8     PTP Movement................................................................................. 231
           3.6.9     Linear Interpolation Movement......................................................... 239
           3.6.10 Changing Target Speed.................................................................... 243




ii                                                                                                              TI 34M6K01-01E
                 Appendix A List of Input/Output Relays and Module Data..........................249
                      A1     F3NC01-0N/F3NC02-0N ................................................................... 249
                      A2     F3NC11-0N/F3NC12-0N.................................................................... 252
                      A3     F3NC51-0N/F3NC52-0N ................................................................... 254
                      A4     F3YP04-0N/F3YP08-0N .................................................................... 258
                      A5     F3YP14-0N/F3YP18-0N .................................................................... 260
                 Appendix B Mapping of Parameters Between New and Old Yp Models .....263
                      B.1    Mapping of Parameters Between New and Old YP Models .............. 263




TI 34M6K01-01E                                                                                                         iii
                                                                                  1. Overview of Positioning Control




1.                  Overview of Positioning Control
1.1                 What is Positioning Control?
                    Positioning Control moves an object to a specified target position at a specified
                    speed.


1.2                 Examples of Positioning Control
                 ● Specified-length Sheet Cutting
                   A sheet is moved in the direction of the arrow so that a specified length is cut off. This
                   application requires control of the travel distance, as well as the starting and stopping
                   of the motor.




                    Figure 1.1   Specified-length Sheet Cutting



                 ● Index Table
                   An index table is rotated so that parts are moved to a robot arm to be picked up. The
                   application requires control of the motor to move a part through a fixed distance, to
                   stop movement and to repeat the operation.




                    Figure 1.2   Index Table



TI 34M6K01-01E                                                                                                    1
                                                                   1.   Overview of Positioning Control


    ● X-Y Table
      An arm is moved horizontally to any location on a table. This application requires
      control of the motors of the X and Y axes to travel through the required distance along
      the axis, to rotate and to stop. It also requires the arm to move along a slanting line or
      a curve (linear interpolation and circular interpolation).




                                      Y


                                                        X




       Figure 1.3    X-Y Table




2                                                                                         TI 34M6K01-01E
                                                                                      1. Overview of Positioning Control



1.3                Examples of Drive Mechanisms
                   Many types of mechanisms for driving a load using servo systems are available for
                   selection to suit different control purposes such as positioning accuracy, feed
                   accuracy, travel and mechanical movements involved. Some examples are described
                   in this section.


                 ● Ball Screw

                                                          Moving part




                     Lead of ball screw




                                                            Axle ratio                Servomotor


                   Figure 1.4     Ball Screw

                   The ball screw drive mechanism is typically used for high accuracy positioning with
                   relatively short travel. The smaller the lead of the ball screw, the higher is the
                   accuracy but the slower the feed speed.

                 ● Rack and Pinion


                                                  Moving part




                                           Rack




                                                        Pinion




                                                                         Axle ratio   Servomotor



                   Figure 1.5     Rack and Pinion

                   Rack and pinion drive mechanism is used in positioning applications requiring
                   relatively longer travel. In most cases, the pinion is fixed while the rack is movable,
                   but in some cases, the rack is fixed while the pinion end, including the motor, moves.




TI 34M6K01-01E                                                                                                        3
                                                                      1.   Overview of Positioning Control


    ● Timing Belt

                                        Moving part
              Timing belt




            Timing pulley



                                     Axle ratio                 Servomotor


      Figure 1.6    Timing Belt

      The timing belt drive mechanism finds wide applications, ranging from large carrier
      machines to precision instruments. Unlike V-belts and flat belts commonly used in
      general purpose motors, timing belts have teeth on the pulley and belt and hence
      experience no errors due to slippage. Depending on the belt material, however,
      maintenance is required to take care of wear and reduced accuracy due to aging.
      A similar drive mechanism is the chain and sprocket wheel mechanism.

    ● Roll Feeding


                                   Feed roll




                                                                                        Work (material)




                                                         Axle ratio                      Servomotor

      Figure 1.7    Roll Feeding

      The roll feeding mechanism moves a load using friction force induced by the rotation
      of a roll. It is mostly used in constant-rate feeding (a typical example is the roller
      feeder of press machines) and feeding of film sheets and paper. To improve
      positioning accuracy, it is necessary to prevent sliding between the roll and material
      and machine the roller to improve circularity.




4                                                                                            TI 34M6K01-01E
                                                                                       1. Overview of Positioning Control


                 ● Traveling Dolly



                                                                         Dolly




                                                                           Driving wheel (two each on
                                                                                the left and right)

                                                                Driver component for dolly




                                                                            Servo motor
                                                       Axle ratio

                   Figure 1.8   Traveling Dolly

                   A traveling dolly is installed with a servo motor, which acts as the driving source. The
                   driving wheel is normally rotated by a servo motor as shown in Figure 1.8, and careful
                   consideration is required to prevent slippage between the wheels and the rails.
                   The traveling dolly is often used as an alternative to the rack and pinion drive
                   mechanism where the rack is fixed and the pinion is movable.




TI 34M6K01-01E                                                                                                         5
                                                                   1.   Overview of Positioning Control



1.4      Servo Systems
         The word “servo” is derived from the Latin word “Servus”, which means servant.
         Servo systems are so-called because they respond faithfully to commands. A servo
         system refers to a system that performs accurate movements according to position or
         speed commands. This section briefly describes some typical servo systems.
      ● AC Servo Motor System
        An AC servo system consists of an AC servo motor, a speed and position detector
        and a servo drive. There are two types of AC servo motors: synchronous and
        induction type. The former uses permanent magnets while the latter does not.
        Synchronous servo motors have merits of ease of control and dynamic braking in an
        emergency but suffer from capacity limitation. Induction type servo motors allow high
        capacity but suffer from complicated control.
        Synchronous servo motors normally have capacities below 3.7 kW, while induction
        type servo motors normally have capacities above 3.7 kW. As industrial machines (e.g
        plant machinery) using high capacity servo motors are limited in actual applications,
        and synchronous motors have good controllability, synchronous motors have become
        the mainstream servo motors used today.


      ● Stepper Motor System
        A stepper motor, also known as a pulse motor, rotates in response to electrical pulses.
        Its angular displacement is proportional to the number of input pulses, while its
        rotation speed varies proportionally to the input frequency, allowing for positioning
        control without feedback. It is relatively low cost and easy to use.
         The demerits of stepper motors are lower resolution when compared to AC servo
         motors and susceptibility to loss of synchronism as it has no feedback mechanism.
         As stepper motor systems do not use feedback control, they are sometimes not
         considered as servo motor systems.

      ● DC Servo Motor Systems
        DC servo motor systems use DC servo motors. As DC servo motors have simple
        control, DC servo systems rarely come with dedicated drivers, which are common in
        AC servo systems. Instead, the drivers are often made by users or purchased
        separately from manufacturers specializing in driver production.
        DC servo motors require regular maintenance of their brush components, and are
        susceptible to noise due to brush friction and problems due to carbon dust. For these
        reasons, although DC servo motors were the mainstream in the eighties, they were
        increasingly replaced by AC servo motors, which were becoming cheaper in the
        nineties. Today, AC servo systems have become the mainstream servo systems.




6                                                                                         TI 34M6K01-01E
                                                                                                                                  1. Overview of Positioning Control



1.5                Machine Configurations for Positioning
                   Control
                 ● Analog Input Servo Systems
                   Figure 1.9 shows a machine configuration that employs an analog input servo driver.

                                                                                                      Drive current




                                   Position data                 Analog
                                    Speed data                   voltage
                                                   Positioning                                                                 Servo motor
                                                                                  Servo
                    Sequence CPU                    module
                                                                                  driver
                                                     (unit)




                                                                                              Speed feedback (encoder input)




                                                                              Position feedback (encoder input)


                    Figure 1.9          Machine Configuration Using an Analog Input Servo

                    A positioning module with analog voltage output generates a positioning path based
                    on position and speed data from the sequence CPU, performs position-loop
                    computation based on position feedback from the encoder, and outputs command
                    speed values as analog voltages. It is suitable for positioning control by detection of
                    motor position (semi-closed loop control).
                    Positioning module models F3NC51 and F3NC52 are of this type and compatible with
                    the FA-M3 system.

                 ● Pulse Input Servo Systems
                   Figure 1.10 shows a machine configuration that uses a pulse input servo driver.



                                                                                                                  Drive current


                                                                    Pulse train
                                    Position data
                                    Speed data
                                                    Positioning                                                                              Servo motor
                     Sequence                                                              Servo
                                                     module
                       CPU                                                                 driver
                                                      (unit)




                                                                                             Position and speed feedback (encoder input)



                    Figure 1.10           Machine Configuration Using A Pulse Input Servo

                    A positioning module (unit) with pulse output generates a positioning path based on
                    position and speed data from a sequence CPU, and outputs pulse trains to drive the
                    motor. The number of output pulses indicates the angular travel and the frequency of


TI 34M6K01-01E                                                                                                                                                    7
                                                                                       1.   Overview of Positioning Control


      output pulses indicates the speed. A servo driver performs position and speed
      correction based on the input pulse train from the positioning module and the
      feedback pulse train from the encoder, and rotates a motor by controlling the drive
      current (semi-closed loop control)
      Positioning module models F3NC01, F3NC02, F3NC11, F3NC12, F3YP04, F3YP08,
      F3YP14 and F3YP18 are of this type and compatible with the FA-M3 system.
      Models F3YP14 and F3YP18 feature high pulse rate, and thus can also be used to
      drive DD motors and linear motors.

    ● Stepper Motor (pulse motor)
      Figure 1.11 shows a machine configuration that uses a stepper motor.

                                                                       Drive current


                                                Pulse train
                  Position data
                  Speed data
                                                                                       Stepper motor
       Sequence                   Positioning                 Step
         CPU                       module                     driver




      Figure 1.11        Machine Configuration Using a Stepper Motor

      A stepper motor operates completely in synchronization with input pulses, and thus
      requires no position detector such as an encoder used with a servo motor (open loop
      control). The input signal to the step driver (driver for a stepper motor) uses the same
      pulse train as a pulse input servo driver.
      Positioning module models F3NC01, F3NC02, F3NC11, F3NC12, F3YP04, F3YP08,
      F3YP14 and F3YP18 can be used in an FA-M3 system.




8                                                                                                             TI 34M6K01-01E
                                                                                                                       1. Overview of Positioning Control



1.6              Principle of Servo Systems
                 This section briefly describes the principles of positioning control using a servo
                 system (AC servo)

                                                   Position                                           Speed
                                                  reference                                         reference
                                                                                                 Speed
                   Positioning                 Position
                                                                                               reference
                                              reference               Deviation
                      data                      pulse                  pulse
                                                                                                Analog
                                   Pulse                                                        voltage                      Drive
                                                                                                            Speed           current
                                  genrator                Deviation                  D/A
                                                                                                            controll                     Motor
                                  for path                 counter                 converter
                                                                      -                                       er
                                 generation


                                                                        Position
                                                                                                                   Speed feedback
                                                                       feedback

                                                                                                            Speed
                                                                                                           detector



                                                                      Feedback pulses                                  Feedback pulses



                                                                                                                                         Encoder

                 Figure 1.1.2      Servo System

                 (1) Generates a path based on given position data, and outputs position reference
                     pulse train to a servo system.
                 (2) The input pulse train is tabulated in the deviation counter (or error counter), and
                     the output (deviation pulses) from the counter is converted to speed reference
                     analog voltage using a D/A converter. The motor is rotated at the reference
                     speed. The speed reference is proportional to the number of the deviation pulses.
                 (3) Once the motor starts rotating, feedback pulses generated by the encoder are
                     used to decrement the deviation pulses. As the number of the deviation pulses
                     reduces, the speed reduces; when the number of the deviation pulses reaches
                     zero, the motor stops.
                 (4) Building upon these principles, positioning with accompanying acceleration and
                     deceleration is implemented by continuously setting a new value to the deviation
                     counter according to continuously changing position reference values.
                     The travel (rotation amount of the motor) corresponds to the total number of
                     position reference pulses, and the speed of the motor is determined by position
                     reference pulses per unit time (= pulse frequency).
                 (5) The deviation counter attempts to always maintain its value at zero in spite of any
                     internal or external disturbance. When there is slight movement of the motor axis
                     due to voltage output drift or inertia of the mechanical system, this slight
                     movement is captured in the deviation counter from the feedback pulse received
                     from the encoder. Based on the output (deviation pulses) from the deviation
                     counter, a speed reference voltage is output to return the motor to its original
                     position. This kind of corrective action that enables the current position to be
                     always maintained is known as servo lock or servo clamping.
                     In Figure 1.12, servo drivers that possess functions as illustrated to the right of
                     the vertical dash line labeled “Position reference” are known as position reference
                     type servo drivers, while servo drivers that possess only functions as illustrated to
                     the right of the vertical dash line labeled “Speed reference” are known as speed
                     reference type servo drivers




TI 34M6K01-01E                                                                                                                                         9
                                                                        1.   Overview of Positioning Control



1.7      Types of Positioning Control
         Positioning control modes are broadly categorized into two types based on their
         applications and uses, namely, PTP (point-to-point) control and CP (continuous path)
         control.
      ● PTP (Point-to-point) Control
        PTP control is used for general positioning to move an object (work piece) from one
        point (starting position) in space to another point (target position). The objective is to
        move the object quickly and accurately to its target position, with no concern of the
        path taken.
        PTP control is used in a wide range of applications, including fast forward operation of
        work machines, movement of feeders, as well as positioning of loaders, unloaders,
        spot welders and various transfer machines.


                                                       B




                                       Path taken is
                                       insignificant

            A


         Figure 1.13 PTP Control



      ● CP (Continuous Path) Control (Linear interpolation and circular interpolation)
        CP control moves an object along a specific path between 2 points (starting position
        and target position). Linear interpolation moves the object along a straight line joining
        the two points, while circular interpolation moves the object along a circular path.
         CP control is used in various processing equipment and transfer equipment, including
         examples like movement of machine tools, movement of robot arms and movement of
         laser beams.



                                                B


                                                                                            B




           A
                                                           A
                       Linear interpolation                     Circular interpolation

         Figure 1.14       CP Control




10                                                                                              TI 34M6K01-01E
                                                                                  1. Overview of Positioning Control



1.8                 Speed Control
                    Unlike position control, which specifies a target position, speed control specifies a
                    target speed at which a motor rotates. It is principally used in the control of revolving
                    machines and machines with long travel distances. Speed control receives signals
                    from external contacts such as limit switches and timers and uses them to control
                    startup, acceleration, deceleration and stopping of a motor. By switching from position
                    control to speed control and vice versa, a motor can be made to rotate at a constant
                    speed starting from a starting position and then made to stop at a target position as
                    shown in Figure 1.15.

                                                      Rotating at                 Stops at desginated
                        Starts rotation
                                                    constant speed                     position




                    Figure 1.15     Speed Control Application Example




1.9                 Absolute Positioning and Incremental
                    Positioning
                    Depending on how the coordinate system is defined, positioning systems can be
                    classified into absolute and incremental systems.
                 ● Absolute Positioning
                   In absolute positioning, a coordinate system is defined for the movement range of the
                   mechanism with a fixed origin. Position data is specified as points within the
                   coordinate system.
                 ● Incremental Positioning
                   In incremental positioning, the current position is taken as the origin, and position data
                   is specified as displacements from the current position.
                   Incremental positioning is used in constant-rate roll feeding and other applications.




TI 34M6K01-01E                                                                                                  11
                                                                                              1.   Overview of Positioning Control



1.10   Speed Profiles of Positioning Actions
       Figure 1.16 shows the speed profile of a simple positioning action.

        Speed



                                        3 Constant                  Target
                                          speed                     speed


                             n
                             tio
                        lera




                                                                     4
                                                                      De
                       cce




                                          Distance




                                                                        ce
                                                                          le
                     2A




                                          traveled




                                                                            ra
                                                                              tio
                                                                                 n
                                                                                                   Time

                  Acceleration                                Deceleration time
                       time
             1 Startup                                                               5 Stop

       Figure 1.16      Trapezoidal Drive

       In positioning, the motor speed goes through phases of startup, acceleration, constant
       speed, deceleration and stop to achieve smooth movement of the mechanical system.
       This is known as trapezoidal drive.
       The actual travel is represented by the area of the trapezium.
       If the travel time is shorter than the sum of the acceleration time and deceleration
       time, we get the triangular drive as shown in Figure 1.17.

         Speed




                                                                    Target speed




                                                              Actual speed attained




                             Distance
                             traveled
                                                                                                   Time

                     Acceleration                    Deceleration
                        time                            time
                      Actual acceleration/
                       deceleration time


       Figure 1.17      Triangular Drive

       To achieve even smoother mechanical system movement, trapezoidal drive can be
       substituted by 2-line-segment acceleration and deceleration drive (Figure 1.18), 3-
       line-segment acceleration and deceleration drive (Figure 1.19) or S-shaped
       acceleration and deceleration drive (Figure 1.20).



12                                                                                                                   TI 34M6K01-01E
                                                                                            1. Overview of Positioning Control



                  Speed



                                                              Target
                                                              speed




                                              Distance
                                              traveled




                                                                                          Time

                          Acceleration time                    Deceleration time

                 Figure 1.18    2-line-segment Acceleration and Deceleration


                  Speed



                                                                               Target
                                                                               speed




                                              Distance
                                              travelled




                                                                                          Time

                          Acceleration time                Deceleration time

                 Figure 1.19    3-line-segment Acceleration and Deceleration


                  Speed



                                                                                 Target
                                                                                 speed




                                               Distance
                                               travelled




                                                                                             Time

                          Acceleraton time                   Deceleration time

                 Figure 1.20    S-shaped Acceleration and Deceleration




TI 34M6K01-01E                                                                                                            13
                                                                                           2. Types of Positioning Modules for FA-M3 and Their Features




2.                                 Types of FA-M3 Positioning
                                   Modules and Their Features
                                   Positioning Modules for FA-M3 are classified by function into 4 categories. F3NC
                                   models support 1 or 2 axes, while F3YP models support 4 or 8 axes. A total of ten
                                   models are available*1
                                   Table 2.1 shows the specifications and features of each positioning module.
                                   Table 2.1       Specifications of Positioning Modules (1/2)
                                 Item                                                                Specifications
                                                                                               Positioning Modules                  Positioning Modules
       Name                                                Positioning Module
                                                                                                (with pulse output)             (with analog voltage output)
       Model no.                                     F3NC01-0N         F3NC02-0N          F3NC11-0N           F3NC12-0N      F3NC51-0N           F3NC52-0N
       Number of controlled axes                           2                  2                 1                  2              1                   2
       Control output type                                                       Pulse output                                      Analog voltage output
                                                                          Pulse input servo driver
       Compatible drivers                                                                                                        Analog input servo driver
                                                                                  Step driver
                                                                                                  Position control                     Position control
                                                                                                   Speed control                        Speed control
       Control mode                                          Position control
                                                                                            Position control to speed         Position control to speed control
                                                                                                 control switchover                      switchover
                                                        Absolute or incremental
                                                                                                                              Absolute or incremental position
                           Command types                   position command                Absolute position command
                                                                                                                                         command
                                                           Number command
                           Maximum pulse count         -8,388,608 to +8,388,607             -8,388,608 to +8,388,608           -134,217,728 to +134,217,727
                           Speed reference                   0.1 to 250K pps                    0.1 to 249,750 pps                     0.1 to 2M pps
                                                     Can be stored in positioning
                           Position data                                                      Stored in CPU module                 Stored in CPU module
                                                      module (64 points per axis)
        Position control




                                                     Can be stored in positioning
                           Speed data                                                         Stored in CPU module                 Stored in CPU module
                                                     module (16 speeds per axis)
                                                                                                   PTP operation                      PTP operation
                                                                       2-axis linear
                           Interpolation systems          -                                Multi-axis linear interpolation     Multi-axis linear interpolation
                                                                       interpolation
                                                                                           2-axis circular interpolation       2-axis circular interpolation
                                                     Can be stored in positioning
                           Pattern data                                                                   ―                                  ―
                                                      module (16 data per axis)
                           En-route operation                       No                                   Yes                                Yes
                           Change in target
                           position or speed                       No                                   Yes                                 Yes
                           during positioning
                           Axis movement using
                                                                   No                                   No                                  Yes
                           manual pulsar
                           Speed command                                                    -249,750 to +249,750 pps                  -2M to +2M pps
     control
     Speed




                           Change in speed                         No
                                                                                                        Yes                                 Yes
                           during positioning
                                                                                                                                       Trapezoidal
     /deceleration




                           Acceleration/
     Acceleration




                                                              Trapezoidal                          Trapezoidal                  2-segment polygonal curve
                           deceleration mode
                                                                                                                                3-segment polygonal curve
                                                            0 to 10,000ms                        0 to 32,767ms                        0 to 32,767ms
                           Acceleration/
                                                     Acceleration and deceleration        Acceleration and deceleration        Acceleration and deceleration
                           deceleration time
                                                     independently programmable           independently programmable           independently programmable
                                   *1: As of March, 2002




14                                                                                                                                               TI 34M6K01-01E
                                                                                           2. Types of Positioning Modules for FA-M3 and Their Features


                                    Table 2.1       Specifications of Positioning Modules (2/2)
                                     Item                                                      Specifications
                                                                  Positioning Module                            Positioning Module
           Name
                                                           (with multi-channel pulse output)             (with multi-channel pulse output)
           Model no.                                        F3YP04-0N           F3YP08-0N              F3YP14-0N               F3YP18-0N
           Number of controlled axes                             4                   8                      4                        8
           Control output type                                        Pulse output                                  Pulse output
                                                                Pulse input servo driver                      Pulse input servo driver
           Compatible drivers
                                                                 Stepper motor driver                           Stepper motor driver
           Control mode                                             Position control                              Position control
                                                                Absolute or incremental                              Absolute or
                               Command type
                                                                  position command                        incremental position command
                               Maximum pulse count          -134,217,728 to +134,217,727                -2,147,483,647 to +2,147,483,647
                                                                                                      0.1 to 3,998K pps (when using servo
                                                                                                                       motor)
                               Speed reference                     0.1 to 250K pps
                                                                                                      0.1 to 499.75K pps (when using pulse
                                                                                                                       motor)
            Position control




                               Speed data                       Stored in CPU module                           Stored in CPU module
                               Interpolation systems            Stored in CPU module                           Stored in CPU module
                                                                    PTP operation                                  PTP operation
                               Pattern data
                                                                Multi-axis interpolation                      Multi-axis interpolation
                               En-route operation                          ―                                             ―
                               Change in target
                               position or speed                          No                                           No
                               during positioning
                               Axis movement using
                                                                          No                                          Yes
                               manual pulsar
                               Maximum pulse count                        No                                           No
                               Speed command
         control
         Speed




                                                                          No                                           No
                               Change in speed
                               during positioning
                                                                                                                  Trapezoidal
                               Acceleration
         Acceleration/




                                                                     Trapezoidal                                   S-shaped
         deceleration




                               /deceleration mode

                                                                   0 to 32,767ms                                 0 to 32,767ms
                               Acceleration/decelerati
                                                            Acceleration and deceleration                 Acceleration and deceleration
                               on time
                                                            independently programmable                    independently programmable
                                    *1: As of March 2002




TI 34M6K01-01E                                                                                                                                     15
                                                      2. Types of Positioning Modules for FA-M3 and Their Features
                                                                                                                      F3NC01/02


2.1   Positioning Modules Models F3NC01-0N
      (1 axis) and F3NC02-0N (2 axis)
      The F3NC01-0N and F3NC02-0N modules are positioning modules with position
      reference pulse output, and can be used to control stepping motors (pulse motors) or
      position reference type servo motors.
      An overview of their main functions is given below.
      (1) Positioning Operation
           The module moves an object to a specified position at a specified speed. The
           acceleration and deceleration is calculated from the specified maximum speed,
           acceleration time and deceleration time.
             Speed

       Maximum
        speed


                                                                                        Max. speed - Startup speed
                                                                                               Acceleration time

        Target
        speed

                                                                                        Max. speed - Startup speed
                                                                                              Deceleration time



        Startup
        speed

                                                                                                             Time
                             Acceleration time                         Deceleration time

      Figure 2.1          Positioning Action (F3NC01-0N/F3NC02-0N)

      The module remembers position data for up to 64 points per axis, and thus supports
      execution by simply specifying a position data number (number command execution),
      in addition to execution by directly specifying position data values (direct command
      execution).
      (2) Pattern Operation
          The module remembers speed data and position data (number) for up to 16
          points per axis, and supports sequential execution of the stored positioning
          actions (pattern operation).
                     Speed




                             Acceleration
                                                  Target position of pattern data 2
                                                                                            Deceleration
           Speed of
         pattern data 2

           Speed of
         pattern data 1

           Speed of                      Target position of pattern data 1
         pattern data 3




                                                                                                           Time
                                                                Target position of pattern data 3

      Figure 2.2          Pattern Operation


16                                                                                                                   TI 34M6K01-01E
                                                     2. Types of Positioning Modules for FA-M3 and Their Features
                                                                                                       F3NC01/02

                 (3) 2-axis Linear Interpolation Function
                     Model F3NC02-0N supports 2-axis linear interpolation positioning. If you set the
                     control mode to interpolation mode and initiate positioning for AX1, both axes AX1
                     and AX2 will be activated at the same time to move the work piece along a
                     straight line joining the starting position and target position. In actual movement,
                     the module calculates the travel distance and reference speed for each axis, and
                     automatically adjusts the speed, acceleration time and deceleration time of both
                     axes to accommodate the axis with a longer travel time.

                    AX1




                                                                Target
                                                                position




                             Position at
                          command startup
                                                                                  AX2

                 Figure 2.3     Linear Interpolation Movement



                 (4) Pattern Operation under 2-axis Linear Interpolation control mode
                     The module remembers speed data and position data for up to 16 points each for
                     axes AX1 and AX2, and supports sequential execution of positioning actions
                     using the stored speed data and position data. In pattern operation under 2-axis
                     linear interpolation mode, the axes stop at the position of each pattern, and
                     accelerates towards the position of the next pattern.



                    AX1



                                                       Pattern data 2




                            Pattern data 1




                                                                             Pattern data 3




                          Position at
                           startup
                                                                                               AX2

                 Figure 2.4     Pattern Operation under Linear Interpolation Control Mode




TI 34M6K01-01E                                                                                                17
                                    2. Types of Positioning Modules for FA-M3 and Their Features
                                                                                      F3NC01/02

     (5) Origin Search Using Z-phase
         The module allows the option to use the Z-phase signal of the encoder during
         origin search.
     (6) Data Backup Function
        All user-defined data can be stored in the built-in non-volatile memory for backup
        purposes.


.




18                                                                                  TI 34M6K01-01E
                                                                       2. Types of Positioning Modules for FA-M3 and Their Features
                                                                                                                       F3NC11/12


2.2              Positioning Module (with pulse output)
                 Models F3NC11-0N and F3NC12-0N
                 The F3NC11-0N and F3NC12-0N modules are positioning modules with position
                 reference pulse output, and can be used to control stepping motors (pulse motors) or
                 position reference type servomotors.
                 An overview of their main functions is given below.
                   (1) Positioning Operation
                        Positioning is initiated by setting the target speed [pulse/ms], target position
                        [pulse], acceleration time [ms] and deceleration time [ms] in the positioning
                        module, changing the Start Operation Command relay from OFF to ON. At the
                        end of pulse output, the End-of-Positioning relay turns on.
                        The acceleration/deceleration curve is trapezoidal, with the acceleration time
                        and deceleration time independently programmable.
                  Speed                                                           Speed

                                                 Target speed                                               Target speed

                                  Distance                                                                   Actual speed attained
                                  traveled



                                                                                       Distance
                                                                                       traveled

                                                                           Time                                                       Time
                   Acceleration                   Deceleration                    Acceleration        Deceleration
                      time                           time                            time                time
                                                                                                            Actual acceleration/decel. time



                                                   Speed Acceleration and deceleration times with
                                                                 startup speed specified
                                             Target
                                             speed




                                             Startup
                                              time

                                                                                                           Time
                                                       Acceleration time          Deceleration time
                 Figure 2.5       Positioning Operation (speed, acceleration time and deceleration time in
                                  trapezoidal drive or triangular drive)




TI 34M6K01-01E                                                                                                                       19
                                                       2. Types of Positioning Modules for FA-M3 and Their Features
                                                                                                       F3NC11/12

     (2)     Multi-axis Linear Interpolation
             Multi-axis linear interpolation is initiated by writing the target speed [pulse/ms],
             target position [pulse], acceleration time [ms] and deceleration time to the
             positioning module for each axis and changing the Start Operation Command
             relay for all axes from OFF to ON simultaneously from a CPU module. When
             pulse output for an axis is completed, the End-of-Positioning relay associated
             with that axis turns on. The acceleration time [ms], deceleration time [ms] and
             acceleration/deceleration mode must be set to the same value for all axes
             participating in linear interpolation. The target speeds [pulse/ms] for the axes
             must be calculated and preset so that their ratios are equal to the ratios of the
             travel distance along the axes.


     Speed                                                                                      Y axis
                                                Target speed for
                                                    X-axis


                  Distance traveled




                                                                      Distance traveled by Y axis
                                                Target speed for
                      by X axis
                                                    Y-axis


                   Distance traveled
                       by Y axis
                                                           Time
      Acceleration time          Deceleration time


                                                                                                                                              X
                                                                                                                                             axis

                                                                                                         Distance traveled by X axis


     Figure 2.6     Multi-axis Linear Interpolation (for 2-axis)




20                                                                                                                          TI 34M6K01-01E
                                                                  2. Types of Positioning Modules for FA-M3 and Their Features
                                                                                                                  F3NC11/12

                 (3)   En-route Operation
                       If the next positioning operation is started while the current positioning operation
                       is in progress, the two positioning operations are combined until the preceding
                       action is completed. This mode of operation is called an en-route operation and
                       the interval during which the two positioning operations overlap is called an en-
                       route interval. En-route operation allows the positioning module to continue its
                       operation toward the next target position without stopping at the preceding
                       target position.
                       The direction of movement may be changed during an en-route operation.
                                                       Normal positioning Operation
                                             X-axis
                                             speed




                                                                                              Time
                                         Start↑                 Start↑




                                                               En-route Operation
                                             X-axis
                                                          En-route            En-route
                                             speed
                                                          interval            interval




                                                                                              Time
                                         Start↑       Start↑             Start↑



                 Figure 2.7   Normal Positioning Operation and En-route Operation



                                    Y axis




                                                                                                 X axis

                 Figure 2.8   Example of En-route Operation (for 2-axis Linear Interpolation)




TI 34M6K01-01E                                                                                                            21
                                                               2. Types of Positioning Modules for FA-M3 and Their Features
                                                                                                               F3NC11/12

     (4)    Changing Target Position during Positioning Operation
            The target position can be changed during positioning by writing new positioning
            parameters to the positioning module and turning on the Request to Change
            Target Position relay.
            A user can also change the target position in such a way that the direction of
            movement is also changed. In this case, the positioning module decelerates
            and stops promptly and starts positioning to the new target position.

                    With No Change in Direction                                        With Change in Direction
              Speed                                                          Speed




           Start↑                ↑                           Time        Start↑              ↑                          Time
                         Request to change                                        Request to change
                           target position                                          target position
     Figure 2.9      Operation When Target Position Is Changed during Positioning

                     Y axis


                                                  Old target position


                               Request to change
                              target position issued




                                                                                       new target position




                                                                                                             X axis

     Figure 2.10       Example on Change of Target Position During Positioning
                      (for 2-axis linear interpolation)

     (5)    Change in Speed During Positioning
            The target speed can be changed during positioning by writing a new target
            speed [pulse/ms] to the positioning module and turning on the Request to
            Change Speed relay.
                          Speed




                                                                                                             Time
                      Start↑                      ↑                          ↑
                                              Request to                 Request to
                                             change speed               change speed
     Figure 2.11       Operation When Speed is Changed During Positioning




22                                                                                                                    TI 34M6K01-01E
                                                                                                      2. Types of Positioning Modules for FA-M3 and Their Features
                                                                                                                                                      F3NC11/12

                 (6)   Circular Interpolation
                       The positioning module implements 2-axis circular interpolation by converting a
                       positioning command from a CPU module into a trigonometric function. Circular
                       interpolation is initiated by writing the center in the X-Y coordinate system,
                       radius, starting angle and angular travel, and changing the Start Operation
                       Command relay for both axes from OFF to ON simultaneously from a CPU
                       module.
                                                  Y axis

                                                                                                                                           Circular
                                                         Y-axis radius                                                                interpolation path




                                                                                           Angular travel
                                                                                              (270 °)



                                                                                                                                  Direction of zero angle
                        Y-axis center position




                                                                                                                                            Starting angle
                                                                                                                                             (-45 [315] °)

                                                                              Target
                                                                             position                    Starting
                                                                                                         position
                                                                                                       X-axis radius
                                                                                                                                                 X axis

                                                                                        X-axis center position

                 Figure 2.12                         Circular Interpolation



                 (7)   Speed Control
                       Speed control is initiated by writing the target speed [pulse/ms] (specify a
                       negative value to move in the reverse direction), acceleration time [ms] and
                       deceleration time [ms], and changing the Start Operation Command relay from
                       OFF to ON from a CPU module.
                       In speed control, the speed can be changed during positioning. An axis can be
                       configured to start operation immediately after execution of the start command
                       (normal startup) or to wait for an external or internal trigger.

                                                 Speed




                                                                                                                                                                 Time
                       Start↑                                                 ↑           ↑                                 ↑                          ↑
                                                                          Request to   Request to                       Request to                 Request to
                                                                         change speed change speed                     change speed               change speed

                  Figure 2.13                            Speed Control and Speed Change Operation




TI 34M6K01-01E                                                                                                                                                    23
                                                   2. Types of Positioning Modules for FA-M3 and Their Features
                                                                                                   F3NC11/12

     (8)   Speed Control to Position Control Switchover Operation
           Speed control to position control switchover is initiated by writing the target
           speed [pulse/ms], target position [pulse], acceleration time [ms] and
           deceleration time [ms] from the CPU module, and changing the control mode
           from speed control to position control during speed control positioning. The
           positioning module takes the current position at the time of switchover as the
           new origin for positioning.
           Besides normal switchover (switchover immediately after command execution),
           switchover can also be configured to wait for an external or internal trigger. In
           addition, the module can be configured to switch to position control after Z-
           phase signal detection by selecting either rising or falling edge and specifying a
           pulse count.
                    Speed




                                                     Target position (travel)


                                                                                              Time
               Startup↑                      ↑
                                  Request to swtich to position control
     Figure 2.14    Speed Control to Position Control Switchover (with no Z-phase count
                    specified)


                    Speed




                                                                   Target position (travel)


                                                                                                            Time
              Startup↑                     ↑
                               Request to swtich to position control

               Z-phase


      Figure 2.15    Speed Control to Position Control Switchover
                     (with Z-phase pulse count :2; rising edge)

     (9)   Position Control to Speed Control Switchover
           If you change the control mode from position control to speed control during
           positioning, the module switches to speed control, retaining the same target
           speed before the switchover.




24                                                                                                   TI 34M6K01-01E
                                                             2. Types of Positioning Modules for FA-M3 and Their Features
                                                                                                             F3NC11/12

                 (10) Jogging
                      Jogging is initiated by writing the target speed, acceleration time and
                      deceleration time to the positioning module and changing the Forward Jogging
                      or Reverse Jogging output relay from OFF to ON from a CPU module. Jogging
                      is performed while the output relay is on, and ends when the output relay is
                      turned off.
                                           Speed                                    Jogging
                                                                                     ends


                                                   Jogging
                                                    begins



                                                                                                        Time

                           Forward Jogging relay
                 Figure 2.16   Jogging Operation (Forward Jogging)

                 (11) Origin Search Using Z-phase
                      The origin search function searches for the origin using the Z-phase signal of
                      the encoder. The origin search operation can be customized by appropriately
                      combining the use of external contact inputs such as limit switches.




TI 34M6K01-01E                                                                                                       25
                                                     2. Types of Positioning Modules for FA-M3 and Their Features
                                                                                                                F3NC51/52


2.3           Positioning Modules (with Analog Voltage
              Output) Models F3NC51-0N and F3NC52-0N
              The F3NC51-0N and F3NC52-0N modules are positioning modules with analog
              voltage output, and can be used to control speed command type servo motors.
              An overview of their main functions is given below.
              (1) Positioning Operation
                      Positioning is initiated by writing the target speed [pulse/ms], target position
                      [pulse], acceleration time [ms] and deceleration time [ms] to the positioning
                      module and changing the Start Operation Command relay from OFF to ON from
                      a CPU module. At the end of pulse output, the End-of-Positioning relay turns on.
                      The acceleration/deceleration curve can be specified as trapezoidal, 2-line
                      segment, S-shape (3-line-segment). The acceleration time and deceleration
                      time must be set separately.

      Speed                                                   Speed

                                   Target speed                                           Target speed

                     Distance                                                             Actual speed attained
                     traveled



                                                                      Distance
                                                                      traveled

                                                       Time                                                         Time
      Acceleration                 Deceleration                Acceleration        Deceleration
         time                         time                        time                time
                                                                                          Actual acceleration/decel. time


              Figure 2.17       Positioning Operation
                                (speed, acceleration time and deceleration time in trapezoidal drive or
                                triangular drive)




       Speed             2-line Segment                       Speed           S-ahaped (3-line Segment)




                                                      Time                                                           Time

              Figure 2.18       Acceleration and Deceleration under 2-line-segment and S-shape (3-line
                                Segment) Acceleration/deceleration Mode




26                                                                                                            TI 34M6K01-01E
                                                                   2. Types of Positioning Modules for FA-M3 and Their Features
                                                                                                                                                  F3NC51/52

                         (2)    Multi-axis Linear Interpolation
                                Multi-axis linear interpolation is initiated by writing the target speed [pulse/ms],
                                target position [pulse], acceleration time [ms] and deceleration time to the
                                positioning module for each axis and changing the Start Operation Command
                                relay for all axes from OFF to ON simultaneously from a CPU module. When
                                pulse output for an axis is completed, the End-of-Positioning relay associated
                                with that axis turns on. The acceleration time [ms], deceleration time [ms] and
                                acceleration/deceleration mode must be set to the same value for all axes
                                participating in linear interpolation. The target speeds [pulse/ms] for the axes
                                must be calculated and preset so that their ratios are equal to the ratios of the
                                travel distance along the axes.
                 Speed                                                                                     Y axis
                                                             Target speed for
                                                                 X-axis


                               Distance traveled




                                                                                 Distance traveled by Y axis
                                                             Target speed for
                                   by X axis
                                                                 Y-axis


                                Distance traveled
                                    by Y axis
                                                                        Time
                 Acceleration time            Deceleration time


                                                                                                                                                     X axis

                                                                                                                    Distance traveled by X axis
                      Figure 2.19         Multi-axis Linear Interpolation (for 2-axis)




TI 34M6K01-01E                                                                                                                                          27
                                             2. Types of Positioning Modules for FA-M3 and Their Features
                                                                                               F3NC51/52

     (3)   En-route Operation
           If the next positioning operation is started while the current positioning operation
           is in progress, the two positioning operations are combined until the preceding
           action is completed. This mode of operation is called an en-route operation and
           the interval during which the two positioning operations overlap is called an en-
           route interval. En-route operation allows the positioning module to continue its
           operation toward the next target position without stopping at the preceding
           target position.
           The direction of movement may be changed during an en-route operation.

                                            Normal positioning Operation
                                  X-axis
                                  speed




                                                                              Time
                            Start↑                   Start↑




                                                    En-route Operation
                                  X-axis
                                               En-route            En-route
                                  speed
                                               interval            interval




                                                                              Time
                            Start↑         Start↑             Start↑




     Figure 2.20   Normal Positioning Operation and En-route Operation


                         Y axis




                                                                               X axis

     Figure 2.21   Example of En-route Operation (for 2-axis Linear Interpolation)




28                                                                                           TI 34M6K01-01E
                                                                       2. Types of Positioning Modules for FA-M3 and Their Features
                                                                                                                                     F3NC51/52

                 (4)    Changing Target Position During Positioning
                        The target position can be changed during positioning by writing new positioning
                        parameters to the positioning module and turning on the Request to Change
                        Target Position relay.
                        A user can also change the target position in such a way that the direction of
                        movement is also changed. In this case, the positioning module decelerates
                        and stops promptly and starts positioning to the new target position.

                                With No Change in Direction                                            With Change in Direction
                          Speed                                                              Speed




                       Start↑                ↑                              Time         Start↑              ↑                       Time
                                     Request to change                                            Request to change
                                       target position                                              target position

                 Figure 2.22       Operation When Target Position Is Changed during Positioning

                                     Y axis


                                                                  Old target position


                                               Request to change
                                              target position issued




                                                                                                   new target position




                                                                                                                         X axis

                 Figure 2.23       Example on Change of Target Position During Positioning
                                   (for 2-axis linear interpolation)



                 (5)    Change in Speed During Positioning
                        The target speed can be changed during positioning by writing a new target
                        speed [pulse/ms] to the positioning module and turning on the Request to
                        Change Speed relay.

                                     Speed




                                                                                                                              Time
                                  Start↑                       ↑                             ↑
                                                           Request to                    Request to
                                                          change speed                  change speed

                 Figure 2.24       Operation When Speed is Changed During Positioning



TI 34M6K01-01E                                                                                                                              29
                                                                         2. Types of Positioning Modules for FA-M3 and Their Features
                                                                                                                                      F3NC51/52

     (6)   Circular Interpolation
           The positioning module implements 2-axis circular interpolation by converting a
           positioning command from a CPU module into a trigonometric function. Circular
           interpolation is initiated by writing the center in the X-Y coordinate system,
           radius, starting angle and angular travel, and changing the Start Operation
           Command relay for both axes from OFF to ON simultaneously from a CPU
           module.

                                                   Y axis

                                                                                                                            Circular
                                                                                                                       interpolation path




                                                        Y-axis radius
                                                                                      Angular travel
                                                                                        (270 °)



                                                                                                                      Direction of zero angle
                          Y-axis center position




                                                                                                                                Starting angle
                                                                                                                                 (-45 [315] °)

                                                                         Target
                                                                        position                    Starting
                                                                                                    position
                                                                                                  X-axis radius
                                                                                                                                  X axis

                                                                                   X-axis center position

     Figure 2.25    Circular Interpolation



     (7)   Speed Control
           Speed control is initiated by writing the target speed [pulse/ms] (specify a
           negative value to move in the reverse direction), acceleration time [ms] and
           deceleration time [ms], and changing the Start Operation Command relay from
           OFF to ON from a CPU module.
           In speed control, the speed can be changed during positioning. An axis can be
           configured to start operation immediately after execution of the start command
           (normal startup) or to wait for an external or internal trigger.

              Speed




                                                                                                                                                Time
           Start↑            ↑           ↑                                                                  ↑                  ↑
                         Request to   Request to                                                        Request to         Request to
                        change speed change speed                                                      change speed       change speed

     Figure 2.26    Speed Control and Speed Change Operation




30                                                                                                                                  TI 34M6K01-01E
                                                           2. Types of Positioning Modules for FA-M3 and Their Features
                                                                                                                     F3NC51/52

                 (8)   Speed Control to Position Control Switchover Operation
                       Speed control to position control switchover is initiated by writing the target
                       speed [pulse/ms], target position [pulse], acceleration time [ms] and
                       deceleration time [ms] from the CPU module, and changing the control mode
                       from speed control to position control during speed control positioning. The
                       positioning module takes the current position at the time of switchover as the
                       new origin for positioning.
                       Besides normal switchover (switchover immediately after command execution),
                       switchover can also be configured to wait for an external or internal trigger. In
                       addition, the module can be configured to switch to position control after Z-
                       phase signal detection by selecting either rising or falling edge and specifying a
                       pulse count.

                               Speed




                                                                      Target position (travel)


                                                                                                              Time
                           Startup↑                          ↑
                                                  Request to swtich to position control

                 Figure 2.27   Speed Control to Position Control Switchover (with no Z-phase count
                               specified)


                               Speed




                                                                                   Target position (travel)


                                                                                                                         Time
                          Startup↑                          ↑
                                       Request to swtich to position control

                           Z-phase


                 Figure 2.28   Speed Control to Position Control Switchover
                               (with Z-phase pulse count :2; rising edge)



                 (9)   Position Control to Speed Control Switchover
                       If you change the control mode from position control to speed control during
                       positioning, the module switches to speed control, retaining the same target
                       speed before the switchover.




TI 34M6K01-01E                                                                                                             31
                                             2. Types of Positioning Modules for FA-M3 and Their Features
                                                                                                 F3NC51/52

     (10) Jogging
           Jogging is initiated by writing the target speed, acceleration time and
           deceleration time to the positioning module and changing the Forward Jogging
           or Reverse Jogging output relay from OFF to ON from a CPU module. Jogging
           is performed while the output relay is on, and ends when the output relay is
           turned off.

                               Speed                                    Jogging
                                                                         ends


                                       Jogging
                                        begins



                                                                                          Time

               Forward Jogging relay



     Figure 2.29   Jogging Operation (Forward Jogging)



     (11) Origin Search Using Z-phase
          The origin search function searches for the origin using the Z-phase signal of
          the encoder. The origin search operation can be customized by appropriately
          combining the use of external contact inputs such as limit switches.

     (12) Manual Pulser Mode
           If you turn on manual pulser mode, you can operate the motor using a manual
           pulser. Although the manual pulser input is common to both axes, manual
           pulser mode is independently configurable for each axis. If you set both axes in
           manual pulser mode, you can actuate the motors of both axes concurrently
           using a single manual pulser input.

     (13) Interrupt Function
          The positioning module can raise an interrupt to the CPU module in the two
          situations described below.
           -   Position detected interrupt
               If positioning is initiated with position detection specified, then the positioning
               module can interrupt the CPU module when the axes arrive at the command
               position or the encoder position (when the Position Detected Notification
               input relay turns on). The maximum delay for encoder position detection is 1
               ms.
           - End of positioning interrupt
               The positioning module can interrupt the CPU module when positioning
               completes (when the End of Positioning input relay turns on).
           Interrupts generated by the positioning module can be intercepted using the
           INTP instruction for a sequence CPU or using the ON INT statement for a
           BASIC CPU module.




32                                                                                           TI 34M6K01-01E
                                                                  2. Types of Positioning Modules for FA-M3 and Their Features
                                                                                                                         F3YP04/08


2.4                Positioning Modules (with multi-channel
                   pulse output) Models F3YP04-0N and
                   F3YP08-0N
                   The F3YP04-0N and F3YP08-0N modules are positioning modules with multi-channel
                   pulse output, and can be used to control stepping motors (pulse motors) or position
                   reference type servomotors.
                   An overview of their main functions is given below.
                   (1) Positioning Operation
                         Positioning is initiated by writing the target speed [pulse/ms], target position
                         [pulse], acceleration time [ms] and deceleration time [ms] to the positioning
                         module, setting the command code to 0 and then changing the Execute
                         Command relay from OFF to ON from a CPU module. At the end of pulse output,
                         the End-of-Positioning relay turns on.
                         The acceleration/deceleration curve is trapezoidal. The acceleration time and
                         deceleration time are independently programmable.

                 Speed                                                       Speed

                                              Target speed                                           Target speed

                                Distance                                                             Actual speed attained
                                traveled



                                                                                   Distance
                                                                                   traveled

                                                                      Time                                                    Time
                 Acceleration                 Deceleration                    Acceleration    Deceleration
                    time                         time                            time            time
                                                                                                    Actual acceleration/decel. time


                                          Speed Acceleration and deceleration times with
                                                        startup speed specified
                                    Target
                                    speed




                                    Startup
                                     time

                                                                                              Time
                                              Acceleration time          Deceleration time



                   Figure 2.30        Positioning Operation (speed, acceleration time and deceleration time in
                                      trapezoidal drive or triangular drive)




TI 34M6K01-01E                                                                                                                   33
                                                      2. Types of Positioning Modules for FA-M3 and Their Features
                                                                                                                                                  F3YP04/08


     (2) Multi-axis Linear Interpolation
         Multi-axis linear interpolation is initiated by writing the target speed [pulse/ms],
         target position [pulse], acceleration time [ms] and deceleration time to the
         positioning module for each axis, setting the command code to 0 for each axis
         and changing the Execute Command relay for all axes from OFF to ON
         simultaneously from a CPU module. When pulse output for an axis is completed,
         the End-of-Positioning relay associated with the axis turns on. The acceleration
         time [ms], deceleration time [ms] and acceleration/deceleration mode should be
         set to the same value for all axes participating in linear interpolation. The target
         speeds [pulse/ms] for the axes should be calculated and set up so that their ratios
         are equal to the ratios of the travel distance along the axes.

            Speed                                                                                   Y axis
                                                       Target speed for
                                                           X-axis


                        Distance traveled




                                                                          Distance traveled by Y axis
                                                       Target speed for
                            by X axis
                                                           Y-axis


                         Distance traveled
                             by Y axis
                                                                  Time
             Acceleration time         Deceleration time


                                                                                                                                             X axis

                                                                                                             Distance traveled by X axis

     Figure 2.31      Multi-axis Linear Interpolation (for 2-axis)



     (3) Jogging
         Jogging is initiated by writing the target speed, acceleration time and deceleration
         time to the positioning module and changing the Forward Jogging output relay
         from OFF to ON from a CPU module. Jogging is performed while the output relay
         is on, and ends when the output relay is turned off. The target speed can be
         changed during jogging.

                                     Speed                                                                    Jogging
                                                                                                               ends


                                             Jogging
                                              begins



                                                                                                                                           Time

                Forward Jogging relay

     Figure 2.32      Jogging Operation (Forward Jogging)



     (4) Origin Search Using Z-phase
         The origin search function searches for the origin using the Z-phase signal of the
         encoder. The origin search operation can be customized by appropriately
         combining the use of external contact inputs such as limit switches.




34                                                                                                                                            TI 34M6K01-01E
                                                                                2. Types of Positioning Modules for FA-M3 and Their Features
                                                                                                                                                                       F3YP14/18


2.5              Positioning Modules (with multi-channel
                 pulse output) Models F3YP14-0N and
                 F3YP18-0N
                 The F3YP14-0N and F3YP18-0N modules are positioning modules with multi-channel
                 pulse output, and can be used to control stepping motors (pulse motors) or position
                 reference type servomotors.
                 An overview of their main functions is given below.
                 (1) Positioning Operation
                     Positioning is initiated by writing the target speed [pulse/ms], target position
                     [pulse], acceleration time [ms] and deceleration time [ms] to the positioning
                     module, setting the command code to 0 and then changing the Execute
                     Command relay from OFF to ON from a CPU module. At the end of pulse output,
                     the End-of-Positioning relay turns on.
                     The acceleration/deceleration curve is trapezoidal or S-shaped. The acceleration
                     time and deceleration time are independently programmable in trapezoidal
                     acceleration/deceleration but are fixed at 0 in S-shaped acceleration/deceleration.
                     In addition, you can change the speed or target position during positioning.
                                Speed                                                            Speed

                                                               Target speed                                                   Target speed


                                               Distance                                                                        Actual speed attained
                                               traveled



                                                                                                         Distance
                                                                                                         traveled

                                                                                        Time                                                               Time
                                Acceleration                    Deceleration                      Acceleration         Deceleration
                                   time                            time                              time                 time
                                                                                                                               Actual acceleration/decel. time


                            Speed
                                    Acceleration and deceleration times with startup
                                                   speed specified
                   Target
                   speed




                 Startup time


                                                                                         Time

                                Acceleration time               Deceleration time

                             Speed                                                             Speed
                                                                            Taraget
                                                                             speed                                                     Target speed




                                                    Distance                                                                       Actual speed attained
                                                    traveled




                                                                                       Time                                                         Time

                                                                                                   Acceleration time    Deceleration time
                                    Acceleration time           Deceleration time
                                                                                                                            Actual acceleration time and decel. time


                 Figure 2.33              Positioning Operation
                                          (speed, acceleration time and deceleration time in trapezoidal drive, triangular
                                          drive or S-shaped drive; triangular drive under S-shaped acceleration and
                                          deceleration)




TI 34M6K01-01E                                                                                                                                                               35
                                                         2. Types of Positioning Modules for FA-M3 and Their Features
                                                                                                                                                 F3YP14/18

     (2) Multi-axis Linear Interpolation
         Multi-axis linear interpolation is initiated by writing the target speed [pulse/ms],
         target position [pulse], acceleration time [ms] and deceleration time to the
         positioning module for each axis, setting the command code to 0 for each axis
         and changing the Execute Command relay for all axes from OFF to ON
         simultaneously from a CPU module. When pulse output for an axis is completed,
         the End-of-Positioning relay associated with the axis turns on. The acceleration
         time [ms], deceleration time [ms] and acceleration/deceleration mode should be
         set to the same value for all axes participating in linear interpolation. The target
         speeds [pulse/ms] for the axes should be calculated and set up so that their ratios
         are equal to the ratios of the travel distance along the axes.

     Speed                                                                                  Y axis
                                               Target speed for
                                                   X-axis


                 Distance traveled




                                                                  Distance traveled by Y axis
                                               Target speed for
                     by X axis
                                                   Y-axis


                  Distance traveled
                      by Y axis
                                                          Time
      Acceleration time         Deceleration time


                                                                                                                                       X axis

                                                                                                      Distance traveled by X axis

     Figure 2.34          Multi-axis Linear Interpolation (for 2-axis)



     (3) Jogging
         Jogging is initiated by writing the target speed, acceleration time and deceleration
         time to the positioning module and changing the Forward Jogging output relay
         from OFF to ON from a CPU module. Jogging is performed while the output relay
         is on, and ends when the output relay is turned off. The target speed can be
         changed during jogging.

                           Speed                                                                     Jogging
                                                                                                      ends


                                     Jogging
                                      begins



                                                                                                                                Time

      Forward Jogging relay

     Figure 2.35          Jogging Operation (Forward Jogging)




36                                                                                                                                              TI 34M6K01-01E
                                                       2. Types of Positioning Modules for FA-M3 and Their Features
                                                                                                         F3YP14/18

                 (4) Origin Search
                     1. Origin Search
                      The origin search function searches for the origin using the Z-phase signal of the
                      encoder. The origin search operation can be customized by appropriately
                      combining the use of external contact inputs such as limit switches.

                      2. Automatic Origin Search
                      The automatic origin search function performs automatic origin search using the
                      Z-phase signal of the encoder. You can configure the automatic origin search
                      using registered parameters, in particular, selecting whether to make use of the
                      origin switch input.
                      Figure 2.36 shows an automatic origin search operation that uses the origin input.
                      Figure 2.37 shows an automatic search operation that does not use the origin
                      input.

                  !   Starting from the positive side of the orign switch:
                           Search speed 2
                            Startup speed


                                               Z-phase pulse


                                       Forward limit              Origin      Reverse limit


                  !   Starting with the origin input turned on:




                                               Z-phase pulse


                                       Forward limit              Origin      Reverse limit

                  !   Starting between the reverse limit input and origin input:

                           Search speed 1
                           Search speed 2
                            Startup speed


                                               Z-phase pulse


                                       Forward limit              Origin      Reverse limit

                  !   Starting with the reverse limit input turned on:




                                               Z-phase pulse


                                      Forward limit               Origin      Reverse limit


                 Figure 2.3.6   Automatic Origin Search with origin input




TI 34M6K01-01E                                                                                                  37
                                              2. Types of Positioning Modules for FA-M3 and Their Features
                                                                                                F3YP14/18


          !    Starting with the reverse limit turned off

              Search speed 1
              Search speed 2
               Startup speed


                                                   Z-phase pulse


                          Forward limit                            Reverse limit


      !       Starting with the reverse limit turned off

              Search speed 2
               Startup speed


                                                   Z-phase pulse


                          Forward limit                            Reverse limit


     Figure 2.3.6       Automatic Origin Search without Origin Input



     (5) Saving Registered Parameters
         Registered parameters can be saved to the flash memory when all axes are
         stationary. Before saving the parameters, the Set Parameter command must be
         first executed to set up registered parameters for all axes. To save registered
         parameters, set the Command Code to 9 and then change the Executed
         Command relay from OFF to ON. Beware that the number of write operations to
         the flash memory is limited to 100,000 times.




38                                                                                            TI 34M6K01-01E
                  2. Types of Positioning Modules for FA-M3 and Their Features


                 MEMO.




TI 34M6K01-01E                                                             39
      2. Types of Positioning Modules for FA-M3 and Their Features


     MEMO.




40                                                    TI 34M6K01-01E
                                                                                           3. Sample Programs for Positioning Module




3.               Sample Programs for Positioning
                 Modules
3.1              System Example
                 For ease of explanation, the sample programs described in this chapter assume the
                 use of a 2-axis X-Y table positioning system employing AC servo motors, as shown in
                 Figure 3.1.



                                                                  200 mm
                                                                                            Forward limit
                                                                                            SW for X-axis

                         Forward limit                                            Y-axis
                         SW for Y-axis



                                  X-axis origin SW
                  Reverse limit
                  SW for X-axis
                                                     Y-axis origin SW



                                                                        Reverse limit SW
                                                                           for Y-axis




                                                                             600 mm
                                                     X-axis




                 Figure 3.1        2-axis X-Y Table Positioning System

                 The specifications, as well as the mechanism of the x and Y axes are given below.
                 - AC Servo motor (driver)
                    Rated speed: 2400 rpm
                    Speed command voltage at rated speed: 6 V
                    Encoder: General-purpose incremental encoder
                    2500 pulse per rotation
                    SERVO ON, BRAKE OFF, DRIVER RESET signals are normally-open (NO)
                    contacts;
                    DRIVER ALM signal is normally-closed (NC) contact.

                 - Mechanism
                    Direct axis drive using a ball screw
                    Ball screw (pitch): 10mm/rot
                    Movement range for X axis: -10 to 590 mm
                                          Y axis: -10 to 190 mm
                    Maximum speed: 500mm/s
                    Acceleration and deceleration performance: 0.1s (100 ms) max. from 0 to
                    maximum speed
                    Contact inputs: Forward limit (NC contact), Reverse limit (NC contact), Origin input


TI 34M6K01-01E                                                                                                                   41
                                                                         3. Sample Programs for Positioning Modules
                                                                                                            F3NC01/02


3.2     Sample Programs for F3NC02-0N Module
        This section describes some sample ladder programs for the positioning module
        model F3NC02-0N. All programs assume that the module is installed in slot 4. The
        system is the X-Y table shown in Figure 3.1 (P41).
        Note: Sample programs in this section assume that that sequence CPU module model F3SP28 is used. Beware of
              differences in device range when using other sequence CPUs.



3.2.1   F3NC02-0N Operation Procedure
        Figure 3.2 shows the procedure for operating the positioning module.

              F3NC01/F3NC02
             Operation procedure




              Register parameters



                 Turn on servo
          (when using AC servo motor)



                 Origin search




                                        Number command
               Command type?


                          Direct command
                                                                               Yes
              Write position data                    Pattern execution
               and speed data
                                                                No

            Turn on Execute Direct               Write command position no.                 Write 0 to
               Command relay                      and command speed no.               command position number




                                                  Turn on Execute Number
                                                      Command relay




        Figure 3.2 Operation Procedure

        - Register Parameters
          Register parameters for the positioning system. Calculate parameter values to
          match the positioning system used. When performing number command execution
          or pattern execution, also register position data, speed data and pattern data.
          Register the positioning control mode (2-axis PTP mode or 2-axis Linear
          Interpolation mode).
        - Turn on servo motor
          When performing positioning using an AC servo motor, you need to put the servo
          system into Servo ON status by turning on the SERVO ON input of the driver
          (pulse type) using a contact output module.




42                                                                                                        TI 34M6K01-01E
                                                                3. Sample Programs for Positioning Modules
                                                                                                F3NC01/02

                 - Execute origin search
                   Perform an origin search to enable correct positioning. If origin search is not done,
                   the default origin will be the position of the axes when the module is powered on.
                 - Execute various positioning actions
                   Execute positioning actions as required by rotating the motor.




TI 34M6K01-01E                                                                                         43
                                                                     3. Sample Programs for Positioning Modules
                                                                                                              F3NC01/02




3.2.2       Calculation of Registered Parameters
            The following example shows a minimal set of registered parameters, which must be
            defined for controlling a servo motor using the positioning module.
            A list of registered parameters is given in Table 3.1.
            A parameter with two numbers recorded in the data position number column
            represents a 2-word data. When setting a 2-word data, beware that the smaller data
            position number represents the high-order word while the larger data position number
            represents the low-order word.
            Table 3.1 Registered parameters

          Data Position Number                                                      Range of values
                                           Parameter
          AX1             AX2                                        (Default values are indicated within brackets)
                                                              0:×0.1 (0.1pps to 2,500pps)
                                   Speed Command Scaling
           024           232                                  1:×1 (1pps to 25,000pps)    (0)
                                   Factor
                                                              2:×10 (10pps to 250kpps)
           025           233       Electronic        m
                                                              1 to 3000 (1); 0.011 ≤(m/n) ≤ 10
           026           234       Gear              n
                                                              1 to 25,000 (25,000); ≥ Startup speed
           027           235       Maximum Speed              If electronic gear ratio (m/n) > 1,
                                                              1 ≤Maximum Speed×m/n ≤ 25,000
           028           236       Startup Speed              0 to 25,000 (0); Startup Speed ≤ Maximum Speed
           029           237       Acceleration Time          0 to 10,000[ms] (0)
           030           238       Deceleration Time          0 to 10,000[ms] (0)
         031/032       239/240     Backlash Compensation      0 to 83,886,070 (0)
         033/034       241/242     Origin Correction          -83,886,080 to 83,886,070 (0)
                                                              -83,886,080 to 83,886,070 (83,886,070)
         035/036       243/244     CW Limit                   If electronic gear ratio (m/n) > 1,
                                                              -83,886,080 ≤ Forward Limit×m/n ≤ 83,886,070
                                                              -83,886,080 to 83,886,070 (-83,886,080)
         037/038       245/246     CCW Limit                  If electronic gear ratio (m/n) > 1,
                                                              -83,886,080 ≤ Reverse Limit×m/n ≤ 83,886,070
           039           247       Z-phase Pulse Count        0 to 32,767 (0)
           040           248       Contact Input Polarity     One bit for each contact ($000D)
                                                              0: pulse/direction signal      (1)
           041           249       Pulse Output Mode
                                                              1: CW pulse/CCW pulse
           042           250       Origin Search Mode         0 to 7 (0)
                                                              0: 2-axis PTP Mode           (0)
           043             -       Positioning Control Mode
                                                              1: 2-axis Linear Interpolation Mode
        044 to 048    252 to 256   (Reserved)
                                   Speed Data 1
                                   (Origin Search Speed)
           049           257
                                   (Speed for Return to
                                   Origin)                    1 to 25,000 (1);
                                   Speed Data 2               between Startup Speed and Maximum Speed;
           050           258       (Low Speed for Origin      Low speed for origin search ≤ origin search speed
                                   Search)
                                   Speed Data 3
           051           259
                                   (Jogging Speed)
        052 to 064    260 to 272   Speed Data 4 to 16
                                                              0 to 6,416 (0)
        065 to 080    273 to 288   Pattern Data 1 to 16
                                                              position data number ×100+ speed data number
                                                              83,886,080 to 83,886,070 (0) when using absolute
         081/082       289/290
                                                              position values
            to            to       Position Data 1 to 64
                                                              83,886,079 to 83,886,071 when using incremental
         207/208       415/416
                                                              position values




44                                                                                                           TI 34M6K01-01E
                                                                 3. Sample Programs for Positioning Modules
                                                                                                 F3NC01/02

                 Here we explain the calculation of the registered parameters for the system shown in
                 Figure 3.1. The X and Y axes of the system are mapped to axes AX1 and AX2
                 respectively.
                 - Speed command scaling factor
                   Set the scaling factor for command speed values and speed values obtained from
                   read operations.
                   All speed data defined in the positioning module are multiplied by this parameter to
                   give the actual speed value.
                   Here, we set it to 2 for 10x multiplication, without exceeding the value range of the
                   maximum speed.
                 - Electronic gear m, n
                   Specify the ratio of position and speed command data to actual pulse output value.
                   The actual pulse output value is given by preset value x (m/n).
                   Here, we set it to 1 for no conversion.
                 - Maximum speed
                   Specify the maximum speed allowed for the axes. If a given command speed
                   exceeds this value, the axis will move at the specified maximum speed. The actual
                   speed is obtained by multiplying this value by the Speed Command Scaling Factor.
                   Here, we set both axes to the same value since the motors used for both axes
                   have the same specification.
                   500[mm/s]÷10[mm/rot]×2500[pulse/rot]= 125000[pulse/s]
                   125000[pulse/s]÷Speed Command Scaling Factor (10) = 12500[(×10)pulse/s]
                 - Startup speed
                   Specify the speed when positioning begins and immediately before positioning
                   ends. When using a stepper motor, accelerating from speed 0 may cause loss in
                   synchronization due to resonance with the low-speed components (the same
                   applies to deceleration). To prevent this from happening, specify a startup speed
                   above the resonance point. The actual speed is obtained by multiplying this value
                   with the speed command scaling factor.
                   When using servo motors, this value should normally be set to 0.
                   Here, set it to 0 for using AC servo motors.
                 - Acceleration time
                   Specify the time taken in milliseconds to accelerate from the startup speed to the
                   maximum speed when positioning begins.
                   Here, set it to 1500 [ms].
                 - Deceleration time
                   Specify the time taken in milliseconds to decelerate from the maximum speed to
                   the startup speed at the end of positioning.
                   Here, set it to 2000 [ms].
                 - Backlash compensation
                   Specify the compensation value if backlash compensation is required. Write a
                   value that is 10 times the actual required value (pulse count)
                   Here, no backlash compensation is required. (set to 0)
                 - Origin Correction
                   Specify an origin offset value If the origin obtained from origin search is off the
                   ideal origin position. Write a value that is 10 times the actual required value (pulse
                   count)
                   During positioning, this value is added to the origin obtained from origin search to
                   give the actual origin used in subsequent positioning.
                   Here, set to 0 for zero offset.




TI 34M6K01-01E                                                                                          45
                                                             3. Sample Programs for Positioning Modules
                                                                                                      F3NC01/02

     - CW limit, CCW limit
       Set the software boundaries for positioning.
            CW Limit ≤ positioning range ≤ CCW Limit
       Write a value that is 10 times the actual value (pulse count). If a specified target
       position is beyond the specified positioning range, an error is generated when
       positioning is initiated.
       Here, we set the following values, mapping CW to positive direction and CCW to
       negative direction.
       For CW limit:
            AX1: 580 [mm] ÷ 10 [mm/rot] × 2500 [pulse/rot] × 10 = 1450000 [pulse].
            AX2: 180 [mm] ÷ 10 [mm/rot] × 2500 [pulse/rot] × 10 = 450000 [pulse]
       For CCW limit:
            AX1: -5 [mm] ÷ 10 [mm/rot] × 2500 [pulse/rot] × 10 = -12500 [pulse].
            AX2: -5 [mm] ÷ 10 [mm/rot] × 2500 [pulse/rot] × 10 = -12500 [pulse]
     - Z-phase Pulse Count
       Specify the number of Z-phase pulses to be counted after the origin switch is
       detected during origin search. After the specified number of Z-phase pulses are
       counted, the current position is taken as the origin. Set to 0 if not using Z-phase.
       Here, set the Z-phase pulse count to 1.
       Contact input polarity
       Specify the polarity of external contact inputs. 1 bit is allocated for one contact
       input. (0: NO contact; 1: NC contact)

       15 14 13 12 11 10 9   8   7   6   5   4   3   2   1    0


                                                                        Origin input (default: 1)
                                                                        Origin proximity input (default: 0)
                                                                        CW limit input (default: 1)
                                                                        CCW limit input (default: 1)
                                                                        Ready input (default: 0)




     - Pulse output mode
       Specify the pulse output mode.
       0: pulse/direction mode; 1: CW pulse/CCW pulse mode
       Here, set the value of 1.
     - Origin search mode
       Specify the origin search mode by selecting from the following 8 available modes.
                                                           Use of Origin
        Origin Search       Z-phase      Origin Search
                                                            Proximity
            Mode            Detection       Direction
                                                              Switch
              0             ON→OFF           CCW              Yes
              1             OFF→ON           CCW              Yes
              2             ON→OFF           CW               Yes
              3             OFF→ON           CW               Yes
              4             ON→OFF           CCW              No
              5             OFF→ON           CCW              No
              6             ON→OFF           CW               No
              7             OFF→ON           CW               No
       Here, set to mode 5 to start Z-phase detection on the rising edge of the origin input,
       perform origin search in the CCW direction without using the origin proximity
       switch.




46                                                                                                  TI 34M6K01-01E
                                                                3. Sample Programs for Positioning Modules
                                                                                                F3NC01/02

                 - Positioning control mode
                   Specify the control mode of the positioning module.
                        0: 2-axis PTP mode; 1: 2-axis linear interpolation mode
                   Here, set the value to 0 (2-axis PTP mode). Set the value to 1 if performing 2-axis
                   linear interpolation positioning.
                 - Speed data 1 to 16
                   Specify speed data for performing execution by number command. The actual
                   speed is given by multiplying this data value by the Speed Command Scaling
                   Factor.
                   Speed data 1 to 3 maps to the following speeds during positioning.
                   1: Origin search speed, speed for return-to-origin operation
                       This specifies the speed during the origin search and return-to-origin operation.
                       However, if the origin proximity input is not used, the speed during origin
                       search will be determined by the Origin Search Low Speed parameter.
                       Here, we specify the speed for the return-to-origin operation as 20[mm/s] with
                       the following preset value since the origin proximity input is not used.
                       20[mm/s]÷10[mm/rot]×2500[pulse/rot]= 5000[pulse/s]
                       5000[pulse/s]÷Speed Command Scaling Factor (10) = 500[(×10)pulse/s]
                   2: Origin search low speed
                       When using the origin proximity input during origin search, this parameter
                       specifies the search speed after origin proximity input is detected.
                       Here, we specify the origin search speed as 20[mm/s] with the following preset
                       value since the origin proximity input is not used.
                       20[mm/s]÷10[mm/rot]×2500[pulse/rot]= 5000[pulse/s]
                       5000[pulse/s]÷Speed Command Scaling Factor(10) = 500[(×10)pulse/s]
                   3: Jogging speed
                       Specifies the speed during jogging.
                       Here, we set the jogging speed for X and Y axis to 100[mm/s] and 50[mm/s]
                       respectively using the following preset values.
                       AX1:100[mm/s]÷10[mm/rot]×2500[pulse/rot]= 25000[pulse/s]
                       25000[pulse/s]÷Speed Command Scaling Factor(10) = 2500[(×10)pulse/s]
                       AX2:50[mm/s]÷10[mm/rot]×2500[pulse/rot]= 12500[pulse/s]
                       12500[pulse/s]÷Speed Command Scaling Factor(10) = 1250[(×10)pulse/s]
                 - Pattern data 1 to 16
                   To perform pattern positioning, we need to specify pattern data by combining a
                   position data number and a speed data number as follows:
                         Pattern data = position data number ×100+speed data number
                   Set to appropriate values for the problem example below.
                 - Position data 1 to 64
                   Specify position data for performing execution by number command. Write a value
                   that is 10 times the actual position (pulse count).
                   Set to appropriate values for the problem example below.




TI 34M6K01-01E                                                                                         47
                                                                                       3. Sample Programs for Positioning Modules
                                                                                                                           F3NC01/02


3.2.3            Reading Module Status
                 You can read various statuses of the positioning module such as error status and
                 current position. Table 3.2 lists all the module statuses.
                 Table 3.2 List of Module Statuses
        Data Position Number
                                             Parameter                                                Remarks
         AX1            AX2
     003/004        211/212        Current Position                   Current position during positioning [(1/10)pulse]
                                                                      Current speed during positioning
         007            215        Current Speed
                                                                      [(×speed command scaling factor) pulse/ms]
         013            221        Module Status                      State of external contact inputs
         023            231        Error Code                         Error information code when error occurs


                 Figure 3.3 shows a sample program for reading statuses of the positioning module.
                 The statuses read are stored in data registers and internal registers listed in Table 3.3.

                 Table 3.3 Devices for Storing Modules Status Values Read
                              Status
                                                                                        Description
                  AX1                     AX2
                 D0101                   D2101           Error Code
                 D0102                   D2102           Module Status
               D0103/D0104             D2103/D2104       Current Position Status [(1/10)pulse]
                 D0105                   D2105           Current Speed Status [(×speed command scaling factor)pulse/s]
            I00101 to I00116       I02101 to I02116      Bit data for contact inputs


         ***** Read module status (READST) *****


         *** X axis ***



                                                                                                                              Read error code



                                                                                                                              Read AX1 status



                                                                                                                              Swap words




                                                                                                                              Read current speed



                                                                                                                              Read module status



                                                                                                                              Expand contact
                                                                                                                              input




48                                                                                                                        TI 34M6K01-01E
                                                                    3. Sample Programs for Positioning Modules
                                                                                                      F3NC01/02



                 *** Y axis ***



                                                                                               Read error code



                                                                                               Read AX2 status



                                                                                               Swap words




                                                                                               Read current speed



                                                                                               Read module status



                                                                                               Expand contact
                                                                                               input

                      Figure 3.33 Read Module Status Program

                      Any statuses can be read from the positioning module. The sample program in Figure
                      3.3. always reads all statuses.
                      The Current Position is a 2-word data, where the high order word maps to the smaller
                      data position number and the low order word maps to the larger data position data.
                      Hence, it is necessary to swap the high-order and low-order words in the program.




TI 34M6K01-01E                                                                                                   49
                                                             3. Sample Programs for Positioning Modules
                                                                                                F3NC01/02



3.2.4        Registering Parameters
             Figure 3.4 shows a sample ladder program, which registers parameters calculated in
             section 3.2.2 to the positioning module, together with the timing chart (for only the X-
             axis).


        ***** Set parameters for PTP mode (SETPARA1) *****


        *** Set X-axis parameters in data registers ***


                                                                                        Target speed scaling
                                                                                        factor



                                                                                        Electronic gear m



                                                                                        Electronic gear n




                                                                                        Maximum speed




                                                                                        Startup speed



                                                                                        Acceleration time



                                                                                        Deceleration time



                                                                                        Backlash
                                                                                        compensation


                                                                                        Swap words




                                                                                        Origin correction



                                                                                        Swap words




                                                                                        CW limit



                                                                                        Swap words




                                                                                        CCW limit



                                                                                        Swap words




                                                                                        Z-phase pulse count



                                                                                        Contact input
                                                                                        polarity




50                                                                                            TI 34M6K01-01E
                                                                           3. Sample Programs for Positioning Modules
                                                                                                              F3NC01/02



                                                                                                      Pulse output mode

                                            2-axis PTP mode
                                  (For 2-axis linear interpolation mode,                              Origin search mode
                                              set value to 1)


                                                                                                      Interpolation mode



             ** Set speed data in data registers **


                                                                                                      Origin search speed



                                                                                                      Origin search low
                                                                                                      speed


                                                                                                      Jogging speed



                                                                                                      Set speed data
                                                                                                      4-16 to 0


             *** Set Y-axis parameters in data registers ***


                                                                                                      Target speed scaling
                                                                                                      factor


                                                                                                      Electronic gear m



                                                                                                      Electronic gear n



                                                                                                      Maximum speed



                                                                                                      Startup speed



                                                                                                      Acceleration time



                                                                                                      Deceleration time



                                                                                                      Backlash
                                                                                                      compensation


                                                                                                      Swap words



                                                                                                      Origin correction


                                                                                                      Swap words




                                                                                                      CW limit




TI 34M6K01-01E                                                                                                            51
                                                                3. Sample Programs for Positioning Modules
                                                                                                   F3NC01/02


                                                                                           Swap words




                                                                                           CCW limit



                                                                                           Swap words



                                                                                           Z-phase pulse count



                                                                                           Contact input polarity



                                                                                           Pulse output mode
                                   2-axis PTP mode
                             (For 2-axis linear interpolation
                               mode, Set the value to 1)
                                                                                           Origin search mode



                                                                                           Interpolation mode


     ** Set speed data in data registers **


                                                                                           Origin search speed


                                                                                           Origin search low
                                                                                           speed



                                                                                           Jogging speed


                                                                                           Set speed data
                                                                                           4-16 to 0



     *** Write X-axis parameters to module ***

                                                                                           Request to set
                                                                                           parameters


                                                                                           Write parameters



                                                                                           Write speed data


                                                                                           Set Parameters relay
                                                                                           ON

                                                                                           Waiting for set
                                                                                           parameters ACK flag
                                                                                           ON

                                                                                           Command
                                                                                           executing flag ON




52                                                                                               TI 34M6K01-01E
                                                                         3. Sample Programs for Positioning Modules
                                                                                                           F3NC01/02



                                                                                                    Set Parameters
                                                                                                    relay OFF


                                                                                                    Waiting for set
                                       Set Parameters ACK                                           parameter ACK flag
                                           relay for AX1                                            OFF

                                                                                                    Command
                                                                                                    executing flag OFF


             *** Write Y-axis parameters to module ***


                                                                                                    Request to set
                                                                                                    parameters


                                                                                                    Write parameters



                                                                                                    Write speed data


                                                                                                    Set Parameters relay
                                                                                                    ON

                                                                                                    Waiting for set
                                                                                                    parameter ACK flag
                                                                                                    ON

                                                                                                    Command
                                      Set Parameters ACK                                            executing flag ON
                                          relay for AX2
                                                                                                    Set Parameters
                                                                                                    relay OFF


                                                                                                    Waiting for set
                                                                                                    parameter ACK flag
                                                                                                    OFF

                                                                                                    Command
                                                                                                    executing flag OFF



                      I00001
                                                  Request to set
                                                   parameters
                      I00002

                      I00003                                        Request to set
                                                                   parameters ACK
                     Y00446

                     X00412

                      I00004
                                        Command executing

                   Figure 3.4 Set Parameters Program and Timing Chart for X Axis

                   The sample program shown in Figure 3.4 registers parameters for the X and Y axes
                   on the rising edge of internal relay /I00001. During registration, internal relays /I00004
                   and /I02004 turn on to indicate that a command is being executed.
                   This sample program does not register speed data 1 to 16, pattern data 1 to 16 and
                   position data 1 to 64. The required values are instead set up by the programs for
                   individual positioning operations. In actual applications, however, it may be better to
                   register all parameters at one go if these parameters are pre-determined.



TI 34M6K01-01E                                                                                                         53
                                                    3. Sample Programs for Positioning Modules
                                                                                    F3NC01/02

      CAUTION

     If a registered speed data value is smaller than the startup speed, an error is
     generated. When this happens, the invalid speed data value is replaced by startup
     speed value.
     Speed data that are not used should be set to a value that is equal to or larger than
     the startup speed value.




54                                                                                 TI 34M6K01-01E
                                                                       3. Sample Programs for Positioning Modules
                                                                                                          F3NC01/02



3.2.5                  Reset Error
                       When the positioning module is in error state, execution requests for all commands
                       are ignored, except for the Reset Error command. To have the module start accepting
                       commands again, you need to first reset the error state. To do so, reset all output
                       relays and then turn on the Reset Error output relay (Y!!!45/ Y!!!61). Figure
                       3.5 shows the sample ladder program and the timing chart for the X-axis.

                 ***** Reset error (RLSERR) *****


                 *** X axis ***


                                                                                                  Rising edge of reset
                                                                                                  error request


                                                                                                  Falling edge of reset
                                                                                                  error request


                                                                                                  AX1 Execute Direct
                                                                                                  Command relay OFF


                                                                                                  Reset Error relay ON



                                                                                                  Reset Error relay OFF
                                        Error Notification relay for
                                                for AX1
                 *** Y axis ***


                                                                                                  Rising edge of reset
                                               Reset Error relay                                  error request
                                                    OFF
                                                                                                  Falling edge of reset
                                                                                                  error request


                                                                                                  AX2 Execute Direct
                                                                                                  Command relay OFF


                                                                                                  Reset Error relay ON

                                            Error Notification
                                            relay for for AX2                                     Reset Error relay OFF




TI 34M6K01-01E                                                                                                      55
                                                       3. Sample Programs for Positioning Modules
                                                                                       F3NC01/02




                                                 Error reset request


                           I00201

                           I00202

                           I00203

                           Y00445

                           X00412

                                                          Error Nofitication
                                                             relay OFF


     Figure 3.5 Reset Error Program and Timing Chart for X Axis

     The sample program shown in Figure 3.5 assumes that a rising edge of relay /I00201
     will be generated manually. If the cause of an error is not removed, the Error
     Notification relay will not turn off even if you execute a Reset Error command.




56                                                                                    TI 34M6K01-01E
                                                                              3. Sample Programs for Positioning Modules
                                                                                                                 F3NC01/02


3.2.6              Jogging
                   While a designated relay is on, you can cause the motor to rotate in the forward or
                   reverse direction at a specified speed, acceleration and deceleration using forward
                   jogging or reverse jogging. This allows you to test positioning actions of the system,
                   as well as adjust position manually.
                   To perform jogging, register the required parameters as described in Section 3.2.4,
                   and then turn on the Forward Jogging (Y!!!40/Y!!!56) or Reverse Jogging
                   (Y!!!42/Y!!!58) output relay.



            *** Jogging (JOG) ***


            *** Execute X-axis forward jogging ***

                                                                                                       Request to start
                                                                                                       forward jogging


                                                                                                       Request to stop
                                                                                                       forward jogging


                                                                                                       Start forward jogging


                                                                                                       Command executing
                                                                                                       flag ON


                                                End of Positioning relay
                                                        for AX1                                        Stop forward jogging


                                                                                                       Command executing
                                                                                                       flag OFF

                                                         Error Notification
                                                           relay for AX1


            *** Execute Y-axis forward jogging ***


                                                                                                       Request to start
                                                                                                       forward jogging


                                                                                                       Request to stop
                                                                                                       forward jogging


                                                                                                       Start forward jogging


                                                                                                       Command executing
                                               End of Positioning relay                                flag ON
                                                       for AX2

                                                                                                       Stop forward jogging


                                                                                                       Command executing
                                                        Error Notification                             flag OFF
                                                          relay for AX2




TI 34M6K01-01E                                                                                                                 57
                                                                    3. Sample Programs for Positioning Modules
                                                                                                       F3NC01/02



     *** Execute X-axis reverse jogging ***


                                                                                             Request to start
                                                                                             reverse jogging


                                                                                             Request to stop
                                                                                             reverse jogging


                                                                                             Start reverse jogging


                                                                                             Command executing
                                       End of Positioning relay                              flag ON
                                               for AX1

                                                                                             Stop reverse jogging



                                               Error Notification                            Command executing
                                                                                             flag OFF
                                                 relay for AX1




     *** Execute Y-axis reverse jogging ***


                                                                                             Request to start
                                                                                             reverse jogging


                                                                                             Request to stop
                                                                                             reverse jogging


                                                                                             Start reverse jogging


                                                                                             Command executing
                                         End of Positioning relay                            flag ON
                                                 for AX2

                                                                                             Stop reverse jogging


                                                                                             Command executing
                                              Error Notification                             flag OFF
                                                relay for AX2




            Figure 3.6 Jogging Program




58                                                                                                   TI 34M6K01-01E
                                                                      3. Sample Programs for Positioning Modules
                                                                                                        F3NC01/02


                                    Speed




                               I00401                 Start forward
                                                         jogging
                               I00402
                                                                                   Stop forward
                               I00403                                                 jogging

                               Y00440

                               X00415

                               I00404
                                                  Command executing


                 Figure 3.7 Forward Jogging Program and Timing Chart for X Axis

                 The sample program shown in Figure 3.6 starts forward jogging of the X-axis when
                 /I00401 turns on, and stops forward jogging when /I00401 turns off. Relay /I00404
                 turns on during jogging.
                 In addition, execution can be prohibited by turning on relay I00099, which is the
                 execution disable relay (NC contact).
                 The relays allocated for forward and reverse jogging of each axis are shown below.
                 X-axis
                   Start/stop forward jogging   /I00401 Command executing flag                    /I00404
                   Start/stop reverse jogging   /I00411 Command executing flag                    /I00414
                 Y-axis
                   Start/stop forward jogging   /I02401 Command executing flag                    /I02404
                   Start/stop reverse jogging   /I02411 Command executing flag                    /I02414




TI 34M6K01-01E                                                                                                59
                                                                 3. Sample Programs for Positioning Modules
                                                                                                    F3NC01/02


3.2.7           Origin Search
                To perform origin search, register the required parameters as described in Section
                3.2.4, and then change the Origin Search output relay (Y!!!37/ Y!!!53) from OFF
                to ON.



        ***** Origin search (ZSEARCH) *****


        *** Execute X-axis origin search ***

                                                                                          Request to search for
                                                                                          origin


                                                                                          Start Origin Search
                                                                                          relay ON


                                                                                          Waiting for ACK flag
                                                                                          ON
                                    End of Origin Search
                                       relay for AX1
                                                                                          Command executing
                                                                                          flag ON


                                       Error Notification                                 Start Origin Search
                                                                                          relay OFF
                                       relay for AX1

                                                                                          Waiting for ACK flag
                                                                                          OFF


                                                                                          Command executing
                                                                                          flag OFF


        *** Execute Y-axis origin search ***

                                                                                          Request to search for
                                                                                          origin


                                                                                          Start Origin Search
                                                                                          relay ON


                                                                                          Waiting for ACK flag
                                                                                          ON

                                  End of Origin Search
                                     relay for AX2                                        Command executing
                                                                                          flag ON


                                                                                          Start Origin Search
                                                                                          relay OFF
                                            Error Notification
                                              relay for AX2
                                                                                          Waiting for ACK flag
                                                                                          OFF


                                                                                          Command executing
                                                                                          flag OFF


                Figure 3.8 Origin Search Program




60                                                                                                TI 34M6K01-01E
                                                                    3. Sample Programs for Positioning Modules
                                                                                                      F3NC01/02



                                                                             Start Z-phase
                                                                                search

                              Origin input                                      Z-phase detected
                                        Speed                                  (origin established)




                                I00501
                                                      Start origin search
                                I00502

                                I00503                                            End origin search

                                Y00437

                                X00405

                                I00504
                                                       Command executing


                 Figure 3.9 Origin Search Program and Timing Chart for X Axis

                 The sample program shown in Figure 3.8 starts origin search for both X and Y axes
                 on the rising edge of /I00501. In addition, execution can be prohibited by turning on
                 relay I00099, which is the execution disable relay (NC contact).
                 As shown in the timing chart in Figure 3.9, when the module detects a falling edge in
                 the origin input, it starts Z-phase search. When it detects one Z-phase, it takes that
                 position as the origin and then, decelerates and stops. /I00504 relay is on during
                 origin search.




TI 34M6K01-01E                                                                                              61
                                                                            3. Sample Programs for Positioning Modules
                                                                                                                   F3NC01/02


3.2.8     PTP Movement (execution by direct command)
          To move an object from a current position to a specified position in point-to-point
          (PTP) movement where the travel speed and target position are specified directly,
          write the parameters listed in Table 3.4, and change the Execute Direct Command
          output relay (Y!!!33/ Y!!!49) from OFF to ON. In PTP movement described here,
          each axis moves to its target position independently. The route taken to reach the
          target position is insignificant. Execution is performed according to the setup for 2-axis
          PTP Mode. (Register parameters using sample program in Section 3.2.4)
          Table 3.4 Startup Parameters for PTP Operation
         Data Position Number
                                                   Parameter                                  Value Range
         AX1              AX2

        005/006        213/214     Direct Command Position                  -83,886,080 to 83,886,070
         008              216      Direct Command Speed                     1 to 25,000
          An object is moved using the system shown in Figure 3.1 successively to 4 points as
          shown in Figure 3.10.


            Y
                                                      P3(280,170)




                                                                                                    P2(500,110)
                  P4(100,90)




                                                               P1(320,30)
                                                                                                                  X

                                         Table 3.10 Target Positions (coordinate system is in mm)


          The travel speed for each segment of the movement is as shown below.
                Movement                  Axis                  Speed
                                          (X/Y)                 [mm/s]
          Moving to P1                     X                     100
                                           Y                      50
          Moving to P2                     X                     150
                                           Y                      75
          Moving to P3                     X                     200
                                           Y                     1000
          Moving to P4                     X                     150
                                           Y                      75
          The corresponding parameters values to be written to the positioning module are
          calculated as follows:
               Movement          Axis             Direct Command            Speed
                                 (X/Y)                Position
          Moving to P1            X                 800000                   2500
                                  Y                 75000                    1250
          Moving to P2            X                 1250000                  3750
                                  Y                 275000                   2000
          Moving to P3            X                 700000                   5000
                                  Y                 425000                   2500
          Moving to P4            X                 250000                   3750
                                  Y                 225000                   2000
          Figure 3.11 shows the corresponding sample program and Figure 3.12 shows the
          timing chart.




62                                                                                                                TI 34M6K01-01E
                                                                        3. Sample Programs for Positioning Modules
                                                                                                        F3NC01/02



             ***** PTP Movement (execution using direct command ) (PTPMOV) *****



             *** Set the number of target positions in data registers ***


                                                                                                          Number of target
                                                                                                          positions



             *** Set X-axis target position and speed data in data registers ***



                                                                                                          Target position P1



                                                                                                          Swap words




                                                                                                          Target speed



                                                                                                          Target position P2


                                                                                                          Swap words




                                                                                                          Target speed




                                                                                                          Target position P3


                                                                                                          Swap words




                                                                                                          Target speed



                                                                                                          Target position P4


                                                                                                          Swap words




                                                                                                          Target speed



             *** Set Y-axis target position and speed data in data registers ***



                                                                                                          Target position P1



                                                                                                          Swap words




                                                                                                          Target speed



TI 34M6K01-01E                                                                                                  63
                                                       3. Sample Programs for Positioning Modules
                                                                                         F3NC01/02


                                                                                 Target position P2


                                                                                 Swap words




                                                                                 Target speed



                                                                                 Target position P3



                                                                                 Swap words



                                                                                 Target speed



                                                                                 Target position P4



                                                                                 Swap words



                                                                                 Target speed



     *** Execute PTP operation ***


                                                                                 Initiate positioning
                                Initiate positioning                             flag ON
                                   operation flag

                                                                                 Clear data register
                                                                                 for indexing


                                                                                 Target position data
                                                                                 index


                                                                                 Write X-axis target
                                                                                 position


                                                                                 Write X-axis target
                                                                                 speed

           Start positioning                                                     Write Y-axis target
            operation flag                                                       position


                                                                                 Write Y-axis target
                                                                                 speed

                                                                                 Execute Direct
                                                                                 Command relay for X
                                                                                 axis ON

                                                                                 Execute Direct
                                                                                 Command relay for Y
                                                                                 axis ON

                                                                                 Waiting for X-axis
                                                                                 ACK flag ON




64                                                                                     TI 34M6K01-01E
                                                                                      3. Sample Programs for Positioning Modules
                                                                                                                          F3NC01/02



                                                                                                                 Waiting for Y-axis
                 Execute Direct
                                                                                                                 ACK flag ON
                 Command ACK
                 relay for X-axis
                                                                                                                 Command
                                                                                                                 executing flag ON

                                                                                                                 Execute Direct
                                                                                                                 Command relay for
                                                                                                                 X axis OFF

                                            Execute Direct
                                                                                                                 Waiting for X-axis
                                          Command ACK relay                                                      ACK flag OFF
                                              for Y-axis

                                                                                                                 X-axis positioning in
                                                                                                                 progress flag ON

                                                                                                                 Execute Direct
                                                Execute Direct                                                   Command relay for
                                             Command ACK relays                                                  Y axis OFF

                                                                                                                 Waiting for Y-axis
                                                                                                                 ACK flag OFF


                                                                                                                 Y-axis positioning in
                                                                                                                 progress flag ON




                                                                                                                 Start positioning flag
                                                                                                                 ON

                            Positioning in                    End-of-positioning
                                                                                                                 X-axis positioning in
                            progress flags                         relays
                                                                                                                 progress flag OFF


                                                                                                                 Y-axis positioning in
                                                                                                                 progress flag OFF


                            Movement to final target                                                             Increment index
                            position completed                                                                   register


                                                                                                                 Command
                                                        Start from first target position                         executing flag OFF



                                                                                                                 Reset index register


                  Figure 3.11 PTP Operation (execution by direct command) Program




TI 34M6K01-01E                                                                                                                        65
                                                                3. Sample Programs for Positioning Modules
                                                                                                F3NC01/02


             I00601

             I00602

             I00612

             I00604
                                     Command executing




              Speed



                                          X-axis Execute
             I00603                      Direct Command


      X axis Y00433
                                       End of positioning
             X00401

             I00605
                                      Positioning in progress

             X00415




              Speed



                                      Y-axis Execute
             I02603                  Direct Command


      Y axis Y00449
                                      End of positioning
             X00417

             I02605
                                      Positioning in progress

             X00431



     Figure 3.12 PTP Operation Program Timing Chart

     The sample program shown in Figure 3.11 moves the work piece successively
     through positions P1 to P4 while /I00601 is on. When both X and Y axes reach a
     target position, movement begins to the next target position. The first movement is
     initiated by /I00602 turning on but movement to subsequent points are triggered by
     /I00612 turning on. /I00604 is ON during movement of either the X or Y axis.
     In addition, execution can be prohibited by turning on relay I00099, which is the
     execution disable relay (NC contact).




66                                                                                             TI 34M6K01-01E
                                                                           3. Sample Programs for Positioning Modules
                                                                                                                  F3NC01/02


3.2.9               PTP Movement (execution by number command)
                    To move an object from a current position to a specified position in point-to-point
                    (PTP) movement where the travel speed and target position are specified using a
                    speed data number and position data number, first register the speed data, position
                    data and other required parameters as described in Section 3.2.4, and then write the
                    speed data number and position data number in the data positions listed in Table 3.5.
                    Next, change the Execute Number Command output relay (Y!!!34/ Y!!!50) from
                    OFF to ON. In PTP movement described here, each axis moves to its target position
                    independently. The route taken to reach the target position is insignificant. Execution
                    is performed according to the setup for 2-axis PTP Mode. (Register parameters as
                    described in Section 3.2.4)
                    Table 3.5 Startup Parameters for PTP Operation
                  Data Position Number
                                                       Parameter                          Value Range
                  AX1             AX2

                  009             217       Command Position Number         0 to 64
                  010             218       Command Speed Number            1 to 16


                    Figure 3.13 shows a sample program that performs the same positioning operation as
                    the sample program described in Section 3.2.8.

          ***** PTP Movement (execution by number command) (PTPNMOV) *****



          *** Set the number of target positions in data registers for X and Y axes ***


                                                                                                        Number of target
                                                                                                        position data



          *** Set X-axis target position data in data registers ***


                                                                                                        Clear position data



                                                                                                        P1




                                                                                                        Swap words



                                                                                                        P2




                                                                                                        Swap words



                                                                                                        P3



                                                                                                        Swap words



                                                                                                        P4




                                                                                                        Swap words




TI 34M6K01-01E                                                                                                                67
                                                                 3. Sample Programs for Positioning Modules
                                                                                                    F3NC01/02



     *** Set Y-axis target position data in data registers ***



                                                                                          Clear position data



                                                                                          P1



                                                                                          Swap words




                                                                                          P2




                                                                                          Swap words




                                                                                          P3



                                                                                          Swap words




                                                                                          P4



                                                                                          Swap words



     *** Set X-axis speed data in data registers ***




     *** Set Y-axis speed data in data registers ***




68                                                                                                TI 34M6K01-01E
                                                                             3. Sample Programs for Positioning Modules
                                                                                                                 F3NC01/02


                 *** Set command number data for both X and Y axes in data registers ***


                                                                                                       Command position
                                                                                                       no. for P1


                                                                                                       Command speed no.
                                                                                                       for P1


                                                                                                       Command position
                                                                                                       no. for P2


                                                                                                       Command speed no.
                                                                                                       for P2


                                                                                                       Command position
                                                                                                       no. for P3



                                                                                                       Command speed no.
                                                                                                       for P3


                                                                                                       Command position
                                                                                                       no. for P4


                                                                                                       Command speed no.
                                                                                                       for P4


                                                                                                       Initiate positioning
                                                                                                       operation flag ON



                                                                                                       Clear index data
                                                                                                       register


                 *** Registers speed data and position data for X-axis ***


                                                                                                       Write X-axis speed
                                                                                                       data


                                                                                                       Write X-axis position
                                                                                                       data


                                                                                                       Write Y-axis speed
                                                                                                       data


                                                                                                       Write Y-axis position
                                                                                                       data


                                                                                                       X-axis Set
                                                                                                       Parameters relay
                                                                                                       ON

                                                                                                       Y-axis Set
                                                                                                       Parameters relay
                                                                                                       ON


                                                                                                       X-axis Waiting for
                                                                                                       ACK flag ON


                                                                                                       Y-axis Waiting for
                                                                                                       ACK flag ON


                                                                                                       Command executing
                                                                                                       flag ON




TI 34M6K01-01E                                                                                                                69
                                                             3. Sample Programs for Positioning Modules
                                                                                                F3NC01/02


                                                                                      X-axis Set Parameters
                                                                                      relay OFF


                                                                                      X-axis waiting for ACK
                                                                                      flag OFF


                                                                                      Y-axis Set Parameters
                                                                                      relay OFF


                                                                                      Y-axis waiting for ACK
                                                                                      flag OFF


                                                                                      Start PTP operation
                                                                                      flag ON


     *** Start Positioning ***        Initiate positioning
                                               flag


                                                                                      Target position
                                                                                      number index


                                                                                      Write X-axis number



                                                                                      Write Y-axis number
             Start positioning flag
                                                                                      X-axis Execute
                                                                                      Number Command
                                                                                      relay f ON

                                                                                      Y-axis Execute
                                                                                      Number Command
                                                                                      relay ON


                                                                                      X-axis Waiting for ACK
                                                                                      flag ON
             X-axis Execute
            Number Command                                                            Y-axis Waiting for ACK
               ACK relay                                                              flag ON


                                                                                      Command executing
                                                                                      flag ON

                                                                                      X-axis Execute
                                                                                      Number Command
                                                                                      OFF

                                                                                      X-axis waiting for ACK
                                                                                      flag OFF

                                       Y-axis Execute
                                      Number Command                                  X-axis positioning in
                                         ACK relay                                    progress flag OFF

                                                                                      Y-axis Execute
                                                                                      Number Command
                                                                                      OFF


                                                                                      Y-axis waiting for ACK
                                                                                      flag OFF


                                                                                      Y-axis positioning in
                                                                                      progress flag OFF




70                                                                                            TI 34M6K01-01E
                                                                                    3. Sample Programs for Positioning Modules
                                                                                                                        F3NC01/02




                                                                                                             Start positioning
                                                                                                             operation flag ON
                                                                                   End of
                   Positioning in                 Execute Number                 positioning
                   progress flags               Command ACK relays                 relays                    X-axis positioning in
                                                                                                             progress flag OFF


                                                                                                             Y-axis positioning in
                                                                                                             progress flag OFF
                     Movement to final target
                       position completed
                                                                                                             Increment index register



                                                                                                             Command executing
                                                       Start from first target                               flag OFF
                                                               position

                                                                                                             Reset index register


                 Figure 3.13 PTP Operation (execution by number command) Program

                 The sample program shown in Figure 3.13 moves the work piece successively
                 through positions P1 to P4 while /I00701 is on. When both X and Y axes reach a
                 target position, movement begins to the next target position. When /I00702 turns on,
                 the program registers speed data and position data, and begins positioning using
                 number command execution when registration is completed (I00712 turns on).
                 Movement to subsequent points are triggered by /I00722 turning on. /I00704 is ON
                 during movement of either the X or Y axis.
                 In addition, execution can be prohibited by turning on relay I00099, which is the
                 execution disable relay (NC contact).




TI 34M6K01-01E                                                                                                                       71
                                                                           3. Sample Programs for Positioning Modules
                                                                                                              F3NC01/02


3.2.10         2-axis Linear Interpolation Movement
               (execution by direct command)
               This section discusses a sample program for 2-axis linear interpolation movement.
               Linear interpolation movement can be easily performed by setting the control mode
               parameter to 2-axis linear interpolation mode.
               Executing a positioning command for AX1 in 2-axis linear interpolation mode activates
               both AX1 and AX2 simultaneously to perform positioning along a straight line path. In
               actual movement, the positioning module computes the ratio of travel distance to
               command speed for each axis, and adjusts the acceleration time, deceleration time
               and travel speed of the axis with the smaller ratio to accommodate the axis with the
               larger ratio. It then moves AX1 and AX2 simultaneously.
               The example shown here moves the work piece along straight lines joining the same
               4 points used in PTP movement in Section 3.2.8 as shown in Figure 3.14. Figure
               3.15 shows the corresponding timing chart.
                 Y
                                                       P3(280,170)




                                                                                            P2(500,110)
                      P4(100,90)




                                                              P1(320,30)
                                                                                                            X

               Figure 3.14 Target Positions (Coordinate system is in mm)



         ***** Linear Interpolation Operation Program (STRMOV) ******


         *** Set number of target position data in data registers ***


                                                                                                    No. of target position
                                                                                                    data


         *** Set position data and speed data for X-axis **



                                                                                                    Target position P1



                                                                                                    Swap words




                                                                                                    Travel speed



                                                                                                    Target position P2



                                                                                                    Swap words




                                                                                                    Travel speed




72                                                                                                          TI 34M6K01-01E
                                                                   3. Sample Programs for Positioning Modules
                                                                                                      F3NC01/02



                                                                                            Target position P3



                                                                                            Swap words




                                                                                            Travel speed




                                                                                            Target position P4



                                                                                            Swap words




                                                                                            Travel speed



             *** Set position data and speed data for Y-axis ***



                                                                                            Target position P1



                                                                                            Swap words




                                                                                            Travel speed



                                                                                            Target position P2



                                                                                            Swap words




                                                                                            Travel speed




                                                                                            Target position P3



                                                                                            Swap words




                                                                                            Travel speed




                                                                                            Target position P4



                                                                                            Swap words




                                                                                            Travel speed




TI 34M6K01-01E                                                                                                   73
                                                                                        3. Sample Programs for Positioning Modules
                                                                                                                            F3NC01/02



     *** Start Linear Interpolation Operation ***


                                                                                                                Start positioning flag ON
                          Start positioning flag

                                                                                                                Clear index data
                                                                                                                register


                                                                                                                Target position data
                                                                                                                index


                                                                                                                Write X-axis direct
                                                                                                                command position


                                                                                                                Write X-axis direct
                                                                                                                command speed


                                                                                                                Write Y-axis direct
          Initiate positioning                                                                                  command position
                   flag

                                                                                                                Write Y-axis direct
                                                                                                                command speed


                                                                                                                X-axis Execute Direct
                                                                                                                Command relay ON


                                                                                                                X-axis Wait for ACK flag
                                                                                                                ON


                                                    AX1 Execute Direct                                          Command executing
                                                                                                                flag ON
                                                   Command ACK relay

                                                                                                                X-axis Execute Direct
                                                                                                                Command relay OFF


                                 Positioning in                                                                 X-axis Wait for ACK flag
                                 progress flag                                                                  OFF


                                                                                                                X-axis positioning in
                                                                AX1 End of                                      progress flag ON
                                                              Positioning relay
                                                                                                                Initiate positioning flag
                                                                                                                ON


                                                                                                                X-axis positioning in
                                                                                                                progress flag OFF


          Movement to final target                                                                              Increment index register
            position completed

                                                                                                                Command executing
                                                           Starting from first target                           flag OFF
                                                                   position
                                                                                                                Reset index register



            Figure 3.15 Sample Program for Linear Interpolation Operation (execution by direct
                        command)




74                                                                                                                        TI 34M6K01-01E
                                                                     3. Sample Programs for Positioning Modules
                                                                                                     F3NC01/02


                   I00801

                   I00802

                   I00812
                                            AX1 Execute Direct
                   I00803                      Command


                   Y00433
                                                    AX1 End of
                                                    Positioning
                   X00401

                   I00805

                   X00415

                   I00804
                                           Positioning in progress




                  Speed along
                    A-axis




                  Speed along
                    Y-axis




                 Figure 3.16 Timing Chart for Linear Interpolation Operation Program

                 Compared to the sample program for PTP movement (execution by direct command),
                 the sample program shown in Figure 3.15 does not require program code for AX2 (Y-
                 axis). In 2-axis linear interpolation mode, you need to only perform execution for one
                 axis to activate both axes.
                 The sample program moves the axes along straight lines successively through
                 positions P1 to P4 while /I00801 is on.
                 In addition, execution can be prohibited by turning on relay I00099, which is the
                 execution disable relay (NC contact).




TI 34M6K01-01E                                                                                              75
                                                                      3. Sample Programs for Positioning Modules
                                                                                                         F3NC01/02


3.2.11        Pattern Operation (and 2-axis linear interpolation)
              This sample program performs pattern positioning. To perform pattern positioning, in
              addition to registering speed data and position data, you need to also register pattern
              data by combining speed data numbers and position data numbers. Next, write 0 to
              the command position number, and then turn on the Execute Number Command
              (Y!!!34/ Y!!!50) output relay.
              The sample program shown in Figure 3.17 performs linear interpolation movement
              described in 3.2.10 using pattern operation.

     ***** Pattern positioning under 2-axis linear interpolation mode (PTNMOV) ******



     *** Set position data in data registers for X-axis ***



                                                                                                Clear position data




                                                                                                P1



                                                                                                Swap words




                                                                                                P2



                                                                                                Swap words




                                                                                                P3



                                                                                                Swap words




                                                                                                P4




                                                                                                Swap words




     *** Set position data in data registers for Y-axis ***



                                                                                                Clear position data




                                                                                                P1



                                                                                                Swap words




                                                                                                P2



                                                                                                Swap words




76                                                                                                     TI 34M6K01-01E
                                                                  3. Sample Programs for Positioning Modules
                                                                                                    F3NC01/02



                                                                                            P3



                                                                                            Swap words




                                                                                            P4



                                                                                            Swap words



           *** Set speed data in data registers for X-axis ***



                                                                                              1
                                                                                            Vx



                                                                                              2
                                                                                            Vx



                                                                                              3
                                                                                            Vx



                                                                                              4
                                                                                            Vx



           *** Set speed data in data registers for Y-axis ***


                                                                                              1
                                                                                            Vy



                                                                                              2
                                                                                            Vy



                                                                                              3
                                                                                            Vy



                                                                                              4
                                                                                            Vy




          *** Set pattern data in data registers for X-axis ***


                                                                                            Clear pattern data




                                                                                            Position 1, Speed 4



                                                                                            Position 2, Speed 5




                                                                                            Position 3, Speed 6




                                                                                            Position 4, Speed 7




TI 34M6K01-01E                                                                                                   77
                                                                       3. Sample Programs for Positioning Modules
                                                                                                            F3NC01/02



     *** Set pattern data in data registers for Y axis ***


                                                                                               Clear pattern data



                                                                                               Position 1, Speed 4




                                                                                               Position 2, Speed 5



                                                                                               Position 3, Speed 6




                                                                                               Position 4, Speed 7



     *** Pattern operation ***


                                                                                               Start Positioning flag
                                                                                               ON



     *** Register speed data, position data, pattern data (setup parameters) ***


                                                                                               Write X-axis speed data



                                                                                               Write X-axis position
                                                                                               data



                                                                                               Write X-axis pattern data



                                                                                               Write Y-axis speed data



                                                                                               Write Y-axis position
                                                                                               data



                                                                                               Write Y-axis pattern data



                                                                                               X-axis Set Parameters
                                                                                               relay ON


                                                                                               X-axis waiting for ACK
                                                                                               flag ON


                                                                                               Command executing flag
                                                                                               ON


                                                                                               X-axis Set Parameters
                                                                                               relay OFF


                                                                                               X-axis waiting for ACK
                                                                                               flag OFF




78                                                                                                        TI 34M6K01-01E
                                                                         3. Sample Programs for Positioning Modules
                                                                                                             F3NC01/02



                                                                                                  Initiate PTP positioning
                                                                                                  flag ON

                                          Start positioning
           *** Start Positioning ***             flag


                                                                                                  Write 0 to X-axis
                                                                                                  position command
                                                                                                  number

                                                                                                  Write 0 to X-axis
                                                                                                  position command
                                                                                                  number

                                                                                                  X-axis Execute Number
                                                                                                  Command relay ON

                  Initiate positioning                                                            X-axis waiting for ACK
                           flag                                                                   flag ON

                                                    AX1 Execute Number
                                                    Command ACK relay                             Command executing
                                                                                                  flag ON


                                                                                                  X-axis Execute Number
                                                                                                  Command relay OFF


                                                       AX1 End of                                 X-axis waiting for ACK
                                                     Positioning relay                            flag OFF


                                                                                                  X-axis positioning in
                                                                                                  progress OFF


                                                                                                  Initiate positioning flag
                                                                                                  ON


                                                                                                  X-axis positioning in
                                                                                                  progress OFF


                                                                                                  Command executing
                                                                                                  flag OFF


                   Figure 3.17 Sample Program for Pattern Operation (2-axis linear interpolation)



                   Although the sample program shown in Figure 3.17 performs 2-axis linear
                   interpolation, you need to only initiate execution for AX1 (X axis) to activate both axes
                   after registering speed data, position data and pattern data..
                   The sample program moves the axes along straight lines through positions P1 to P4
                   repeatedly while /I00901 is on. When I00901 is turned off, positioning continues to P4
                   and stops.
                   In addition, execution can be prohibited by turning on relay I00099, which is the
                   execution disable relay (NC contact).




TI 34M6K01-01E                                                                                                            79
             3. Sample Programs for Positioning Modules
                                             F3NC01/02

     MEMO.




80                                          TI 34M6K01-01E
                                                                                    3. Sample Programs for Positioning Modules
                                                                                                                    F3NC11/12


3.3              Sample Programs for F3NC12-0N
                 This section describes some sample ladder programs for the positioning module (with
                 pulse output) model F3NC12-0N. All programs assume that the module is installed in
                 slot 4. The system is the X-Y table shown in Figure 3.1 (P41).
                 Note: Sample programs in this section assume that that sequence CPU module model F3SP28 is used. Beware of
                       differences in device range when using other sequence CPUs.




3.3.1            F3NC12-0N Operation Procedure
                 Figure 3.18 shows the procedure for operating the positioning module (with pulse
                 output).

                                                              F3NC11 / F3NC12
                                                              Operation Procedure




                                                              Register parameters




                                                              Turn servomotor on
                                                          (when using AC servomotor)




                                                                    Execute
                                                                  origin search




                                                           Execute various positioning
                                                                    actions




                                                    Figure 3.18 Operation Procedure

                 -   Register Parameters
                     Register parameters for the positioning system. Calculate parameter values to
                     match the positioning system used.
                 -   Turn on servomotor
                     When performing positioning using a servo system, you need to put the servo
                     system into Servo ON status by turning on the SERVO ON input of the driver
                     (pulse type) using a contact output module.
                 -   Execute origin search
                     Perform an origin search to enable correct positioning. If origin search is not done,
                     the default origin will be the position of the axes when the module is powered on.
                 -   Execute various positioning actions
                     Execute positioning actions as required by rotating the motor.




TI 34M6K01-01E                                                                                                                81
                                                                  3. Sample Programs for Positioning Modules
                                                                                                  F3NC11/12




3.3.2     Calculation of Registered Parameters
          The following example shows a minimal set of registered parameters, which must be
          defined for controlling a servomotor using the positioning module.
          A list of registered parameters is given in Table 3.6.
          Table 3.6     Registered parameters
         Data Position Number
                                            Parameter                           Range of values
         AX1            AX2
        030/031       230/231   Forward Limit                 0 to 8388608[pulse]
        032/033       232/233   Reverse Limit                 -8388608 to 0[pulse]
        034/035       234/235   Speed Limit                   0 to 16367616[(1/65536)pulse/ms]
                                                              0: Positive data indicates CW pulse
         036            236     Direction of Motor Rotation
                                                              1: Negative data indicates CW pulse
                                                              0: Pulse and direction signal
         037            237     Pulse Output Mode
                                                              1:CW pulse and CCW pulse
         038            238     Contact Input Polarity        1 bit for each point


          The X-axis and Y-axis for the system shown in Figure 3.1 are mapped to axes AX1
          and AX2 respectively.


          -    Forward limit and reverse limit
               Set the boundaries for forward movement and reverse movement in terms of
               number of pulses from the origin (absolute position). Taking into consideration
               overshoot during normal positioning, the preset limits are within the real
               boundaries of the movement mechanism. Example preset values are given below:
               For forward limit:
               AX1: 580 [mm] ÷ 10 [mm/rot] × 2500 [pulse/rot] = 145000 [pulse].
               AX2: 180 [mm] ÷ 10 [mm/rot] × 2500 [pulse/rot] = 45000 [pulse]
               For reverse limit:
               AX1: -5 [mm] ÷ 10 [mm/rot] × 2500 [pulse/rot] = -1250 [pulse].
               AX2: -5 [mm] ÷ 10 [mm/rot] × 2500 [pulse/rot] = -1250 [pulse]

          -    Speed limit
               Set the speed limit for the path to be generated by the positioning module. Here,
               we set the speed limit for both axes to the same value as the motors for both the
               axes have the same specification.
               500 [mm/s] ÷ 10 [mm/rot] × 2500 [pulse/rot] = 125000 [pulse/s]
               125000 [pulse/s] ÷ 1000 × 65536 = 8192000 [(1/65536) pulses/ms]

          -    Direction of motor rotation
               This defines the mapping between positive or negative position data from the CPU
               module and pulse output.
               Set to 0 so that positive data indicates CW pulses.

          -    Contact input polarity


82                                                                                                  TI 34M6K01-01E
                                                                           3. Sample Programs for Positioning Modules
                                                                                                           F3NC11/12

                      This sets the polarity of contact inputs.
                      Set the value to $000C for the following configuration: forward limit input (NC
                      contact), reverse limit input (NC contact), origin input (NO contact), general-
                      purpose and external trigger (not used).


                 15 14 13 12 11 10 9   8   7   6   5   4   3   2   1   0


                                                                             Origin input
                                                                             Near origin input (external trigger input)
                                                                             Forward limit input
                                                                             Reverse limit input
                                                                             Ready input
                                                                             Encoder Z-phase input




TI 34M6K01-01E                                                                                                            83
                                                                                      3. Sample Programs for Positioning Modules
                                                                                                                      F3NC11/12




3.3.3            Reading Module Status
                 You can read various statuses of the positioning module such as error status and
                 current position. Table 3.7 lists all the module statuses.
                                                        Table 3.7 List of Module Statuses
        Data Position Number
                                                   Parameter                                              Remarks
         AX1          AX2
         039          239       Error Status                                     Error code when error occurs
         040          240       Contact Input Status                             State of contact input
     041/042        241/242     Current Position Status                          [pulse]
     043/044        243/244     Current Speed Status                             [(1/65536)pulse/ms]
     045/046        245/246     Current Position Status                          [pulse]
                                                                                 Time remaining for the generated path to arrive at
         047          247       Remaining Deceleration Time
                                                                                 the target position [ms]
                                                                                 Accelerating, decelerating, over-ramping, waiting
         048          248       Extended Status                                  for trigger, control mode and other information on
                                                                                 movement


                 Figure 3.19 shows a sample program for reading statuses of the positioning module.
                 The statuses read are stored in data registers and internal registers listed in Table 3.8.
                 Any status of the positioning module can be read. This sample program always reads
                 all statuses.
                                        Table 3.8 Devices for Storing Modules Status Values Read
                                     Status
                                                                                                Description
                        AX1                      AX2
                       D0101                    D2101          Error status
                       D0102                    D2102          Contact input status
                   D0103/D0104                D2103/D2104      Current position status [pulse]
                   D0105/D0106                D2105/D2106      Current speed status [(1/65536)pulse/ms
                   D0107/D0108                D2107/D2108      Target position status [pulse]
                       D0109                    D2109          Remaining deceleration time
                       D0110                    D2110          Extended status
                  I00101 to I00116        I02101 to I02116     Bit data of contact inputs
                  I00117 to I00132        I02117 to I02132     Bit data of extended status




84                                                                                                                    TI 34M6K01-01E
                                                                           3. Sample Programs for Positioning Modules
                                                                                                           F3NC11/12




                 ***** Read module status (READST) *****


                 *** X axis ***


                                                                                                    Read AX1 status



                                                                                                    Expand contact
                                                                                                    inputs


                                                                                                    Expand extended
                                                                                                    status



                 *** Y axis ***


                                                                                                    Read AX2 status




                                                                                                    Expand contact
                                                                                                    inputs


                                                                                                    Expand extended
                                                                                                    status


                        Figure 3.19   Sample Program for Reading Module statuses




TI 34M6K01-01E                                                                                                        85
                                                                   3. Sample Programs for Positioning Modules
                                                                                                   F3NC11/12




3.3.4         Registering Parameters
              Figure 3.20 shows a sample ladder program, which registers parameters calculated in
              section 3.3.2 to the positioning module, together with the timing chart (for only the X-
              axis).
              The sample program shown in Figure 3.20 registers parameters for the X and Y axes
              on the rising edge of internal relay /I00001. During registration, internal relays /I00004
              and /I02004 turn on to indicate that a command is being executed.



        ***** Set parameters (SETPARA) *****


        *** Set parameters for X-axis in data registers ***


                                                                                                      Forward limit



                                                                                                      Reverse limit




                                                                                                      Speed limit



                                                                                                      Direction of
                                                                                                      rotation


                                                                                                      Pulse output
                                                                                                      mode


                                                                                                      Contact output
                                                                                                      polarity


        *** Set parameters for Y-axis in data registers ***



                                                                                                      Forward limit



                                                                                                      Reverse limit




                                                                                                      Speed limit



                                                                                                      Direction of
                                                                                                      rotation


                                                                                                      Pulse output
                                                                                                      mode


                                                                                                      Contact output
                                                                                                      polarity




86                                                                                               TI 34M6K01-01E
                                                                 3. Sample Programs for Positioning Modules
                                                                                                 F3NC11/12

          *** Set parameters for X-axis in module ***



                                                                                                Request to set
                                                                                                parameters



                                                                                                Write parameters



                                                                                                Set Parameters relay for
                                                                                                X axis ON


                                                                                                Waiting for execute
                                     Set Parameters relay                                       command ACK flag ON
                                           for AX1
                                                                                                Command executing
                                                                                                flag ON



                                                                                                Set Parameters relay for
                                                                                                X axis OFF


                                                                                                Waiting for set
                                                                                                parameters ACK flag
                                                                                                OFF


                                                                                                Command executing
                                                                                                flag OFF

          *** Set parameters for Y-axis in module ***



                                                                                                Request to set
                                                                                                parameters



                                                                                                Write parameters



                                                                                                Set Parameters relay for
                                                                                                Y axis ON


                                                                                                Waiting for execute
                                                                                                command ACK flag ON


                                          Set Parameters relay                                  Command executing
                                                                                                flag ON
                                                 for AX2


                                                                                                Set Parameters relay for
                                                                                                Y axis OFF


                                                                                                Waiting for set
                                                                                                parameters ACK flag
                                                                                                OFF


                                                                                                Command executing
                                                                                                flag OFF




TI 34M6K01-01E                                                                                            87
                                                            3. Sample Programs for Positioning Modules
                                                                                            F3NC11/12




               I00001
                                         Request to set
                                          parameters
               I00002

               I00003                                      Request to set
                                                          parameters ACK
               Y00448

               X00416

               I00004
                                Command executing

     Figure 3.20   Set Parameters Program and Timing Chart for X Axis




88                                                                                        TI 34M6K01-01E
                                                                     3. Sample Programs for Positioning Modules
                                                                                                     F3NC11/12




3.3.5               Reset Error
                    When the positioning module is in error state, execution requests for all commands
                    are ignored, except for the Reset Error command. To have the module start accepting
                    commands again, you need to first reset the error state. To do so, reset all output
                    relays and then turn on the Reset Error output relay (Y□□□45/ Y□□□61). Figure
                    3.21 shows the sample ladder program and the timing chart for the X-axis.




            ***** Reset error (RLSERR) *****


            *** X axis ***

                                                                                                      Request to reset error
                                                                                                      ON

                                     Error Notification relay
                                                                                                      Request to reset error
                                            for AX1                                                   OFF


                                                                                                      Start Operation relay
                                                                                                      for AX1 OFF
                                               Rising edge of
                                            Reset Error relay                                         Reset Error relay ON



                                                                                                      Reset Error relay OFF



            *** Y axis ***


                                                                                                      Request to reset
                                                                                                      error ON


                                          Error Notification                                          Request to reset
                                                                                                      error OFF
                                            relay for AX2

                                                                                                      Start Operation relay
                                                                                                      for AX2 OFF


                                                                                                      Reset Error relay ON


                                                                                                      Reset Error relay
                                                                                                      OFF




TI 34M6K01-01E                                                                                              89
                                                            3. Sample Programs for Positioning Modules
                                                                                            F3NC11/12




                                                  Error reset request

                           I00201

                           I00202

                           I00203

                           Y00445

                           X00412

                                                           Error Nofitication
                                                              relay OFF


     Figure 3.21   Reset Error Program and Timing Chart for X Axis

     The sample program shown in Figure 3.21 assumes that a rising edge of relay
     /I00201 will be generated manually. If the cause of an error is not removed, the Error
     Notification relay will not turn off even if you execute a Reset Error command.




90                                                                                        TI 34M6K01-01E
                                                                               3. Sample Programs for Positioning Modules
                                                                                                               F3NC11/12




3.3.6              Jogging
                   While a designated relay is on, you can cause the motor to rotate in the forward or
                   reverse direction at a specified speed, acceleration and deceleration using forward
                   jogging or reverse jogging. This allows you to test positioning actions of the system,
                   as well as adjust position manually.
                   To perform jogging, write required values for the parameters listed in Table 3.9 to the
                   positioning module, and then turn on the Forward Jogging (Y□□□42/Y□□□58) or
                   Reverse Jogging (Y□□□43/Y□□□59) output relay.
                   Table 3.9    Startup Parameters for Jogging
                  Data Position Number
                                                     Parameter                              Value Range
                  AX1            AX2
                 009/010       209/210    Startup Speed                    0 to 16367616[(1/65536)pulse/ms]
                 011/012       211/212    Target Speed (Jogging Speed)     0 to 16367616[(1/65536)pulse/ms]
                  013            213      Acceleration Time                0 to 32767[ms]
                  014            214      Deceleration Time                0 to 32767[ms]


                   Let’s assume we want to perform jogging at the following speed, acceleration and
                   deceleration.
                   Speed    X axis: 100[mm/s]
                            Y-axis: 50[mm/s]
                   Acceleration time (common to both X and Y axis): 100[ms]
                   Deceleration time (common to both X and Y axis): 200[ms]
                   From the above conditions we can calculate the target jogging speed:
                     X-axis 100[mm/s]÷10[mm/rot]×2500[pulse/rot] = 25000[pulse/s]
                               25000[pulse/s]÷1000×65536 = 1638400[(1/65536)pulse/ms]
                        Y-axis 50[mm/s]÷10[mm/rot]×2500[pulse/rot] = 12500[pulse/s]
                            12500[pulse/s]÷1000×65536 = 819200[(1/65536)pulse/ms]
                   Startup up speed is set to 0 since we are using C servomotor.
                   Figure 3.22 shows a sample ladder program for performing forward jogging and
                   reverse jogging. Figure 3.23 shows the timing chart (for forward jogging of the X-axis)


             ***** Jogging (JOG) *****



             *** Set jogging parameters for X-axis in data registers ***


                                                                                                                Starting speed



                                                                                                                Target speed for
                                                                                                                jogging



                                                                                                                Acceleration time



                                                                                                                Deceleration time




TI 34M6K01-01E                                                                                                        91
                                                                          3. Sample Programs for Positioning Modules
                                                                                                          F3NC11/12




     *** Set jogging parameters for Y-axis in data registers ***



                                                                                                            Starting speed


                                                                                                            Target speed for
                                                                                                            Jogging


                                                                                                            Acceleration time



                                                                                                            Deceleration time




     *** Execute forward jogging for X-axis ***

                                                                                                            Request to start
                                                                                                            forward jogging


                                                                                                            Request to stop
                                                                                                            forward jogging


                                                                                                            Write parameters



                                                                                                            Start forward jogging


                                                                                                            Command executing
                                                                                                            flag ON
                                            End of Positioning relay
                                                    for AX1
                                                                                                            Stop forward jogging


                                                                                                            Command executing
                                                     Error Notification                                     flag OFF

                                                       relay for AX1



       *** Execute forward jogging for Y-axis ***


                                                                                                            Request to start
                                                                                                            forward jogging


                                                                                                            Request to stop
                                                                                                            forward jogging


                                                                                                            Write parameters



                                                                                                            Start forward jogging



                                                                                                            Command executing
                                                                                                            flag ON


92                                                                                                      TI 34M6K01-01E
                                                                                   3. Sample Programs for Positioning Modules
                                                                                                                   F3NC11/12




                                                                                                                    Stop forward jogging

                                                       End of Positioning
                                                          relay for AX2                                             Command executing
                                                                                                                    flag OFF

                                                              Error Notification
                                                                relay for AX2

                 *** Execute reverse jogging for X-axis ***


                                                                                                                    Request to start
                                                                                                                    reverse jogging


                                                                                                                    Request to stop
                                                                                                                    reverse jogging


                                                                                                                    Write parameters



                                                                                                                    Start reverse jogging


                                                                                                                    Command executing
                                                    End of Positioning                                              flag ON

                                                       relay for AX1

                                                                                                                    Stop reverse jogging


                                                        Error Notification                                          Command executing
                                                                                                                    flag OFF
                                                         relay fAor AX1




                 *** Execute reverse jogging for Y-axis ***

                                                                                                                    Request to start
                                                                                                                    reverse jogging


                                                                                                                    Request to stop
                                                                                                                    reverse jogging


                                                                                                                    Write parameters



                                                                                                                    Start reverse jogging



                                                                                                                    Command executing
                                                                                                                    flag ON




TI 34M6K01-01E                                                                                                            93
                                                                              3. Sample Programs for Positioning Modules
                                                                                                              F3NC11/12




                         End of Positioning relay
                                                                                                       Stop reverse jogging
                                for AX2

                                                                                                       Command executing
                                                                                                       flag OFF
                                               Error Notification relay
                                                      for AX2




     Figure 3.22      Jogging Program



              Speed




         I00401                       Start forward
                                         jogging
         I00402
                                                                          Stop forward
         I00403                                                              jogging

         Y00442

         X00415

         I00404
                                Command executing


     Figure 3.23      Forward Jogging Program and Timing Chart for X Axis

     The sample program shown in Figure 3.22 starts forward jogging of the X-axis when
     /I00401 turns on, and stops forward jogging when /I00401 turns off. Relay /I00404
     turns on during jogging.
     In addition, execution can be prohibited by turning on relay I00099, which is the
     execution disable relay (NC contact).
     The relays allocated for forward and reverse jogging of each axis are shown below.
     -    X-axis
         Start/stop forward jogging                   /I00401 Command executing flag                          /I00404
         Start/stop reverse jogging                   /I00411 Command executing flag                          /I00414
     -   Y-axis
         Start/stop forward jogging                   /I02401 Command executing flag                          /I02404
         Start/stop reverse jogging                   /I02411 Command executing flag                          /I02414




94                                                                                                           TI 34M6K01-01E
                                                                                               3. Sample Programs for Positioning Modules
                                                                                                                               F3NC11/12




3.3.7              Origin Search
                   To perform origin search, write required values for the parameters listed in Table 3.10
                   to the positioning module, and change the Origin Search output relay (Y□□□37/
                   Y□□□53) from OFF to ON.
                   Table 3.10       Startup Parameters for Origin Search
                  Data Position Number
                                                                   Parameter                             Value Range
                  AX1               AX2
                 009/010        209/210            Startup Speed                         0 to 16367616[(1/65536)pulse/ms]
                 011/012        211/212            Target Speed (Search Speed)           0 to 16367616[(1/65536)pulse/ms]
                  013               213            Acceleration Time                     0 to 32767[ms]
                  014               214            Deceleration Time                     0 to 32767[ms]
                  020               220            Origin Search Mode                    For details, see Table 3.11 (P95)
                                                                                         0:    Forward
                  021               221            Origin Search Direction
                                                                                         1:    Reverse
                                                                                         0:    Rising edge
                  022               222            Z-phase Edge Selection
                                                                                         1:    Falling edge
                  023               223            Z-phase Pulse Count                   0 to 32767 [times]
                 024/025        224/225            Z-phase Search Range                  0 to 8388608[pulse]


                   Figure 3.11 Origin Search Mode




            15 14 13 12 11 10 9           8    7     6   5     4     3   2     1   0
             0 0 0 0
                                                                               0   0      Ignore falling edge of origin input
                                                                               0   1      Shift to Z-phase search on falling edge of origin input
                                                                               1   0      Decelerate and stop on falling edge of origin input
                                                                               1   1      Stop immediately on falling edge of origin input
                                                                     0   0                Ignore rising edge of origin input
                                                                     0   1                Shift to Z-phase search on rising edge of origin input
                                                                     1   0                Decelerate and stop on rising edge of origin input
                                                                     1   1                Stop immediately on rising edge of origin input
                                                         0     0                          Ignore falling edge of forward limit
                                                         0     1                          Shift to Z-phase search on falling edge of forwarwd limit
                                                         1     0                          Decelerate and stop on falling edge of forward limit
                                                         1     1                          Stop immediately on falling edge of forwarwd limit
                                               0     0                                    Ignore rising edge of forward limit *1
                                               0     1                                    Shift to Z-phase search on rising edge of forward limit
                                               1     0                                    Decelerate and stop on rising edge of forward limit
                                               1     1                                    Stop immediately on rising edge of forwarwd limit
                                     0    0                                               Ignore falling edge of reverse limit
                                     0    1                                               Shift to Z-phase search on falling edge of reverse limit
                                     1    0                                               Decelerate and stop on falling edge of reverse limit
                                     1    1                                               Stop immediately on falling edge of reverse limit
                           0    0                                                         Ignore rising edge of reverse limit *2
                           0    1                                                         Shift to Z-phase search on rising edge of reverse limit
                           1    0                                                         Decelerate and stop on rising edge of reverse limit
                           1    1                                                         Stop immediately on rising edge of reverse limit

                   *1: Error when forwarding                 *2: error when reversing


                   The system shown in Figure 3.1 has forward limit input, reverse limit input and origin
                   input switches for both the X and Y axes. The following text describes how to use
                   these inputs to determine the position of the work piece, and set the original search
                   mode and origin search direction so that the origin search will be successful
                   regardless of the initial position of the work piece when origin search is initiated. The
                   method described applies to both X and Y axes.
                   Search speed                                                : 20mm/s
                   Acceleration time                                           : 100ms
                   Deceleration time                                           : 200ms
                   Z-phase search range                                        : 2500 pulses

TI 34M6K01-01E                                                                                                                                        95
                                                                        3. Sample Programs for Positioning Modules
                                                                                                        F3NC11/12




        The origin search speed setpoint can then be calculated as follows:
          20[mm/s]÷10[mm/rot]×2500[pulse/rot] = 5000[pulse/s]
          5000[pulse/s]÷1000×65536 = 327680[(1/65536)pulse/ms]

     The search mode and origin search direction parameters should be set as described
     below according to the position of the work piece when origin search is initiated.
     (Figure 3.24A shows the programmed movement sequence for different initial
     positions)
     When the work piece is at A or B:
      Origin search direction: forward
      Searches for Z-phase (1 rising edge) on falling edge of origin input, ignoring rising
        edge
      Stop immediately on rising edge of reverse limit input
      Stop immediately on rising edge of forward limit input
     The search mode for implementing the above conditions is $CC01
     When the work piece is at C or D:
      Origin search direction: reverse
      Decelerates and stops on rising edge of origin input, ignoring falling edge
      Stop immediately on rising edge of reverse limit input
      Stop immediately on rising edge of forward limit input
     The search mode for implementing the above conditions is $CC08.


                Negative                                                               Positive


      Reverse limit
      X axis I0104
      Y axis I2104


      Forward limit


       Origin switch
       X axis I0110
       Y axis I2110
                                                          After origin input turns off, searches
         Z phase                                          forward for rising edge of one Z-phase
                                                          pulse. Once detected, current position is
                                                   1
                                                          taken as origin

                       A
                                          B                        Same search direction
                                   C                               regardless of whether
                                                                   forward limit swtich is
                                                                   on or off
                                                                                      D


                                        Programmed movement sequences
                                           for different initial positions

     Figure 3.24A          Programmed Movement Sequence for Different Initial Position of the Work
                           piece




96                                                                                                    TI 34M6K01-01E
                                                                         3. Sample Programs for Positioning Modules
                                                                                                         F3NC11/12

                  Figure 3.24 shows a sample ladder program for performing origin search. Figure 3.25
                  shows the timing chart (for origin search for the X-axis, starting at position A)



       ***** Origin search (ZSEARCH) *****


       *** Set common origin search parameters for X-axis in data registers ***



                                                                                                      Startup speed



                                                                                                      Search speed




                                                                                                      Acceleration time



                                                                                                      Deceleration time



                                                                                                      Z-phase edge
                                                                                                      selection



                                                                                                      Z-phase pulse
                                                                                                      count


                                                                                                      Z-phase search
                                                                                                      range


       *** Set common origin search parameters for Y-axis in data registers ***



                                                                                                      Startup speed



                                                                                                      Search speed




                                                                                                      Acceleration time



                                                                                                      Deceleration time



                                                                                                      Z-phase edge
                                                                                                      selection



                                                                                                      Z-phase pulse
                                                                                                      count


                                                                                                      Z-phase search
                                                                                                      range




TI 34M6K01-01E                                                                                                   97
                                                                            3. Sample Programs for Positioning Modules
                                                                                                            F3NC11/12




     *** Set parameters for reverse origin search for X-axis in data registers ***

                                                                                                          Request to search for
                          AX1 Origin switch                                                               origin



                                                                                                          X-axis reverse search
                                                                                                          flag ON


                                                                                                          Decelerate and stop
                                              AX1 reverse limit switch                                    on rising edge of origin
                                                                                                          input

                                                                                                          Origin search in
                                                                                                          reverse direction



     *** Set parameters for forward origin search for X-axis in data registers ***

                                                                                                          Shift to Z-phase
                                                                                                          search on falling
                                                                                                          edge of origin input


                                                                                                          Origin search in
                                                                                                          forward direction
                               AX1 forward search
                                   request flag




     *** Set parameters for reverse origin search for Y-axis in data registers ***

                                                                                                          Request to search for
                          AX2 Origin switch                                                               origin



                                                                                                          Y-axis reverse search
                                                                                                          flag ON


                                          AX2 reverse limit switch                                        Decelerate and stop
                                                                                                          on rising edge of origin
                                                                                                          input

                                                                                                          Origin search in
                                                                                                          reverse direction



     *** Set parameters for forward origin search for Y-axis in data registers ***

                                                                                                          Shift to Z-phase
                                                                                                          search on falling
                                                                                                          edge of origin input


                               AX2 forward search                                                         Origin search in
                                                                                                          forward direction
                                   request flag




98                                                                                                        TI 34M6K01-01E
                                                                                            3. Sample Programs for Positioning Modules
                                                                                                                            F3NC11/12

       *** Execute X-axis origin search ***



                                                                                                                         Write parameters



                                                                                                                         Start Origin Search
                                                                                                                         relay ON



                                                                                                                         Waiting for ACK flag
                                                                                                                         ON


                                   End of Origin Search                                                                  Command executing
                                                                                                                         flag ON
                                       relay for AX1

                                                                                                                         Start Origin Search
                                                                                                                         relay OFF
                                                Error Notification
                                                  relay for AX1
                                                                                                                         Waiting for ACK flag
                                                                                                                         OFF


                                                                                                                         Command executing
                                                                                                                         flag OFF
                                                                  AX1 reverse search flag
                                                                                                                         X-axis reverse search
                                                                                                                         flag OFF


                                                                                                                         Request X-axis
                                                                                                                         forward search ON


       *** Execute Y-axis origin search ***



                                                                                                                         Write parameters




                                                                                                                         Start Origin Search
                                                                                                                         relay ON


                                 End of Origin Search                                                                    Waiting for ACK flag
                                                                                                                         ON
                                    relay for AX2


                                                                                                                         Command executing
                                                                                                                         flag ON
                                    Error Notification
                                      relay for AX2                                                                      Start Origin Search
                                                                                                                         relay OFF


                                                                                                                         Waiting for ACK flag
                                                                                                                         OFF

                                                                  AX2 reverse search flag
                                                                                                                         Command executing
                                                                                                                         flag OFF



                                                                                                                         Y-axis reverse search
                                                                                                                         flag OFF


                                                                                                                         Request Y-axis forward
                                                                                                                         search ON
                   Figure 3.24      Origin Search Program


TI 34M6K01-01E                                                                                                                         99
                                                              3. Sample Programs for Positioning Modules
                                                                                              F3NC11/12




                                                         Start Z-phase
                                                            search

         Origin input                                      Z-phase detected
                   Speed                                  (origin established)




           I00501
                                   Start origin search
           I00502

           I00503                                             End origin search

           Y00437

           X00405

           I00504
                                    Command executing

      Figure 3.25    Origin Search Program Timing Chart for X Axis



      The sample program shown in Figure 3.24 starts origin search for both X and Y axes
      on the rising edge of /I00501. In addition, execution can be prohibited by turning on
      relay I00099, which is the execution disable relay (NC contact).
      As shown in the timing chart in Figure 3.25, when the module detects a falling edge in
      the origin input, it starts Z-phase search. When it detects one Z-phase, it takes that
      position as the origin and then, decelerates and stops. /I00504 relay is on during
      origin search.




100                                                                                         TI 34M6K01-01E
                                                                                             3. Sample Programs for Positioning Modules
                                                                                                                             F3NC11/12




3.3.8              PTP Movement
                   To move an object from a current position to a specified position in point-to-point
                   (PTP) movement, write the parameters listed in Table 3.12, and change the Start
                   Operation Command output relay (Y□□□33/ Y□□□49) from OFF to ON. In PTP
                   movement described here, each axis moves to its target position independently. The
                   route taken to reach the target position is insignificant.
                   Table 3.12         Startup Parameters for PTP Operation
                  Data Position Number
                                                            Parameter                                        Value Range
                  AX1               AX2
                 009/010          209/210      Startup Speed                          0 to 16367616[(1/65536)pulse/ms]
                 011/012          211/212      Target Speed                           0 to 16367616[(1/65536)pulse/ms]
                  013               213        Acceleration Time                      0 to 32767[ms]
                  014               214        Deceleration Time                      0 to 32767[ms]
                  015               216        (reserved)
                 016/017          216/217      Target position                        -8388608 to 8388608[pulse]
                                                                                      0:     Normal operation
                  018               218        Interpolation Mode                     1:     X-axis circular Interpolation
                                                                                      2:     Y-axis circular interpolation


                   An object is moved using the system shown in Figure 3.1 successively to 4 points as
                   shown in Figure 3.26.

                           Y
                                                                     P 3( 280, 170)




                                                                                                                    P 2( 500, 110)
                               P 4( 100, 90)




                                                                             P 1( 320, 30)
                                                                                                                                         X

                                                 Table 3.26      Target Positions (coordinate system is in mm)


                   The travel speed, acceleration time and deceleration time for each segment of the
                   movement is as shown below.
                   (The acceleration and deceleration curve is trapezoidal)



                           Movement                Axis                    Speed                Acceleration Time            Deceleration Time
                                                   (X/Y)                   [mm/s]                     [ms]                         [ms]
                   Moving to P1                     X                       100                        300                         400
                                                    Y                        50                        200                         300
                   Moving to P2                     X                       150                        400                         500
                                                    Y                        75                        250                         350
                   Moving to P3                     X                       200                        500                         600
                                                    Y                       100                        300                         400
                   Moving to P4                     X                       150                        400                         500
                                                    Y                        75                        250                         350




TI 34M6K01-01E                                                                                                                               101
                                                                              3. Sample Programs for Positioning Modules
                                                                                                              F3NC11/12




                 The corresponding parameters values to be written to the positioning module are
                 calculated as follows:
                    Movement          Axis             Speed          Current Position   Acceleration Time    Deceleration
                                      (X/Y)     [(1/65536)pulse/ms]       [pulse]              [ms]            Time [ms]
                 Moving to P1          X             1638400               80000               300                 400
                                       Y              819200                7500               200                 300
                 Moving to P2          X             2457600              125000               400                 500
                                       Y             1228800               27500               250                 350
                 Moving to P3          X             3276800               70000               500                 600
                                       Y             1638400               42500               300                 400
                 Moving to P4          X             2457600               25000               400                 500
                                       Y             1228800               22500               250                 350
                 Figure 3.27 shows the corresponding sample program and Figure 3.28 shows the timing
                 chart.
                 The sample program is divided into two blocks as follows:
                 - PTPSET             : Sets PTP operation parameters in registers.
                 - PTPMOV             : PTP operation program



      ***** Set PTP parameters in data registers (PTPSET) *****

      *** Set the number of target positions in data registers (for X and Y Axes) ***



                                                                                                             Number of target
                                                                                                             positions



      *** Set target position data for X-axis in data registers ***




                                                                                                             Target speed
                                                                                                             (100 mm/s)


                                                                                                             Acceleration time
                                                                                                             (300 ms)




102                                                                                                           TI 34M6K01-01E
                                                                    3. Sample Programs for Positioning Modules
                                                                                                    F3NC11/12

                                                                                                Deceleration time
                                                                                                (400 ms)


                                                                                                Target position
                                                                                                (320 mm)




                                                                                                Travel speed
                                                                                                (150 mm/s)


                                                                                                Acceleration time
                                                                                                (400 ms)


                                                                                                Deceleration time
                                                                                                (500 ms)



                                                                                                Target position
                                                                                                (500 mm)




                                                                                                Travel speed
                                                                                                (200 mm/s)


                                                                                                Acceleration time
                                                                                                (500 ms)



                                                                                                Deceleration time
                                                                                                (600 ms)


                                                                                                Target position
                                                                                                (280 mm)




                                                                                                Travel speed
                                                                                                (150 mm/s)


                                                                                                Acceleration time
                                                                                                (400 ms)



                                                                                                Deceleration time
                                                                                                (500 ms)


                                                                                                Target position
                                                                                                (100 mm)




    *** Set target position data for Y-axis in data registers ***




                                                                                                Travel speed
                                                                                                (50 mm/s)


TI 34M6K01-01E                                                                                            103
      3. Sample Programs for Positioning Modules
                                      F3NC11/12




                                  Acceleration time
                                  (200 ms)


                                  Deceleration time
                                  (300 ms)



                                  Target position
                                  (30 mm)




                                  Travel speed
                                  (75 mm/s)



                                  Acceleration time
                                  (250 ms)


                                  Deceleration time
                                  (350 ms)


                                  Target position
                                  (110 mm)




                                  Travel speed
                                  (100 mm/s)


                                  Acceleration time
                                  (300 ms)



                                  Deceleration time
                                  (400 ms)


                                  Target position
                                  (170 mm)




                                  Travel speed
                                  (75 mm/s)


                                  Acceleration time
                                  (250 ms)



                                  Deceleration time
                                  (350 ms)


                                  Target position
                                  (90 mm)




104                                 TI 34M6K01-01E
                                                    3. Sample Programs for Positioning Modules
                                                                                    F3NC11/12


       ***** Execute PTP operation (PTPMOV) *****


                                                                                Initiate positioning
                                                                                flag ON


                                                                                Clear data register for
                                                                                indexing


                                                                                Write X-axis startup
                                                                                speed


                                                                                Write Y-axis startup
                                                                                speed
                                 Initiate
                           positioning flag                                     Write X-axis
                                                                                interpolation mode


                                                                                Write Y-axis
                                                                                interpolation mode


                                                                                Target position data
                                                                                index


                                                                                Write X-axis target
                                                                                position data


                                                                                Write Y-axis target
                                                                                position data


                         Start                                                  Start Operation relay
                                                                                for X axis ON
                    positioning flag
                                                                                Start Operation relay
                                                                                for Y axis ON


                                                                                Waiting for X-axis
                                                                                ACK flag ON

                    Start Operation ACK
                                                                                Waiting for Y-axis
                       relay for X axis                                         ACK flag ON


                                                                                Command executing
                                                                                flag ON


                                                                                Start Operation relay
                                                                                for X axis OFF


                                                                                Waiting for X-axis
                                                                                ACK flag OFF


                                                                                X-axis positioning in
                                                                                progress flag ON




TI 34M6K01-01E                                                                               105
                                                                                     3. Sample Programs for Positioning Modules
                                                                                                                     F3NC11/12




                                                                                                                 Start Operation relay
                                                                                                                 for Y axis OFF


                                                Start Operation ACK                                              Waiting for Y-axis ACK
                                                                                                                 flag OFF
                                                   relay for Y axis

                                                                                                                 Y-axis positioning in
                                                                                                                 progress flag ON




                                                                                                                 Initiate positioning flag
                                                                                                                 ON


      Positioning in                     Start Operation              End of Positioning                         X-axis positioning in
                                                                                                                 progress flag OFF
      progress flag                         ACK relay                       relay

                                                                                                                 Y-axis positioning in
                                                                                                                 progress flag OFF
             Start of positioning to first target point
                                                                                                                 Command executing
                                                                                                                 flag OFF


      End of positioning to last target point                                                                    Increment index
                                                                                                                 register


                                                                                                                 Reset index register



               Figure 3.27         PTP Operation Program




106                                                                                                                TI 34M6K01-01E
                                                                           3. Sample Programs for Positioning Modules
                                                                                                           F3NC11/12
                        I00601

                        I00602

                        I00612

                        I00604                C om m and executing




                        Speed


                                                     Start O peration
                        I00603                    for X-axis positioning

                 X axis Y00433
                                                    End of positioning
                        X00401

                        I00605
                                                Positioning in progress
                        X00414




                        Speed

                                                   Start O preation
                        I02603                  for Y-axis positioning

                 Y axis Y00449
                                                   End of positioning
                        X00417

                        I02605
                                                Positioning in progress
                        X00431




                      Figure 3.28   PTP Operation Program Timing Chart

                      The sample program shown in Figure 3.27 moves the axes successively through
                      positions P1 to P4 while /I00601 is on. When both X and Y axes reach a target
                      position, movement begins to the next target position. The first movement is initiated
                      by /I00602 turning on but movement to subsequent points are triggered by /I00612
                      turning on. /I00604 is ON during movement of either the X or Y axis.
                      In addition, execution can be prohibited by turning on relay I00099, which is the
                      execution disable relay (NC contact).




TI 34M6K01-01E                                                                                                  107
                                                                                       3. Sample Programs for Positioning Modules
                                                                                                                       F3NC11/12




3.3.9           Linear Interpolation Movement
                 This section discusses a sample program for 2-axis linear interpolation movement.
                 The procedure for performing linear interpolation movement is given below.
                   (1) Set the target speeds of the 2 axes so that the ratio of their speeds equals the
                       ratio of their travel distances.
                   (2) Set the acceleration time and deceleration time to the same value.
                   (3) Change the Start Operation Command output relay (Y□□□33/ Y□□□49) of all
                       axes from OFF to ON simultaneously.
                 The example shown here moves the work piece along straight lines joining the same
                 4 points used in PTP movement in Section 3.3.8 as shown in Figure 3.29. It uses the
                 same data registers in the PTP movement example for storing the startup parameters
                 for each axis. The travel speeds of the axes are calculated to accommodate the axis
                 with the longest travel distance.
                     Y
                                                       P   3(   280, 170)




                                                                                                      P   2(   500, 110)
                         P   4(   100, 90)




                                                                   P   1(   320, 30)
                                                                                                                            X

                                                   Figure 3.29              Target Positions (Coordinate system is in mm)
                 The target speed of each axis can be calculated as follows.
                    Target speed of X-axis: Vx
                         Target speed of Y-axis: Vy
                         To move from starting position (X0,Y0) to target position (X1,Y1),
                    and assuming that the travel distance along the X-axis is the longer than the travel
                 along the Y-axis: i.e. |X1-X0|>|Y1-Y0|, then
                             Speed of X-axis = Vx
                             Speed of Y-axis = (|Y1-Y0|/|X1-X0|) * Vx
                 Figure 3.30 shows a sample program for linear interpolation. Only the program
                 segment for starting linear interpolation and the program block for calculating and
                 setting the travel speeds are shown. In addition, program blocks from other sample
                 programs are used. The program configuration is shown below:
                 -       PTPSET      : Sets parameters (uses the same parameters as the PTP
                         movement example)
                 -       STRMOV      : Program for starting linear interpolation movement
                 -       SETV        : Subroutine for calculating and setting target speeds
      ***** Execute linear interpolation (STRMOV) *****



                                                                                                                           Initiate positioning
                                                                                                                           flag ON


                                                                                                                           Clear index register



                                                                                                                           Write X-axis startup
                                                                                                                           speed


108                                                                                                                         TI 34M6K01-01E
                                              3. Sample Programs for Positioning Modules
                                                                              F3NC11/12


                                                                           Write Y-axis startup
                                                                           speed


                                                                           Write X-axis
                                                                           interpolation mode


                                                                           Write Y-axis
                                                                           interpolation mode

                                                                           Set X-axis previous
                                                                           position to current
                       Initiate positioning                                position
                              flag
                                                                           Set Y axis previous
                                                                           position to current
                                                                           position

                                                                           Target position data
                                                                           index


                                                                           Write X-axis target
                                                                           position data


                                                                           Write Y-axis target
                                                                           position data


                                                                           Set start position to
                                                                           previous position (X0)


                                                                           Set start position to
                                                                           previous position (Y0)


                                                                           Target position (X1)



                                                                           Target position (Y1)


                 Call subroutine for speed
                                                                           Target speed (Vx)
                  calculation and setup


                                                                           Target speed (Vy)



                                                                           Travel speed



                                                                           Target position data
                                                                           index


                                                                           Write X-axis target
                                                                           position data


                                                                           Waiting for X-axis
                                                                           ACK flag ON


                                                                           Waiting for Y-axis
                                                                           ACK flag ON

                                                                           Command executing
                                                                           flag ON

TI 34M6K01-01E                                                                        109
                                                                                               3. Sample Programs for Positioning Modules
                                                                                                                               F3NC11/12




                                                                                                                           Start Operation relay
                                                                                                                           for X-axis OFF
                                                      Start Operation ACK
                                                      relay for X axis                                                     Waiting for X-axis
                                                                                                                           ACK flag OFF


                                                                                                                           X-axis positioning in
                                                          Start Operation ACK                                              progress flag ON

                                                          relay for Y axis
                                                                                                                           Start Operation relay
                                                                                                                           for Y-axis OFF


                                                            Start Operation                                                Waiting for Y-axis
                                                                                                                           ACK flag OFF
                                                            ACK relay

                                                                                                                           Y-axis positioning in
                                                                                                                           progress flag ON




                                                                                                                           Start positioning
                                                                                                                           flag ON
                 Positioning in progress flag                       End of Positioning relay
                                                                                                                           X-axis positioning
                                                                                                                           in progress flag
                                                                                                                           OFF

                  Start of positioning to first target point                                                               Y-axis positioning in
                                                                                                                           progress flag OFF


                                                                                                                           Increment index
                                                                                                                           register

                End of positioning to last target point
                                                                                                                           Command
                                                                                                                           executing flag OFF


                                                                                                                           Reset index
                                                                                                                           register




       ***** Subroutine for calculating and setting travel speed (SETV) *****




      * Start position



  * Target position



      * Target speed




110                                                                                                                          TI 34M6K01-01E
                                                                            3. Sample Programs for Positioning Modules
                                                                                                            F3NC11/12




                                                                                                        End of positioning
                                                                                                        of either axis




                                                                                                        Compare travel
                                                                                                        distances

                                                                                                        Floating-point
                                                                                                        conversion |X1-X0|


                                                                                                        Floating-point
                                                                                                        conversion |Y1-Y0|


                                                                                                        Floating-point
                                                                                                        conversion (Vx)


                                                                                                        Floating-point
                                                                                                        conversion (Vy)


                                                                                                        Calculate Y-axis
                                                                                                        speed (Vy)




                                                                                                        Integer conversion
                                                                                                        (Vy)

                 X-axis travel > Y-axis travel
                                                                                                        Write X-axis speed
                                                                                                        (preset value)


                                                                                                        Write Y-axis speed
                                                                                                        (calculated value)


                                                                                                        Calculate X-axis
                                                                                                        travel speed (Vx)




                                                                                                        Integer conversion
                                                                                                        (Vx)

                    Y-axis travel > X-axis travel
                                                                                                        Write X-axis speed
                                                                                                        (calculated value)


                                                                                                        Write Y-axis speed
                                                                                                        (preset value)




                 Figure 3.30       Linear Interpolation Operation Program



TI 34M6K01-01E                                                                                                     111
                                                          3. Sample Programs for Positioning Modules
                                                                                          F3NC11/12




      Compared to the sample program for PTP movement, the sample program shown in
      Figure 3.30 has an additional subroutine for calculating travel speeds. Its timing chart
      is similar to that of PTP movement except that in linear interpolation movement, both
      axes reach the target position at the same time. The sample program moves the axes
      along straight lines successively through positions P1 to P4 while /I00701 is on. When
      the axes reach a target position, movement begins to the next target position.
      In addition, execution can be prohibited by turning on relay I00099, which is the
      execution disable relay (NC contact).




112                                                                                     TI 34M6K01-01E
                                                                         3. Sample Programs for Positioning Modules
                                                                                                         F3NC11/12




3.3.10           En-route Operation
                 If a positioning operation is initiated while the previous positioning operation is still in
                 progress, this starts an en-route operation. The procedure for en-route operation is
                 described below.
                   (1) Write to the positioning module startup parameters for moving to the first target
                       position for each axis.
                       (Calculate the travel speeds for linear interpolation.)
                   (2) Turn on the Start Operation Command output relay (Y□□□33/ Y□□□49) for all
                       axes simultaneously.
                   (3) Reset the Start Operation Command output relay of each axis after confirming
                       that the Start Operation Command ACK input relays (X□□□01/ X□□□17) of all
                       axes are set.
                   (4) After confirming that the Start Operation Command ACK input relays of all axes
                       are reset, write the parameters for moving to the next target position.
                   (5) After checking that the remaining deceleration times for all axes are below the
                       required value, turn on the Start Operation Command output relays for all axes
                       simultaneously.
                   (6) Repeat steps 3 through 5 until the final target position is reached.
                 Figure 3.31 shows a sample program for en-route operation. Figure 3.32 shows the
                 corresponding timing chart. The sample program shown here adds en-route operation
                 to the 2-axis linear interpolation operation described in Section 3.3.9. Like the linear
                 interpolation sample program, this sample program also uses program blocks from
                 other sample programs. The program configuration is given below:
                     - PTPSET  : Sets parameters (uses the same parameters as the PTP operation
                                 example)
                     - PASSMOV : Executes en-route operation.
                     - SETV    : subroutine for calculating and setting travel speeds.

       ***** Program for executing en-route operation (PASSM OV) *****

                                                                                                     Initiate positioning
                                                                                                     flag ON


                                                                                                     W rite param eters
                                                                                                     flag ON


                                                                                                     Clear index register



                                                                                                     W rite X-axis startup
                                                                                                     speed



                                                                                                     W rite Y-axis startup
                                                                                                     speed


                                                                                                     W rite X-axis
                                                                                                     interpolation m ode


                                                                                                     W rite Y-axis
                                                                                                     interpolation m ode


                                                                                                     Set X-axis to
                                                                                                     previous position to
                                                                                                     current position

                                                                                                     Set Y-axis previous
                                                                                                     position to current
                                                                                                     position



TI 34M6K01-01E                                                                                                   113
                                                                              3. Sample Programs for Positioning Modules
                                                                                                              F3NC11/12



                                                                                                        Target position data
                                                                                                        index


                                                                                                        Write X-axis target
                                                                                                        position data


                                                                                                        Write Y-axis target
                                                                                                        position data

                                                                                                        Set starting position to
                                           Write Parameters                                             previous position (X0)

                                               enable flag
                                                                                                        Set starting position to
                                                                                                        previous position (Y0)



                                                                                                        Target position (X1)



                                                                                                        Target position (Y1)



                                                                                                        Target speed (Vx)



                                                                                                        Target speed (Vy)
      Initiate positioning flag

                                               Call subroutine to calculate
                                                                                                        Set travel speed
                                                   and set travel speed
                                                                                                        Target position data
                                                                                                        index


                                                                                                        Write X-axis target
                                             Initiate positioning flag                                  position data


                                                                                                        Waiting for X-axis ACK
                          X-axis Start                                                                  flag ON
                     Operation ACK relay
                                                                                                        Waiting for Y-axis ACK
                                                                                                        flag ON


                                                                                                        Command executing
                                                                                                        flag ON

                                                                                                        Start Operation relay
                                                                                                        for X-axis OFF


                                  X-axis Start Operation                                                Waiting for X-axis ACK
                                                                                                        flag OFF
                                       ACK relay

                                                                                                        X-axis positioning in
                                                                                                        progress flag ON


                                                                                                        Start Operation relay
                                                                                                        for Y-axis OFF


                                                                                                        Waiting for Y-axis ACK
                                                                                                        flag OFF


                                                                                                        Y-axis positioning in
                                                                                                        progress flag ON


114                                                                                                         TI 34M6K01-01E
                                                                                    3. Sample Programs for Positioning Modules
                                                                                                                    F3NC11/12




                                                                                                                Increment index
                                                                                                                register


                                                                                                                Read X-axis remaining
                                            Start Operation ACK                                                 deceleration time
                                                   relay off
                                                                                                                Read Y-axis remaining
                                                                                                                deceleration time


                                                                                                                Write parameters
                                                                                                                enable flag ON
                                  Positioning in progress flag ON

                                                                                                                Positioning in progress
                                                                                                                flag ON


                                                                                                                Start positioning flag
                                                                                                                ON


                                                                                                                X-axis positioning in
                 End-of-positioning relay                                                                       progress flag OFF


                                                            Start deceleration                                  Y-axis positioning in
                                                                                                                progress flag OFF


                                                                                                                Command executing
                                                                                                                flag OFF


                                                                                                                Positioning in progress
                                                                                                                flag OFF


                                                                                                                Reset index register

                                       Figure 3.31        Program for En-route Operation




TI 34M6K01-01E                                                                                                              115
                                                                                     3. Sample Programs for Positioning Modules
                                                                                                                     F3NC11/12




             Speed




          I00801

          I00802

          I00812

          I00803

         Y00433

         X00401

          I00805
                                   Write parameters
          I00806

          I00816
                                       Positioning in progress
         X00415

          I00804                     Command executing

       Remaining
                      0                -1                    Valid             -1           -1     Valid    0
      deceleration
         time
                                                                 En-route interval

                Figure 3.32   Timing Chart for X Axis for En-route Program

            The sample program shown in Figure 3.31 writes startup parameters when the Start
            Operation Command ACK relay turns on, and starts the actual operation when the
            axes begin deceleration (when remaining deceleration time ≥ 0). The axes move
            along a straight line successively to points P1 through P4 while I00801 is on. As
            movement to the next target position begins before reaching the current target
            position, the axes do not stop at any of the target points except for the last target
            point. In addition, execution can be prohibited by turning on I00099, which is the
            execution disable relay (NC contact).




116                                                                                                                TI 34M6K01-01E
                                                                                      3. Sample Programs for Positioning Modules
                                                                                                                      F3NC11/12




3.3.11             Circular Interpolation
                   This section describes a sample program for moving from a starting position to a
                   target position through a path generated by circulation interpolation. To initiate a
                   circular interpolation operation, write the parameters listed in Table 3.13, and change
                   the Start Operation Command output relay (Y□□□33/ Y□□□49) from OFF to ON.
                   Table 3.13        Startup Parameters for Circular Interpolation Operation
                  Data Position Number
                                                  Parameter                                   Value Range
                  AX1              AX2
                 001/002         201/202    Position of Center     -8388608 to 8388608 [pulse]
                 003/004         203/204    Radius                 1 to 8388608 [pulse]
                                                                   -23592960 to 23592960[(1/65536) degree]
                 005/006         205/206    Starting Angle
                                                                   (-360 to 360 [degree])
                                                                   -2123366400 to 2123366400
                 007/008         207/208    Angular Travel
                                                                   [(1/65536) degree](-90 to 90[revolutions])
                                            Startup Angular
                 009/010         209/210                           1 to 23592960[(1/65536)degree/ms] (0 to 360[degree])
                                            Speed
                                            Target Angular
                 011/012         211/212                           1 to 23592960[(1/65536)degree/ms] (0 to 360[degree])
                                            Speed
                  013              213      Acceleration Time      0 to 32767[ms]
                  014              214      Deceleration Time      0 to 32767[ms]
                  015              215      Not used
                 016/017         216/217    Target Position        -8388608 to 8388608[pulse]

                                                                   0:   Normal operation
                  018              218      Interpolation Mode     1:   X-axis circular Interpolation
                                                                   2:   Y-axis circular interpolation
                   As shown in the example in Figure 3.33, the work piece is moved from the starting
                   position P (380, 90) along a circle of radius 80, centered at point O (300, 90) and
                   returned to point P. (Unit of measurement is mm).
                   The travel speed is 180 degrees per second (i.e. 1 revolution per 2 seconds)
                       Y




                                                                                   P (380,90)
                                                                    O (300,90)
                                                        R=80

                                                                                                 Curent position

                                                                                                                   X

                                              Figure 3.33        Movement Path (Coordinate system is in mm)
                   The parameter values to be written to the positioning module are given below:
                   -       Starting position, P
                            X axis       : 380[mm]÷10[mm/rot]×2500[pulse/rot] = 95000[pulse]
                            Y axis       : 90[mm]÷10[mm/rot]×2500[pulse/rot] = 22500[pulse]
                   -       Position of Center, O
                             X axis        : 300[mm]÷10[mm/rot]×2500[pulse/rot] = 75000[pulse]
                             Y axis        : 90[mm]÷10[mm/rot]×2500[pulse/rot] = 22500[pulse]
                   -       Radius, R       : 80[mm]÷10[mm/rot]×2500[pulse/rot] = 20000[pulse]
                   -       Startup angle   : 0[degree]

TI 34M6K01-01E                                                                                                             117
                                                                        3. Sample Programs for Positioning Modules
                                                                                                        F3NC11/12




                     -  Angular travel : 360[degree]×65536 = 23592960[(1/65536)degree]
                     -  Target angular speed : 180[degree/s]÷1000×65536 = 11796.48
                                                                approx. 11800[(1/65536)degree/ms]
                     - Acceleration time       : 300[ms]
                     - Deceleration time       : 400[ms]
                     - Target position         : Same as starting position P
                     Figure 3.34 shows the sample program.


      ***** Circular interpolation program (CRCLMOV) *****

      *** Set circular interpolation parameters in data registers ***

      ** X axis **




                                                                                                     Position of center



                                                                                                     Radius




                                                                                                     Starting angle



                                                                                                     Angular travel



                                                                                                     Startup angular
                                                                                                     speed



                                                                                                     Target angular speed



                                                                                                     Acceleration time



                                                                                                     Deceleration time




                                                                                                     Target position


                                                                                                     Interpolation mode
                                                                                                     (circular
                                                                                                     interpolation)


      ** Y axis **



                                                                                                     Position of center



                                                                                                     Radius



                                                                                                     Starting angle



118                                                                                                   TI 34M6K01-01E
                                                                           3. Sample Programs for Positioning Modules
                                                                                                           F3NC11/12

                                                                                                       Angular travel



                                                                                                       Startup angular
                                                                                                       speed



                                                                                                       Target angular
                                                                                                       speed


                                                                                                       Acceleration time



                                                                                                       Deceleration time




                                                                                                       Target position


                                                                                                       Interpolation
                                                                                                       mode (circular
                                                                                                       interpolation)


       ***** Set PTP operation parameters (for moving to starting point) in data registers *****


       ** X axis **



                                                                                                       Startup speed



                                                                                                       Target speed




                                                                                                       Acceleration time



                                                                                                       Deceleration time



                                                                                                       Target position



                                                                                                       Interpolation mode
                                                                                                       (PTP operation)


       ** Y axis **



                                                                                                       Startup speed



                                                                                                       Target speed



                                                                                                       Acceleration time




                                                                                                       Deceleration time



TI 34M6K01-01E                                                                                                   119
                                                                          3. Sample Programs for Positioning Modules
                                                                                                          F3NC11/12




                                                                                                         Target position



                                                                                                         Interpolation mode
                                                                                                         (PTP operation)


      ***** Move to starting point and prepare for circular interpolation *****



                                                                                                         Initiate positioning
                                                                                                         flag ON


                                                                                                         Write X-axis
                                                                                                         positioning
                                                                                                         parameters

                                                                                                         Write Y-axis
                                                                                                         positioning
                                                                                                         parameters


                                                                                                         Start Operation relay
                                                                                                         for X axis ON


                                                                                                         Start Operation relay
                                                                                                         for Y axis ON


                                                                                                         Waiting for X-axis
                                                                                                         ACK flag ON



                                                                                                         Waiting for Y-axis
                                                                                                         ACK flag ON


                                                                                                         Command executing
                                                                                                         flag ON


                                                                                                         Start Operation relay
                                                                                                         for X axis OFF



                                                                                                         Waiting for X-axis
                                                                                                         ACK flag OFF


                                                                                                         X-axis positioning in
                                                                                                         progress flag ON


                                                                                                         Start Operation relay
                                                                                                         for Y axis OFF



                                                                                                         Waiting for Y-axis
                                                                                                         ACK flag OFF


                                                                                                         Y-axis positioning in
                                                                                                         progress flag ON


                                                                                                         Start circular
                                                                                                         interpolation flag ON



                                                                                                         X-axis positioning in
                                                                                                         progress flag OFF




120                                                                                                     TI 34M6K01-01E
                                                                          3. Sample Programs for Positioning Modules
                                                                                                          F3NC11/12


                                                                                                      Y-axis positioning in
                                                                                                      progress flag OFF


                                                                                                      Command executing
                                                                                                      flag OFF


          *** Execute circular interpolation ***



                                                                                                      Write X-axis circular
                                                                                                      interpolation data


                                                                                                      Write Y-axis circular
                                                                                                      interpolation data


                                                                                                      Start Operation relay
                                                                                                      for X axis ON


                                                                                                      Start Operation relay
                                                                                                      for Y axis ON



                                                                                                      Waiting for X-axis
                                                                                                      ACK flag ON


                                                                                                      Waiting for Y-axis
                                                                                                      ACK flag ON


                                                                                                      Command executing
                                                                                                      flag ON



                   Figure 3.34    Sample Program for Circular Interpolation Positioning

                   The sample program shown in Figure 3.34 first performs PTP positioning to the
                   starting position when I00901 is turned on, and then repeats circulation interpolation
                   positioning so that the work piece revolves along a circular path.
                   Execution can be prohibited by turning on relay I00099, which is the execution disable
                   relay (NC contact).
                   This example does not involve en-route operation so the axes stop after completing
                   each revolution. Its timing chart is similar to that of PTP movement except that in this
                   case both axes complete positioning at the same time.




TI 34M6K01-01E                                                                                                   121
              3. Sample Programs for Positioning Modules
                                              F3NC11/12




      MEMO.




122                                         TI 34M6K01-01E
                                                                                3.     Sample Programs for Positioning Modules
                                                                                                                    F3NC51/52


3.4              Sample Programs for F3NC52-0N
                 This section describes some sample ladder programs for the positioning module
                 (analog voltage output) model F3NC52-0N. All programs assume that the module is
                 installed in slot 4. The system is the X-Y table shown in Figure 3.1 (P41). The
                 multiplication factor of the encoder is 4x, and each rotation corresponds to 10,000
                 pulses.
                 Note: Sample programs in this section assume that that sequence CPU module model F3SP28 is used. Beware of
                        differences in device range when using other sequence CPUs.




3.4.1            F3NC52-0N Operation Procedure
                 Figure 3.35 shows the procedure for operating the positioning module (analog voltage
                 pulse output).

                                                             F3NC51 / NC52
                                                            Operation Procedure




                                                             Register parameters




                                                             Turn servomotor on




                                                                  Execute
                                                                origin search




                                                         Execute various positioning
                                                                  actions




                                                    Figure 3.35 Operation Procedure

                 - Register Parameters
                   Register parameters for the positioning system. Calculate parameter values to
                   match the positioning system used.
                 - Turn on servomotor
                   When performing positioning using a servo system, you need to put the servo
                   system into Servo ON status. To do so, the positioning module and the servo
                   driver/motor must be correctly connected, and valid parameters must be registered.
                 - Execute origin search
                   Perform an origin search to enable correct positioning. If origin search is not done,
                   the default origin will be the position of the axes when the module is powered on.
                 - Execute various positioning actions
                    Execute positioning actions as required by rotating the motor.

TI 34M6K01-01E                                                                                                                123
                                                                               3.   Sample Programs for Positioning Modules
                                                                                                                 F3NC51/52



3.4.2            Calculation of Registered Parameters
                 The following example shows a minimal set of registered parameters, which must be
                 defined for controlling a servomotor using the positioning module.
                 A list of registered parameters is given in Table 3.14.
                 Table 3.14   Registered parameters
      Data Position Number                                           Default
                                        Parameter                                              Remarks or Value Range
        AX1          AX2                                              Value

       001/002      201/202   Forward Limit                     134217727           -134217728 to 134217727 [pulse]
       003/004      203/204   Reverse Limit                     -134217728          -134217728 to (Forward Limit - 1) [pulse]
       005/006      205/206   Speed Limit                       131072000           1 to 131072000 [(1/65535) pulses/ms] *1
       007/008      207/208   Over-speed Detection Value        131072000           1 to 131072000 [(1/65536) pulses/ms]
                              Over-acceleration Detection
       009/010      209/210                                     131072000           1 to 131072000 [(1/65536) pulses/ms/ms] *1
                              Value
       011/012      211/212   Deviation Error Detection Value   134211727           1 to 134217727 [pulse]
                                                                                    0: Positive voltage denotes forward
        013          213      Direction of Motor Rotation       0                   movement
                                                                                    1: Negative voltage denotes reverse
        014          214      Contact Input Polarity            0                   1 bit for each point
        015          215      Contact Output Polarity           0                   1 bit for each point
        016          216      Position Loop Range               200                 1 to 10000 [0.01Hz]
        017          217      Speed Feed Forward Factor         9500                0 to 20000 [1/10000]
                                                                                    0: General-purpose incremental method
                                                                                    1: Sanyo Denki's Manchester coding
        018          218      Encoder Method Designation        0
                                                                                    absolute
                                                                                    2: Yaskawa Electric's serial absolute
        019          219      Encoder Multiplication            4                   1: 1x 2: 2x 4: 4 x
       020/021      220/221   Speed/voltage Ratio               10240               1 to 2000000 [pps/V]
        022          222      (Reserved)                        0                   0: fixed value
       023/024      223/224   Absolute Encoder Offset           0                   -134217728 to 134217727 [pulse]
       025/026      225/226   Absolute Encoder Pulse Count      32768               1 to 134217727 [pulse]
        027          227      Sanyo ABS Bit Length              28                  17 to 28
                                                                                    0: Encoder data increases in positive
                                                                                    direction
        028          228      Sanyo ABS Rotation Direction      0
                                                                                    1: Encoder data increases in negative
                                                                                    direction
                                                                                    0:   Normal mode with limits
                                                                                    1:   Normal mode without limits
        029          229      Contact Input Mode                0
                                                                                    2:   Alarm detail mode with limits
                                                                                    3:   Alarm detail mode without limits


                 The X-axis and Y-axis for the system shown in Figure 3.1 are mapped to axes AX1
                 and AX2 respectively.


                 - Forward limit and reverse limit
                    Set the boundaries for forward movement and reverse movement in terms of
                    number of pulses from the origin (absolute position). Taking into consideration
                    overshoot during normal positioning, the preset limits are within the boundaries of
                    the movement mechanism but beyond the range of actual use. Example preset
                    values are given below:
                    For forward limit:

124                                                                                                                 TI 34M6K01-01E
                                                                              3.   Sample Programs for Positioning Modules
                                                                                                                F3NC51/52

                   AX1: 580 [mm] ÷ 10 [mm/rot] × 10000 [pulse/rot] = 580000 [pulse].
                   AX2: 180 [mm] ÷ 10 [mm/rot] × 10000 [pulse/rot] = 180000 [pulse]
                   For reverse limit:
                   AX1: -5 [mm] ÷ 10 [mm/rot] × 10000 [pulse/rot] = -5000 [pulse].
                   AX2: -5 [mm] ÷ 10 [mm/rot] × 10000 [pulse/rot] = -5000 [pulse]

                 - Speed limit
                   Set the speed limit for the path to be generated by the positioning module. Here,
                   we set the speed limit for both axes to the same value as the motors for both the
                   axes have the same specification.
                   500 [mm/s] ÷ 10 [mm/rot] × 10000 [pulse/rot] = 500000 [pulse/s]
                   500000 [pulse/s] ÷ 1000 × 65536 = 32768000 [(1/65536) pulses/ms]

                 - Over speed detection value
                   Set the speed limit of the motor during positioning. This limit applies to the Encoder
                   input, and is not relate to the speed of the path generated by the positioning
                   module. Here, we set the parameter to 1.1 times the speed limit for both axes.
                   32768000[(1/65536)pulse/ms]×1.1 = 36044800[(1/65536)pulse/ms]

                 - Over acceleration detection value
                   Set the acceleration limit of the motor during positioning. This limit applies to the
                   Encoder input, and is not relate to the acceleration of the path generated by the
                   positioning module. Here, we set the parameter to two times the acceleration and
                   deceleration limit for both axes.
                   500[mm/s]÷0.1[s]÷10[mm/rot]×10000[pulse] = 5000000[pulse/s/s]
                   5000000[pulse/s/s]÷1000÷1000×65536 = 327680[(1/65536)pulse/ms/ms]
                   327680[(1/65536)pulse/ms/ms]×2 = 655360[(1/65536)pulse/ms]

                 - Direction of motor rotation
                   This defines the mapping between positive or negative position data from the CPU
                   module and motor rotation.
                   Set to 0 so that positive analog voltage indicates CW pulses.

                 - Contact input polarity
                   This sets the polarity of contact inputs.
                   Set the value to $0007 for the following configuration: forward limit input (NC
                   contact), reverse limit input (NC contact), origin input (NO contact), ALM (NC
                   contact), general-purpose and external trigger (not used). (use limits in normal
                   mode)

                              15 14 13 12 11 10   9   8   7   6   5   4   3    2   1   0


                                                                                                Forward limit input
                                                                                                Reverse limit input
                                                                                                ALM
                                                                                                Origin input
                                                                                                External trigger input
                                                                                                General purpose input

TI 34M6K01-01E                                                                                                           125
                                                                    3.   Sample Programs for Positioning Modules
                                                                                                      F3NC51/52


      - Contact output polarity
          Specify the logic of contact output. Set to $0000 to configure all contact outputs as
          NO outputs.
                     15 14 13 12 11 10 9   8    7   6   5   4   3    2   1   0


                                                                                      Servo ON output
                                                                                      Driver reset output
                                                                                      Brake OFF output




      - Positioning loop range
          Specify the servo range of the position control loop in units of [0.01 Hz]. To adjust
          this parameter value, start from around 200 to 300 and gradually increase the
          value. Here, we set it to 1000.

      - Speed feed forward factor
          Set the speed feed forward factor in units of [1/10000]. Here, we use the default
          value of 9500.

      - Encoder type
          Set the type of encoder used. Here, set to 0 for using a general-purpose
          incremental encoder.

      - Encoder multiplication
          Specify the multiplication for incremental encoder. Here, set to 4 for 4x
          multiplication.

      - Speed/voltage ratio
          Specify the ratio of the speed command output voltage [V] to actual speed for
          positioning [pulse/s].
          2400[rpm]×10000[pulse]÷60[s/min] = 400000[pulse/s]
          400000[pulse/s]÷6[V] = 66667[pps/V]

      -   Absolute encoder offset              : (0)
      -   Absolute encoder pulse count         : (32768)
      -   Sanyo ABS bit length                 : (28)
      -   Sanyo rotation direction             : (0)
          For the above parameters, use the default values (bracketed values) as we are
          using a general-purpose incremental encoder.

      - Contact Input Mode
          Select the interpretation for external contact inputs.
          Set to 0 to use limits in normal mode.




126                                                                                                      TI 34M6K01-01E
                                                                                  3.   Sample Programs for Positioning Modules
                                                                                                                    F3NC51/52




3.4.3               Reading Modules Status
                    You can read various statuses of the positioning module such as error status and
                    current position. Table 3.15 lists all the module statuses.
                                                      Table 3.15 List of Module Statuses
        Data Position Number
                                                   Parameter                                  Remarks or Value Range
            AX1         AX2
            101         301       Error Status                                 Error code when error occurs
            102         302       Detailed Error Code                          Error information from absolute encoder
            103         303       Contact Input Status                         State of contact input
                                  Current Position Status
         104/105      304/305                                                  [pulse]
                                  (Command value)
                                  Current Speed Status
         106/107      306/307                                                  [(1/65536)pulse/ms]
                                  (Command value)
                                  Current Position Status
         108/109      308/309                                                  [pulse]
                                  (Encoder input value)
                                  Current Speed Status
          110/111     310/311                                                  [(1/65536)pulse/ms]
                                  (Encoder input value)
          112/113     312/313     Target Positions Status                      [pulse]
                                                                               Accelerating, decelerating, over-ramping, waiting
            114         314       Extended Status                              for trigger, control mode and other information on
                                                                               movement
                                                                               Time remaining for the generated path to arrive at
            115         315       Remaining Deceleration Time
                                                                               the target position [ms]
            116         316       Contact Output Status                        State of external contact output
                                  Absolute Data Status
                                  (Yasukawa Electric's ABS)                    [pulse]
          117/118     317/318
                                  Absolute Raw Data Received                   30 bits of received data
                                  (Sanyo Denki's ABS)


                    Figure 3.36 shows a sample program for reading statuses of the positioning module.
                    The statuses read are stored in data registers and internal registers listed in Table
                    3.16.
                    Any status of the positioning module can be read. This sample program always reads
                    all statuses.
                                      Table 3.16 Devices for Storing Modules Status Values Read
                                       Status
                                                                                               Description
                                AX1                 AX2
                              D0101                D2101        Error Status
                              D0102                D2102        Detailed Error Code
                              D0103                D2103        Contact Input Status
                         D0104/D0105             D2104/D2105    Current Position Status (Command value) [pulse]
                         D0106/D0107             D2106/D2107    Current Speed Status (Command value) [(1/65536)pulse/ms
                         D0108/D0109             D2108/D2109    Current Position Status (Encoder input value) [pulse]
                         D0110/D0111             D2110/D2111    Current Speed Status (Encoder input value) [(1/65536)pulse/ms
                         D0112/D0113             D2112/D2113    Current Position Status [pulse]
                              D0114                D2114        Extended Status
                              D0115                D2115        Remaining Deceleration Time
                              D0116                D2116        Contact Output Status
                        I00101 to I00116    I02101 to I02116    Bit Data for Contact Inputs
                        I00117 to I00132    I02117 to I02132    Bit Data for Contact Outputs
                        I00133 to I00148    I02133 to I02148    Bit Data for Extended Status



TI 34M6K01-01E                                                                                                               127
                                                3.   Sample Programs for Positioning Modules
                                                                                  F3NC51/52




      ***** Read module status (READST) *****


      *** X axis ***



                                                                               Read AX1 status



                                                                               Expand contact
                                                                               inputs


                                                                               Expand contact
                                                                               outputs



                                                                               Expand extended
                                                                               status



      *** Y axis ***


                                                                               Read AX2 status



                                                                               Expand contact
                                                                               inputs


                                                                               Expand contact
                                                                               outputs



                                                                               Expand extended
                                                                               status




128                                                                            TI 34M6K01-01E
                                                                   3.   Sample Programs for Positioning Modules
                                                                                                     F3NC51/52


3.4.4            Registering Parameters
                 Figure 3.37 shows a sample ladder program, which registers parameters calculated in
                 section 3.4.2 to the positioning module, together with the timing chart (for only the X-
                 axis).
                 The sample program shown in Figure 3.37 registers parameters for the X and Y axes
                 on the rising edge of internal relay /I0001. During registration, internal relays /I00004
                 and /I02004 turn on to indicate that a command is being executed.


      ***** Set parameters (SETPARA) *****


      *** Store X-axis parameters in data registers ***



                                                                                                  Forward limit



                                                                                                  Reverse limit



                                                                                                  Speed limit




                                                                                                  Over speed
                                                                                                  detection


                                                                                                  Over-acceleration
                                                                                                  detection


                                                                                                  Deviation error
                                                                                                  detection



                                                                                                  Direction of rotation



                                                                                                  Contact input
                                                                                                  polarity


                                                                                                  Contact output
                                                                                                  polarity



                                                                                                  Position loop range



                                                                                                  Speed feedforward
                                                                                                  factor


                                                                                                  Encoder type



                                                                                                  Encoder
                                                                                                  multiplication
                                                                                                  number


                                                                                                  Speed to voltage
                                                                                                  ratio




TI 34M6K01-01E                                                                                               129
                                                          3.   Sample Programs for Positioning Modules
                                                                                            F3NC51/52



                                                                                        Absolute offset value



                                                                                        Absolute pulse count




                                                                                        Sanyo Denki's ABS
                                                                                        bit length


                                                                                        Sanyo Denki's ABS
                                                                                        rotation direction


                                                                                        Contact input mode


      *** Store Y-axis parameters in data registers ***



                                                                                        Forward limit



                                                                                        Reverse limit



                                                                                        Speed limit




                                                                                        Over speed
                                                                                        detection


                                                                                        Over-acceleration
                                                                                        detection


                                                                                        Deviation error
                                                                                        detection



                                                                                        Direction of rotation



                                                                                        Contact input
                                                                                        polarity


                                                                                        Contact output
                                                                                        polarity



                                                                                        Position loop range



                                                                                        Speed feedforward
                                                                                        factor


                                                                                        Encoder type



                                                                                        Encoder
                                                                                        multiplication
                                                                                        number


                                                                                        Speed to voltage
                                                                                        ratio




130                                                                                      TI 34M6K01-01E
                                                           3.   Sample Programs for Positioning Modules
                                                                                             F3NC51/52

                                                                                          Absolute offset value



                                                                                          Absolute pulse count



                                                                                          Sanyo Denki's ABS
                                                                                          bit length


                                                                                          Sanyo Denki's ABS
                                                                                          rotation direction


                                                                                          Contact input mode


         *** Write X-axis parameters to module ***



                                                                                          Request to set
                                                                                          parameters


                                                                                          Write parameters



                                                                                          Set Parameters
                                                                                          relay for X axis ON

                                                                                          Waiting for ACK
                                      Set parameters ACK                                  flag ON

                                         relay for AX1
                                                                                          Command
                                                                                          executing flag ON

                                                                                          Set Parameters
                                                                                          relay for X axis
                                                                                          OFF

                                                                                          Waiting for Set
                                                                                          Parameters ACK
                                                                                          flag OFF

                                                                                          Command
                                                                                          executing flag OFF




     *** Write Y-axis parameters to module ***

                                                                                          Request to set
                                                                                          parameters


                                                                                          Write parameters


                                                                                          Set Parameters
                                                                                          relay for Y axis ON


                                                                                          Waiting for ACK flag
                                                                                          ON

                                                                                          Command executing
                                                                                          flag ON




TI 34M6K01-01E                                                                                       131
                                                             3.    Sample Programs for Positioning Modules
                                                                                                F3NC51/52



                                                                                               Set Parameters relay
                                                                                               for Y axis OFF


                         Set parameters ACK                                                    Waiting for Set
                                                                                               Parameters ACK flag
                            relay for AX2                                                      OFF

                                                                                               Command executing
                                                                                               flag OFF




               I00001
                                            Request to set
                                             parameters
               I00002

               I00003                                              Request to set
                                                                  parameters ACK
              Y00448

              X00416

               I00004
                                 Command executing
      Figure 3.37   Set Parameters Program and Timing Chart for X Axis




132                                                                                          TI 34M6K01-01E
                                                                3.   Sample Programs for Positioning Modules
                                                                                                  F3NC51/52




3.4.5             Reset Error
                  When the positioning module is in error state, execution requests for all commands
                  are ignored, except for the Reset Error command. To have the module start accepting
                  commands again, you need to first reset the error state. To do so, reset all output
                  relays and then turn on the Reset Error output relay (Y□□□45/ Y□□□61). Figure 3.38
                  shows the sample ladder program and the timing chart for the X-axis.




        ***** Reset error (RLSERR) *****


       *** X axis ***

                                                                                                 Rising edge of
                                                                                                 request to reset error

                                 Error Notification relay
                                                                                                 Falling edge of reset
                                       for for AX1                                               error


                                                                                                 All output relays of
                                                                                                 AX1 OFF
                                        Reset Error relay
                                               OFF                                               Reset Error relay
                                                                                                 ON

                                                                                                 Reset Error relay
                                                                                                 OFF




       *** Y axis ***                                                                            Rising edge of
                                                                                                 request to reset error


                                      Error Notification                                         Falling edge of reset
                                                                                                 error
                                      relay for for AX2

                                                                                                 All output relays of
                                                                                                 AX2 OFF


                                                                                                 Reset Error relay
                                                                                                 ON

                                                                                                 Reset Error relay
                                                                                                 OFF




TI 34M6K01-01E                                                                                           133
                                                           3.   Sample Programs for Positioning Modules
                                                                                             F3NC51/52




                                                  Request to reset error


                             I00201

                             I00202

                             I00203

                             Y00445

                             X00412

                                                            Error Nofitication
                                                               relay OFF

      Figure 3.38   Reset Error Program and Timing Chart for X Axis

      The sample program shown in Figure 3.38 assumes that a rising edge of relay
      /I00201 will be generated manually. If the cause of an error is not removed, the Error
      Notification relay will not turn off even if you execute a Reset Error command.




134                                                                                       TI 34M6K01-01E
                                                                  3.   Sample Programs for Positioning Modules
                                                                                                    F3NC51/52




3.4.6              Servo ON
                   To perform positioning, the module must be put into Servo ON status. To do so, write
                   0 to the Extended Command Parameter (data position number 071/271), and then
                   change the Execute Extended Command output relay (Y□□□34/ Y□□□50) from OFF to
                   ON. Figure 3.39 shows a sample program for executing SERVO ON. Figure 3.40
                   shows the corresponding timing chart for the X-axis.


      ***** Servo ON (SRVON) *****


      *** X axis ***



                                                                                                  Request for servo
                                                                                                  ON


                                                                                                  Write 0 to extended
                                                                                                  command parameter


                                                                                                  Execute Extended
                                                                                                  Command relay ON


                                                                                                  Waiting for ACK flag
                                Execute Extended Command                                          ON
                                      ACK relay for AX1                                           Command executing
                                                                                                  flag ON


                                                                                                  Execute Extended
                                                                                                  Command relay
                                                                                                  OFF

                                                                                                  Waiting for ACK flag
                                          Error Notification                                      OFF

                                            relay for AX1
                                                                                                  Command executing
                                                                                                  flag OFF




        *** Y axis ***

                                                                                                   Request for servo
                                                                                                   ON

                                                                                                   Write 0 to extended
                                                                                                   command
                                                                                                   parameter


                                                                                                   Execute Extended
                                                                                                   Command relay ON


                                     Execute Extended Command                                      Waiting for ACK flag
                                                                                                   ON
                                          ACK relay for AX2
                                                                                                   Command
                                                                                                   executing flag ON


                                       Error Notification                                          Execute Extended
                                                                                                   Command relay
                                         relay for AX2                                             OFF

                                                                                                   Waiting for ACK flag
                                                                                                   OFF

TI 34M6K01-01E                                                                                             135
                                                              3.   Sample Programs for Positioning Modules
                                                                                                F3NC51/52




                                                                                                 Command executing
                                                                                                 flag OFF



        Figure 3.39    Servo ON Program




                        I00301
                                                         Execute Extended
                                                        Command relay ON
                        I00302

                        I00303                                       Execute Extended
                                                                   Command ACK relay ON
                        Y00434

                        X00402
                                                                                  End of Positioning
                                                                                      relay ON
                        I00304            Command executing

                        X00414

         Figure 3.40   Servo ON Program and Timing Chart for X Axis

      The sample program shown in Figure 3.39 puts both X and Y axes into Servo ON
      status on the rising edge of I00301. When an axis enters into Servo ON state, the End
      of Positioning input relay turns on.
      In addition, execution can be prohibited by turning on I00099, which is the execution
      disable relay (NC contact).
      To successfully enter SERVO ON state, the positioning module and the servo
      driver/motor must be corrected connected, valid parameters must be registered and
      the driver must be correctly setup. Executing the Servo ON program when these
      conditions are not satisfied will generate an error (the Error Notification relay turns on)
      immediately, which will put the module back into Servo OFF state. If this happens,
      check the Error Code parameter and rectify the problem.


         SEE ALSO
      To put the module into Servo OFF state, follow the same procedure as for Servo ON
      but write 1 to the Extended Command Parameter instead. When the module enters
      into Servo OFF state, the End of Positioning input relay turns off.




136                                                                                              TI 34M6K01-01E
                                                                         3.    Sample Programs for Positioning Modules
                                                                                                            F3NC51/52




3.4.7              Jogging
                   While a designated relay is on, you can cause the motor to rotate in the forward or
                   reverse direction at a specified speed, acceleration and deceleration using forward
                   jogging or reverse jogging. This allows you to test positioning actions of the system,
                   as well as adjust position manually.
                   To perform jogging, write required values for the parameters listed in Table 3.17 to the
                   positioning module, and then turn on the Forward Jogging (Y□□□42/Y□□□58) or
                   Reverse Jogging (Y□□□43/Y□□□59) output relay.
                   Table 3.17 Startup Parameters for Jogging
                  Data Position Number
                                                    Parameter                              Value Range
                  AX1            AX2
                 041/042       241/242   Target Speed                   1 to 131072000 [(1/65536) pulses/ms]
                  046            246     Acceleration Time              0 to 32767[ms]
                                                                        0:    Trapezoidal acceleration
                  047            247     Acceleration Mode Selection    1:    2-line-segment deceleration
                                                                        2:    S-shaped (3-line-segment deceleration)
                  048            248     Acceleration Parameter 1       1 to 99 [%]
                  049            249     Acceleration Parameter 2       1 to 99 [%]
                  050            250     Deceleration Time              0 to 32767 [ms]
                                                                        0:    Trapezoidal acceleration
                  051            251     Deceleration Mode Selection    1:    2-line-segment deceleration
                                                                        2:    S-shaped (3-line-segment deceleration)
                  052            252     Deceleration Parameter 1       1 to 99 [%]
                  053            253     Deceleration Parameter 2       1 to 99 [%]
                 054/055       254/255   Positioning Decision Range     0 to 134217727 [pulse]
                  056            256     Positioning Timeout Interval   0 to 32767 [ms]


                   Let’s assume we want to perform jogging at the following speed, acceleration and
                   deceleration.
                    -       Speed           X axis: 100[mm/s]
                                            Y-axis: 50[mm/s]
                   -     Acceleration time (common to both X and Y axis): 100[ms]
                   -     Deceleration time (common to both X and Y axis): 200[ms]
                   From the above conditions we can calculate the target jogging speed:
                        X-axis 100[mm/s]÷10[mm/rot]×10000[pulse/rot] = 100000[pulse/s]
                               100000[pulse/s]÷1000×65536 = 6553600[(1/65536)pulse/ms]
                        Y-axis 50[mm/s]÷10[mm/rot]×10000[pulse/rot] = 50000[pulse/s]
                               50000[pulse/s]÷1000×65536 = 3276800[(1/65536)pulse/ms]
                   Figure 3.41 shows a sample ladder program for performing forward jogging and
                   reverse jogging. Figure 3.42 shows the timing chart (for forward jogging of the X-axis)




TI 34M6K01-01E                                                                                                         137
                                                                3.   Sample Programs for Positioning Modules
                                                                                                  F3NC51/52




      ***** Jogging (JOG) *****



      *** Set X-axis jogging parameters in data registers ***


                                                                                               Target speed for
                                                                                               jogging


                                                                                               Acceleration time




                                                                                               Acceleration
                                                                                               mode


                                                                                               Deceleration time



                                                                                               Deceleration
                                                                                               mode



                                                                                               Positioning in
                                                                                               progress


                                                                                               Positioning
                                                                                               timeout



      *** Set Y-axis jogging parameters in data registers ***


                                                                                               Target speed for
                                                                                               jogging


                                                                                               Acceleration time




                                                                                               Acceleration
                                                                                               mode


                                                                                               Deceleration time



                                                                                               Deceleration
                                                                                               mode



                                                                                               Positioning in
                                                                                               progress


                                                                                               Positioning
                                                                                               timeout




138                                                                                            TI 34M6K01-01E
                                                                     3.   Sample Programs for Positioning Modules
                                                                                                       F3NC51/52




      *** Execute forward jogging for X axis ***

                                                                                                      Request to start
                                                                                                      forward jogging


                                                                                                      Request to stop
                                                                                                      forward jogging


                                                                                                      Write parameters



                                                                                                      Start forward jogging



                                         End of Positioning                                           Command executing
                                                                                                      flag ON
                                            relay for AX1

                                                                                                      Stop forward jogging


                                              Error Notification
                                                                                                      Command executing
                                                relay for AX1                                         flag OFF




        *** Execute positive jogging for Y axis***

                                                                                                      Request to start
                                                                                                      forward jogging


                                                                                                      Request to stop
                                                                                                      forward jogging


                                                                                                      Write parameters



                                                                                                      Start forward jogging

                                      End of Positioning
                                         relay for AX2                                                Command executing
                                                                                                      flag ON


                                                                                                      Stop forward jogging


                                                Error Notification
                                                                                                      Command executing
                                                  relay for AX2                                       flag OFF




        *** Execute reverse jogging for X-axis ***

                                                                                                      Request to start
                                                                                                      reverse jogging


                                                                                                      Request to stop
                                                                                                      reverse jogging

TI 34M6K01-01E                                                                                                 139
                                                              3.   Sample Programs for Positioning Modules
                                                                                                F3NC51/52




                                                                                               Write parameters



                                                                                               Start reverse jogging


                                      End of Positioning
                                                                                               Command executing
                                        relay for AX1                                          flag ON


                                                                                               Stop reverse jogging

                                         Error Notification
                                                                                               Command executing
                                           relay for AX1                                       flag OFF




      *** Execute reverse jogging for Y-axis negative

                                                                                               Request to start
                                                                                               reverse jogging


                                                                                               Request to stop
                                                                                               reverse jogging


                                                                                               Write parameters



                                   End of Positioning                                          Start reverse jogging
                                     relay for AX2

                                                                                               Command executing
                                                                                               flag ON


                                                                                               Stop reverse jogging

                                      Error Notification
                                        relay for AX2                                          Command executing
                                                                                               flag OFF




              Figure 3.41   Jogging Program




140                                                                                          TI 34M6K01-01E
                                                                     3.     Sample Programs for Positioning Modules
                                                                                                         F3NC51/52


                                          Speed




                                     I00401                 Start forward
                                                               jogging
                                     I00402
                                                                                              Stop
                                     I00403                                              forward jogging

                                     Y00442

                                     X00414

                                     I00404
                                                      Command executing time

                 Figure 3.42   Forward Jogging Program and Timing Chart for X Axis

                 The sample program shown in Figure 3.41 starts forward jogging of the X-axis when
                 /I00401 turns on, and stops forward jogging when /I00401 turns off. Relay /I00404
                 turns on during jogging.
                 In addition, execution can be prohibited by turning on relay I00099, which is the
                 execution disable relay (NC contact).
                 The relays allocated for forward and reverse jogging of each axis are shown below.
                 -      X-axis
                   Start/stop forward jogging       /I00401 Command executing flag                         /I00404
                   Start/stop reverse jogging       /I00411 Command executing flag                         /I00414
                 -     Y-axis
                     Start/stop forward jogging     /I02401 Command executing flag                         /I02404
                     Start/stop reverse jogging     /I02411 Command executing flag                         /I02414




TI 34M6K01-01E                                                                                                  141
                                                                                              3.       Sample Programs for Positioning Modules
                                                                                                                                    F3NC51/52




3.4.8                 Origin Search
                      To perform origin search, write required values for the parameters listed in Table 3.18
                      to the positioning module, and change the Origin Search output relay (Y□□□37/
                      Y□□□53) from OFF to ON.
                      Table 3.18         Startup Parameters for Origin Search
                     Data Position Number
                                                                     Parameter                                                   Value Range
                     AX1                 AX2
                 041/042             241/242           Target Speed                         1 to 131072000 [(1/65536) pulses/ms]
                     046                 246           Acceleration Time                    0 to 32767[ms]
                                                                                            0:      Trapezoidal acceleration
                     047                 247           Acceleration Mode Selection          1:      2-line-segment deceleration
                                                                                            2:      S-shaped (3-line-segment deceleration)
                     048                 248           Acceleration Parameter 1             1 to 99 [%]
                     049                 249           Acceleration Parameter 2             1 to 99 [%]
                     050                 250           Deceleration Time                    0 to 32767 [ms]
                                                                                            0:      Trapezoidal acceleration
                     051                 251           Deceleration Mode Selection          1:      2-line-segment deceleration
                                                                                            2:      S-shaped (3-line-segment deceleration)
                     052                 252           Deceleration Parameter 1             1 to 99 [%]
                     053                 253           Deceleration Parameter 2             1 to 99 [%]
                 054/055             254/255           Positioning Decision Range           0 to 134217727 [pulse]
                     056                 256           Positioning Timeout Interval         0 to 32767 [ms]
                     062                 262           Origin Search Mode                   For details, see Table 3.19 (P42)
                     063                 263           Origin Search Direction              0: Forward; 1: Reverse
                                                                                            0: Rising edge;
                     064                 264           Z-phase Edge Selection
                                                                                            1: Falling edge
                     065                 265           Z-phase Pulse Count                  0 to 32767 [times]
                 066/057             266/267           Z-phase Search Range                 0 to 134217727 [pulse]
                 068/069             268/269           Origin Offset Value                  -134217728 to 134217727 [pulse]
                      Figure 3.19 Origin Search Mode

      15   14   13   12    11   10   9   8     7   6    5   4    3     2   1     0


                                                                           0     0    Ig n o re fa llin g e d g e o f o rig in in p u t
                                                                           0     1    S h ift to Z -p h a s e s e a rc h o n fa llin g e d g e o f o rig in in p u t
                                                                           1     0    D e c e le ra te a n d s to p o n fa llin g e d g e o f o rig in in p u t
                                                                           1     1    S to p im m e d ia te ly o n fa llin g e d g e o f o rig in in p u t
                                                                 0     0              Ig n o re ris in g e d g e o f o rig in in p u t
                                                                 0     1              S h ift to Z -p h a s e s e a rc h o n ris in g e d g e o f o rig in in p u t
                                                                 1     0              D e c e le ra te a n d s to p o n ris in g e d g e o f o rig in in p u t
                                                                 1     1              S to p im m e d ia te ly o n ris in g e d g e o f o rig in in p u t
                                                        0   0                         Ig n o re fa llin g e d g e o f e xte rn a l trig g e r in p u t
                                                        0   1                         S h ift to Z -p h a s e s e a rc h o n fa llin g e d g e o f e xte rn a l trig g e r in p u t
                                                        1   0                         D e c e le ra te a n d s to p o n fa llin g e d g e o f e xte rn a l trig g e r in p u t
                                                        1   1                         S to p im m e d ia te ly o n fa llin g e d g e o f e xte rn a l trig g e r in p u t
                                               0   0                                  Ig n o re ris in g e d g e o f e xte rn a l trig g e r in p u t
                                               0   1                                  S h ift to Z -p h a s e s e a rc h o n ris in g e d g e o f e xte rn a l trig g e r in p u t
                                               1   0                                  D e c e le ra te a n d s to p o n ris in g e d g e o f e xte rn a l trig g e r in p u t
                                               1   1                                  S to p im m e d ia te ly o n ris in g e d g e o f e xte rn a l trig g e r in p u t
                                     0   0                                             Ig n o re fa llin g e d g e o f fo rw a rd lim it
                                     0   1                                             S h ift to Z -p h a s e s e a rc h o n fa llin g e d g e o f fo rw a rw d lim it
                                     1   0                                             D e c e le ra te a n d s to p o n fa llin g e d g e o f fo rw a rd lim it
                                     1   1                                             S to p im m e d ia te ly o n fa llin g e d g e o f fo rw a rw d lim it
                           0    0                                                      Ig n o re ris in g e d g e o f fo rw a rd lim it
                           0    1                                                      S h ift to Z -p h a s e s e a rc h o n ris in g e d g e o f fo rw a rd lim it
                           1    0                                                      D e c e le ra te a n d s to p o n ris in g e d g e o f fo rw a rd lim it
                           1    1                                                      S to p im m e d ia te ly o n ris in g e d g e o f fo rw a rw d lim it
                0     0                                                                Ig n o re fa llin g e d g e o f re ve rs e lim it
                0     1                                                                S h ift to Z -p h a s e s e a rc h o n fa llin g e d g e o f re ve rs e lim it
                1     0                                                                D e c e le ra te a n d s to p o n fa llin g e d g e o f re ve rs e lim it
                1     1                                                                S to p im m e d ia te ly o n fa llin g e d g e o f re ve rs e lim it
      0    0                                                                           Ig n o re ris in g e d g e o f re ve rs e lim it
      0    1                                                                           S h ift to Z -p h a s e s e a rc h o n ris in g e d g e o f re ve rs e lim it
      1    0                                                                           S to p im m e d ia te ly o n ris in g e d g e o f re ve rs e lim it
      1    1                                                                           D e c e le ra te a n d s to p o n ris in g e d g e o f re ve rs e lim it


                      *1: Error when forward;      *2: Error when reversing


142                                                                                                                                                                 TI 34M6K01-01E
                                                                   3.   Sample Programs for Positioning Modules
                                                                                                     F3NC51/52

                 If the origin search mode is set to $0000, the module searches for a Z-phase after
                 movement begins without detection of external trigger input. (This feature is available
                 only for F3NC51/52)


                 The system shown in Figure 3.1 has forward limit input, reverse limit input and origin
                 input switches for both the X and Y axes. The following text describes how to use
                 these inputs to determine the position of the work piece, and set the original search
                 mode and origin search direction so that the origin search will be successful
                 regardless of the initial position of the work piece when origin search is initiated. The
                 method described applies to both X and Y axes.
                 -      Search speed                 : 20mm/s
                 -      Acceleration and deceleration curve       : trapezoidal
                 -      Acceleration time            : 100ms
                 -      No decision on end of positioning
                 -      Z-phase search range         : 10000pules
                 -      Origin offset                : 0 pulse
                     The origin search target speed can then be calculated as follows:
                       20[mm/s]÷10[mm/rot]×10000[pulse/rot] = 20000[pulse/s]
                       20000[pulse/s]÷1000×65536 = 1310720[(1/65536)pulse/ms]

                 The search mode and origin search direction parameters should be set as described
                 below according to the position of the work piece when origin search is initiated.
                 (Figure 3.43A shows the programmed movement sequence for different initial
                 positions)
                 When the work piece is at A or B:
                 -      Origin search direction: forward
                 -      Searches for Z-phase (1 rising edge) on falling edge of origin input, ignoring
                        rising edge
                 -      Stop immediately on rising edge of reverse limit input
                 -      Stop immediately on rising edge of forward limit input
                 The search mode for implementing the above conditions is $CC01
                 When the work piece is at C or D:
                 -      Origin search direction: reverse
                 -      Decelerates and stops on rising edge of origin input, ignoring falling edge
                 -      Stop immediately on rising edge of reverse limit input
                 -      Stop immediately on rising edge of forward limit input
                  The search mode for implementing the above conditions is $CC08.




TI 34M6K01-01E                                                                                            143
                                                                   3.   Sample Programs for Positioning Modules
                                                                                                     F3NC51/52



               Negative                                                                     Positive


      Reverse limit
      X axis I0104
      Y axis I2104


      Forward limit


      Origin switch
      X axis I0110
      Y axis I2110
                                                              After origin input turns off, searches
        Z phase                                               forward for rising edge of one Z-phase
                                                              pulse. Once detected, current position is
                                                       1
                                                              taken as origin

                      A
                                              B                         Same search direction
                                   C                                    regardless of whether
                                                                        forward limit swtich is
                                                                        on or off
                                                                                           D


                                            Programmed movement sequences
                                               for different initial positions

      Figure 3.43A    Programmed Movement Sequence for Different Initial Position of the Work piece



               Figure 3.43 shows a sample ladder program for performing origin search. Figure 3.44
               shows the timing chart (for origin search for the X-axis, starting at position A)




      ***** Origin search (ZSEARCH) *****


      *** Set common origin search parameters for X-axis to data registers ***

                                                                                                    Search speed



                                                                                                    Acceleration time




                                                                                                    Acceleration
                                                                                                    mode


                                                                                                    Deceleration time



                                                                                                    Deceleration
                                                                                                    mode



144                                                                                               TI 34M6K01-01E
                                                                      3.   Sample Programs for Positioning Modules
                                                                                                        F3NC51/52




                                                                                                      Positioning
                                                                                                      decision range


                                                                                                      Positioning
                                                                                                      timeout limit



                                                                                                      Z-phase edge
                                                                                                      selection


                                                                                                      Z-phase pulse
                                                                                                      count



                                                                                                      Z-phase search
                                                                                                      range


                                                                                                      Origin offset value



         *** Set common origin search parameters for Y-axis to data registers ***



                                                                                                      Search speed



                                                                                                      Acceleration time



                                                                                                      Acceleration mode




                                                                                                      Deceleration time



                                                                                                      Deceleration mode



                                                                                                      Positioning
                                                                                                      decision range


                                                                                                      Positioning
                                                                                                      timeout limit



                                                                                                      Z-phase edge
                                                                                                      selection


                                                                                                      Z-phase pulse
                                                                                                      count


                                                                                                      Z-phase search
                                                                                                      range



                                                                                                      Origin offset value




TI 34M6K01-01E                                                                                                 145
                                                                          3.   Sample Programs for Positioning Modules
                                                                                                            F3NC51/52




      *** Set parameters for reverse origin search for X-axis in data registers ***

                                                                                                          Request to search for
                           AX1 Origin switch                                                              origin



                                                                                                          X-axis reverse search
                                                                                                          flag ON


                                                                                                          Decelerate and stop
                                               AX1 reverse limit switch                                   on rising edge of origin
                                                                                                          input

                                                                                                          Origin search in
                                                                                                          reverse direction



      *** Set parameters for forward origin search for X-axis in data registers ***

                                                                                                          Shift to Z-phase
                                                                                                          search on falling
                                                                                                          edge of origin input


                                                                                                          Origin search in
                                                                                                          forward direction
                                AX1 forward search
                                    request flag




      *** Set parameters for reverse origin search for Y-axis in data registers ***

                                                                                                          Request to search for
                           AX2 Origin switch                                                              origin



                                                                                                          Y-axis reverse search
                                                                                                          flag ON


                                           AX2 reverse limit switch                                       Decelerate and stop
                                                                                                          on rising edge of origin
                                                                                                          input

                                                                                                          Origin search in
                                                                                                          reverse direction



      *** Set parameters for forward origin search for Y-axis in data registers ***

                                                                                                          Shift to Z-phase
                                                                                                          search on falling
                                                                                                          edge of origin input


                                AX2 forward search                                                        Origin search in
                                                                                                          forward direction
                                    request flag




146                                                                                                      TI 34M6K01-01E
                                                                                    3.   Sample Programs for Positioning Modules
                                                                                                                      F3NC51/52



        *** Execute X-axis origin search ***



                                                                                                                     Write parameters



                                                                                                                     Start Origin Search
                                                                                                                     relay ON



                                                                                                                     Waiting for ACK flag
                                                                                                                     ON


                                  End of origin Search                                                               Command
                                                                                                                     executing flag ON
                                      relay for AX1

                                                                                                                     Start Origin Search
                                                                                                                     relay OFF
                                          Error Notification
                                            relay for AX1
                                                                                                                     Waiting for ACK flag
                                                                                                                     OFF


                                                               AX1 reverse search                                    Command
                                                                                                                     executing flag OFF
                                                                      flag

                                                                                                                     X-axis reverse
                                                                                                                     search flag OFF



                                                                                                                     Request X-axis
                                                                                                                     forward search ON


        *** Execute Y-axis origin search ***



                                                                                                                     Write parameters



                                                                                                                     Start Origin Search
                                                                                                                     relay ON



                                                                                                                     Waiting for ACK flag
                                                                                                                     ON

                                    End of origin Search
                                                                                                                     Command
                                       relay for AX2                                                                 executing flag ON


                                                                                                                     Start Origin Search
                                          Error Notification                                                         relay OFF

                                            relay for AX2

                                                                                                                     Waiting for ACK flag
                                                                                                                     OFF


                                                                                                                     Command executing
                                                            AX2 reverse search                                       flag OFF

                                                                   flag
                                                                                                                     Y-axis reverse search
                                                                                                                     flag OFF



                                                                                                                     Request Y-axis
                                                                                                                     positive search ON
                                          Figure 3.43          Origin Search Program




TI 34M6K01-01E                                                                                                               147
                                                            3.      Sample Programs for Positioning Modules
                                                                                                 F3NC51/52



                                                                          Start Z-phase
                                                                             search

                     Origin input                                           Z-phase detected
                               Speed                                       (origin established)




                       I00501
                                              Start origin search
                       I00502

                       I00503                                                  End origin search

                      Y00437

                      X00405

                       I00504
                                              Command executing

      Figure 3.44   Origin Search Program Timing Chart for X Axis



      The sample program shown in Figure 3.43 starts origin search for both X and Y axes
      on the rising edge of /I00501. In addition, execution can be prohibited by turning on
      relay I00099, which is the execution disable relay (NC contact).
      As shown in the timing chart in Figure 3.44, when the module detects a falling edge in
      the origin input, it starts Z-phase search. When it detects one Z-phase, it takes that
      position as the origin and then, decelerates and stops. /I00504 relay is on during
      origin search.




148                                                                                                TI 34M6K01-01E
                                                                                             3.    Sample Programs for Positioning Modules
                                                                                                                                F3NC51/52




3.4.9              PTP Movement
                   To move an object from a current position to a specified function in point-to-point
                   (PTP) movement, write the parameters listed in Table 3.20, and change the Start
                   Operation Command output relay (Y□□□33/ Y□□□49) from OFF to ON. In PTP
                   movement described here, each axis moves to its target position independently. The
                   route taken to reach the target position is insignificant.
                   Table 3.20         Startup Parameters for PTP Operation

                  Data Position Number
                                                            Parameter                                          Value Range
                  AX1                AX2
                 041/042           241/242       Target Speed                               1 to 131072000 [(1/65536) pulses/ms] *1
                 043/044           243/244       Target Position                            -134217728 to 134217727 [pulse]
                                                                                            0: Absolute position
                  045                245         Target Position Mode                       1: Relative position (from the encoder position)
                                                                                            2: Relative position (from the previous target
                                                                                                    )
                  046                246         Acceleration Time                          0 to 32767[ms]
                                                                                            0:    Trapezoidal acceleration
                  047                247         Acceleration Mode Selection                1:    2-line-segment deceleration
                                                                                            2:    S-shaped (3-line-segment deceleration)
                  048                248         Acceleration Parameter 1                   1 to 99 [%]
                  049                249         Acceleration Parameter 2                   1 to 99 [%]
                  050                250         Deceleration Time                          0 to 32767 [ms]
                                                                                            0:    Trapezoidal acceleration
                  051                251         Deceleration Mode Selection                1:    2-line-segment deceleration
                                                                                            2:    S-shaped (3-line-segment deceleration)
                  052                252         Deceleration Parameter 1                   1 to 99 [%]
                  053                253         Deceleration Parameter 2                   1 to 99 [%]
                 054/055           254/255       Positioning Decision Range                 0 to 134217727 [pulse]
                  056                256         Positioning Timeout Interval               0 to 32767 [ms]
                                                                                            0: Normal operation
                  057                257         Interpolation Mode Selection               1: X-axis circular Interpolation
                                                                                            2: Y-axis circular interpolation
                                                                                            0: Normal startup
                  058                258         Startup Mode Selection                     1: Wait for external trigger
                                                                                            2: Wait for internal trigger
                                                                                            0: No detection
                  059                259         Position Detection Mode                    1: Command value
                                                                                            2: Encoder position
                 060/061           260/261       Position Detection Setpoint                -134217728 to 134217727 [pulse]


                   An object is moved using the system shown in Figure 3.1 successively to 4 points as
                   shown in Figure 3.45.

                        Y
                                                                   P 3 ( 280, 170)




                                                                                                                     P 2 ( 500, 110)
                            P 4 ( 100, 90)




                                                                           P 1 ( 320, 30)
                                                                                                                                       X

                                             Figure 3.4.5 Target Positions (Coordinate system is in mm)


TI 34M6K01-01E                                                                                                                             149
                                                                                  3.   Sample Programs for Positioning Modules
                                                                                                                    F3NC51/52


                 The travel speed, acceleration time and deceleration time for each segment of the
                 movement is as shown below.
                 (The acceleration and deceleration curve is trapezoidal)

                      Movement               Axis                   Speed               Acceleration Time       Deceleration Time
                                             (X/Y)                  [mm/s]                    [ms]                    [ms]
                 Moving to P1                 X                      100                        300                    400
                                              Y                       50                        200                    300
                 Moving to P2                 X                      150                        400                    500
                                              Y                       75                        250                    350
                 Moving to P3                 X                      200                        500                    600
                                              Y                      100                        300                    400
                 Moving to P4                 X                      150                        400                    500
                                              Y                       75                        250                    350


                 The corresponding parameters values to be written to the positioning module are
                 calculated as follows:
                     Movement        Axis                   Speed            Current Position     Acceleration Time    Deceleration
                                     (X/Y)           [(1/65536)pulse/ms          [pulse]                [ms]            Time [ms]
                                                              ]
                 Moving to P1         X                 6553600                  320000                 300                  400
                                      Y                  3276800                  30000                 200                  300
                 Moving to P2         X                 9830400                  500000                 400                  500
                                      Y                  4915200                 110000                 250                  350
                 Moving to P3         X                 13107200                 280000                 500                  600
                                      Y                  6553600                 170000                 300                  400
                 Moving to P4         X                 9830400                  100000                 400                  500
                                      Y                  4915200                  90000                 250                  350
                 Figure 3.46 shows the corresponding sample program and Figure 3.47 shows the
                 timing chart.
                 The sample program is divided into two blocks as follows:
                 -          PTPSET                : Sets PTP operation parameters in registers.
                 -          PTPMOV                : PTP operation program




      ***** Set PTP parameters in data registers (PTPSET) *****


      *** Set the number of target positions in data registers (for X and Y Axes) ***


                                                                                                                      Number of target
                                                                                                                      positions




150                                                                                                                   TI 34M6K01-01E
                                                                      3.   Sample Programs for Positioning Modules
                                                                                                        F3NC51/52

      *** Set target position data for X-axis in data registers ***




                                                                                                     Target speed
                                                                                                     (100 mm/s)


                                                                                                     Target position
                                                                                                     (320 mm)



                                                                                                     Target position mode



                                                                                                     Acceleration time
                                                                                                     (300 ms)


                                                                                                     Acceleration mode
                                                                                                     (trapezoidal)


                                                                                                     Deceleration time
                                                                                                     (400 ms)


                                                                                                     Deceleration mode
                                                                                                     (trapezoidal)




                                                                                                     Target speed
                                                                                                     (150 mm/s)


                                                                                                     Target position
                                                                                                     (500 mm)



                                                                                                     Target position mode



                                                                                                     Acceleration time
                                                                                                     (400 ms)


                                                                                                     Acceleration mode
                                                                                                     (trapezoidal)


                                                                                                     Deceleration time
                                                                                                     (500 ms)



                                                                                                     Deceleration mode
                                                                                                     (trapezoidal)




                                                                                                     Target speed
                                                                                                     (200 mm/s)


                                                                                                     Target position
                                                                                                     (280 mm)



                                                                                                     Target position
                                                                                                     mode


TI 34M6K01-01E                                                                                                  151
                                                                  3.   Sample Programs for Positioning Modules
                                                                                                    F3NC51/52


                                                                                                 Acceleration time
                                                                                                 (500 ms)


                                                                                                 Acceleration
                                                                                                 mode
                                                                                                 (trapezoidal)


                                                                                                 Deceleration time
                                                                                                 (600 ms)


                                                                                                 Deceleration
                                                                                                 mode
                                                                                                 (trapezoidal)




                                                                                                 Target speed
                                                                                                 (200 mm/s)


                                                                                                 Target position
                                                                                                 (280 mm)



                                                                                                 Target position
                                                                                                 mode


                                                                                                 Acceleration time
                                                                                                 (500 ms)


                                                                                                 Acceleration
                                                                                                 mode
                                                                                                 (trapezoidal)


                                                                                                 Deceleration time
                                                                                                 (600 ms)


                                                                                                 Deceleration
                                                                                                 mode
                                                                                                 (trapezoidal)

      *** Set target position data Y-axis in data registers ***




                                                                                                 Target speed
                                                                                                 (50 mm/s)


                                                                                                 Target position
                                                                                                 (30 mm)



                                                                                                 Target position mode



                                                                                                 Acceleration time
                                                                                                 (200 ms)


                                                                                                 Acceleration mode
                                                                                                 (trapezoidal)


                                                                                                 Deceleration time
                                                                                                 (300 ms)


                                                                                                 Deceleration mode
                                                                                                 (trapezoidal)


152                                                                                               TI 34M6K01-01E
                 3.   Sample Programs for Positioning Modules
                                                   F3NC51/52




                                                Target speed
                                                (75 mm/s)


                                                Target position
                                                (110 mm)



                                                Target position mode



                                                Acceleration time
                                                (250 ms)


                                                Acceleration mode
                                                (trapezoidal)



                                                Deceleration time
                                                (350 ms)


                                                Deceleration mode
                                                (trapezoidal)




                                                Target speed
                                                (100 mm/s)


                                                Target position
                                                (170 mm)



                                                Target position mode



                                                Acceleration time
                                                (300 ms)


                                                Acceleration mode
                                                (trapezoidal)


                                                Deceleration time
                                                (400 ms)



                                                Deceleration mode
                                                (trapezoidal)




                                                Target speed
                                                (200 mm/s)


                                                Target position
                                                (280 mm)



                                                Target position mode



TI 34M6K01-01E                                            153
                                                        3.   Sample Programs for Positioning Modules
                                                                                          F3NC51/52



                                                                                       Acceleration time
                                                                                       (500 ms)


                                                                                       Acceleration mode
                                                                                       (trapezoidal)



                                                                                       Deceleration time
                                                                                       (600 ms)


                                                                                       Deceleration mode
                                                                                       (trapezoidal)




      ***** Execute PTP operation (PTPMOV) *****


                                                                                        Start positioning flag
                                                                                        ON


                                    Start positioning                                   Clear data register for
                                                                                        indexing
                                          flag

                                                                                        Write X-axis
                                                                                        positioning parameters


                                                                                        Write Y-axis
                                                                                        positioning parameters


                                                                                        Target position data
                                                                                        index


                                                                                        Write X-axis
                                                                                        positioning parameters


                                                                                        Write Y-axis
                                                                                        positioning parameters

            Initiate positioning
                                                                                        Start Operation relay
                   flag                                                                 for X axis ON


                                                                                        Start Operation relay
                                                                                        for Y axis ON


                                                                                        Waiting for X-axis ACK
                                                                                        flag ON
              Start Operation ACK
                 relay for X axis
                                                                                        Waiting for Y-axis ACK
                                                                                        flag ON

                                                                                        Command executing
                                                                                        flag ON


                                                                                        Start Operation relay
                                                                                        for X axis OFF


                                                                                        Waiting for X-axis ACK
                                                                                        flag OFF


                                                                                        X-axis positioning in
                                                                                        progress flag ON

154                                                                                    TI 34M6K01-01E
                                                                                          3.   Sample Programs for Positioning Modules
                                                                                                                            F3NC51/52



                                                                                                                         Start Operation relay
                                                                                                                         for Y axis OFF


                                                      Start Operation ACK                                                Waiting for Y-axis ACK
                                                                                                                         flag OFF
                                                         relay for Y axis

                                                                                                                         Y-axis positioning in
                                                                                                                         progress flag ON




                                                                                                                         Initiate positioning flag
                                                                                                                         ON


           Positioning in                      Start Operation              End of Positioning                           X-axis positioning in
                                                                                                                         progress flag OFF
           progress flags                        ACK relays                      relays

                                                                                                                         Y-axis positioning in
                                                                                                                         progress flag OFF
                    Start positioning to first target point
                                                                                                                         Command executing
                                                                                                                         flag OFF


            End of positioning to last target point                                                                      Increment index
                                                                                                                         register


                                                                                                                         Reset index register



                     Figure 3.46        PTP Operation Program




TI 34M6K01-01E                                                                                                                       155
                                                               3.   Sample Programs for Positioning Modules
                                                                                                 F3NC51/52




             I00601

             I00602

             I00612

             I00604                C om m and executing




             Speed

                                      Execute com m and
             I00603                  for X-axis positioning

      X axis Y00433
                                         End of positioning
             X00401

             I00605
                                     Positioning in progress
             X00414




             Speed

                                      Execute com m and
             I02603                  for Y-axis positioning

      Y axis Y00449
                                        End of positioning
             X00417

             I02605
                                    Positioning in progress
             X00430

           Figure 3.47   PTP Operation Program Timing Chart



           The sample program shown in Figure 3.46 moves the axes successively through
           positions P1 to P4 while /I00601 is on. When both X and Y axes reach a target
           position, movement begins to the next target position. The first movement is initiated
           by /I00602 turning on but movement to subsequent points are triggered by /I00612
           turning on. /I00604 is ON during movement of either the X or Y axis.
           In addition, execution can be prohibited by turning on relay I00099, which is the
           execution disable relay (NC contact).




156                                                                                           TI 34M6K01-01E
                                                                                              3.   Sample Programs for Positioning Modules
                                                                                                                                F3NC51/52




3.4.10           Linear Interpolation Movement
                 This section discusses a sample program for 2-axis linear interpolation movement.
                 The procedure for performing linear interpolation movement is given below.
                   (1) Set the target speeds of the 2 axes so that the ratio of their speeds equals the
                       ratio of their travel distances.
                   (2) Set the acceleration time and deceleration time to the same value.
                   (3) Change the Start Operation Command output relay (Y□□□33/ Y□□□49) of all axes
                       from OFF to ON simultaneously.
                 The example shown here moves the work piece along straight lines joining the same
                 4 points used in PTP movement in Section 3.4.9 as shown in Figure 3.48. It uses the
                 same data registers in the PTP movement example for storing the startup parameters
                 for each axis. The travel speeds of the axes are calculated to accommodate the axis
                 with the longest travel distance.
                  Y
                                                              P   3(   280, 170)




                                                                                                                P   2(   500, 110)
                       P   4(   100, 90)




                                                                          P   1(   320, 30)
                                                                                                                                       X

                 Figure 3.48               Target Positions (Coordinate system is in mm)
                 The target speed of each axis can be calculated as follows.
                      Target speed of X-axis: Vx
                      Target speed of Y-axis: Vy
                 To move from starting position (X0,Y0) to target position (X1,Y1), and assuming that the
                 travel distance along the X-axis is the longer than the travel along the Y-axis: i.e. |X1-
                 X0|>|Y1-Y0|, then
                           Speed of X-axis = Vx
                           Speed of Y-axis = (|Y1-Y0|/|X1-X0|) * Vx
                 Figure 3.49 shows a sample program for linear interpolation. Only the program
                 segment for starting linear interpolation and the program block for calculating and
                 setting the travel speeds are shown. In addition, program blocks from other sample
                 programs are used. The program configuration is shown below:
                 - PTPSET                       : Sets parameters (uses the same parameters as the PTP
                                                  movement example)
                 - STRMOV                       : Program for starting linear interpolation movement
                 - SETV                         : Subroutine for calculating and setting target speeds
      ***** Execute linear interpolation (STRM OV) *****



                                                                                                                                     Initiate positioning
                                                                                                                                     flag ON


                                                                                                                                     Clear index
                                                                                                                                     register


                                                                                                                                     W rite X-axis
                                                                                                                                     positioning
                                                                                                                                     param eters

                                                                                                                                     W rite Y-axis
                                                                                                                                     positioning
                                                                                                                                     param eters

TI 34M6K01-01E                                                                                                                                  157
                                         3.   Sample Programs for Positioning Modules
                                                                           F3NC51/52



                                                                        Set previous position
                                                                        to X-axis current
                                                                        position

                                                                        Set previous position
                                                                        to Y-axis current
                                                                        position


                                                                        Target position data
                                                                        index


                                                                        Write X-axis target
                                                                        position data


                                                                        Write Y-axis target
                                                                        position data

                                                                        Set starting position
                                                                        to previous position
                                                                        (X0)

                                                                        Set starting position
                                                                        to previous position
                                                                        (Y0)


                                                                        Target position (X1)



                                                                        Target position (Y1)
       Subroutine call for calculating
         and setting travel speed
                                                                        Target speed (Vx)



                                                                        Target speed (Vy)


                                                                        Travel speed



                                                                        Start Operation
                                                                        relay for X axis ON


                                                                        Start Operation
                                                                        relay for Y axis ON


                                                                        Waiting for X-axis
                                                                        ACK flag ON
      Start Operation ACK relay
              for X axis                                                Waiting for Y-axis
                                                                        ACK flag ON


                                                                        Command executing
                                                                        flag ON

                                                                        Start Operation
                                                                        relay for X axis OFF


                                                                        Waiting for X-axis
                                                                        ACK flag OFF


                                                                        X-axis positioning in
                                                                        progress flag ON


158                                                                     TI 34M6K01-01E
                                                                                               3.    Sample Programs for Positioning Modules
                                                                                                                                  F3NC51/52



                                                                                                                              Start Operation relay
                                                                                                                              for Y axis OFF
                                                      Start Operation ACK relay
                                                              for Y axis                                                      Waiting for Y-axis
                                                                                                                              ACK flag OFF


                                                                                                                              Y-axis positioning
                                                                                                                              in progress flag ON




                                                                                                                              Initiate positioning flag
                                                                                  End of Positioning                          ON
                                                    Start Operation                      relays
                                                                                                                              X-axis positioning in
                                                     ACK relays
                                                                                                                              progress flag OFF
                        Positioning in
                        progress flags
                                                                                                                              Y-axis positioning
                                                                                                                              in progress flag OFF

                           End of positioning
                                                                                                                              Increment index register
                          to last target position


                                                        Start positioning to first target position                            Command executing
                                                                                                                              flag OFF


                                                                                                                              Reset index register




     ***** Subroutine for calculating and setting travel speed (SETV) *****




     * Start position



     * Target position



     * Target speed




TI 34M6K01-01E                                                                                                                             159
                                                          3.   Sample Programs for Positioning Modules
                                                                                            F3NC51/52




                                                                                          End of positioning
                                                                                          of either axis




                                                                                          Compare travel
                                                                                          distances

                                                                                          Floating-point
                                                                                          conversion |X1-X0|


                                                                                          Floating-point
                                                                                          conversion |Y1-Y0|


                                                                                          Floating-point
                                                                                          conversion (Vx)


                                                                                          Floating-point
                                                                                          conversion (Vy)


                                                                                          Calculate Y-axis
                                                                                          speed (Vy)




                                                                                          Integer conversion
                                                                                          (Vy)

       X-axis travel > Y-axis travel
                                                                                          Write X-axis speed
                                                                                          (preset value)


                                                                                          Write Y-axis speed
                                                                                          (calculated value)


                                                                                          Calculate X-axis
                                                                                          travel speed (Vx)




                                                                                          Integer conversion
                                                                                          (Vx)

          Y-axis travel > X-axis travel
                                                                                          Write X-axis speed
                                                                                          (calculated value)


                                                                                          Write Y-axis speed
                                                                                          (preset value)




      Figure 3.49      Linear Interpolation Movement Program




160                                                                                      TI 34M6K01-01E
                                                                  3.   Sample Programs for Positioning Modules
                                                                                                    F3NC51/52

                 Compared to the sample program for PTP movement, the sample program shown in
                 Figure 3.49 has an additional subroutine for calculating travel speeds. Its timing chart
                 is similar to that of PTP movement except that in linear interpolation movement, both
                 axes reach the target position at the same time. The sample program moves the axes
                 along straight lines successively through positions P1 to P4 while /I00701 is on. When
                 the axes reach a target position, movement begins to the next target position.
                 In addition, execution can be prohibited by turning on relay I00099, which is the
                 execution disable relay (NC contact).




TI 34M6K01-01E                                                                                           161
                                                                            3.   Sample Programs for Positioning Modules
                                                                                                              F3NC51/52




3.4.11            En-route Operation
                  If a positioning operation is initiated while the previous positioning operation is still in
                  progress, this starts an en-route operation. The procedure for en-route operation is
                  described below.
                    (1) Write to the positioning module startup parameters for moving to the first target
                        position for each axis.
                        (Calculate the travel speeds for linear interpolation.)
                    (2) Turn on the Start Operation Command output relay (Y□□□33/ Y□□□49) for all axes
                        simultaneously.
                    (3) Reset the Start Operation Command output relay of each axis after confirming
                        that the Start Operation Command ACK input relays (X□□□01/ X□□□17) of all axes
                        are set.
                    (4) After confirming that the Start Operation Command ACK input relays of all axes
                        are reset, write the parameters for moving to the next target position.
                    (5) After checking that the remaining deceleration times for all axes are below the
                        required value, turn on the Start Operation Command output relays for all axes
                        simultaneously.
                    (6) Repeat steps 3 through 5 until the final target position is reached.
                  Figure 3.50 shows a sample program for en-route operation. Figure 3.51 shows the
                  corresponding timing chart. The sample program shown here adds en-route operation
                  to the 2-axis linear interpolation operation described in Section 3.4.10. Like the linear
                  interpolation sample program, this sample program also uses program blocks from
                  other sample programs. The program configuration is given below:
                  - PTPSET  : Sets parameters (uses the same parameters as the PTP operation
                              example)
                  - PASSMOV : Executes en-route operation.
                  - SETV   : Subroutine for calculating and setting travel speeds.


      ***** C hange speed/position during positioning (PAS SM O V ) *****

                                                                                                          Initiate positioning
                                                                                                          flag O N


                                                                                                          W rite param eters
                                                                                                          enable flag O N


                                                                                                          Clear index register


                                                                                                          W rite X-axis
                                                                                                          positioning
                                                                                                          param eters

                                                                                                          W rite Y-axis
                                                                                                          positioning
                                                                                                          param eters

                                                                                                          Set previous
                                                                                                          position to X-axis
                       W rite param eters enable flag                                                     current position

                                                                                                          Set previous
                                                                                                          position to Y-axis
                                                                                                          current position

                                                                                                          Target position data
                                                                                                          index


                                                                                                          W rite X-axis target
                                                                                                          position data


                                                                                                          W rite Y-axis target
                                                                                                          position data


162                                                                                                         TI 34M6K01-01E
                                                                         3.   Sample Programs for Positioning Modules
                                                                                                           F3NC51/52

                                                                                                         Set starting position to
                                                                                                         previous position (X0)


                                                                                                         Set starting position to
                                                                                                         previous position (Y0)


                                                                                                         Target position (X1)



                                                                                                         Target position (Y1)



                                    Initiate positioning flag                                            Target speed (Vx)



                                                                                                         Target speed (Vy)
                                      Call subroutine for calculating
                                         and setting travel speed
                                                                                                         Travel speed


                                                                                                         Start Operation relay
                                                                                                         for X axis ON


                                                                                                         Start Operation relay
                                                                                                         for Y axis ON


                                                                                                         Waiting for X-axis ACK
                                       Start positioning flag                                            flag ON


                                                                                                         Waiting for Y-axis ACK
                                                                                                         flag ON


                                            Start Operation ACK                                          Command executing
                                               relay for X axis                                          flag ON


                                                                                                         Start Operation relay
                                                                                                         for X axis OFF


                                                                                                         Waiting for X-axis ACK
                                   Start Operation ACK                                                   flag OFF
                                     relay for Y axis
                                                                                                         X-axis positioning in
                                                                                                         progress flag ON



                                                                                                         Start Operation relay
                                                                                                         for Y axis OFF

                                                   Start Operation ACK                                   Waiting for Y-axis ACK
                                                                                                         flag OFF
                                                         relay OFF
                                                                                                         Y-axis positioning in
                                                                                                         progress flag ON




                                                                                                         Increment index
                                                                                                         register
                  Positioning in
                 progress flag ON
                                                                                                         Read X-axis remaining
                                                                                                         deceleration time

TI 34M6K01-01E                                                                                                     163
                                                                              3.    Sample Programs for Positioning Modules
                                                                                                                 F3NC51/52



                                                                                                                 Read Y-axis
                                                                                                                 remaining
                                                                                                                 deceleration time


                                                                                                                 Write parameters
                                                                                                                 enable flag ON


                                                                                                                 Positioning in
                                                                                                                 progress flag ON


                                                                                                                 Initiate positioning
                                                                                                                 flag ON


                                                                                                                 X-axis positioning
                                                                                                                 in progress flag OFF
                                  Start deceleration

                                                                                                                 Y-axis positioning
                                                                                                                 in progress flag OFF

                                               End of Positioning relay                                          Command executing
                                                                                                                 flag OFF


                                                                                                                 Positioning in
                                                                                                                 progress flag OFF


                                                                                                                 Reset index register


      Figure 3.50      Sample Program for En-route Operation



               Speed




            I00801

            I00802

            I00812

            I00803

           Y00433

           X00401

            I00805
                                           Write parameters
            I00806

            I00816
                                                Positioning in progress
           X00414

            I00804                           Command executing

         Remaining
                          0                    -1                     Valid             -1        -1    Valid      0
        deceleration
           time
                                                                          En-route interval

           Figure 3.51        Timing Chart for X Axis for En-route Operation


164                                                                                                             TI 34M6K01-01E
                                                                3.   Sample Programs for Positioning Modules
                                                                                                  F3NC51/52

                 The sample program shown in Figure 3.50 writes startup parameters when the Start
                 Operation Command ACK relay turns on, and starts the actual operation when the
                 axes begin deceleration (when remaining deceleration time ≥ 0). The axes move
                 along a straight line successively to points P1 through P4 while I00801 is on. As
                 movement to the next target position begins before reaching the current target
                 position, the axes do not stop at any of the target points except for the last target
                 point. In addition, execution can be prohibited by turning on I00099, which is the
                 execution disable relay (NC contact).




TI 34M6K01-01E                                                                                         165
                                                                       3.     Sample Programs for Positioning Modules
                                                                                                           F3NC51/52




3.4.12     Circular Interpolation
           This section describes a sample program for moving from a starting position to a
           target position through a path generated by circulation interpolation. To initiate a
           circular interpolation operation, write the parameters listed in Table 3.21, and change
           the Start Operation Command output relay (Y□□□33/ Y□□□49) from OFF to ON.
           Table 3.21      Startup Parameters for Circular Interpolation Operation
          Data Position Number
                                       Parameter                                   Value Range
          AX1             AX2
                                                         0: Normal operation
                                  Interpolation Mode
          057            257                             1: X-axis circular Interpolation
                                  Selection
                                                         2: Y-axis circular interpolation
         082/083        282/283   Position of Center     -134217728 to 134217727 [pulse]
         084/085        284/285   Radius                 0 to 134217727 [pulse]
                                                         -23592960 to 23592960 [(1/65536) degree]
         086/087        286/287   Starting Angle
                                                         (-360 to 360 [degree])
                                                         -2123366400 to 2123366400 [(1/65536) degree]
         088/089        288/289   Angular Travel
                                                         (-90 to 90 [revolutions])
                                  Angular Speed
         090/091        290/291                          1 to 23592960 [(1/65536) degree/ms] (360 [degree])
                                  Setpoint
          092            292      Acceleration Time      0 to 32767 [ms]
          093            293      Deceleration Time      0 to 32767 [ms]
         094/095        294/295   Target Position        -134217728 to 134217727 [pulse]
                                  Correction Pulse
          096            296                             0 to 32767 [pulse]
                                  Range
           As shown in the example in Figure 3.52, the work piece is moved from the starting
           position P (380, 90) along a circle of radius 80, centered at point O (300, 90) and
           returned to point P. (Unit of measurement is mm).
           The travel speed is 180 degrees per second (i.e. 1 revolution per 2 seconds)
                Y




                                                                        P (380,90)
                                                          O (300,90)
                                              R=80

                                                                                     Curent position

                                                                                                         X

                                     Figure 3.52       Movement Path (Coordinate system is in mm)
           The parameter values to be written to the positioning module are given below:
            -       Starting position, P
                         X axis         : 380[mm]÷10[mm/rot]×10000[pulse/rot] = 380000[pulse]
                         Y axis         : 90[mm]÷10[mm/rot]×10000[pulse/rot] = 90000[pulse]
            -       Position of Center, O
                         X axis            : 300[mm]÷10[mm/rot]×10000[pulse/rot] = 300000[pulse]
                         Y axis            : 90[mm]÷10[mm/rot]×10000[pulse/rot] = 90000[pulse]
            -       Radius, R              : 80[mm]÷10[mm/rot]×10000[pulse/rot] = 80000[pulse]
            -       Startup angle          : 0[degree]
            -       Angular travel         : 360[degree]×65536 = 23592960 [(1/65536)degree]

166                                                                                                     TI 34M6K01-01E
                                                                           3.   Sample Programs for Positioning Modules
                                                                                                             F3NC51/52

                   -      Target angular speed      : 180[degree/s]÷1000×65536 = 11796.48
                   -                                   approx. 11800 [(1/65536)degree/ms]
                   -      Acceleration time : 300 [ms]
                   -      Deceleration time : 400 [ms]
                   -     Target position     : Same as starting position
                   -      Correction pulse range:   10000 [pulse]
                   Figure 3.53 shows a sample program.




         ***** Execute circular interpolation operation (CRCLMOV) *****


         *** Set circular interpolation parameters in data registers ***



         *** X axis ***

                                                                                                            Position of center



                                                                                                            Radius



                                                                                                            Starting angle




                                                                                                            Angular travel


                                                                                                            Target angular
                                                                                                            speed



                                                                                                            Acceleration time



                                                                                                            Deceleration time




                                                                                                            Target position


                                                                                                            Correction pulse
                                                                                                            range



            *** Y axis ***


                                                                                                            Position of center



                                                                                                            Radius




                                                                                                            Starting angle



                                                                                                            Angular travel


TI 34M6K01-01E                                                                                                       167
                                                                        3.   Sample Programs for Positioning Modules
                                                                                                          F3NC51/52


                                                                                                       Target angular
                                                                                                       speed



                                                                                                       Acceleration time



                                                                                                       Deceleration time



                                                                                                       Target position



                                                                                                       Correction pulse
                                                                                                       range



      ** Set PTP operation parameters (for moving to starting point) in data registers **



      *** X axis ***


                                                                                                       Target speed



                                                                                                       Target position




                                                                                                       Target position
                                                                                                       mode


                                                                                                       Acceleration time



                                                                                                       Acceleration
                                                                                                       mode



                                                                                                       Deceleration time



                                                                                                       Deceleration
                                                                                                       mode




      *** Y axis ***



                                                                                                       Target speed



                                                                                                       Target position



                                                                                                       Target position
                                                                                                       mode



                                                                                                       Acceleration time



                                                                                                       Acceleration mode


168                                                                                                    TI 34M6K01-01E
                                                                        3.   Sample Programs for Positioning Modules
                                                                                                          F3NC51/52

                                                                                                       Deceleration
                                                                                                       time



                                                                                                       Deceleration
                                                                                                       mode




      ***** Move to the start point and prepare for circular interpolation *****


                                                                                                       Initiate positioning
                                                                                                       flag ON


                                                                                                       W rite positioning
                                                                                                       parameters
                                                                                                       for X-axis


                                                                                                       W rite positioning
                                                                                                       parameters
                                                                                                       for Y-axis

                                                                                                       Start Operation
                                                                                                       relay for X axis ON



                                                                                                       Start Operation
                                                                                                       relay for Y axis ON


                                                                                                       W aiting for X-axis
                                                                                                       ACK flag ON


                                                                                                       W aiting for Y-axis
                                                                                                       ACK flag ON


                                                                                                       Command
                                                                                                       executing flag ON



                                                                                                       Start Operation
                                                                                                       relay for X axis
                                                                                                       OFF

                                                                                                       W aiting for X-axis
                                                                                                       ACK flag OFF


                                                                                                       X-axis positioning
                                                                                                       in progress flag
                                                                                                       ON

                                                                                                       Start Operation
                                                                                                       relay for Y axis
                                                                                                       OFF


                                                                                                       W aiting for Y-axis
                                                                                                       ACK flag OFF


                                                                                                       Y-axis positioning
                                                                                                       in progress flag
                                                                                                       ON

                                                                                                       Start circular
                                                                                                       interpolation flag
                                                                                                       ON

                                                                                                       X-axis positioning
                                                                                                       in progress flag
                                                                                                       OFF

                                                                                                       Y-axis positioning
                                                                                                       in progress flag
                                                                                                       OFF


TI 34M6K01-01E                                                                                                     169
                                                                     3.     Sample Programs for Positioning Modules
                                                                                                         F3NC51/52




                                                                                                          Command
                                                                                                          executing flag OFF
                                   X-axis circular interpolation


      *** Execute circular interpolation ***                              Y-axis circular interpolation

                                                                                                          X-axis interpolation
                                                                                                          mode


                                                                                                          Y-axis interpolation
                                                                                                          mode

                                                                                                          Write circular
                                                                                                          interpolation data
                                                                                                          for X-axis

                                                                                                          Write circular
                                                                                                          interpolation data
                                                                                                          for Y-axis


                                                                                                          Start Operation relay
                                                                                                          for X axis ON


                                                                                                          Start Operation relay
                                                                                                          for Y axis ON

                                                                                                          Waiting for X-axis
                                                                                                          ACK flag ON


                                                                                                          Waiting for Y-axis
                                                                                                          ACK flag ON


                                                                                                          Command executing
                                                                                                          flag ON



                 Figure 3.53    Sample Program for Circular Interpolation Positioning

                 The sample program shown in Figure 3.53 first performs PTP positioning to the
                 starting position when I00901 is turned on, and then repeats circulation interpolation
                 positioning so that the work piece revolves along a circular path.
                 Execution can be prohibited by turning on relay I00099, which is the execution disable
                 relay (NC contact).
                 This example does not involve en-route operation so the axes stop after completing
                 each revolution. Its timing chart is similar to that of PTP movement except that in this
                 case both axes complete positioning at the same time.




170                                                                                                       TI 34M6K01-01E
                         3.   Sample Programs for Positioning Modules
                                                           F3NC51/52



                 MEMO.




TI 34M6K01-01E                                                  171
              3.   Sample Programs for Positioning Modules
                                                F3NC51/52




      MEMO.




172                                          TI 34M6K01-01E
                                                                                        3. Sample Programs for Positioning Modules
                                                                                                                        F3YP04/08


3.5              Program Examples for F3YP08-0N
                 This section describes some sample ladder programs for the positioning module (multi-
                 channel pulse output) model F3YP08-0N. All programs assume that the module is
                 installed in slot 4. The system is the X-Y table shown in Figure 3.1 (P41). Axis 1 (AX1)
                 and axis 2 (AX2) of the F3YP18-0N are mapped to the X axis and Y axis respectively.
                 Note: Sample programs in this section assume that that sequence CPU module model F3SP28 is used. Beware of
                       differences in device range when using other sequence CPUs.



3.5.1            F3YP08-0N Operation Procedure
                 Figure 3.54 shows the procedure for operating the positioning module (with multi-
                 channel pulse output).

                                                                F3YP14 / F3YP18
                                                               Operation Procedure




                                                               Register parameters




                                                               Turn servomotor on
                                                           (When using AC servo motor)




                                                                    Execute
                                                              automatic origin search




                                                            Execute various positioning
                                                                     actions




                 Figure 3.54 Operation Procedure

                 - Register Parameters
                    Register parameters for the positioning system. Calculate parameter values to match
                    the positioning system used.
                 - Turn on servomotor
                    When performing positioning using an AC servomotor, you need to enable the servo
                    system by turning on the Servo ON input of the driver (pulse type) using a contact
                    output module.
                 - Execute origin search
                    Perform an origin search to enable correct positioning. If origin search is not done,
                    the default origin will be the position of the axes when the module is powered on.
                 - Execute various positioning actions
                    Execute positioning actions as required by rotating the motor.



TI 34M6K01-01E                                                                                                             173
                                                                                    3. Sample Programs for Positioning Modules
                                                                                                                    F3YP04/08




3.5.2     Calculation of Registered Parameters
          The following example shows a minimal set of registered parameters, which must be
          defined for controlling a servomotor using the positioning module.
          A list of registered parameters is given in Table 3.22.
                                              Table 3.22 Registered parameters
         Data Position Number
                                              Parameter                                       Range of values
         AX1             AX2

         001            101      Contact Input Polarity                    1 bit per point
        002/003       102/103    Positive Limit                            -134217728 to 134217727[pulse]
        004/005       104/105    Negative Limit                            -134217728 to (forward limit –1 ) [pulse]


          AX1 and AX2 maps to the X axis and Y axis of the system shown in Figure 3.1.


           - Contact input polarity
               Set the positive limit input (NC), negative limit input (NC contact) and origin input
               (NO contact) to $0003


                      15 14 13 12 11 10   9    8   7   6   5   4   3   2    1   0


                                                                                             Reverse limit input
                                                                                             Forward limit input
                                                                                             Origin input


           - Forward limit and Reverse limit
               Set the boundaries for forward movement and reverse movement in terms of number
               of pulses from the origin (absolute position). Taking into consideration overshoot
               during normal positioning, the preset limits are within the real movement boundaries
               of the mechanism. Example preset values are given below:
               For forward limit:
               AX1: 580 [mm] ÷ 10 [mm/rot] × 2500 [pulse/rot] = 145000 [pulse].
               AX2: 180 [mm] ÷ 10 [mm/rot] × 2500 [pulse/rot] = 45000 [pulse]
               For reverse limit:
               AX1: -5 [mm] ÷ 10 [mm/rot] × 2500 [pulse/rot] = -1250 [pulse].
               AX2: -5 [mm] ÷ 10 [mm/rot] × 2500 [pulse/rot] = -1250 [pulse]




174                                                                                                                TI 34M6K01-01E
                                                                                                    3. Sample Programs for Positioning Modules
                                                                                                                                    F3YP04/08




3.5.3                Reading Module Status
                     You can read various statuses of the positioning module such as error status and
                     current position. Table 3.23 lists all the module statuses.
                     Table 3.23 List of Module Statuses
                   Data Position Number
                                                                  Parameter                                      Remarks
                  AX1                   AX2
                 051/052              151/152          Target Position Status             [pulse]
                 053/054              153/154          Current Position Status            [pulse]
                 055/056              155/156          Current Speed Status               [(1/65536) pulses/ms]
                                                                                          States of contact inputs and encoder Z-phase
                  057                   157            Contact Input Status
                                                                                          input
                  058                   158            Error Status                       Error code when an error occurs.

                  059                   159            Origin Search Status               Status during and at the end of origin search


                     Figure 3.55 shows a sample program for reading statuses of the positioning module.
                     The statuses read are stored in data registers and internal registers listed in Table 3.31.
                     Any status of the positioning module can be read. This sample program always reads
                     all statuses.
                     Table 3.24       Devices for Storing Modules Status Values Read
                                      Device
                                                                                                   Description
                           AX1                       AX2
                    D0051/D0052                 D2051/D2052           Target position status [pulse]
                    D0053/D0054                 D2053/D2054           Current position status [pulse]
                    D0055/D0056                 D2055/D2056           Current speed status [(1/65536)pulse/ms]
                        D0057                      D2057              Contact input status
                        D0058                      D2058              Error status
                        D0059                      D2059              Origin search status
                   I00001 to I00016            I02001 to I02016       Bit data of contact inputs



          ***** Read module status (READST) *****


         *** X axis ***



                                                                                                                              Read status for
                                                                                                                              AX1


                                                                                                                              Expand contact
                                                                                                                              inputs



         *** Y axis ***


                                                                                                                              Read status for
                                                                                                                              AX2


                                                                                                                              Expand contact
                                                                                                                              inputs


                     Figure 3.55 Sample Program for Reading Module Statuses


TI 34M6K01-01E                                                                                                                            175
                                                                    3. Sample Programs for Positioning Modules
                                                                                                    F3YP04/08




3.5.4         Registering Parameters
              Figure 3.56 shows a sample ladder program, which registers parameters calculated in
              section 3.5.2 to the positioning module, together with the timing chart (for only the X-
              axis). To register parameters, set the Command Code (data position number 11/111)
              parameter to 3 (Set Parameters command code), and then turn on the Execute
              Command output relay (Y        33/ Y    37).
              The sample program shown in Figure 3.56 registers parameters for the X and Y axes
              on the rising edge of internal relay /I00101. During registration, internal relays /I00104
              and /I02104 turn on to indicate that a command is being executed.


      ***** Set parameters (SETPARA) *****


      *** Set X-axis parameters in data registers ***



                                                                                                 Contact input
                                                                                                 polarity


                                                                                                 Forward limit




                                                                                                 Reverse limit



      *** Set Y-axis parameters in data registers ***


                                                                                                 Contact input
                                                                                                 polarity



                                                                                                 Forward limit



                                                                                                 Reverse limit



      *** Write X-axis parameters to module ***


                                                                                                 Request to set
                                                                                                 parameters



                                                                                                 Command code to
                                                                                                 set parameters


                                                                                                 write parameters



                                                                                                 Execute
                                                                                                 command relay
                                                                                                 for X axis ON

                                                                                                 W aiting for
                                                                                                 execute command
                                                                                                 ACK flag ON


                                                                                                 Command
                                                                                                 executing flag ON



176                                                                                            TI 34M6K01-01E
                                                                            3. Sample Programs for Positioning Modules
                                                                                                            F3YP04/08

                                                                                                       Execute Command
                                                                                                       relay for X axis OFF

                                              Execute Command ACK
                                                   relay for AX1                                       Waiting for execute
                                                                                                       command ACK flag
                                                                                                       OFF

                                                                                                       Command
                                                                                                       executing flag OFF



       ***Write X-axis parameters to module ***


                                                                                                       Request to set
                                                                                                       parameters


                                                                                                       Command code to
                                                                                                       set parameters



                                                                                                       Write parameters



                                                                                                       Execute Command
                                                                                                       relay for Y axis ON


                                                                                                       Waiting for execute
                                                                                                       command ACK flag
                                                                                                       ON


                                                                                                       Command
                                                                                                       executing flag ON


                                                                                                       Execute Command
                                                                                                       relay for Y axis OFF

                                              Execute Command ACK relay
                                                        for AX2                                        Waiting for execute
                                                                                                       command ACK flag
                                                                                                       ON


                                                                                                       Command
                                                                                                       executing flag OFF


                          I00101
                                                    Request to set
                                                     parameters
                          I00102

                          I00103                                      Request to set
                                                                     parameters ACK
                          Y00433

                          X00401

                          I00104
                                         Command executing time


                        Figure 3.56 Set Parameters Program and Timing Chart for X Axis




TI 34M6K01-01E                                                                                                  177
                                                                        3. Sample Programs for Positioning Modules
                                                                                                        F3YP04/08


3.5.5          Reset Error
               When the positioning module is in error state, execution requests for all commands are
               ignore, except for the Reset Error command and the Set Parameters command. To
               have the module start accepting commands again, you need to first reset the error
               state. To do so, write the value of 5 (Reset Error command code) to the Command
               Code parameter (data position number 11/111), and turn on the Execute Command
               output relay (Y      33/ Y     37). Figure 3.57 shows the sample ladder program and the
               timing chart for the X-axis.



        ***** Reset error (RLSERR) *****


        *** X axis ***


                                                                                                Rising edge of error
                                                                                                reset request relay

                            Error Notification relay for
                                        AX1                                                     Falling edge of error
                                                                                                reset request relay



                                                                                               Read error status for
                                                                                               X axis


                                                                                               Command code to
                                                                                               reset error status for
                                                                                               X-axis


                                                                                               Stop Immediately relay
                                                                                               for X axis OFF



                                                                                               Forward Jogging
                                                                                               relay for X axis OFF


                                                                                               Reverse Jogging relay
                                                                                               for X axis OFF


                                                                                               Execute Command
                                                                                               relay for X axis ON



                                                                                               Command executing
                                                                                               flag ON
                                        Falling edge of reset request
                                                    relay
                                                                                               Execute Command
                                                                                               relay for X axis OFF


                                                                                               Command executing
                                                                                               flag OFF




178                                                                                                  TI 34M6K01-01E
                                                                                              3. Sample Programs for Positioning Modules
                                                                                                                              F3YP04/08



            *** Y axis ***


                                                                                                                   Rising edge of error
                                                                                                                   reset request relay


                              Error Notification relay for AX2
                                                                                                                   Falling edge of error
                                                                                                                   reset request relay



                                                                                                                   Read Y-axis error
                                                                                                                   status



                                                                                                                   Command code to
                                                                                                                   reset Y-axis errors



                                                                                                                   Stop Immediately relay
                                                                                                                   for Y axis OFF



                                                                                                                   Forward Jogging
                                                                                                                   relay for Y axis OFF


                                                                                                                   Reverse Jogging relay
                                                                                                                   for Y axis OFF



                                                                                                                   Execute Command
                                                                                                                   relay for Y axis ON



                                                                                                                   Command executing
                                                                                                                   flag ON



                                                                                                                   Execute Command
                                                                                                                   relay for Y axis OFF


                                                                                                                   Command executing
                                                                                                                   flag OFF




                                                                 Error reset request


                                 I00111

                                 I00112

                                 I00113

                                 Y00433

                                 X00401

                                 X00403

                                                                         Error Notification
                                                                            relay OFF

                     Figure 3.57 Reset Error Program and Timing Chart for X Axis

                    The sample program shown in Figure 3.57 assumes that a rising edge of relay /I00111
                    will be generated manually. If the cause of an error is not removed, the Error Notification
                    relay will not turn off even if you execute a Reset Error command. In addition, a
                    registered parameter setup error (error code 2         ) cannot be reset by a Reset Error
                    command. Instead, you need to re-execute a Set Parameters command with valid
                    parameter values.



TI 34M6K01-01E                                                                                                                             179
                                                                           3. Sample Programs for Positioning Modules
                                                                                                           F3YP04/08


3.5.6          Jogging
               While a designated relay is on, you can cause the motor to rotate in the forward or
               reverse direction at s specified speed, acceleration and deceleration using forward
               jogging or reverse jogging. This allows you to test movement of the system, as well as
               adjust the position manually.
               To perform jogging, write required values for the parameters listed in Table 3.25 to the
               positioning module, and then turn on the Forward Jogging (Y             35/Y     39) or
               Reverse Jogging (Y       36/Y     40) output relay.


               Table 3.25 Startup Parameters for Jogging
              Data Position Number
                                                Parameter                             Value Range
              AX1            AX2
            015/016        115/116   Target Speed (Jogging speed)   0 to Speed Limit [(1/65536) pulses/ms]
              017             117    Acceleration Time              0 to 32767 [ms]
              018             118    Deceleration Time              0 to 32767 [ms]
            019/020        119/120   Startup Speed                  0 to target speed [(1/65536) pulses/ms]


               Let’s assume we want to perform jogging at the following speed, acceleration and
               deceleration.
               - Speed X axis: 100[mm/s]
                       Y-axis: 50[mm/s]
               - Acceleration time (common to both X and Y axis) : 100[ms]
               - Deceleration time (common to both X and Y axis): 200[ms]
               From the above conditions we can calculate the target jogging speed:
                X-axis 100[mm/s]÷10[mm/rot]×2500[pulse/rot] = 25000[pulse/s]
                        25000[pulse/s]÷1000×65536 = 1638400[(1/65536)pulse/ms]
                 Y-axis 50[mm/s]÷10[mm/rot]×2500[pulse/rot] = 12500[pulse/s]
                        12500[pulse/s]÷1000×65536 = 819200[(1/65536)pulse/ms]
               Startup up speed is not specified since we are using an AC servomotor.
               Figure 3.58 shows a sample ladder program for performing forward jogging and reverse
               jogging. Figure 3.59 shows the timing chart (for forward jogging of the X-axis).


      ***** Jog stepping (JOG) *****



      *** Set jogging parameters for X-axis in data registers ***



                                                                                                        Target speed for
                                                                                                        jogging


                                                                                                        Acceleration
                                                                                                        time


                                                                                                        Deceleration
                                                                                                        time



                                                                                                        Startup speed




180                                                                                                      TI 34M6K01-01E
                                                                               3. Sample Programs for Positioning Modules
                                                                                                               F3YP04/08



                 *** Set jogging parameters for Y-axis in data registers ***



                                                                                                       Target speed for jogging



                                                                                                       Acceleration time



                                                                                                       Deceleration time



                                                                                                       Startup speed



                 *** Execute forward jogging for X axis ***


                                                                                                       Request to start forward
                                                                                                       jogging


                                                                                                       Request to stop forward
                                                                                                       jogging


                                                                                                       Write parameters



                                                                                                       Start forward jogging



                                                                                                       Command executing
                                                                                                       flag ON

                                                End of positioning
                                                                                                       Stop forward jogging
                                                   relay for AX1


                                                                                                       Command executing
                                                                                                       flag OFF


                                           Error Notification
                                             relay for AX1




                                                                                                       Request to start forward
                                                                                                       jogging


                                                                                                       Request to stop forward
                                                                                                       jogging


                                                                                                       Write parameters



                                                                                                       Start forward jogging



                                                                                                       Command executing
                                                                                                       flag ON




TI 34M6K01-01E                                                                                                         181
                                                                             3. Sample Programs for Positioning Modules
                                                                                                             F3YP04/08



                                                                                                 Stop forward jogging



                                                                                                 Command executing
                                                                                                 flag OFF
                                             End of Positioning
                                                relay for AX2




                                                        Error Notification
                                                          relay for AX2


      *** Execute reverse jogging for X axis ***
                                                                                                 Request to start reverse
                                                                                                 jogging


                                                                                                 Request to stop reverse
                                                                                                 jogging


                                                                                                 Write parameters



                                                                                                 Start reverse jogging


                                                                                                 Command executing
                                                                                                 flag ON

                                            End of Positioning relay
                                                     for AX1                                     Stop reverse jogging


                                                                                                 Command executing
                                                                                                 flag OFF
                                           Error Notification
                                             relay for AX1




       *** Execute reverse jogging of Y-axis ***


                                                                                                 Request to start reverse
                                                                                                 jogging


                                                                                                 Request to stop reverse
                                                                                                 jogging


                                                                                                 Write parameters



                                                                                                 Start reverse jogging


                                                                                                 Command executing
                                                                                                 flag ON




182                                                                                                        TI 34M6K01-01E
                                                                                      3. Sample Programs for Positioning Modules
                                                                                                                      F3YP04/08



                                           End of Positioning relay                                           Stop reverse jogging
                                                    for AX2
                                                                                                              Command executing
                                                                                                              flag OFF


                                Error Notification relay
                                       for AX2




                 Figure 3.58 Jogging Program



                                               Speed




                                      I00121                          Start forward
                                                                         jogging
                                      I00122
                                                                                                    Stop forward
                                      I00123                                                           jogging

                                      Y00435

                                      X00404

                                      I00124
                                                                  Command executing time


                 Figure 3.59 Forward Jogging Program and Timing Chart for X Axis



                 The sample program shown in Figure 3.58 starts forward jogging of the X-axis when
                 /I00121 turns on, and stops forward jogging when /I00121 turns off. Relay /I00124 turns
                 on during jogging.
                 In addition, execution can be prohibited by turning on relay I00099, which is the
                 execution disable relay (NC contact).
                 The relays allocated for forward and reverse jogging of each axis are shown below.
                 - X-axis
                     Start/stop forward jogging               /I00121 Command executing flag                       /I00124
                    Start/stop reverse jogging                /I01121 Command executing flag                       /I01124
                 - Y-axis
                    Start/stop forward jogging                /I02121 Command executing flag                       /I02124
                    Start/stop reverse jogging                /I03121 Command executing flag                       /I03124




TI 34M6K01-01E                                                                                                             183
                                                                                      3. Sample Programs for Positioning Modules
                                                                                                                      F3YP04/08




3.5.7     Origin Search
          To perform origin search, write required values for the parameters listed in Table 3.26 to
          the positioning module, write the value of 2 (Origin Search command code) to the
          Command Code parameter, and turn on the Execute Command output relay (Y                33/
          Y     37).
          Table 3.26 Startup Parameters for Origin Search
         Data Position Number
                                                   Parameter                                      Value Range
         AX1            AX2
                                                                             0:   Start Positioning command
                                                                             1:   Decelerate-and-Stop command
                                                                             2:   Origin Search command
         011             111                   Command Code
                                                                             3:   Set Parameters command
                                                                             4:   Set Current Position command
                                                                             5:   Reset Error command
         012             112           (unused)

        013/014       113/114          (unused)
        015/016       115/116          Target Speed                          1 to 16384000 [(1/65536) pulses/ms]
         017             117           Acceleration Time                     0 to 32767 [ms]

         018             118           Deceleration Time                     0 to 32767 [ms]

        019/020       119/120          Startup Speed                         0 to target speed [(1/65536) pulses/ms]

         021            121            Origin Search Mode                    For details, see Table 3.27

         022            122            Origin Search Direction               0: Reverse, 1: Forward

         023            123            Z-phase Edge Selection                0: Rising edge, 1: Falling edge

         024            124            Z-phase Search Count                  0 to 32767 [count]

        025/026       125/126          Z-phase Search Range                  0 to 134217727/ Z-phase search count [pulse]
         027            127            Deviation Pulse Clear Time            0 to 32767 [ms]


           Figure 3.27 Origin Search Mode

            15 14 13 12 11 10 9            8   7    6   5   4    3   2   1   0
             0 0 0 0
                                                                         0   0            Ignore falling edge of origin input
                                                                         0   1            Shift to Z-phase search on falling edge of origin input
                                                                         1   0            Decelerate and stop on falling edge of origin input
                                                                         1   1            Stop immediately on falling edge of origin input
                                                                 0   0                    Ignore rising edge of origin input
                                                                 0   1                    Shift to Z-phase search on rising edge of origin input
                                                                 1   0                    Decelerate and stop on rising edge of origin input
                                                                 1   1                    Stop immediately on rising edge of origin input
                                                        0   0                             Ignore falling edge of forward limit
                                                        0   1                             Shift to Z-phase search on falling edge of forwarwd limit
                                                        1   0                             Decelerate and stop on falling edge of forward limit
                                                        1   1                             Stop immediately on falling edge of forwarwd limit
                                               0    0                                     Ignore rising edge of forward limit
                                               0    1                                     Shift to Z-phase search on rising edge of forward limit
                                               1    0                                     Decelerate and stop on rising edge of forward limit
                                               1    1                                     Stop immediately on rising edge of forwarwd limit
                                       0   0                                              Ignore falling edge of reverse limit
                                       0   1                                              Shift to Z-phase search on falling edge of reverse limit
                                       1   0                                              Decelerate and stop on falling edge of reverse limit
                                       1   1                                              Stop immediately on falling edge of reverse limit
                               0   0                                                      Ignore rising edge of reverse limit
                               0   1                                                      Shift to Z-phase search on rising edge of reverse limit
                               1   0                                                      Decelerate and stop on rising edge of reverse limit
                               1   1                                                      Stop immediately on rising edge of reverse limit




          The system shown in Figure 3.1 has forward limit input, reverse limit input and origin
          input switches for both the X and Y axes. The following text describes how to use these
          inputs to determine the position of the workpiece, and set the original search mode and

184                                                                                                                        TI 34M6K01-01E
                                                                                 3. Sample Programs for Positioning Modules
                                                                                                                 F3YP04/08

                 origin search direction so that the origin search will be successful regardless of the
                 initial position of the workpiece when origin search is initiated. The method described
                 applies to both X and Y axes.
                 - Search speed            : 20mm/s
                 - Acceleration time       : 100ms
                 - Deceleration time       : 200ms
                    The origin search speed setpoint can then be calculated as follows:
                     20[mm/s]÷10[mm/rot]×2500[pulse/rot] = 5000[pulse/s]
                     5000[pulse/s]÷1000×65536 = 327680[(1/65536)pulse/ms]
                    We also have:
                 - Z-phase search range             : 2500pules
                 - Deviation pulse clear time       : 1ms
                 The search mode and origin search direction parameters should be set as described
                 below according to the position of the workpiece before origin search is initiated. (Figure
                 3.60A shows the programmed movement sequence for different initial positions)
                 When the workpiece is at A or B:
                 - Origin search direction: forward
                 - Searches for Z-phase (1 rising edge) on falling edge of origin input, ignoring rising
                    edge
                 - Stop immediately on rising edge of reverse limit input
                 - Stop immediately on rising edge of forward limit input
                 The search mode for implementing the above conditions is $0CC1
                 When the workpiece is at C or D:
                 - Origin search direction: reverse
                 - Decelerates and stops on rising edge of origin input, ignoring falling edge
                 - Stop immediately on rising edge of reverse limit input
                 - Stop immediately on rising edge of forward limit input
                 The search mode for implementing the above conditions is $0CC8.

                           Negative                                                        Positive


                  Reverse limit
                  X axis I0144
                  Y axis I2144


                  Forward limit


                  Origin switch
                  X axis I0140
                  Y axis I2140
                                                              After origin input turns off, searches
                    Z phase                                   forward for rising edge of one Z-phase
                                                              pulse. Once detected, current position is
                                                       1
                                                              taken as origin

                                  A
                                              B                        Same search direction
                                       C                               regardless of whether
                                                                       forward limit swtich is
                                                                       on or off
                                                                                          D


                                            Programmed movement sequences
                                               for different initial positions




TI 34M6K01-01E                                                                                                      185
                                                                       3. Sample Programs for Positioning Modules
                                                                                                       F3YP04/08

             Figure 3.60 shows a sample ladder program for performing origin search. Figure 3.61
             shows the timing chart (for origin search for the X-axis, starting at position A)

      ***** Normal origin search (ZSEARCH) *****

      *** Set X-axis common origin search parameters in data registers ***



                                                                                                   Command code
                                                                                                   for origin search


                                                                                                   Search speed



                                                                                                   Acceleration time



                                                                                                   Deceleration time


                                                                                                   Startup speed



                                                                                                   Z-phase edge
                                                                                                   selection

                                                                                                   Z-phase search
                                                                                                   count


                                                                                                   Z-phase search
                                                                                                   range


                                                                                                   Deviation pulse
                                                                                                   clear time

      *** Set Y-axis common origin search parameters in data registers ***



                                                                                                   Command code for
                                                                                                   origin search


                                                                                                   Search speed



                                                                                                   Acceleration time



                                                                                                   Deceleration time



                                                                                                   Startup speed


                                                                                                   Z-phase edge
                                                                                                   selection




186                                                                                               TI 34M6K01-01E
                                                                                    3. Sample Programs for Positioning Modules
                                                                                                                    F3YP04/08




                                                                                                        Z-phase search count



                                                                                                        Z-phase search range



                                                                                                        Deviation pulse clear
                                                                                                        time


                 *** Set reverse origin search parameters for X-axis in data registers ***

                                    AX2 origin
                                     switch
                                                                                                        Request to start origin
                                                                                                        search



                                                   AX1 reverse limit                                    X-axis reverse search
                                                                                                        flag ON
                                                        switch

                                                                                                        Decelerate and stop
                                                                                                        on rising edge of
                                                                                                        origin input


                                                                                                        Reverse origin search




             *** Set forward origin search parameters for X-axis in data registers ***

                                                                                                        Shift to Z-phase search
                                                                                                        on falling edge of origin
                                                                                                        input


                                                                                                        Forward origin search
                                         AX1 forward search
                                            request flag




             *** Set reverse origin search parameters for Y-axis in data registers ***
                                      AX2 origin
                                       switch
                                                                                                        Request to start origin
                                                                                                        search


                                                                                                        Y-axis reverse
                                                     AX2 reverse limit                                  search flag ON
                                                          switch

                                                                                                        Decelerate and stop on
                                                                                                        rising edge of origin
                                                                                                        input

                                                                                                        Reverse origin search




                 *** Set forward origin search parameters for Y-axis in data registers ***

                                                                                                        Shift to Z-phase search
                                                                                                        on falling edge of origin
                                                                                                        input


                                       AX2 forward search request                                       Forward origin search
                                                  flag




TI 34M6K01-01E                                                                                                                  187
                                                                              3. Sample Programs for Positioning Modules
                                                                                                              F3YP04/08



      *** Execute X-axis normal origin search ***


                                                                                                      Write parameters


                         Command execution disable
                           (to be set elsewhere)                                                      Execute Command
                                                                                                      relay ON


                                                                                                      Waiting for ACK flag
                                                                                                      ON


                                   Execute Command ACK
                                                                                                      Command executing
                                        relay for AX1                                                 flag ON



                                                                                                      Execute Command
                                                                                                      relay OFF
                                  Error Notification
                                    relay for AX1
                                                                                                      Waiting for ACK flag
                                                                                                      OFF
                                                       End of Positioning
                                                         relay for AX1
                                                                                                      Command executing
                                                                                                      flag OFF

                                                         Reverse search flag for AX1
                                                                                                      X-axis reverse search
                                                                                                      flag OFF



                                                                                                      Request X-axis
                                                                                                      forward search



                                                                                                      Read origin search
                                                                                                      status



      *** Execute Y-axis normal origin search ***



                                                                                                      Write parameters



                       Command execution disable                                                      Execute Command
                         (to be set elsewhere)                                                        relay ON



                                                                                                      Waiting for ACK flag
                                                                                                      ON


                                                                                                      Command executing
                                                                                                      flag ON




188                                                                                                        TI 34M6K01-01E
                                                                                           3. Sample Programs for Positioning Modules
                                                                                                                           F3YP04/08


                                             Execute Command
                                             ACK relay for AX2


                                                                                                                     Start origin search
                                                                                                                     relay OFF
                                   Error Notification relay for
                                               AX2
                                                                                                                     Waiting for ACK flag
                                                                                                                     OFF

                                                     End of Positioning relay for
                                                                AX2                                                  Command executing
                                                                                                                     flag OFF



                                                                                                                     Y-axis reverse search
                                                                  Reverse search flag                                flag OFF
                                                                       for AX2
                                                                                                                     Request Y-axis
                                                                                                                     forward search



                                                                                                                     Read origin search
                                                                                                                     status


                                                      Figure 3.60 Origin Search Program



                                                                                                Start Z-phase
                                                                                                   search
                                  Origin input
                                                                                                     Z-phase detected
                                               Speed                                                (origin established)




                                        I00131
                                                                     Start origin search
                                        I00132

                                        I00133                                                  Deviation pulse
                                                                                                 clear output
                                       Y00433

                                       X00401                                                          End origin search

                   Deviation pulse clear output signal

                                       X00404

                                        I00134
                                                                   Command executing time


                 Figure 3.61 Timing Chart for Origin Search Program for X Axis

                 The sample program shown in Figure 3.60 starts origin search for both X and Y axes on
                 the rising edge of /I00131. In addition, execution can be prohibited by turning on relay
                 I00099, which is the execution disable relay (NC contact).
                 As shown in the timing chart in Figure 3.61, when the module detects a falling edge in
                 the origin input, it starts Z-phase search. When it detects one Z-phase, it takes that
                 position as the origin and then performs an immediate stop operation. /I00134 relay is
                 on during origin search.



TI 34M6K01-01E                                                                                                                      189
                                                                                    3. Sample Programs for Positioning Modules
                                                                                                                    F3YP04/08


3.5.8     PTP Movement
          To move an object from a current position to a specified function in point-to-point (PTP)
          movement, write the parameters listed in Table 3.28, set the Command Code to 0 (Start
          Positioning command code) and change the Execute Command output relay (Y              33/
          Y      37) from OFF to ON. In the PTP movement described here, each axis moves to
          its target position independently. The route taken to reach the target position is
          insignificant.
          Table 3.28 Startup Parameters for PTP Operation
         Data Position Number
                                               Parameter                                       Value Range
         AX1               AX2
                                                                           0:   Start Positioning command
                                                                           1:   Decelerate-and-Stop command
                                                                           2:   Origin Search command
         011               111     Command Code
                                                                           3:   Set Parameter command
                                                                           4:   Set Current Position command
                                                                           5:   Reset Error command
         012               112     Target Position Mode                    0: Absolute position, 1: Incremental position
        013/014          113/114   Target Position                         Negative limit to positive limit [pulses]
        015/016          115/116   Target Speed                            0 to 16384000 [(1/65536)pulse/ms]
         017               117     Acceleration Time                       0 to 32767 [ms]
         018               118     Deceleration Time                       0 to 32767 [ms]
        019/020          119/120   Startup Speed                           0 to target speed [(1/65536)pulse/ms]


          An object is moved using the system shown in Figure 3.1 to successively to 4 points as
          shown in Figure 3.62.


            Y
                                                     P3 (280,170)




                                                                                                  P2 (500,110)
                   P4 (100,90)




                                                             P1 (320,30)
                                                                                                                       X

                                   Table 3.62 Current Positions (Coordinate system is in mm)
          The travel speed, acceleration time and deceleration time for each segment of the
          movement is as shown below.
          (The acceleration/ deceleration curve is trapezoidal)
                  Movement             Axis                   Speed                Acceleration Time         Deceleration Time
                                       (X/Y)                  [mm/s]                     [ms]                      [ms]
          Moving to P1                  X                       100                      300                           400
                                        Y                        50                      200                           300
          Moving to P2                  X                       150                      400                           500
                                        Y                        75                      250                           350
          Moving to P3                  X                       200                      500                           600
                                        Y                       100                      300                           400
          Moving to P4                  X                       150                      400                           500
                                        Y                        75                      250                           350




190                                                                                                                    TI 34M6K01-01E
                                                                                       3. Sample Programs for Positioning Modules
                                                                                                                       F3YP04/08

                      The corresponding parameters values to be written to the positioning module are
                      calculated as follows:
                         Movement           Axis             Speed           Current Position    Acceleration Time    Deceleration
                                            (X/Y)     [(1/65536)pulse/ms]        [pulse]               [ms]            Time [ms]
                      Moving to P1           X            1638400                 80000                300                400
                                             Y             819200                  7500                200                300
                      Moving to P2           X            2457600                125000                400                500
                                             Y            1228800                 27500                250                350
                      Moving to P3           X            3276800                 70000                500                600
                                             Y            1638400                 42500                300                400
                      Moving to P4           X            2457600                 25000                400                500
                                             Y            1228800                 22500                250                350


                      Figure 3.63 shows the corresponding sample program, and Figure 3.64 shows the
                      timing chart.
                      The sample program is divided into two blocks:
                      - PTPSET            : Sets the PTP operation parameters in the registers.
                      - PTPMOV            : Performs PTP movement



                 ***** Set the PTP operation parameters in data registers (PTPSET) *****


                 *** Set the number of target positions to data register (for X and Y Axes) ***


                                                                                                                     Number of target
                                                                                                                     positions


                 *** Set X-axis target position data to data registers ***




                                                                                                                     Command code to
                                                                                                                     start positioning


                                                                                                                     Target position
                                                                                                                     mode


                                                                                                                     Target position
                                                                                                                     (320 mm)




TI 34M6K01-01E                                                                                                              191
      3. Sample Programs for Positioning Modules
                                      F3YP04/08


                              Travel speed
                              (100 mm/s)


                              Acceleration time
                              (300 ms)


                              Deceleration time
                              (400 ms)



                              Startup speed




                              Command code to
                              start positioning



                              Target position
                              mode



                              Target position
                              (500 mm)


                              Travel speed
                              (150 mm/s)


                              Acceleration time
                              (400 ms)


                              Deceleration time
                              (500 ms)



                              Startup speed




                              Command code to
                              start positioning



                              Target position
                              mode


                              Target position
                              (280 mm)


                              Travel speed
                              (200 mm/s)


                              Acceleration time
                              (500 ms)


                              Deceleration time
                              (600 ms)



                              Startup speed




192                               TI 34M6K01-01E
                                                                   3. Sample Programs for Positioning Modules
                                                                                                   F3YP04/08




                                                                                           Command code to
                                                                                           start positioning



                                                                                           Target position mode



                                                                                           Target position
                                                                                           (100 mm)


                                                                                           Travel speed
                                                                                           (150 mm/s)


                                                                                           Acceleration time
                                                                                           (400 ms)


                                                                                           Deceleration time
                                                                                           (500 ms)


                                                                                           Startup speed



       *** Set Y-axis target position data to data registers ***




                                                                                           Command code to
                                                                                           start positioning


                                                                                           Target position mode



                                                                                           Target position
                                                                                           (30 mm)


                                                                                           Travel speed
                                                                                           (50 mm/s)


                                                                                           Acceleration time
                                                                                           (200 ms)



                                                                                           Deceleration time
                                                                                           (300 ms)



                                                                                           Startup speed




                                                                                           Command code to
                                                                                           start positioning



                                                                                           Target position mode


                                                                                           Target position
                                                                                           (110 mm)



TI 34M6K01-01E                                                                                            193
      3. Sample Programs for Positioning Modules
                                      F3YP04/08



                             Travel speed
                             (75 mm/s)


                             Acceleration time
                             (250 ms)


                             Deceleration time
                             (350 ms)



                             Startup speed




                             Command code to
                             start positioning


                             Target position
                             mode



                             Target position
                             (280 mm)


                             Travel speed
                             (200 mm/s)


                             Acceleration time
                             (500 ms)


                             Deceleration time
                             (600 ms)



                             Startup speed




                             Command code to
                             start positioning


                             Target position
                             mode



                             Target position
                             (100 mm)


                             Travel speed
                             (150 mm/s)


                             Acceleration time
                             (400 ms)


                             Deceleration time
                             (500 ms)



                             Startup speed



194                               TI 34M6K01-01E
                                                                                3. Sample Programs for Positioning Modules
                                                                                                                F3YP04/08


     *** Execute PTP operation (PTPMOV) ***


                                 Initiate
                           Initiate                                                                    Start positioning flag
                           positioning flag                                                            ON
                           positioning flag

                                                                                                       Clear data register for
                                                                                                       indexing


                                                                                                       Target position data
                                                                                                       index


                                                                                                       Write X-axis target
                                                                                                       position data


                                                                                                       Write Y-axis target
                                                                                                       position data

             Start Start                                                                               Execute Command
             positioning flag
             positioning flag                                                                          relay for X axis ON


                                                                                                       Execute Command
                                                                                                       relay for Y axis ON


                                                                                                       Waiting for X-axis
                                                                                                       ACK flag ON


                                                                                                       Waiting for Y-axis
                                                                                                       ACK flag ON

                                                   Execute Command ACK
                                                   Execute Command ACK
                                                         relay for X axis                              Command executing
                                                   relay for X axis                                    flag ON

                                                                                                       Execute Command
                                                                                                       relay for X axis OFF


                                                                                                       Waiting for X-axis
                                                                                                       ACK flag OFF

                                                 Execute Command
                                                 Execute Command
                                                 ACK relay for Y axis                                  X-axis positioning in
                                                 ACK relay for Y axis                                  progress flag ON


                                                                                                       Execute Command
                                                                                                       relay for Y axis OFF

                                         Execute Command
                                         Execute Command                                               Waiting for Y-axis
                                            ACK relays                                                 ACK flag OFF
                                         ACK relays

                                                                                                       Y-axis positioning in
                                                                                                       progress flag ON




                                                                                                       Initiate positioning
                                                                                                       flag ON


                                                                                                       X-axis positioning in
                         Positioning
                       Positioning in in                   End of Positioning
                                                           End of Positioning                          progress flag OFF
                        progress flags                           relays
                       progress flags                      relays
                                                                                                       Y-axis positioning in
                                                                                                       progress flag OFF

TI 34M6K01-01E                                                                                                          195
                                                                            3. Sample Programs for Positioning Modules
                                                                                                            F3YP04/08


                                                                                                    Command executing
             End of positioning to last target point                                                flag OFF


                                                                                                    Increment index
                 Start positioning to first                                                         register

                       target point
                                                                                                    Reset index register

       Figure 3.63 PTP Movement Sample Program




             I00601

             I00602

             I00612

             I00604                           C om m and executing tim e




             Speed

                                                    Execute com m and
             I00603                                for X-axis positioning

      X axis Y00433
                                                      End of positioning
             X00401

             I00605
                                                  Positioning in progress
             X00404




             Speed

                                                    Execute com m and
             I02603                                for Y-axis positioning

      Y axis Y00437
                                                      End of positioning
             X00405

             I02605
                                                  Positioning in progress
             X00408
       Figure 3.64 Timing Chart for PTP Movement Sample Program



       The sample program shown in Figure 3.63 moves the axes successively through
       positions P1 to P4 while /I00601 is on. When both X and Y axes reach a target position,
       movement begins to the next target position. The first movement is initiated by /I00602
       turning on but movement to subsequent points are triggered by /I00612 turning on.
       /I00604 is ON during movement of either the X or Y axis.
       In addition, execution can be prohibited by turning on relay I00099, which is the
       execution disable relay (NC contact).




196                                                                                                    TI 34M6K01-01E
                                                                                        3. Sample Programs for Positioning Modules
                                                                                                                        F3YP04/08




3.6.9             Linear Interpolation Movement
                  This section discusses a sample program for 2-axis linear interpolation movement. The
                  procedure for performing linear interpolation movement is given below.
                    (1) Set the target speeds of the 2 axes so that the ratio of their speeds equals the
                        ratio of their travel distances.
                    (2) Set the acceleration time and deceleration time to the same value.
                    (3) Set the Command Code of each axis to 0, and change the Execute Command
                        output relay (Y        33/ Y     37) of each axis from OFF to ON.
                  The example shown here moves the workpiece along straight lines joining the same 4
                  points used in PTP movement in Section 3.5.8 as shown in Figure 3.65. It uses the
                  same data registers in the PTP movement example for storing the startup parameters
                  for each axis. The travel speeds of the axes are calculated to accommodate the axis
                  with the longest travel distance.
                  Y
                                                          P   3(   280,170)




                                                                                                    P   2(   500,110)
                      P   4(   100,90)




                                                                     P   1(   320,30)
                                                                                                                        X

                                         Figure 3.80 Target Positions (Coordinate system is in mm)

                  The target speed of each axis can be calculated as follows.
                   Target speed of X-axis: Vx
                    Target speed of Y-axis: Vy
                  To move from starting position (X0,Y0) to target position (X1,Y1), and assuming that the
                  travel distance along the X-axis is the longer than the travel along the Y-axis: i.e. |X1-
                  X0|>|Y1-Y0|, then
                      Speed of X-axis = Vx
                      Speed of Y-axis = (|Y1-Y0|/|X1-X0|) * Vx
                  Figure 3.66 shows a sample program for linear interpolation. Only the program segment
                  for starting linear interpolation and the program block for calculating and setting the
                  travel speeds are shown.
                  - PTPSET                   : Sets parameters (uses the same parameters as the PTP movement
                                               example)
                  - STRMOV                   : Program for executing linear interpolation movement
                  - SETV                     : Subroutine for calculating and setting target speeds
          ***** Execute linear interpolation operation (ST RMOV) *****



                                                                                                                            Initiate positioning
                                                                                                                            flag O N



                                                                                                                            Clear index register



                                                                                                                            Set previous position
                                                                                                                            to X-axis current
                                                                                                                            position

                                                                                                                            Set previous position
                                                                                                                            to Y-axis current
                                                                                                                            position

TI 34M6K01-01E                                                                                                                      197
                                                                       3. Sample Programs for Positioning Modules
                                                                                                       F3YP04/08



                                                                                              Target position data
                                                                                              index


                                                                                              Write X-axis target
                                                                                              position data


                                                                                              Write Y-axis target
          Initiate                                                                            position data
      positioning flag                                                                        Set start position to
                                                                                              previous position
                                                                                              (X0)

                                                                                              Set start position to
                                                                                              previous position
                                                                                              (Y0)


                                                                                              Target position (X1)



                                                                                              Target position (Y1)



                                                                                              Target speed (Vx)

                         Call subroutine to calculate and
                                set travel speeds                                             Target speed (Vj)



                                                                                              Travel speed


                                                                                              Execute Command
                                                                                              relay for X axis ON


                                                                                              Execute Command
                                                                                              relay for Y axis ON


                                                                                              Waiting for X-axis
                                                                                              ACK flag ON


                                                                                              Waiting for Y-axis
                                                                                              ACK flag ON


                                             Execute Command ACK                              Command executing
                                                                                              flag ON
                                                    relay for X axis

                                                                                              Execute Command
                                                                                              relay for X axis OFF


                                                                                              Waiting for X-axis
                                                                                              ACK flag OFF
                         Execute Command                                                      X-axis positioning in
                         ACK relay for Y axis                                                 progress flag ON


                                                                                              Execute Command
                                                                                              relay for Y axis OFF


                                                                                              Waiting for Y-axis
                                                                                              ACK flag OFF


                                                                                              Y-axis positioning in
                                                                                              progress flag ON

198                                                                                                TI 34M6K01-01E
                                                                                                3. Sample Programs for Positioning Modules
                                                                                                                                F3YP04/08




                                                                                                                       Start positioning flag
                                                                                                                       ON

                         Positioning in               Execute Command           End of Positioning
                                                                                                                       X-axis positioning in
                         progress flag                   ACK relay                     relay                           progress flag OFF

                                                                                                                       Y-axis positioning in
                                                                                                                       progress flag OFF
                   End of positioning to last point
                                                                                                                       Increment index
                                                                                                                       register


                                                           Start positioning to first point                            Command executing
                                                                                                                       flag OFF


                                                                                                                       Reset index register




      ***** Subroutine for calculating and setting travel speed (SETV) *****




     * Start Position



     * Target Position



     * Target Speed




                                                                                                                        End of
                                                                                                                        positioning of
                                                                                                                        either axis




                                                                                                                        Compare travel
                                                                                                                        distances


TI 34M6K01-01E                                                                                                                           199
                                                             3. Sample Programs for Positioning Modules
                                                                                             F3YP04/08
                                                                                   Floating-point
                                                                                   conversion |X1-X0|


                                                                                   Floating-point
                                                                                   conversion |Y1-Y0|



                                                                                   Floating-point
                                                                                   conversion (Vx)



                                                                                   Floating-point
                                                                                   conversion (Vy)



                                                                                   Calculate Y-axis
                                                                                   speed (Vy)




              AX1 travel > AX2 travel                                              Integer conversion
                                                                                   (Vy)



                                                                                   Write X-axis speed
                                                                                   (preset value)



                                                                                   Write Y-axis speed
                                                                                   (calculated value)



                                                                                   Calculate X-axis speed
                                                                                   (Vx)




              AX2 travel > AX1 travel                                              Integer conversion
                                                                                   (Vx)



                                                                                   Write X-axis speed
                                                                                   (calculated value)


                                                                                   Write Y-axis speed
                                                                                   (preset value)




             Figure 3.66 Sample Program for Linear Interpolation Movement

      Compared to the sample program for PTP movement, the sample program shown in
      Figure 3.66 has an additional subroutine for calculating travel speeds. Its timing chart is
      similar to that of PTP movement except that in linear interpolation movement, both axes
      reach the target position at the same time. The sample program moves the axes along
      straight lines successively through positions P1 to P4 while /I00701 is on. When the
      axes reach a target position, movement begins to the next target position.
      In addition, execution can be prohibited by turning on relay I00099, which is the
      execution disable relay (NC contact).




200                                                                                        TI 34M6K01-01E
                         3. Sample Programs for Positioning Modules
                                                         F3YP04/08

                 MEMO.




TI 34M6K01-01E                                              201
              3. Sample Programs for Positioning Modules
                                              F3YP04/08

      MEMO.




202                                      TI 34M6K01-01E
                                                                                    3. Sample Programs for Positioning Modules
                                                                                                                    F3YP14/18


3.6              Sample Programs for F3YP18-0N
                 This section describes some sample ladder programs for the positioning module
                 (multi-channel pulse output) model F3YP18-0N. All programs assume that the module
                 is installed in slot 4, and that the slot number of the module has been previously
                 written in D00001. The programs use local devices, which must be set to appropriate
                 values before program execution. For details on how to set local devices, read the
                 instruction manuals for the WideField and WideField2 FA-M3 programming tools.
                 The system is the X-Y table shown in Figure 3.1 (P41). Axis 1 (AX1) and axis 2 (AX2)
                 of the F3YP18-0N are mapped to the X axis and Y axis respectively.
                 Note: Sample programs in this section assume that that sequence CPU module model F3SP28 is used. Beware of
                        differences in device range when using other sequence CPUs.




3.6.1            F3YP18-0N Operation Procedure
                 Figure 3.67 shows the procedure for operating the positioning module (with multi-
                 channel pulse output).

                                                               F3YP14 / F3YP18
                                                              Operation Procedure




                                                              Register parameters




                                                             Turn servomotor on
                                                          (When using AC servomotor)




                                                                   Execute
                                                             automatic origin search




                                                           Execute various positioning
                                                                    actions




                                                    Figure 3.67 Operation Procedure




TI 34M6K01-01E                                                                                                                203
                                                         3. Sample Programs for Positioning Modules
                                                                                         F3YP14/18

      - Register Parameters
        Register parameters for the positioning system. Calculate parameter values to
        match the positioning system used.
      - Turn on servomotor
        When performing positioning using an AC servomotor, you need to enable the
        servo system by turning on the Servo ON input of the driver (pulse type) using a
        contact output module.
      - Execute automatic origin search
        Perform an origin search to enable correct positioning. If origin search is not done,
        the default origin will be the position of the axes when the module is powered on.
      - Execute various positioning actions
        Execute positioning actions as required by rotating the motor.




204                                                                                    TI 34M6K01-01E
                                                                                         3. Sample Programs for Positioning Modules
                                                                                                                         F3YP14/18


3.6.2            Calculation of Registered Parameters
                 The following example shows a minimal set of registered parameters, which must be
                 defined for controlling a servomotor using the positioning module.
                 A list of registered parameters is given in Table 3.29.
                 Table 3.29       Registered parameters
                     Data Position
                                                      Parameter                                         Range of values
                       Number
                          *01           Maximum Speed Selection                   0: 499,750 [pps], 1: 3,998,000 [pps]
                                                                                  0: Forward pulse/reverse pulse output
                          *02           Pulse Output Mode
                                                                                  1: Travel pulse/direction output
                                                                                  0: Positive data indicates forward pulse output.
                          *03           Direction of Rotation
                                                                                  1: Negative data indicates forward pulse output.
                          *04           Contact Input Polarity                    1 bit per point
                        *05/*06         Forward Limit                             -2147483648 to 2147483647 [pulses]
                        *07/*08         Reverse limit                             -2147483648 to (Forward Limit - 1) [pulses]
                                                                                  1 to 32751616 [(1/65536) pulse/ms] if Maximum
                                                                                  Speed Selection is 0
                        *09/*10         Speed Limit
                                                                                  1 to 262012928 [(1/65536) pulse/ms] if Maximum
                                                                                  Speed Selection is 1
                                                                                  0: Use origin input
                          *11           Automatic Origin Search Mode
                                                                                  1: Do not use origin input
                          *12           Automatic Origin Search Direction         0: Reverse, 1: Forward
                        *13/*14         Automatic Origin Search Speed 1           1 to Speed Limit
                        *15/*16         Automatic Origin Search Speed 2           1 to Automatic Origin Search Speed 1
                                        Automatic Origin Search Starting
                        *17/*18                                                   0 to Automatic Origin Search Speed 2
                                        Speed
                                        Automatic Origin Search
                          *19                                                     0 to 32767 [ms]
                                        Acceleration Time
                                        Automatic Origin Search
                          *20                                                     0 to 32767 [ms]
                                        deceleration Time
                                        Automatic Origin Search
                          *21                                                     0: Rising edge, 1: Falling edge
                                        Z-phase Edge Selection
                                        Automatic Origin Search
                          *22                                                     0 to 32767 [times]
                                        Z-phase Search Count
                                        Automatic Origin Search                   0 to 2147483647 or Automatic Origin Search Z-phase
                        *23/*24
                                        Z-phase Search Range                      Pulse Count [pulses]
                                        Automatic Origin Search
                          *25                                                     0 to 32767 [ms]
                                        Deviation Pulse Clear Time
                                        Automatic Origin Search
                        *26/*27                                                   -2147483648 to 2147483647 [pulses]
                                        Origin Offset Value
                 The symbol ‘*’ designates the value of (axis number - 1).   The values for axis 1 to axis 8 are 0 to 7 respectively.
                       AX1 and AX2 maps to the X axis and Y axis of the system shown in Figure 3.1.
                 - Maximum speed selection
                     Set to 0 as the motor used is a servomotor rated at below 499,750 pps.

                 - Pulse output mode
                     Set to 0 to use forward/reverse pulse output.

                 - Rotating direction
                     Set to 0 so that positive data indicates forward pulse output.




TI 34M6K01-01E                                                                                                                          205
                                                                  3. Sample Programs for Positioning Modules
                                                                                                  F3YP14/18

      - Contact input polarity
        Set the forward limit input (NC), reverse limit input (NC contact) and origin input
        (NO contact) to $0003


       15 14 13 12 11 10 9    8   7   6   5   4   3   2   1   0


                                                                          Reverse limit input
                                                                          Forward limit input
                                                                          Origin input

      - Forward limit and reverse limit
        Set the boundaries for forward movement and reverse movement in terms of
        number of pulses from the origin (absolute position). Taking into consideration
        overshoot during normal positioning, the preset limits are within the real movement
        boundaries of the mechanism. Example preset values are given below:
        For forward limit:
        AX1: 580 [mm] ÷ 10 [mm/rot] × 2500 [pulse/rot] = 145000 [pulse].
        AX2: 180 [mm] ÷ 10 [mm/rot] × 2500 [pulse/rot] = 45000 [pulse]
        For reverse limit:
        AX1: -5 [mm] ÷ 10 [mm/rot] × 2500 [pulse/rot] = -1250 [pulse].
        AX2: -5 [mm] ÷ 10 [mm/rot] × 2500 [pulse/rot] = -1250 [pulse]

      - Speed limit
        500 [mm/s] ÷ 10 [mm/rot] × 2500 [pulse/rot] = 125000 [pulse/s]
        12500 [pulse/s] ÷ 1000 × 65536 = 8192000 [(1/65536) pulses/ms]

      - Automatic origin search mode
        Set to 0 to use the origin input.

      - Automatic origin search direction
        Set to 0 to start origin search in the reverse direction.

      - Automatic origin search speed 1
        Assume that the origin search speed 1 is 50 [mm/s].
        20 [mm/s] ÷ 10 [mm/rot] × 2500 [pulse/rot] = 80000 [pulse/s]
        5000 [pulse/s] ÷ 1000 × 65536 = 327680 [(1/65536) pulses/ms]

      - Automatic origin search speed 2
        2 [mms] ÷ 10 [mm/rot] × 2500 [pulse/rot] = 500 [pulse/s]
        500 [pulse/s] ÷ 1000 × 65536 = 32768 [(1/65536) pulses/ms]

      - Automatic origin search startup speed
        Set to 0 [(1/65536) pulses/ms] as the motor used is a servomotor.

      - Automatic origin search acceleration time
        Set to 100 [ms].



206                                                                                             TI 34M6K01-01E
                                                                     3. Sample Programs for Positioning Modules
                                                                                                     F3YP14/18

                 - Automatic origin search deceleration time
                   Set to 200 [ms].

                 - Automatic origin search Z-phase edge selection
                   Set to 0 to use the rising edge.

                 - Automatic origin search Z-phase pulse count
                   Set to 1 [count] so that the position where the first Z-phase pulse is detected is
                   considered the origin.

                 - Automatic origin search Z-phase search range
                   Set to 2500 [pulse] as the encoder outputs 2500 pulses per rotation.

                 - Automatic origin search deviation pulse clear time
                   Set to 1000 [ms] to output the deviation pulse clear signal for 1 second.

                 - Automatic origin search origin offset
                   Set to 0 [pulse].




TI 34M6K01-01E                                                                                            207
                                                                                      3. Sample Programs for Positioning Modules
                                                                                                                      F3YP14/18




3.6.3      Reading Module Status
           You can read various statuses of the positioning module such as error status and
           current position. Table 3.30 lists all the module statuses.
           Table 3.30 List of Module Statuses
         Data Position Number
                                                  Parameter                                         Remarks
         AX1               AX2
        081/082        181/182        Target Position Status                [pulse]
        083/084        183/184        Current Position Status               [pulse]
        085/086        185/186        Current Speed Status                  [(1/65536) pulses/ms]
         087               187        Contact Input Status                  States of contact inputs and encoder z-phase input
         088               188        Error Status                          Error code when an error occurs.
         089               189        Alarm Status                          Alarm code when an alarm is generated.
         090               190        Origin Search Status                  Status during and at the end of origin search
                                                                            Status of the movement during positioning or
         091               191        Extended Status
                                                                            during jogging
                                      Number of Flash Memory Write          Total number of write operations to the flash
        092/093        192/193
                                      Operations                            memory


           Figure 3.68 shows a sample program for reading statuses of the positioning module.
           The statuses read are stored in data registers and internal registers listed in Table
           3.31.
           Any status of the positioning module can be read. This sample program always reads
           all statuses.
           Table 3.31 Devices for Storing Modules Status Values Read
                           Device
                                                                                      Description
                AX1                   AX2

         D0011 / D0012           D0031 / D0032       Target position status [pulse]

         D0013 / D0014           D0033 / D0034       Current position status [pulse]

         D0015 / D0016           D0035 / D0036       Current speed status [(1/65536)pulse/ms]

               D0017                D0037            Contact input status

               D0018                D0038            Error status

               D0019                D0039            Alarm status

               D0020                D0040            Origin search status

               D0021                D0041            Extended status

         D0022 / D0023           D0042 / D0043       Number of flash memory write operations

         D0024 / D0025           D0044 / D0045       Converted current speed

         D0028 / D0029           D0048 / D0049       Current speed [pulses/s]

          I0101 to I0116         I0149 to I0164      Bit data for contact inputs

          I0117 to I0132         I0165 to I0180      Origin search status bit data

          I0133 to I0148         I0181 to I0196      Extension status bit data




208                                                                                                                 TI 34M6K01-01E
                                                                      3. Sample Programs for Positioning Modules
                                                                                                      F3YP14/18




                                                                                                     Module slot no.



            ***** Read module status (READST) *****

            *** X axis ***


                                                                                                     Read AX1 status



                                                                                                     Expand contact
                                                                                                     inputs


                                                                                                     Expand origin
                                                                                                     search status


                                                                                                     Expand extended
                                                                                                     status


                                                                                                     Convert current
                                                                                                     speed


                                                                                                     Pulses/s



            *** Y axis ***


                                                                                                     Read AX2 status



                                                                                                     Expand contact
                                                                                                     inputs


                                                                                                     Expand origin
                                                                                                     search status


                                                                                                     Expand extended
                                                                                                     status

                                                                                                     Convert current
                                                                                                     speed


                                                                                                     Pulses/s


                   Figure 3.68   Sample Program for Reading Module statuses




TI 34M6K01-01E                                                                                              209
                                                                     3. Sample Programs for Positioning Modules
                                                                                                     F3YP14/18




3.6.4            Registering Parameters and Saving to Flash
                 Memory
                 Figure 3.69 shows a sample ladder program, which registers parameters calculated in
                 section 3.6.2 to the positioning module, together with the timing chart (for only the X-
                 axis). To register parameters, set the Command Code (data position number 41/141)
                 parameter to 3 (Set Parameters command code), and then turn on the Execute
                 Command output relay (Y         33/ Y    34).
                 The sample program shown in Figure 3.69 registers parameters for the X and Y axes
                 on the rising edge of internal relay /I0001. During registration, internal relays /I0004
                 and /I0014 turn on to indicate that a command is being executed. You can cancel
                 parameter setup by turning on internal relay /I0005.



      ***** Set parameters (SETPARA) *****


      *** Store X-axis parameters to data registers ***


                                                                                        Select max. speed



                                                                                        Pulse output mode



                                                                                        Direction of rotation



                                                                                        Contact input polarity



                                                                                        Forward limit



                                                                                        Reverse limit



                                                                                        Speed limit


                                                                                        Auto. origin search
                                                                                        mode


                                                                                        Auto. origin search
                                                                                        direction


                                                                                        Auto. origin search
                                                                                        speed 1


                                                                                        Auto. origin search
                                                                                        speed 2


                                                                                        Auto. origin search
                                                                                        starting speed


                                                                                        Auto. origin search
                                                                                        acceleration time

                                                                                        Auto. origin search
                                                                                        deceleration time


                                                                                        Auto. origin search Z-
                                                                                        phase edge selection


                                                                                        Auto. origin search Z-
                                                                                        phase search count


210                                                                                                     TI 34M6K01-01E
                                                            3. Sample Programs for Positioning Modules
                                                                                            F3YP14/18




                                                                                         Auto. origin search
                                                                                         Z-phase search
                                                                                         range

                                                                                         Auto. origin search
                                                                                         deviation pulse
                                                                                         clear time

                                                                                         Auto. origin search
                                                                                         origin offset

        *** Store Y-axis parameters to data registers ***


                                                                                         Select max. speed



                                                                                         Pulse output mode



                                                                                         Direction of rotation



                                                                                         Contact input polarity


                                                                                         Forward limit



                                                                                         Reverse limit



                                                                                         Speed limit



                                                                                         Auto. origin search
                                                                                         mode


                                                                                         Auto. origin search
                                                                                         direction


                                                                                         Auto. origin search
                                                                                         speed 1

                                                                                         Auto. origin search
                                                                                         speed 2


                                                                                         Auto. origin search
                                                                                         starting speed


                                                                                         Auto. origin search
                                                                                         acceleration time


                                                                                         Auto. origin search
                                                                                         deceleration time


                                                                                         Auto. origin search Z-
                                                                                         phase edge selection


                                                                                         Auto. origin search Z-
                                                                                         phase search count




TI 34M6K01-01E                                                                                      211
                                                                 3. Sample Programs for Positioning Modules
                                                                                                 F3YP14/18



                                                                                         Auto. origin search Z-
                                                                                         phase search range


                                                                                         Auto. origin search
                                                                                         deviation pulse clear
                                                                                         time


                                                                                         Auto. origin search
                                                                                         origin offset



      *** Write X-axis parameters to module ***


                                                                                         Request to set
                                                                                         parameters



                                                                                         Command code to set
                                                                                         parameters




                                                                                         Write parameters



                                                                                         Execute command
                                                                                         relay for X axis ON


                                                                                         Waiting for Execute
                                                                                         Command ACK flag
                                                                                         ON

                                                                                        Command Executing
                                                                                        flag ON
                                     Execute Command ACK relay
                                               for AX1
                                                                                         Execute Command
                                                                                         relay for X axis OFF

                                       Cancel parameter                                  Waiting for Execute
                                         registration                                    Command ACK flag
                                                                                         OFF

                                                                                         Command Executing
                                                                                         flag OFF



      *** Write Y-axis parameters to module ***


                                                                                         Request to set
                                                                                         parameters



                                                                                         Command code to set
                                                                                         parameters



                                                                                         Write parameters



                                                                                         Execute Command
                                                                                         relay for Y axis ON



                                                                                         Waiting for Execute
                                                                                         Command ACK flag
                                                                                         ON


                                                                                         Command Executing
                                                                                         flag ON




212                                                                                               TI 34M6K01-01E
                                                                               3. Sample Programs for Positioning Modules
                                                                                                               F3YP14/18




                    Y0043
                      4                                                                                   Execute Command
                                            Execute Command ACK relay                                     relay for Y axis OFF
                                                      for AX2
                                                                                                          Waiting for Execute
                                                                                                          Command ACK flag
                                                                                                          OFF

                                               Cancel request to write
                                                                                                          Command Executing
                                                   parameters                                             flag OFF




                              /I0001
                                                            Request to set
                                                             parameters
                              /I0002

                              /I0003                                          Request to set
                                                                             parameters ACK
                              Y00433

                              X00401

                              /I0004
                                                 Command executing


                   Figure 3.69    Program for Setting Parameters and Timing Chart for X Axis



                   Figure 3.70 shows a sample ladder program for saving the parameters registered
                   earlier to the flash memory inside the positioning module, together with the timing
                   chart (for the X-axis only). Registered parameters for all axes can be saved to flash
                   memory only when all axes stationary. To save parameters to flash memory, write the
                   value 9 (Save Parameter command code) to the Command Code (data position
                   number 41) parameter, and turn on the Execute Command (Y!!!33) output relay.
                   The sample program shown in Figure 3.70 saves registered parameters for both X
                   and Y axes to the flash memory on the rising edge of internal relay /I0021. Internal
                   relay /I0024 turns on during saving to indicate that a command is being executed. In
                   addition, execution can be prohibited by turning on relay I0099, which is the execution
                   disable relay (NC contact).




            *** Save parameters to flash memory ***


                                         Command execution disable                                     Request to save
                                           (to be set elsewhere)                                       parameters



                                                                                                       Command code to
                                                                                                       save parameters



                                                                                                       Execute Command
                                                                                                       relay ON


                                                                                                       Waiting for Execute
                                                                                                       Command ACK ON



                                                                                                       Command Executing
                                                                                                       flag ON

TI 34M6K01-01E                                                                                                           213
                                                            3. Sample Programs for Positioning Modules
                                                                                            F3YP14/18




                        Execute Command ACK
                       Execute Command ACK
                             relay for
                           relay for AX1
                                       AX1
                                                                                    Read alarm status


                                                                                    Execute Command
                                                                                    relay OFF


                                                                                    Waiting for Execute
                                                                                    Command ACK OFF


                                                                                    Command Executing
                                                                                    flag OFF




              /I0021
                                        Request to save
                                          parameters
              /I0022

              /I0023                                      Request to save
                                                          parameters ACK
              Y00433

              X00401

              /I0024
                                Command executing



      Figure 3.70   Program for Saving Registered Parameters and Timing Chart for X Axis




214                                                                                        TI 34M6K01-01E
                                                                           3. Sample Programs for Positioning Modules
                                                                                                           F3YP14/18


3.6.5                Reset Error
                     When the positioning module is in error state, execution requests for all commands
                     are ignored, except for the Reset Error command and the Set Parameters command.
                     To have the module start accepting commands again, you need to first reset the error
                     state. To do so, write the value of 5 (Reset Error command code) to the Command
                     Code parameter (data position number 41/141), and turn on the Execute Command
                     output relay (Y       33/ Y       34). Figure 3.71 shows the sample ladder program
                     and the timing chart for the X-axis..
                     The sample program shown in Figure 3.71 assumes that a rising edge of relay
                     /I00001 will be generated manually. If the cause of an error is not removed, the Error
                     Notification relay will not turn off even if you execute a Reset Error command. In
                     addition, a registered parameter setup error (error code 2       ) cannot be reset by a
                     Reset Error command. Instead, you need to re-execute a Set Parameters command
                     with valid parameter values.



           ***** Reset error (RLSERR) *****


           *** X axis ***


                                                                                                  Rising edge of error
                                                                                                  reset request relay

                               Error Notification relay for
                                           AX1                                                    Falling edge of error
                                                                                                  reset request relay



                                                                                                  Read error status for
                                                                                                  X axis


                                                                                                  Command code to
                                                                                                  reset error status for
                                                                                                  X-axis


                                                                                                  Stop Immediately relay
                                                                                                  for X axis OFF



                                                                                                  Forward Jogging
                                                                                                  relay for X axis OFF


                                                                                                  Reverse Jogging relay
                                                                                                  for X axis OFF


                                                                                                  Execute Command
                                                                                                  relay for X axis ON



                                                                                                  Command executing
                                                                                                  flag ON
                                           Falling edge of reset request
                                                       relay
                                                                                                  Execute Command
                                                                                                  relay for X axis OFF


                                                                                                  Command executing
                                                                                                  flag OFF




TI 34M6K01-01E                                                                                                             215
                                                                                   3. Sample Programs for Positioning Modules
                                                                                                                   F3YP14/18



      *** Y axis ***


                                                                                                           Rising edge of error
                                                                                                           reset request relay

                       Error Notification relay for AX2
                                                                                                           Falling edge of error
                                                                                                           reset request relay



                                                                                                          Read Y-axis error
                                                                                                          status



                                                                                                           Command code to
                                                                                                           reset Y-axis errors



                                                                                                          Stop Immediately relay
                                                                                                          for Y axis OFF



                                                                                                           Forward Jogging
                                                                                                           relay for Y axis OFF


                                                                                                           Reverse Jogging relay
                                                                                                           for Y axis OFF



                                                                                                          Execute Command
                                                                                                          relay for Y axis ON



                                                                                                          Command executing
                                                                                                          flag ON



                                                                                                          Execute Command
                                                                                                          relay for Y axis OFF


                                                                                                          Command executing
                                                                                                          flag OFF




                                                    Request to reset error


                       /I0001

                       /I0002

                       /I0003

                       Y00433

                       X00401

                       X00417

                                                              Error Notification
                                                                 relay OFF


              Figure 3.71    Reset Error Program and Timing Chart for X Axis




216                                                                                                                 TI 34M6K01-01E
                                                                               3. Sample Programs for Positioning Modules
                                                                                                               F3YP14/18


3.6.6            Jogging
                 While a designated relay is on, you can cause the motor to rotate in the forward or
                 reverse direction at a specified speed, acceleration and deceleration using forward
                 jogging or reverse jogging. This allows you to test positioning actions of the system,
                 as well as adjust position manually.
                 To perform jogging, write required values for the parameters listed in Table 3.32 to the
                 positioning module, and then turn on the Forward Jogging (Y             49/Y     57) or
                 Reverse Jogging (Y       50/Y     58) output relay.
                 Table 3.32   Startup Parameters for Jogging
                 Data Position Number
                                              Parameter                         Value Range
                 AX1            AX2
                                                                                0: Trapezoidal acceleration/deceleration (with
                       045              145   Acceleration/deceleration Mode    programmable startup speed)
                                                                                1: S-shaped acceleration/deceleration
                   046/047         146/147    Target Speed (Jogging speed)      0 to Speed Limit [(1/65536) pulses/ms]
                       048              148   Acceleration Time                 0 to 32767 [ms]
                       049              149   Deceleration Time                 0 to 32767 [ms]
                                                                                0 to target speed [(1/65536) pulses/ms]
                   050/051         150/151    Startup Speed



                 Let’s assume we want to perform jogging at the following speed, acceleration and
                 deceleration.
                 - Acceleration/deceleration mode:1 (S-shaped acceleration and deceleration)
                 - Speed          X axis: 100[mm/s]
                                  Y-axis: 50[mm/s]
                 - Acceleration time (common to both X and Y axis): 100[ms]
                 - Deceleration time (common to both X and Y axis): 200[ms]
                 From the above conditions we can calculate the target jogging speed:
                   X-axis 100[mm/s]÷10[mm/rot]×2500[pulse/rot] = 25000[pulse/s]
                          25000[pulse/s]÷1000×65536 = 1638400[(1/65536)pulse/ms]
                   Y-axis 50[mm/s]÷10[mm/rot]×2500[pulse/rot] = 12500[pulse/s]
                           12500[pulse/s]÷1000×65536 = 819200[(1/65536)pulse/ms]
                 Startup up speed is not specified since we are using S-shaped acceleration and
                 deceleration.
                 Figure 3.72 shows a sample ladder program for performing forward jogging and
                 reverse jogging, together with the timing chart (for forward jogging of the X-axis)

                 The sample program shown in Figure 3.72 starts forward jogging of the X-axis when
                 /I0001 turns on, and stops forward jogging when /I0001 turns off. Relay /I0004 turns
                 on during jogging.
                 In addition, execution can be prohibited by turning on relay I0099, which is the
                 execution disable relay (NC contact).
                 The relays allocated for forward and reverse jogging of each axis are shown below.
                 - X-axis
                   Start/stop forward jogging             /I0001 Command executing flag                         /I0004
                   Start/stop reverse jogging             /I0011 Command executing flag                         /I0014
                 - Y-axis
                    Start/stop forward jogging            /I0005   Command executing flag                       /I0008
                    Start/stop reverse jogging            /I0015   Command executing flag                       /I0018

TI 34M6K01-01E                                                                                                            217
                                                                    3. Sample Programs for Positioning Modules
                                                                                                    F3YP14/18


      ***** Jog stepping (JOG) *****


      *** Set jogging parameters for X-axis in data registers ***


                                                                                            Acceleration/
                                                                                            deceleration mode
                                                                                            (S-shape)


                                                                                            Target speed for jogging




                                                                                            Acceleration time




                                                                                            Deceleration time




      *** Set jogging parameters for Y-axis in data registers ***

                                                                                            Acceleration/
                                                                                            deceleration mode
                                                                                            (S-shape)


                                                                                            Target speed for
                                                                                            jogging



                                                                                            Acceleration time




                                                                                            Deceleration time



      *** Execute forward jogging of X-axis ***


                                                                                            Request to start
                         Command execution disable                                          forward jogging
                           (to be set elsewhere)
                                                                                            Request to stop
                                                                                            forward jogging



                                                                                            Write parameters



                                                                                            Start forward jogging



                                                                                            Command executing
                                  End of Positioning relay for                              flag ON
                                             AX1

                                                                                            Stop forward jogging



                                                                                            Command executing
                                                                                            flag OFF


                          Error Notification relay for
                                      AX1                                                   Read alarm status



                                                                                            Stop forward jogging




                                                                                            Command executing
                                                                                            flag OFF




218                                                                                                 TI 34M6K01-01E
                                                                    3. Sample Programs for Positioning Modules
                                                                                                    F3YP14/18




      *** Execute forward jogging for Y axis ***

                        Command execution disable
                          (to be set elsewhere)                                           Request to start
                                                                                          forward jogging



                                                                                          Request to stop
                                                                                          forward jogging



                                                                                          Write parameters




                                                                                         Start forward jogging



                                                                                         Command executing
                                                                                         flag ON

                                   End of Positioning relay for
                                             AX2
                                                                                         Stop forward jogging



                                                                                         Command executing
                                                                                         flag OFF

                            Error Notification
                              relay for AX2
                                                                                         Read alarm status




                                                                                         Stop forward jogging



                                                                                         Command executing
                                                                                         flag OFF


      *** Execute reverse jogging for X axis ***

                              Command execution disable (to
                                  be set elsewhere)                                       Request to start
                                                                                          reverse jogging



                                                                                         Request to stop
                                                                                         reverse jogging



                                                                                         Write parameters




                                                                                         Start reverse jogging



                                                                                         Command executing
                                                                                         flag ON



                                         End of Positioning relay                        Stop reverse jogging
                                                for AX1

                                                                                         Command executing
                                                                                         flag OFF
                          Error Notification relay
                                 for AX1
                                                                                         Read alarm status




                                                                                         Stop reverse jogging



                                                                                         Command executing
                                                                                         flag OFF

TI 34M6K01-01E                                                                                                   219
                                                                        3. Sample Programs for Positioning Modules
                                                                                                        F3YP14/18


      *** Execute reverse jogging for Y axis***


                                  Command execution                                               Request to start
                                                                                                  reverse jogging
                                         disable
                                  (to be set elsewhere)
                                                                                                  Request to stop
                                                                                                  reverse jogging


                                                                                                  Write parameters



                                                                                                  Start reverse
                                                                                                  jogging


                                                                                                  Command
                                                                                                  executing flag ON
                                         End of Positioning
                                                relay
                                              for AX2                                             Stop reverse jogging


                                                                                                  Command
                                                                                                  executing flag OFF

                         Error Notification relay
                                for AX2                                                           Read alarm status



                                                                                                  Stop reverse jogging


                                                                                                  Command
                                                                                                  executing flag OFF



                       Speed




              /I0001                                  Start forward
                                                         jogging
              /I0002
                                                                                 Stop forward
              /I0003                                                                jogging

             Y00449

             X00425

              /I0004
                                                    Command executing




           Figure 3.72      Jogging Program and Timing Chart (for Forward jogging of X Axis)




220                                                                                                    TI 34M6K01-01E
                                                                                          3. Sample Programs for Positioning Modules
                                                                                                                          F3YP14/18


3.6.7              Origin Search
3.6.7-1            Origin Search
                   To perform origin search, write required values for the parameters listed in Table 3.33
                   to the positioning module, write the value of 2 (Origin Search command code) to the
                   Command Code parameter, and turn on the Execute Command output relay
                   (Y     33/ Y      34).
                   Table 3.33         Startup Parameters for Origin Search
                   Data Position Number
                                                               Parameter                                     Value Range
                  AX1                AX2
                                                                                    0: Start Positioning command
                                                                                    1: Decelerate-and-Stop command
                                                                                    2: Origin Search command
                                                                                    3: Set Parameters command
                                                                                    4: Set Current Position command
                  041                141                   Command Code             5: Reset Error command
                                                                                    6: Change Speed command
                                                                                    7: Change Target Position command
                                                                                    8: Automatic Origin Search command
                                                                                    9: Save Parameter command
                                                                                    99: Initialize Flash Memory command
                  042                142           (unused)

                 043/044            143/144        (unused)
                  045                145           (unused)
                 046/047            146/147        Target Speed (search speed)      0 to speed limit [(1/65536) pulses/ms]

                  048                148           Acceleration Time                0 to 32767 [ms]

                  049                149           Deceleration Time                0 to 32767 [ms]

                 050/051            150/151        Startup Speed                    0 to target speed [(1/65536) pulses/ms]

                  052                152           Origin Search Mode               For details, see Table 3.73

                  053                153           Origin Search Direction          0: Reverse, 1: Forward

                  054                154           Z-phase Edge Selection           0: Rising edge, 1: Falling edge

                  055                155           Z-phase Search Count             0 to 32767 [times]

                 056/057            156/157        Z-phase Search Range             0 to 2147483647/Z-phase search count [pulses]

                  058                158           Deviation Pulse Clear Time       0 to 32767 [ms]

        15 14 13 12 11 10 9           8    7   6   5   4   3    2   1   0
         0 0 0 0
                                                                    0   0        Ignore falling edge of origin input
                                                                    0   1        Shift to Z-phase search on falling edge of origin input
                                                                    1   0        Decelerate and stop on falling edge of origin input
                                                                    1   1        Stop immediately on falling edge of origin input
                                                           0    0                Ignore rising edge of origin input
                                                           0    1                Shift to Z-phase search on rising edge of origin input
                                                           1    0                Decelerate and stop on rising edge of origin input
                                                           1    1                Stop immediately on rising edge of origin input
                                                   0   0                         Ignore falling edge of forward limit
                                                   0   1                         Shift to Z-phase search on falling edge of forwarwd limit
                                                   1   0                         Decelerate and stop on falling edge of forward limit
                                                   1   1                         Stop immediately on falling edge of forwarwd limit
                                           0   0                                 Ignore rising edge of forward limit
                                           0   1                                 Shift to Z-phase search on rising edge of forward limit
                                           1   0                                 Decelerate and stop on rising edge of forward limit
                                           1   1                                 Stop immediately on rising edge of forwarwd limit
                                0     0                                          Ignore falling edge of reverse limit
                                0     1                                          Shift to Z-phase search on falling edge of reverse limit
                                1     0                                          Decelerate and stop on falling edge of reverse limit
                                1     1                                          Stop immediately on falling edge of reverse limit
                        0   0                                                    Ignore rising edge of reverse limit
                        0   1                                                    Shift to Z-phase search on rising edge of reverse limit
                        1   0                                                    Decelerate and stop on rising edge of reverse limit
                        1   1                                                    Stop immediately on rising edge of reverse limit

                   Figure 3.73         Origin Search Mode

TI 34M6K01-01E                                                                                                                               221
                                                                          3. Sample Programs for Positioning Modules
                                                                                                          F3YP14/18

       The system shown in Figure 3.1 has forward limit input, reverse limit input and origin
       input switches for both the X and Y axes. The following text describes how to use
       these inputs to determine the position of the work piece, and set the original search
       mode and origin search direction so that the origin search will be successful
       regardless of the initial position of the work piece when origin search is initiated. The
       method described applies to both X and Y axes.
       - Search speed           : 20mm/s
       - Acceleration time      : 100ms
       - Deceleration time      : 200ms
       The origin search speed setpoint can then be calculated as follows:
            20[mm/s]÷10[mm/rot]×2500[pulse/rot] = 5000[pulse/s]
            5000[pulse/s]÷1000×65536 = 327680[(1/65536)pulse/ms]
       We also have:
        - Z-phase search range         : 2500pules
        - Deviation pulse clear time   : 1ms
       The search mode and origin search direction parameters should be set as described
       below according to the position of the work piece before origin search is initiated.
       (Figure 3.74 shows the programmed movement sequence for different initial
       positions)
       When the work piece is at A or B:
        - Origin search direction: forward
        - Searches for Z-phase (1 rising edge) on falling edge of origin input, ignoring rising
          edge
        - Stop immediately on rising edge of reverse limit input
        - Stop immediately on rising edge of forward limit input
            The search mode for implementing the above conditions is $0CC1
            When the work piece is at C or D:
        -   Origin search direction: reverse
        -   Decelerates and stops on rising edge of origin input, ignoring falling edge
        -   Stop immediately on rising edge of reverse limit input
        -   Stop immediately on rising edge of forward limit input
        The search mode for implementing the above conditions is $0CC8.
               Negative                                                             Positive


      Reverse limit
      X axis I0144
      Y axis I2144


      Forward limit


      Origin switch
      X axis I0140
      Y axis I2140
                                                       After origin input turns off, searches
        Z phase                                        forward for rising edge of one Z-phase
                                                       pulse. Once detected, current position is
                                                1
                                                       taken as origin

                      A
                                       B                        Same search direction
                                C                               regardless of whether
                                                                forward limit swtich is
                                                                on or off
                                                                                   D


                                     Programmed movement sequences
                                        for different initial positions

       Figure 3.74        Programmed Movement Sequence for Different Initial Work piece Positions



222                                                                                                     TI 34M6K01-01E
                                                                        3. Sample Programs for Positioning Modules
                                                                                                        F3YP14/18



                 Figure 3.75 shows a sample ladder program for performing origin search, together
                 with the timing chart (for origin search for the X-axis, starting at position A) The origin
                 input, forward limit input and reverse limit input are obtained by using the READST
                 program block to read the module status and expand the data into internal (I) relays.



       ***** Normal origin search (ZSEARCH) *****

       *** Set X-axis common origin search parameters for X-axis in data registers ***



                                                                                                    Command code
                                                                                                    for origin search


                                                                                                    Search speed



                                                                                                    Acceleration time



                                                                                                    Deceleration time


                                                                                                    Startup speed



                                                                                                    Z-phase edge
                                                                                                    selection

                                                                                                    Z-phase search
                                                                                                    count


                                                                                                    Z-phase search
                                                                                                    range


                                                                                                    Deviation pulse
                                                                                                    clear time

      *** Set Y-axis common origin search parameters for Y-axis in data registers ***



                                                                                                    Command code for
                                                                                                    origin search


                                                                                                    Search speed



                                                                                                    Acceleration time



                                                                                                    Deceleration time



                                                                                                    Startup speed


                                                                                                    Z-phase edge
                                                                                                    selection




TI 34M6K01-01E                                                                                                 223
                                                                      3. Sample Programs for Positioning Modules
                                                                                                      F3YP14/18



                                                                                            Z-phase search count



                                                                                            Z-phase search range



                                                                                            Deviation pulse clear
                                                                                            time


       *** Set reverse origin search parameters for X-axis in data registers ***

                         AX2 origin
                          switch
                                                                                            Request to search for
                                                                                            origin



                                        AX1 reverse limit                                   X-axis reverse search
                                                                                            flag ON
                                            switch

                                                                                            Decelerate and stop
                                                                                            on rising edge of
                                                                                            origin input


                                                                                            Reverse origin search




      *** Set forward origin search parameters for X-axis in data registers ***

                                                                                            Shift to Z-phase search
                                                                                            on falling edge of origin
                                                                                            input


                                                                                            Forward origin search
                              AX1 forward search
                                 request flag




      *** Set reverse origin search parameters for Y-axis in data registers ***
                           AX2 origin
                            switch
                                                                                            Request to start origin
                                                                                            search


                                                                                            Y-axis reverse
                                          AX2 reverse limit                                 search flag ON
                                              switch

                                                                                            Decelerate and stop on
                                                                                            rising edge of origin
                                                                                            input

                                                                                            Reverse origin search




      *** Set forward origin search parameters for Y-axis in data registers ***

                                                                                            Shift to Z-phase search
                                                                                            on falling edge of origin
                                                                                            input


                            AX2 forward search request                                      Forward origin search
                                       flag




224                                                                                                    TI 34M6K01-01E
                                                                                      3. Sample Programs for Positioning Modules
                                                                                                                      F3YP14/18



           *** Execute X-axis normal origin search ***


                                                                                                              Write parameters



                                    Command execution disable                                                 Execute Command
                                       (to be set elsewhere)                                                  relay ON


                                                                                                              Waiting for ACK flag
                                                                                                              ON


                                        Execute Command ACK
                                                                                                              Command executing
                                             relay for AX1
                                                                                                              flag ON



                                                                                                              Execute Command
                                                                                                              relay OFF
                                           Error Notification
                                             relay for AX1
                                                                                                              Waiting for ACK flag
                                                                                                              OFF
                                                                End of Positioning
                                                                  relay for AX1
                                                                                                              Command executing
                                                                                                              flag OFF


                                                                  Reverse search flag for AX1
                                                                                                              X-axis forward search
                                                                                                              flag OFF


                                                                                                              Request X-axis
                                                                                                              forward search



                                                                                                              Read origin search
                                                                                                              status



           *** Execute Y-axis normal origin search ***



                                                                                                              Write parameters



                                  Command execution disable                                                   Execute Command
                                     (to be set elsewhere)                                                    relay ON



                                                                                                              Waiting for ACK flag
                                                                                                              ON


                                                                                                              Command executing
                                                                                                              flag ON




TI 34M6K01-01E                                                                                                                     225
                                                                                   3. Sample Programs for Positioning Modules
                                                                                                                   F3YP14/18



                                        Execute Command
                                        ACK relay for AX2


                                                                                                               Start origin search
                                                                                                               relay OFF
                              Error Notification relay for
                                          AX2
                                                                                                               Waiting for ACK flag
                                                                                                               OFF

                                                End of Positioning relay for
                                                           AX2                                                 Command executing
                                                                                                               flag OFF



                                                                                                               Y-axis reverse search
                                                             Reverse search flag                               flag OFF
                                                                  for AX2
                                                                                                               Request Y-axis
                                                                                                               forward search



                                                                                                               Read origin search
                                                                                                               status




                                                                                    Start Z-phase
                                                                                       search
                      Origin input
                                                                                         Z-phase detected
                                    Speed                                               (origin established)




                           /I0001
                                                         Start origin search
                           /I0002

                           /I0003                                                   Deviation pulse
                                                                                     clear output
                           Y00433

                           X00401                                                          End origin search

      Deviation pulse clear ooutput signal

                           X00425

                            I0004
                                                       Command executing time




           Figure 3.75         Normal Origin Search Program and Timing Chart for X Axis




           The sample program shown in Figure 3.75 starts origin search for both X and Y axes
           on the rising edge of /I0001. In addition, execution can be prohibited by turning on
           relay I0099, which is the execution disable relay (NC contact).
           As shown in the timing chart in Figure 3.75, when the module detects a falling edge in
           the origin input, it starts Z-phase search. When it detects one Z-phase, it takes that
           position as the origin and then performs an immediate stop operation. /I0004 relay is
           on during origin search.

226                                                                                                                    TI 34M6K01-01E
                                                                                      3. Sample Programs for Positioning Modules
                                                                                                                      F3YP14/18



3.6.7-2 Automatic Origin Search
                 To perform automatic origin search, write the registered parameters listed in Table
                 3.29, and then set the Command Code to 8 (Automatic Origin Search command
                 code), and change the state of the Execute Command output relay (Y                 33/
                 Y      34) from off to on. A series of origin search movements will be automatically
                 carried out up to Z-phase detection according to the value of the registered
                 parameters. In Z-phase search mode, when the number of Z-phase pulses as defined
                 in the Automatic Origin Search Z-phase Pulse Count parameter is detected, the axis
                 stops immediately. The stop position is defined as the origin (the value of the origin
                 is defined in the Automatic Origin Search Origin Offset parameter). The deviation
                 pulse clear signal is then output for a duration specified in the Automatic Origin
                 Search Deviation Pulse Clear Time parameter.
                 Automatic origin search has two modes: mode 0 and mode 1. Mode 0 uses the origin
                 switch, while mode 1 does not use the origin switch but uses the forward and reverse
                 limit switches instead.
                 The system shown in Figure 3.1 has forward limit input, reverse limit input and original
                 input switches for both X and Y axes. This subsection will describe how to perform
                 automatic origin search using these limit switches, with the automatic origin search
                 mode set to 0 (using the origin switch), and the automatic origin search direction set
                 to 0 (reverse direction).
                 Figure 3.76 illustrates the automatic origin search behaviors initiated at different start
                 positions.


                 - If axis is on the positive side of the origin when origin search is initiated



                        Search speed 1
                        Search speed 2
                         Startup speed



                                                    Z-phase pulse



                                          forward limit                      Origin             Reverse limit




                 - If origin input is on when origin search is initiated


                 Search speed 2
                  Startup speed



                                           Z-phasse pulse



                                  forward limit                     Origin                Reverse limit




TI 34M6K01-01E                                                                                                             227
                                                                   3. Sample Programs for Positioning Modules
                                                                                                   F3YP14/18

      - if axis is between the origin and reverse limit switch when origin search is initiated



           Search speed 1
           Search speed 2
            Startup speed



                                     Z-phase pulse



                         Forward limit                    Origin            Reverse limit




      - If the reverse limit input is on when origin search is initiated



      Search speed 2
       Startup speed



                                Z-phase pulse



                    Forward limit                    Origin            Reverse limit




      Figure 3.76      Automatic Origin Search Operation (mode 0, reverse search)




228                                                                                              TI 34M6K01-01E
                                                                                3. Sample Programs for Positioning Modules
                                                                                                                F3YP14/18

                   Figure 3.77 shows a sample ladder program for performing automatic origin search
                   and the timing chart for the X axis.


           ***** Automatic origin search (ATSEARCH) *****


           *** Execute X-axis automatic origin search ***

                                Command execution disable
                                                                                                       Request for automatic
                                  (to be set elsewhere)                                                origin search



                                                                                                       Command code (8)



                                                                                                       Execute Command
                                                                                                       relay ON



                                                                                                       Automatic origin search
                                                                                                       operating ON



                                                                                                       Automatic origin
                                                                                                       search executing ON
                                      Execute Command
                                      ACK relay for AX1
                                                                                                       Read alarm status



                                                                                                       Execute Command
                                                                                                       relay OFF



                                                                                                       Automatic origin search
                                                                                                       operating OFF


                                                 Error Notification relay for
                                                             AX1


                                                                                                       Automatic origin
                                                                                                       search executing OFF



                                     End of Positioning                                                Origin search status
                                       relay for AX1

           *** Execute Y-axis automatic origin search ***

                                      Command execution disable
                                                                                                       Request for automatic
                                        (to be set elsewhere)
                                                                                                       origin search



                                                                                                       Command code (8)



                                                                                                       Execute Command
                                                                                                       relay ON



                                                                                                       Automatic origin search
                                                                                                       operating ON



                                                                                                       Automatic origin search
                                                                                                       executing ON




TI 34M6K01-01E                                                                                                                229
                                                                                        3. Sample Programs for Positioning Modules
                                                                                                                        F3YP14/18



                                          Execute Command ACK
                                               relay for AX2                                                    Read alarm status



                                                                                                               Execute Command
                                                                                                               relay OFF



                                                                                                                Automatic origin
                                                                                                                search operating OFF



                                                         Error Notification
                                                           relay for AX2

                                                                                                                Automatic origin search
                                                                                                                executing OFF



                                                                                                               Origin search status
                           End of Positioning
                             relay for AX2



                                                                               Start Z-phase
                                                                                  search
                  Origin input
                                                                                    Z-phase detected
                                Speed                                              (origin established)




                       /I0001
                                                   Start origin search
                       /I0002

                       /I0003                                                 Outputs deviation
                                                                                pulse clear
                       Y00433

                       X00401                                                         End origin search

  Deviation pulse clear ooutput signal

                       X00425

                        I0004
                                                    Command executing


                  Figure 3.77           Automatic Origin Search Program and Timing Chart for X Axis

                  The sample program shown in Figure 3.77 starts origin search for both X and Y axes
                  on the rising edge of /I0001. In addition, execution can be prohibited by turning on
                  relay I0099, which is the execution disable relay (NC contact).
                  As shown in the timing chart in Figure 3.77, the module detects a falling edge in the
                  origin input, it starts Z-phase search. When it detects one Z-phase edge, it stops
                  immediately, and the stop position is taken as the origin. /I0004 relay is on during
                  origin search.




230                                                                                                                     TI 34M6K01-01E
                                                                                  3. Sample Programs for Positioning Modules
                                                                                                                  F3YP14/18


3.6.8              PTP Movement
                   To move an object from a current position to a specified function in point-to-point
                   (PTP) movement, write the parameters listed in Table 3.34, set the Command Code to
                   0 (Start Positioning command code) and change the Execute Command output relay
                   (Y      33/ Y      34) from OFF to ON. In PTP movement described here, each axis
                   moves to its target position independently. The route taken to reach the target position
                   is insignificant.
                   Table 3.34    Startup Parameters for PTP Operation
                  Data Position Number
                                                      Parameter                                    Value Range
                  AX1             AX2
                                                                              0: Start Positioning command
                                                                              1: Decelerate-and-Stop command
                                                                              2: Origin Search command
                                                                              3: Set Parameters command
                                                                              4: Set Current Position command
                  041             141      Command Code                       5: Reset Error command
                                                                              6: Change Speed command
                                                                              7: Change Target Position command
                                                                              8: Automatic Origin Search command
                                                                              9: Save Parameter command
                                                                              99: Initialize Flash Memory command
                  042             142      Target Position Mode               0: Absolute position, 1: Incremental position
                 043/044        143/144    Target Position                    Reverse limit to forward limit [pulses]
                                                                              0: Trapezoidal acceleration/deceleration (with
                  045             145      Acceleration/deceleration Mode     programmable startup speed)
                                                                              1: S-shaped acceleration/deceleration
                 046/047        146/147    Target Speed                       0 to speed limit [(1/65536) pulses/ms]
                  048             148      Acceleration Time                  0 to 32767 [ms]
                  049             149      Deceleration Time                  0 to 32767 [ms]
                                                                              0 to target speed [(1/65536) pulses/ms]
                 050/051        150/151    Startup Speed                      (valid only for trapezoidal
                                                                              acceleration/deceleration)
                   An object is moved using the system shown in Figure 3.1 successively to 4 points as
                   shown in Figure 3.78.
                     Y
                                                          P (280,
                                                           3    170)




                                                                                                          110)
                                                                                                    P (500,
                                                                                                     2
                           P (100,
                            4    90)




                                                                  P (320,
                                                                   1    30)
                                                                                                                        X
                   Table 3.78 Changes in Current Position (coordinate system is in mm)



                   The travel speed, acceleration time and deceleration time for each segment of the
                   movement is as shown below.
                   (The startup speed is not specified as S-shaped acceleration and deceleration is
                   selected)




TI 34M6K01-01E                                                                                                                 231
                                                                                  3. Sample Programs for Positioning Modules
                                                                                                                  F3YP14/18



                 Movement                Axis                    Speed               Acceleration Time       Deceleration Time
                                         (X/Y)                   [mm/s]                    [ms]                    [ms]
            Moving to P1                  X                       100                        300                       400
                                          Y                        50                        200                       300
            Moving to P2                  X                       150                        400                       500
                                          Y                        75                        250                       350
            Moving to P3                  X                       200                        500                       600
                                          Y                       100                        300                       400
            Moving to P4                  X                       150                        400                       500
                                          Y                        75                        250                       350


            The corresponding parameters values to be written to the positioning module are
            calculated as follows:
               Movement          Axis                   Speed             Current Position     Acceleration Time       Deceleration
                                 (X/Y)           [(1/65536)pulse/ms]          [pulse]                [ms]               Time [ms]
            Moving to P1          X                  1638400                   80000                 300                     400
                                  Y                   819200                    7500                 200                     300
            Moving to P2          X                  2457600                  125000                 400                     500
                                  Y                  1228800                   27500                 250                     350
            Moving to P3          X                  3276800                   70000                 500                     600
                                  Y                  1638400                   42500                 300                     400
            Moving to P4          X                  2457600                   25000                 400                     500
                                  Y                  1228800                   22500                 250                     350
            Figure 3.79 shows the corresponding sample program and the timing chart.



      ***** PTP operation (PTPSET) *****


      *** Set the number of target positions in data registers (for X and Y Axes) ***


                                                                                                                   Number of target
                                                                                                                   positions



      *** Set Xaxis target position data in data registers ***




                                                                                                                   Command code to start
                                                                                                                   positioning



                                                                                                                   Target position mode



                                                                                                                   Target position
                                                                                                                   (320 mm)


                                                                                                                   Acceleration/
                                                                                                                   deceleration mode
                                                                                                                   (S-shape)


                                                                                                                   Target speed
                                                                                                                   (100 mm/s)



                                                                                                                   Acceleration time
                                                                                                                   (300 ms)




232                                                                                                                    TI 34M6K01-01E
                 3. Sample Programs for Positioning Modules
                                                 F3YP14/18




                                             Deceleration time
                                             (400 ms)


                                             Startup speed




                                             Command code to
                                             start positioning


                                             Target position mode



                                             Target position
                                             (500 mm)

                                             Acceleration
                                             /deceleration mode
                                             (S-shaped)

                                             Target speed
                                             (150 mm/s)


                                             Acceleration time
                                             (400 ms)


                                             Deceleration time
                                             (500 ms)


                                             Startup speed




                                             Command code to
                                             start positioning


                                             Target position mode



                                             Target position
                                             (280 mm)

                                             Acceleration/deceler
                                             ation mode
                                             (S-shaped)


                                             Target speed
                                             (200 mm/s)

                                             Acceleration time
                                             (500 ms)



                                             Deceleration time
                                             (600 ms)


                                             Startup speed




TI 34M6K01-01E                                         233
                                                                  3. Sample Programs for Positioning Modules
                                                                                                  F3YP14/18




                                                                                              Command code to
                                                                                              start positioning


                                                                                              Target position
                                                                                              mode


                                                                                              Target position
                                                                                              (100 mm)

                                                                                              Acceleration
                                                                                              /deceleration mode
                                                                                              (S-shaped)


                                                                                              Target speed
                                                                                              (150 mm/s)

                                                                                              Acceleration time
                                                                                              (400 ms)



                                                                                              Deceleration time
                                                                                              (500 ms)


                                                                                              Startup speed


      *** Set Y-axis target position data in data registers ***




                                                                                              Command code to
                                                                                              start positioning


                                                                                              Target position
                                                                                              mode

                                                                                              Target position
                                                                                              (30 mm)


                                                                                              Acceleration
                                                                                              /deceleration
                                                                                              mode (S-shape)

                                                                                              Target speed
                                                                                              (50 mm/s)


                                                                                              Acceleration time
                                                                                              (200 ms)


                                                                                              Deceleration time
                                                                                              (300 ms)


                                                                                              Startup speed




234                                                                                             TI 34M6K01-01E
                 3. Sample Programs for Positioning Modules
                                                 F3YP14/18




                                             Command code to
                                             start positioning


                                             Target position mode


                                             Target position
                                             (110 mm)


                                             Acceleration/deceler
                                             ation mode
                                             (S-shape)

                                             Target speed
                                             (75 mm/s)


                                             Acceleration time
                                             (250 ms)

                                             Deceleration time
                                             (350 ms)



                                             Startup speed




                                             Command code to
                                             start positioning


                                             Target position mode


                                             Target position
                                             (280 mm)


                                             Acceleration
                                             /deceleration mode
                                             (S-shape)

                                             Target speed
                                             (200 mm/s)


                                             Acceleration time
                                             (500 ms)


                                             Deceleration time
                                             (600 ms)


                                             Startup speed




                                             Command code to
                                             start positioning


                                             Target position mode



                                             Target position
                                             (100 mm)




TI 34M6K01-01E                                         235
                                                                3. Sample Programs for Positioning Modules
                                                                                                F3YP14/18


                                                                                        Acceleration
                                                                                        /deceleration mode
                                                                                        (S-shape)

                                                                                        Target speed
                                                                                        (150 mm/s)

                                                                                        Acceleration time
                                                                                        (400 ms)


                                                                                        Deceleration time
                                                                                        (500 ms)


                                                                                        Startup speed


      *** Execute PTP operation ***



                                                                                        Start positioning flag
                                                                                        ON

                                   Command exaecution disable
                                      (to be set elsewhere)                             Clear data register
                                                                                        for indexing


                                                                                        Target position data
                                                                                        index

                                     Initiate
                                 positioning flag                                       Write X-axis target
                                                                                        position data

                                                                                        Write Y-axis target
                               Start                                                    position data
                         positioning flag

                                                                                        Execute Command
                                                                                        relay for X axis ON


                                                                                        Execute Command
                                                                                        relay for Y axis ON


                                                                                        Waiting for X-axis
                                                                                        ACK flag ON


                                                                                        Waiting for Y-axis
           Execute Command ACK                                                          ACK flag ON
                relay for AX1
                                                                                        Command executing
                                                                                        flag ON


                               Error Notification relay                                 Execute Command
                                      for AX1                                           relay for X axis OFF


                                                                                        Waiting for X-axis
                                                                                        ACK flag OFF

                         Execute Command ACK
                              relay for AX2                                             X-axis positioning in
                                                                                        progress flag ON

                                                                                        Execute Command
                                                                                        relay for Y axis OFF

                                 Error Notification relay
                                                                                        Waiting for Y-axis
                                        for AX2
                                                                                        ACK flag OFF


                                                                                        Y-axis positioning in
                                                                                        progress flag ON




236                                                                                            TI 34M6K01-01E
                                                                                    3. Sample Programs for Positioning Modules
                                                                                                                    F3YP14/18




                                                                                                            Initiate positioning flag
                                  End of
                                  Endof positioning                                                         ON
                                  relay for AX1
                                     relay for
                                                            End of
                                                           End of positioning                               X-axis positioning in
                                                                                                            progress flag OFF
                                                            relay for AX2
                                                             relay for
                                                                                                            Y-axis positioning in
                                                                                                            progress flag OFF


                                                                                                            Command executing
                     Dataisis transferred to a
                     Data transferred directly                                                              flag OFF

                     a linear interpolation via
                     linear interpolation program
                     a global device global
                        through a                                                                           Increment index
                                                                                                            register



                                                                                                            Reset index register



                                                                                                            Transfer data to linear
                                                                                                            interpolation program




                        /I0001

                        /I0002

                        /I0012

                        /I0004                    Com m and executing tim e




                         S peed



                                                       Execute com m and
                        /I0003                        for X-axis positioning

                 X axis Y00433
                                                         End of positioning
                        X00401

                        /I0005
                                                         P ositioning in progress

                        X00425




                         S peed



                                                       Execute com m and
                        /I0013                        for Y-axis positioning

                 Y axis Y00434
                                                        End of positioning
                        X00402

                        /I0015
                                                         P ositioning in progress

                        X00426




TI 34M6K01-01E                                                                                                                   237
                                                        3. Sample Programs for Positioning Modules
                                                                                        F3YP14/18

      Figure 3.79   PTP Movement Sample Program and Timing Chart



      The sample program shown in Figure 3.79 moves the axes successively through
      positions P1 to P4 while /I0001 is on. When both X and Y axes reach a target
      position, movement begins to the next target position. The first movement is initiated
      by /I0002 turning on but movement to subsequent points are triggered by /I0012
      turning on. /I0004 is ON during movement of either the X or Y axis.
      In addition, execution can be prohibited by turning on relay I0099, which is the
      execution disable relay (NC contact).




238                                                                                   TI 34M6K01-01E
                                                                                             3. Sample Programs for Positioning Modules
                                                                                                                             F3YP14/18




3.6.9              Linear Interpolation Movement
                   This section discusses a sample program for 2-axis linear interpolation movement.
                   The procedure for performing linear interpolation is given below.
                     (1) Set the target speeds of the 2 axes so that the ratio of their speeds equals the
                         ratio of their travel distances.
                     (2) Set the acceleration time and deceleration time to the same value.
                     (3) Set the Command Code of each axis to 0, and change the Execute Command
                         output relay (Y        33/ Y     34) of each axis from OFF to ON.
                   The example shown here moves the workpiece along straight lines joining the same 4
                   points used in PTP movement in Section 3.6.8 as shown in Figure 3.80. It uses the
                   same data registers in the PTP movement example for storing the startup parameters
                   for each axis. The travel speeds of the axes are calculated to accommodate the axis
                   with the longest travel distance.

                     Y
                                                               P   3(   280,170)




                                                                                                            P   2(   500,110)
                         P   4(   100,90)




                                                                          P   1(   320,30)
                                                                                                                                    X

                    Figure 3.80          Changes in Target Position (Coordinate system is in mm)

                   The target speed of each axis can be calculated as follows.
                     Target speed of X-axis: Vx
                      Target speed of Y-axis: Vy
                   To move from starting position (X0,Y0) to target position (X1,Y1), and assuming that the
                   travel distance along the X-axis is the longer than the travel along the Y-axis: i.e. |X1-
                   X0|>|Y1-Y0|, then
                         Speed of X-axis = Vx
                         Speed of Y-axis = (|Y1-Y0|/|X1-X0|) * Vx
                   Figure 3.81 shows a sample program for linear interpolation. Only the program
                   segment for starting linear interpolation and the program block for calculating and
                   setting the travel speeds are shown.

           ***** Execute linear interpolation operation (STRMOV) *****


                                                                                                                         Receive target
                                                                                                                         position data


                                          Target position and other
                                  data are passed from the PTP movement
                                      program using global addresses

                                                                                                                         Initiate positioning flag
                                                                                                                         ON



                                                                                                                         Clear index register




                                                                                                                         Set previous position to
                                                                                                                         current position forX-axis


                                                                                                                         Set previous position to
                                                                                                                         current position for Y-
                                                                                                                         axis



TI 34M6K01-01E                                                                                                                                  239
                                                                          3. Sample Programs for Positioning Modules
                                                                                                          F3YP14/18


                                  Command execution disable
                                    (to be set elsewhere)

                                                                                                 Target position data
                                                                                                 index



                        Initiate positioning flag                                                 Write target position
                                                                                                  data for X-axis



                                                                                                  Write target position
              Start positioning flag                                                              data for Y-axis


                                                                                                  Set start ing position to
                                                                                                  previous position (X0)



                                                                                                 Set start ing position to
                                                                                                 previous position (Y0)



                                                                                                  Target position (X1)




                                                                                                 Target position (Y1)




                                                                                                  Target speed (Vx)




                                                                                                 Target speed (Vy)
                                              Call subroutine for speed
      Initiate positioning flag                calculation and setup

                                                                                                 Travel speed


                                   Command execution disable
                                     (to be set elsewhere)                                       Execute Command
                                                                                                 relay for X axis ON



                                                                                                  Execute Command
                                                                                                  relay for Y axis ON



                                                                                                  Waiting for X-axis
                     Start positioning flag                                                       ACK flag ON


                                                                                                  Waitting for Y-axis
                                                                                                  ACK flag ON



                                                                                                  Command executing
                                                                                                  flag ON


                             Execute Command ACK                                                 Execute Command
                                  relay for AX1                                                  relay for X axis OFF



                                                                                                  Waiting for X-axis ACK
                                                                                                  flag OFF
                          Error Notification relay
                                 for AX1
                                                                                                 X-axis positioning in
                                                                                                 progress flag ON

                          Execute Command ACK
                               relay for AX2                                                     Execute Command
                                                                                                 relay for Y axis OFF



                                                                                                 Waiting for Y-axis ACK
                                                                                                 flag OFF

                       Error Notification relay
                              for AX2                                                            Y-axis positioning in
                                                                                                 progress flag ON




240                                                                                                        TI 34M6K01-01E
                                                                                    3. Sample Programs for Positioning Modules
                                                                                                                    F3YP14/18


                        Positioning in progress   Execute Command       End of Positioning
                                  flag                ACK relay               relay




                                                                                                            Start positioning flag
                      Command executing                                                                     ON
                           flag

                                                                                                            X-axis positioning in
                                                                                                            progress flag OFF



                                                                                                            Y-axis positioning in
                                                                                                            progress flag OFF



                                                                                                            Increment index
                                                                                                            register


                                                                                                            Command executing
                                                                                                            flag OFF



                                                                                                            Reset index register



                            ***** Subroutine for calculating and setting travel speed *****




          * Starting Position



           * Target Position



           * Target Speed




                                                                                                            End of positioning of
                                                                                                            either axis




                                                                                                            Compare travel
                                                                                                            distances




TI 34M6K01-01E                                                                                                                   241
                                                         3. Sample Programs for Positioning Modules
                                                                                         F3YP14/18


                                                                                 Floating-point
                                                                                 conversion |X1-X0|


                                                                                 Floating-point
                                                                                 conversion |Y1-Y0|



                                                                                 Floating-point
                                                                                 conversion (Vx)



                                                                                 Floating-point
                                                                                 conversion (Vy)



                                                                                 Calculate Y-axis
                                                                                 speed (Vy)




             AX1 travel > AX2 travel
                                                                                 Integer conversion
                                                                                 (Vy)



                                                                                 Write X-axis speed
                                                                                 (preset value)



                                                                                 Write Y-axis speed
                                                                                 (calculated value)



                                                                                 Calculate X-axis speed
                                                                                 (Vx)




            AX2 travel > AX1 travel                                              Integer conversion
                                                                                 (Vx)



                                                                                 Write X-axis speed
                                                                                 (calculated value)


                                                                                 Write Y-axis speed
                                                                                 (preset value)




      Figure 3.81 Sample Program for Linear Interpolation Movement

      Compared to the sample program for PTP movement, the sample program shown in
      Figure 3.81 has an additional program block for calculating travel speeds. Its timing
      chart is similar to that of PTP movement except that in linear interpolation movement,
      both axes reach the target position at the same time. The sample program moves the
      axes along straight lines successively through positions P1 to P4 while /I0001 is on.
      When the axes reach a target position, movement begins to the next target position.
      In addition, execution can be prohibited by turning on relay I0099, which is the
      execution disable relay (NC contact).




242                                                                                      TI 34M6K01-01E
                                                                        3. Sample Programs for Positioning Modules
                                                                                                        F3YP14/18




3.6.10           Changing Target Speed
                 You can change the target speed during positioning or jogging. To change the target
                 speed, write the parameters listed in Table 3.35, set the Command Code to 6
                 (Change Speed command code) and change the Execute Command output relay
                 (Y     33/ Y      34) from OFF to ON.
                 If the Change Speed command is issued during acceleration, deceleration or a
                 change in speed is such as to prevent the axis from stopping at the target position,
                 the command is ignored, the Execute Command ACK input relay is not set, and an
                 alarm is raised via the Alarm Status relay.
                 If a Change Speed command is issued during jogging, the module waits until all
                 acceleration and deceleration has been completed before executing the command.
                 If a new Change Speed command is issued during the wait, the previous command is
                 discarded and only the new command is executed.


                 Table 3.35     Startup Parameters for Changing Speed
                     Data Position Number
                                                        Parameter                            Value Range
                     AX1             AX2
                                                                         0: Start Positioning command
                                                                         1: Decelerate-and-Stop command
                                                                         2: Origin Search command
                                                                         3: Set Parameters command
                                                                         4: Set Current Position command
                     041            141      Command Code                5: Reset Error command
                                                                         6: Change Speed command
                                                                         7: Change Target Position command
                                                                         8: Automatic Origin Search command
                                                                         9: Save Parameter command
                                                                         99: Initialize Flash Memory command
                     042            142      (Unused)
                   043/044        143/144    (Unused)
                     045            145      (Unused)
                   046/047        146/147    Target Speed                0 to speed limit [(1/65536) pulses/ms]
                     048            148      Acceleration Time           0 to 32767 [ms]
                     049            149      Deceleration Time           0 to 32767 [ms]
                   050/051        150/151    (Unused)


                 Figure 3.82 shows the movement sequence when the target speed is changed.
                        Speed




                                                                              Time
                       Start↑           ↑             ↑
                                  Request to      Request to
                                 change speed    change speed            F030901.VSD

                 Figure 3.82 Movement Sequence When Target Speed is Changed




TI 34M6K01-01E                                                                                                    243
                                                                3. Sample Programs for Positioning Modules
                                                                                                F3YP14/18



               Figure 3.83 shows a sample program and the timing chart for the X-axis.

      ***** Change speed *****

      *** Set X-axis parameters in data registers ***



                            Command execution disable
                                                                                        Flag to start speed
                              (to be set elsewhere)                                     change for X-axis



                                                                                        Command code (6) to
                                                                                        change speed



                                                                                        Target speed
                                                                                        (200 mm/s)



                                                                                        Acceleration time
                                                                                        (500 mm/s)


                                                                                        Deceleration time
                                                                                        (600 mm/s)

      *** Set Y-axis parameters in data registers ***



                             Command execution disable                                  Flag to start speed
                               (to be set elsewhere)                                    change for Y-axis



                                                                                        Command code (6)
                                                                                        to change speed



                                                                                        Target speed
                                                                                        (200 mm/s)



                                                                                        Acceleration time
                                                                                        (500 mm/s)



                                                                                        Deceleration time
                                                                                        (600 mm/s)


       *** Execute X-axis speed change ***


                                                                                        Write new X-axis
                                                                                        target speed



                        Command execution disable                                       Execute Command
                                                                                        relay for X axis ON
                          (to be set elsewhere)

                                                                                        Waiting for X-axis ACK
                                                                                        flag ON


                                                                                        X-axis command
                                                                                        executing flag ON




244                                                                                             TI 34M6K01-01E
                                                                                        3. Sample Programs for Positioning Modules
                                                                                                                        F3YP14/18


                                      Execute Command ACK
                                           relay for AX1

                                                                                                                Read X-axis alarm
                                                                                                                status


                                                                                                                Execute Command
                                                                                                                relay for X axis OFF



                                                                                                                W aiting for X-axis
                                                                                                                ACK flag OFF




                                                     Error Notification relay for AX1
                                                                                                                X-axis command
                                                                                                                executing flag OFF



                 *** Execute Y-axis speed change ***

                      I0099
                                                                                                                W rite new Y-axis
                                                                                                                target speed


                                                                                                                Execute Command
                              Command execution disable                                                         relay for Y axis ON
                                (to be set elsewhere)

                                                                                                                W aiting for Y-axis
                                                                                                                ACK flag ON



                                      Execute Command ACK                                                       Y-axis command
                                                                                                                executing flag ON
                                           relay for AX2

                                                                                                                Read Y-axis alarm
                                                                                                                status



                                                                                                                Execute Command
                                                                                                                relay for Y axis OFF



                                                                                                                 W aiting for Y-axis
                                                                                                                 ACK flag OFF




                                              Error Notification relay for AX2                                  Y-axis command
                                                                                                                executing flag OFF




                     /I0 0 0 1


                     /I0 0 0 2


                     /I0 0 0 3


                       Y433


                       X401


                     /I0 0 0 4
                                       C o m m a n d e x e c u tin g tim e


                     Figure 3.83        Change Speed Program and Timing Chart for X Axis


TI 34M6K01-01E                                                                                                                         245
                                                         3. Sample Programs for Positioning Modules
                                                                                         F3YP14/18

      The sample program shown in Figure 3.83 starts speed change for the X-axis when
      /I0001 is turned on. Internal relay /I0004 turns on during speed change, turns off upon
      completion of speed change.
      In addition, execution can be prohibited by turning on relay I0099, which is the
      execution disable relay (NC contact).




246                                                                                    TI 34M6K01-01E
                         3. Sample Programs for Positioning Modules
                                                         F3YP14/18

                 MEMO.




TI 34M6K01-01E                                                247
              3. Sample Programs for Positioning Modules
                                              F3YP14/18

      MEMO.




248                                         TI 34M6K01-01E
                                                                                                    Appendix A.
                                                                                                    F3NC01/02



Appendix A List of Input/Output Relays
           and Module Data
A1               F3NC01-0N/F3NC02-0N
                 - Input Relays
                              Input Relay Number
                                                                                Operation When On
                             AX1              AX2
                           X!!!01         X!!!17        *   Direct Command ACK
                           X!!!02         X!!!18        *   Number Command ACK
                           X!!!03         X!!!19        *   Paused
                           X!!!04         X!!!20        *   Stop Immediately ACK
                           X!!!05         X!!!21            End of Origin Search
                           X!!!06         X!!!22        *   End of Return to Origin
                           X!!!07         X!!!23            Moving CW
                           X!!!08         X!!!24            Moving CCW
                           X!!!09         X!!!25        *   Write Teach Values ACK
                           X!!!10         X!!!26        *   Write Current Position ACK
                           X!!!11         X!!!27            Error Notification
                           X!!!12         X!!!28        *   Register Data ACK
                           X!!!13         X!!!29        *   Save Data ACK
                           X!!!14         X!!!30            Origin Held
                           X!!!15         X!!!31            End of Positioning
                           X!!!16         X!!!32            (Reserved)
                       !!!     : Denotes the slot where the positioning module is installed
                       *       : Relay for AX2 is invalid in 2-axis linear interpolation mode.


                 - Output Relays
                              Output Relay Number
                                                                                Operation When ON
                             AX1              AX2
                           Y!!!33         Y!!!49        *   ↑Execute Direct Command
                           Y!!!34         Y!!!50        *   ↑Execute Number Command
                           Y!!!35         Y!!!51        *   Pause
                           Y!!!36         Y!!!52        *   ↑Stop Immediately
                           Y!!!37         Y!!!53            ↑Origin Search
                           Y!!!38         Y!!!54        *   ↑Return to Origin
                           Y!!!39         Y!!!55            ↑CW Inching (One-shot)
                           Y!!!40         Y!!!56            CW Jogging
                           Y!!!41         Y!!!57            ↑CCW Inching (One-shot)
                           Y!!!42         Y!!!58            CCW Jogging
                           Y!!!43         Y!!!59        *   ↑Write Teach Values
                           Y!!!44         Y!!!60        *   ↑Write Current Position
                           Y!!!45         Y!!!61            ↑Reset Error
                           Y!!!46         Y!!!62        *   ↑Register Data
                           Y!!!47         Y!!!63        *   ↑Save Data
                           Y!!!48         Y!!!64            (Reserved)
                       !!!     : Denotes the slot where the positioning module is installed
                       ↑       : Actuates on rising edge of output relay
                       *       : Relay for AX2 is invalid in 2-axis linear interpolation mode.




TI 34M6K01-01E                                                                                            249
                                                                                                               Appendix A.
                                                                                                               F3NC01/02

          - List of Parameters
        Data Position Number                                                      Remarks or Value Range
                                         Parameter
        AX1             AX2                                             (Default values are enclosed within brackets)
       001/002       209/210     Target Position              Target position during positioning [(1/10)pulse]
       003/004       211/212     Current Position             Current position during positioning [(1/10)pulse]
       005/006       213/214     Direct Command Position      -83,886,080 to 83,886,070
                                                              Current speed during positioning
         007           215       Current Speed
                                                              [(×speed command scaling factor) pulse/ms]
         008           216       Direct Command Speed         1 to 25,000
                                 Command Position
         009           217                                    0 to 64
                                 Number
         010           218       Command Speed number         1 to 16
                                 Pattern Number being
         011           219                                    Pattern number during pattern execution
                                 Executed
                                 Position Number for
         012           220                                    1 to 64 (1)
                                 Teaching
         013           221       Module Status                State of external contact inputs
      014 to 020    222 to 228   (Reserved)
                                 Number of Write
                                                              Accumulated number of write operations to non-volatile
       021/022       229/230     Operations to Non-volatile
                                                              memory
                                 Memory
         023           231       Error Code                   Error information code when error occurs
                                                              0:×0.1 (0.1pps to 2,500pps)
                                 Speed Command Scaling
         024           232                                    1:×1 (1pps to 25,000pps)          (0)
                                 Factor
                                                              2:×10 (10pps to 250kpps)
         025           233       Electronic        m
                                                              1 to 3,000 (1); 0.001≤ (m/n) ≤10
         026           234       Gear              n
                                                              1 to 25,000 (25,000); ≥ Startup speed
         027           235       Maximum Speed                If electronic gear ratio (m/n) > 1,
                                                              1 ≤Maximum Speed×m/n ≤ 25,000
         028           236       Startup Speed                0 to 25,000 (0); . Startup Speed ≤ Maximum Speed
         029           237       Acceleration Time            0 to 10,000[ms] (0)
         030           238       Deceleration Time            0 to 10,000[ms] (0)
       031/032       239/240     Backlash Compensation        0 to 83,886,070 (0)
       033/034       241/242     Origin Correction            -83,886,080 to 83,886,070 (0)
                                                              -83,886,080 to 83,886,070 (83,886,070)
       035/036       243/244     CW Limit                     If electronic gear ratio (m/n) > 1,
                                                              -83,886,080 ≤ Forward Limit×m/n ≤ 83,886,070
                                                              -83,886,080 to 83,886,070 (-83,886,080)
       037/038       245/246     CCW Limit                    If electronic gear ratio (m/n) > 1,
                                                              -83,886,080 ≤ Reverse Limit×m/n ≤ 83,886,070
         039           247       Z-phase Pulse Count          0 to 32,767 (0)
         040           248       Contact Input Polarity       One bit for each contact ($000D)
                                                              0: pulse/direction signal            (1)
         041           249       Pulse Output Mode
                                                              1: CW pulse/CCW pulse
         042           250       Origin Search Mode           0 to 7 (0)
                                                              0: 2-axis PTP Mode                  (0)
         043             -       Positioning Control Mode
                                                              1: 2-axis Linear Interpolation Mode
      044 to 048    252 to 256   (Reserved)
                                 Speed Data 1
                                 (Origin Search Speed)
         049           257
                                 (Speed for Return to
                                 Origin)                      1 to 25,000 (1);
                                 Speed Data 2                 between Startup Speed and Maximum Speed;
         050           258        (Low Speed for Origin       Low speed for origin search ≤ origin search speed
                                 Search)
                                 Speed Data 3
         051           259
                                  (Jogging Speed)




250                                                                                                           TI 34M6K01-01E
                                                                                                                 Appendix A.
                                                                                                                 F3NC01/02

                   Data Position Number                                             Remarks or Value Range
                                                    Parameter
                    AX1           AX2                                     (Default values are enclosed within brackets)

                 052 to 064    260 to 272   Speed Data 4 to 16
                                                                    0 to 6,416 (0)
                 065 to 080    273 to 288   Pattern Data 1 to 16
                                                                    position data number ×100 + speed data number
                                                                    83,886,080 to 83,886,070 (0) when using absolute
                  081/082       289/290
                                                                    position values
                     to            to       Position Data 1 to 64
                                                                    83,886,079 to 83,886,071 when using incremental
                  207/208       415/416
                                                                    position values




TI 34M6K01-01E                                                                                                            251
                                                                                                   Appendix A.
                                                                                                   F3NC11/12


A2    F3NC11-0N/F3NC12-0N
      - Input Relays
                         Input Relay Number
                                                                               Operation When ON
                       AX1                AX2
                    X!!!01             X!!!17           Start Operation Command ACK
                    X!!!02             X!!!18           Switch Control Mode ACK
                    X!!!03             X!!!19           Decelerate and Stop ACK
                    X!!!04             X!!!20           Stop Immediately ACK
                    X!!!05             X!!!21           End of Origin Search
                    X!!!06             X!!!22           Backlash Compensation ACK
                    X!!!07             X!!!23           Forwarding
                    X!!!08             X!!!24           Reversing
                    X!!!09             X!!!25           Change Target Position ACK
                    X!!!10             X!!!26           Change Speed ACK
                    X!!!11             X!!!27           Write Current Position ACK
                    X!!!12             X!!!28           Error Notification
                    X!!!13             X!!!29           (Reserved)
                    X!!!14             X!!!30           (Reserved)
                    X!!!15             X!!!31           End of Positioning
                    X!!!16             X!!!32           Set Parameters ACK
      !!! : Denotes the slot where the positioning module is installed.


      -    Output Relays
                        Output Relay Number
                                                                               Operation When ON
                       AX1                AX2
                    Y!!!33             Y!!!49           ↑Start Operation Command
                    Y!!!34             Y!!!50           ↑Switch Control Mode
                    Y!!!35             Y!!!51           ↑Request to Decelerate and Stop
                    Y!!!36             Y!!!52           ↑Request to Stop Immediately
                    Y!!!37             Y!!!53           ↑Start Origin Search
                    Y!!!38             Y!!!54           ↑Backlash Compensation
                    Y!!!39             Y!!!55           ↑Request to Change Target Position
                    Y!!!40             Y!!!56           ↑Request to Change Speed
                    Y!!!41             Y!!!57           (Reserved)
                    Y!!!42             Y!!!58           Forward Jogging
                    Y!!!43             Y!!!59           Reverse Jogging
                    Y!!!44             Y!!!60           ↑Write Current Position
                    Y!!!45             Y!!!61           ↑Reset Error
                    Y!!!46             Y!!!62           (Reserved)
                    Y!!!47             Y!!!63           (Reserved)
                    Y!!!48             Y!!!64           ↑Set Parameters
      !!! : Denotes the slot where the positioning module is installed.
      ↑     : Operates on rising edge of output relay




252                                                                                                TI 34M6K01-01E
                                                                                                                   Appendix A.
                                                                                                                   F3NC11/12

                   - List of Parameters
                  Data Position Number
                                                        Parameter                         Remarks or Value Range
                  AX1            AX2
                 001/002       201/202   Position of Center                    -8388608 to 8388608 [pulse]
                 003/004       203/204   Radius                                1 to 8388608 [pulse]
                                                                               -23592960 to 23592960[(1/65536) degree]
                 005/006       205/206   Starting Angle
                                                                               (-360 to 360 [degree])
                                                                               -2123366400 to 2123366400
                 007/008       207/208   Angular Travel
                                                                               [(1/65536) degree](-90 to 90[revolutions])
                                         Startup Speed (for normal
                                                                               0 to 16367616[(1/65536)pulse/ms]
                                         operation)
                 009/010       209/210
                                         Startup Angular Speed (for circular   0 to 23592960 [(1/65536)degree/ms]
                                         interpolation operation)               ( to 360 [degree])
                                         Target Speed (for normal
                                                                               0 to 16367616[(1/65536)pulse/ms]
                                         operation)
                 011/012       211/212
                                         Target Angular Speed (for circular    0 to 23592960 [(1/65536)degree/ms]
                                         interpolation operation)              (0 to 360 [degree])
                  013            213     Acceleration Time                     0 to 32767[ms]
                  014            214     Deceleration Time                     0 to 32767[ms]
                  015            215     Speed Change Time Interval            0 to 32767[ms]
                 016/017       216/217   Target Position                       -8388608 to 8388608[pulse]
                                                                               0: Normal operation
                  018            218     Interpolation Mode                    1: X-axis circular Interpolation
                                                                               2: Y-axis circular interpolation
                                         Control Mode Switchover
                  019            219                                           Specified as bit pattern
                                         Parameter
                  020            220     Origin Search Mode                    For details, see Table 3.11 (P95)
                                                                               0:   Forward
                  021            221     Origin Search Direction
                                                                               1:   Reverse
                                                                               0:   Rising edge
                  022            222     Z-phase Edge Selection
                                                                               1:   Falling edge
                  023            223     Z-phase Pulse Count                   0 to 32767 [times]
                 024/025       224/225   Z-phase Search Range                  0 to 8388608[pulse]
                 026/027       226/227   Backlash Compensation Value           -8388608 to 8388608[pulse]
                 028/029       228/229   Backlash Compensation Speed           0 to 16367616[(1/65536)pulse/ms]
                 030/031       230/231   Forward Limit                         0 to 8388608[pulse]

                 032/033       232/233   Reverse Limit                         -8388608 to 0[pulse]


                 034/035       234/235   Speed Limit                           0 to 16367616[(1/65536)pulse/ms]

                                                                               0: Positive data indicates CW pulse
                  036            236     Direction of Motor Rotation
                                                                               1: Negative data indicates CW pulse
                                                                               0: Pulse and direction signal
                  037            237     Pulse Output Mode
                                                                               1:CW pulse and CCW pulse
                  038            238     Contact Input Polarity                1 bit for each point
                  039            239     Error Status                          Error code when error occurs
                  040            240     Contact Input Status                  State of contact input
                 041/042       241/242   Current Position Status               [pulse]

                 043/044       243/244   Current Speed Status                  [(1/65536)pulse/ms]

                 045/046       245/246   Current Position Status               [pulse]

                                                                               Time remaining for the generated path to
                  047            247     Remaining Deceleration Time
                                                                               arrive at the target position [ms]
                                                                               Accelerating, decelerating, over-ramping,
                  048            248     Extended Status                       waiting for trigger, control mode and other
                                                                               information on movement




TI 34M6K01-01E                                                                                                               253
                                                                                                   Appendix A.
                                                                                                   F3NC51/52


A3    F3NC51-0N/F3NC52-0N
      - Input Relays
                       Input Relay Number
                                                                               Operation When ON
                       AX1                AX2
                    X!!!01             X!!!17           Start Operation Command ACK
                    X!!!02             X!!!18           Execute Extended Command ACK
                    X!!!03             X!!!19           Decelerate and Stop ACK
                    X!!!04             X!!!20           Stop Immediately ACK
                    X!!!05             X!!!21           End of Origin Search
                    X!!!06             X!!!22           Switch Control Mode ACK
                    X!!!07             X!!!23           Forwarding
                    X!!!08             X!!!24           Reversing
                    X!!!09             X!!!25           Change Target Position ACK
                    X!!!10             X!!!26           Change Speed ACK
                    X!!!11             X!!!27           Write Current Position ACK
                    X!!!12             X!!!28           Error Notification
                    X!!!13             X!!!29           Position Detected Notification
                    X!!!14             X!!!30           End of Positioning
                    X!!!15             X!!!31           End of Pulse Clear Output
                    X!!!16             X!!!32           Set Parameters ACK
      !!! : Denotes the slot where the positioning module is installed.


      - Output Relays
                      Output Relay Number
                                                                               Operation When ON
                       AX1                AX2
                    Y!!!33             Y!!!49           ↑Start Operation Command
                    Y!!!34             Y!!!50           ↑Execute Extended Command
                    Y!!!35             Y!!!51           ↑Request to Decelerate and Stop
                    Y!!!36             Y!!!52           ↑Request to Stop Immediately
                    Y!!!37             Y!!!53           ↑Start Origin Search
                    Y!!!38             Y!!!54           ↑Request to Switch Control Mode
                    Y!!!39             Y!!!55           ↑Request to Change Target Position
                    Y!!!40             Y!!!56           ↑Request to Change Speed
                    Y!!!41             Y!!!57           (Reserved)
                    Y!!!42             Y!!!58           Forward Jogging
                    Y!!!43             Y!!!59           Reverse Jogging
                    Y!!!44             Y!!!60           ↑Write Current Position
                    Y!!!45             Y!!!61           ↑Reset Error
                    Y!!!46             Y!!!62           ↑Reset Position Detected Notification
                    Y!!!47             Y!!!63           ↑Internal Trigger
                    Y!!!48             Y!!!64           ↑Set Parameters
      !!! : Denotes the slot where the positioning module is installed.
      ↑     : Operates on rising edge of output relay




254                                                                                                TI 34M6K01-01E
                                                                                                                       Appendix A.
                                                                                                                       F3NC51/52

                    - List of Parameters
                 Data Position Number
                                                        Parameter                         Remarks or Value Range
                   AX1          AX2
                  001/002      201/202     Forward Limit                       Reverse Limit to 134217727 [pulse]
                  003/004      203/204     Reverse Limit                       -134217728 to (Forward Limit - 1) [pulse]
                  005/006      205/206     Speed Limit                         1 to 131072000 [(1/65535) pulses/ms] *1
                  007/008      207/208     Over-speed Detection Value          1 to 131072000 [(1/65536) pulses/ms]
                  009/010      209/210     Over-acceleration Detection Value   1 to 131072000 [(1/65536) pulses/ms/ms] *1
                  011/012      211/212     Deviation Error Detection Value     1 to 134217727 [pulse]
                                                                               0: Positive voltage denotes forward movement
                    013          213       Direction of Motor Rotation
                                                                               1: Negative voltage denotes reverse movement
                    014          214       Contact Input Polarity              1 bit for each point
                    015          215       Contact Output Polarity             1 bit for each point
                    016          216       Position Loop Range                 1 to 10000 [0.01Hz]
                    017          217       Speed Feed Forward Factor           0 to 20000 [1/10000]
                                                                               0: General-purpose incremental method
                    018          218       Encoder Type                        1: Sanyo Denki's Manchester coding absolute
                                                                               2: Yaskawa Electric's serial absolute
                    019          219       Encoder Multiplication              1: 1x 2: 2x 4: 4 x
                  020/021      220/221     Speed/voltage Ratio                 1 to 2000000 [pps/V]
                    022          222       (reserved)                          0: fixed value
                  023/024      223/224     Absolute Encoder Offset             -134217728 to 134217727 [pulse]
                  025/026      225/226     Absolute Encoder Pulse Count        1 to 134217727 [pulse]
                    027          227       Sanyo ABS Bit Length                17 to 28
                                                                               0: Encoder data increases in forward direction
                    028          228       Sanyo ABS Rotation Direction
                                                                               1: Encoder data increases in reverse direction
                                                                               0:   Normal mode with limits
                                                                               1:   Normal mode without limits
                    029          229       Contact Input Mode
                                                                               2:   Alarm detail mode with limits
                                                                               3:   Alarm detail mode without limits
                 030 to 040   230 to 240   (reserved)
                  041/042      241/242     Target Speed                        1 to 131072000 [(1/65536) pulses/ms] *1
                  043/044      243/244     Target Position                     -134217728 to 134217727 [pulse]
                                                                               0: Absolute position
                                                                               1: Incremental position (from encoder position)
                    045          245       Target Position Mode
                                                                               2: Incremental position (from previous target
                                                                               position)
                    046          246       Acceleration Time                   0 to 32767[ms]
                                                                               0:   Trapezoidal acceleration
                    047          247       Acceleration Mode Selection         1:   2-line-segment deceleration
                                                                               2:   S-shaped (3-line-segment deceleration)
                    048          248       Acceleration Parameter 1            1 to 99 [%]
                    049          249       Acceleration Parameter 2            1 to 99 [%]
                    050          250       Deceleration Time                   0 to 32767 [ms]
                                                                               0:   Trapezoidal acceleration
                    051          251       Deceleration Mode Selection         1:   2-line-segment deceleration
                                                                               2:   S-shaped (3-line-segment deceleration)
                    052          252       Deceleration Parameter 1            1 to 99 [%]
                    053          253       Deceleration Parameter 2            1 to 99 [%]
                  054/055      254/255     Positioning Decision Range          0 to 134217727 [pulse]
                    056          256       Positioning Timeout Interval        0 to 32767 [ms]
                                                                               0: Normal operation
                    057          257       Interpolation Mode Selection        1: X-axis circular Interpolation
                                                                               2: Y-axis circular interpolation


TI 34M6K01-01E                                                                                                               255
                                                                                                          Appendix A.
                                                                                                          F3NC51/52

      Data Position Number
                                               Parameter                      Remarks or Value Range
        AX1          AX2
                                                                    0:    Normal startup;
         058          258       Startup Mode Selection              1:    Wait for external trigger
                                                                    2:    Wait for internal trigger
                                                                    0:    No detection; 1: Command value
         059          259       Position Detection Mode
                                                                    2:    Encoder position
       060/061      260/261     Position Detection Setpoint         -134217728 to 134217727 [pulse]
         062          262       Origin Search Mode                  For details, see Table 3.19 (P42)
         063          263       Origin Search Direction             0: Forward; 1: Reverse
         064          264       Z-phase Edge Selection              0: Rising edge; 1: Falling edge
         065          265       Z-phase Pulse Count                 0 to 32767 [times]
       066/067      266/267     Z-phase Search Range                0 to 134217727 [pulse]
       068/069      268/269     Origin Offset Value                 -134217728 to 134217727 [pulse]
         070          270       (Reserved)
                                                                    0:    Servo ON; 1: Servo OFF
                                                                    2:    Brake ON; 3: Brake OFF
                                                                    4:    Constant deviation adjustment
         071          271       Extended Command Parameter
                                                                    5:    Driver reset
                                                                    10:    Manual pulsar mode ON
                                                                    11:    Manual pulsar mode OFF
                                Constant Deviation Adjustment
       072/073      272/273                                         -32768 to 32767 [pulse]
                                Amount
         074          274       Manual Pulsar Scale Value           -500 to 500 [times]
      075 to 080   275 to 280   (Reserved)
                                                                    0: Switch to speed control mode
                                                                    1: Switch to position control mode
         081          281       Control Mode Switchover parameter
                                                                    2: Switch to position control mode (wait for
                                                                    Z-phase))
       082/083      282/283     Position of Center                  -134217728 to 134217727 [pulse]
       084/085      284/285     Radius                              0 to 134217727 [pulse]
                                                                    -23592960 to 23592960 [(1/65536) degree]
       086/087      286/287     Starting Angle
                                                                    (-360 to 360 [degree])
                                                                    -2123366400 to 2123366400 [(1/65536)
       088/089      288/289     Angular Travel                      degree]
                                                                    (-90 to 90 [revolutions])
                                                                    1 to 23592960 [(1/65536) degree/ms]
       090/091      290/291     Angular Speed Setpoint
                                                                    (360 [degree])
         092          292       Acceleration Time                   0 to 32767 [ms]
         093          293       Deceleration Time                   0 to 32767 [ms]
       094/095      294/295     Target Position                     -134217728 to 134217727 [pulse]
         096          296       Correction Pulse Range              0 to 32767 [pulse]
      097 to 100   297 to 300   (Reserved)
         101          301       Error Status                        Error code when error occurs
         102          302       Detailed Error Code                 Error information from absolute encoder
         103          303       Contact Input Status                State of contact input
                                Current Position Status
       104/105      304/305                                         [pulse]
                                (Command value)
                                Current Speed Status
       106/107      306/307                                         [(1/65536)pulse/ms]
                                (Command value)
                                Current Position Status
       108/109      308/309                                         [pulse]
                                (Encoder input value)
                                Current Speed Status
       110/111      310/311                                         [(1/65536)pulse/ms]
                                (Encoder input value)
       112/113      312/313     Target Positions Status             [pulse]
                                                                    Accelerating, decelerating, over-ramping,
         114          314       Extended Status                     waiting for trigger, control mode and other
                                                                    information on movement



256                                                                                                     TI 34M6K01-01E
                                                                                                         Appendix A.
                                                                                                         F3NC51/52


                 Data Position Number
                                                   Parameter                  Remarks or Value Range
                  AX1          AX2
                                                                      Time remaining for the generated path to
                   115         315      Remaining Deceleration Time
                                                                      arrive at the target position [ms]
                   116         316      Contact Output Status         State of external contact output
                                        Absolute Data Status
                                        (Yasukawa Electric's ABS)     [pulse]
                 117/118      317/318
                                        Absolute Raw Data Received    30 bits of received data
                                        (Sanyo Denki's ABS)




TI 34M6K01-01E                                                                                                   257
                                                                                                              Appendix A
                                                                                                              F3YP04/08


A4    F3YP04-0N/F3YP08-0N
      - Input Relays
           Input relay                                            Input relay
                            Operation when ON                                     Operation when ON
             number                                                 number
                            Axis 1, Execute Command                               Axis 5, Execute Command
           X!!!01                                                 X!!!17
                            ACK                                                   ACK
                                                                                  Axis 5, Stop Immediately
           X!!!02           Axis 1, Stop Immediately ACK          X!!!18
                                                                                  ACK
           X!!!03           Axis 1, Error Notification            X!!!19          Axis 5, Error Notification
           X!!!04           Axis 1, End of Positioning            X!!!20          Axis 5, End of Positioning
                            Axis 2, Execute Command                               Axis 6, Execute Command
           X!!!05                                                 X!!!21
                            ACK                                                   ACK
                                                                                  Axis 6, Stop Immediately
           X!!!06           Axis 2, Stop Immediately ACK          X!!!22
                                                                                  ACK
           X!!!07           Axis 2, Error Notification            X!!!23          Axis 6, Error Notification
           X!!!08           Axis 2, End of Positioning            X!!!24          Axis 6, End of Positioning
                            Axis 3, Execute Command                               Axis 7, Execute Command
           X!!!09                                                 X!!!25
                            ACK                                                   ACK
                                                                                  Axis 7, Stop Immediately
           X!!!10           Axis 3, Stop Immediately ACK          X!!!26
                                                                                  ACK
           X!!!11           Axis 3, Error Notification            X!!!27          Axis 7, Error Notification
           X!!!12           Axis 3, End of Positioning            X!!!28          Axis 7, End of Positioning
                            Axis 4, Execute Command                               Axis 8, Execute Command
           X!!!13                                                 X!!!29
                            ACK                                                   ACK
                                                                                  Axis 8, Stop Immediately
           X!!!14           Axis 4, Stop Immediately ACK          X!!!30
                                                                                  ACK
           X!!!15           Axis 4, Error Notification            X!!!31          Axis 8, Error Notification
           X!!!16           Axis 4, End of Positioning            X!!!32          Axis 8, End of Positioning
      !!! : Denotes the slot where the positioning module is installed.


      - Output Relays
          Output relay                                        Output relay
                                  Operation when ON                                       Operation when ON
            number                                              number
          Y!!!33          ↑Axis 1, Execute Command             Y!!!49           ↑Axis 5, Execute Command
          Y!!!34          ↑Axis 1, Stop Immediately            Y!!!50           ↑Axis 5, Stop Immediately
          Y!!!35          Axis 1, Forward Jogging              Y!!!51           Axis 5, Forward Jogging
          Y!!!36          Axis 1, Reverse Jogging              Y!!!52           Axis 5, Reverse Jogging
          Y!!!37          ↑Axis 2, Execute Command             Y!!!53           ↑Axis 6, Execute Command
          Y!!!38          ↑Axis 2, Stop Immediately            Y!!!54           ↑Axis 6, Stop Immediately
          Y!!!39          Axis 2, Forward Jogging              Y!!!55           Axis 6, Forward Jogging
          Y!!!40          Axis 2, Reverse Jogging              Y!!!56           Axis 6, Reverse Jogging
          Y!!!41          ↑Axis 3, Execute Command             Y!!!57           ↑Axis 7, Execute Command
          Y!!!42          ↑Axis 3, Stop Immediately            Y!!!58           ↑Axis 7, Stop Immediately
          Y!!!43          Axis 3, Forward Jogging              Y!!!59           Axis 7, Forward Jogging
          Y!!!44          Axis 3, Reverse Jogging              Y!!!60           Axis 7, Reverse Jogging
          Y!!!45          ↑Axis 4, Execute Command             Y!!!61           ↑Axis 8, Execute Command
          Y!!!46          ↑Axis 4, Stop Immediately            Y!!!62           ↑Axis 8, Stop Immediately
          Y!!!47          Axis 4, Forward Jogging              Y!!!63           Axis 8, Forward Jogging
          Y!!!48          Axis 4, Reverse Jogging              Y!!!64           Axis 8, Reverse Jogging
      !!! : Denotes the slot where the positioning module is installed.
      ↑       : Operates on rising edge of output relay




258                                                                                                       TI 34M6K01-01E
                                                                                                                                 Appendix A
                                                                                                                                 F3YP04/08

                  - List of Parameters
                 Data Position
                                                      Parameter                                   Description or Data Range
                   Number
                     *01            Contact Input Polarity                          1 bit for each contact point
                   *02/*03          Forward Limit                                   -134217728 to 134217727 [pulses]
                   *04/*05          Reverse Limit                                   -134217728 to (Forward Limit - 1) [pulses]
                 *06 to *10         (Reserved)
                                                                                    0:   Start Positioning Command
                                                                                    1:   Decelerate-and-Stop command
                                                                                    2:   Origin Search command
                     *11            Command Code
                                                                                    3:   Set Parameter command
                                                                                    4:   Set Current Position command
                                                                                    5:   Reset Error command
                     *12            Target Position Mode                            0: Absolute position, 1: Incremental position

                   *13/*14          Target Position                                 Reverse Limit to Forward Limit

                   *15/*16          Target Speed                                    1 to 16384000 [(1/65536) pulses/ms]
                     *17            Acceleration Time                               0 to 32767 [ms]
                     *18            Deceleration Time                               0 to 32767 [ms]
                   *19/*20          Startup Speed                                   0 to target speed [(1/65536) pulses/ms]
                     *21            Origin Search Mode                              For details, see Table 3.27 (P184)
                     *22            Origin Search Direction                         0: Reverse, 1: Forward
                     *23            Z-phase Edge Selection                          0: Rising edge, 1: Falling edge
                     *24            Z-phase Search Count                            0 to 32767 [times]
                                                                                    0 to 134217727/Z-phase search count
                   *25/*26          Z-phase Search Range
                                                                                    [pulses]
                     *27            Deviation Pulse Clear Time                      0 to 32767 [ms]
                 *28 to *50         (Reserved)
                  *51/*52           Target Position Status                          [pulse]
                   *53/*54          Current Position Status                         [pulse]
                   *55/*56          Current Speed Status                            [(1/65536) pulses/ms]
                     *57            Contact Input Status                            States of contact inputs
                     *58            Error Status                                    Error code when an error occurs.
                                                                                    Status during and at the end of origin
                     *59            Origin Search Status
                                                                                    search
                  The symbol ‘*’ denotes the value of (axis number - 1).   The values for axis 1 to axis 8 are 0 to 7 respectively.




TI 34M6K01-01E                                                                                                                        259
                                                                                                               Appendix A.
                                                                                                                F3YP14/18


A5    F3YP14-0N/F3YP18-0N
      - Input Relays
           Input relay                                            Input relay
                                    Operation when ON                                   Operation when ON
             number                                                 number
           X!!!01           Axis 1, Execute Command ACK           X!!!17          Axis 1, Error Notification
           X!!!02           Axis 2, Execute Command ACK           X!!!18          Axis 2, Error Notification
           X!!!03           Axis 3, Execute Command ACK           X!!!19          Axis 3, Error Notification
           X!!!04           Axis 4, Execute Command ACK           X!!!20          Axis 4, Error Notification
           X!!!05           Axis 5, Execute Command ACK           X!!!21          Axis 5, Error Notification
           X!!!06           Axis 6, Execute Command ACK           X!!!22          Axis 6, Error Notification
           X!!!07           Axis 7, Execute Command ACK           X!!!23          Axis 7, Error Notification
           X!!!08           Axis 8, Execute Command ACK           X!!!24          Axis 8, Error Notification
           X!!!09           Axis 1, Stop Immediately ACK          X!!!25          Axis 1, End of Positioning