TI34M6K01-01E Introduction to Programming for Positioning Modules Technical Information TI34M6K01-01E 2004.9.20 1st Edition
TI34M6K01-01E
Introduction to Programming for Positioning Modules
Technical Information
TI34M6K01-01E 2004.9.20 1st Edition
TI 34M6K01-01E i
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
ii TI 34M6K01-01E
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
TI 34M6K01-01E iii
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
1. Overview of Positioning Control
TI 34M6K01-01E 1
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
1. Overview of Positioning Control
2 TI 34M6K01-01E
● 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).
X
Y
Figure 1.3 X-Y Table
1. Overview of Positioning Control
TI 34M6K01-01E 3
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
ServomotorAxle ratio
Lead of ball screw
Moving part
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
ServomotorAxle ratio
Rack
Pinion
Moving part
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.
1. Overview of Positioning Control
4 TI 34M6K01-01E
● Timing Belt
ServomotorAxle ratio
Timing pulley
Timing beltMoving part
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
Servomotor
Work (material)
Feed roll
Axle ratio
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.
1. Overview of Positioning Control
TI 34M6K01-01E 5
● Traveling Dolly
Axle ratioServo motor
Driving wheel (two each onthe left and right)
Driver component for dolly
Dolly
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.
1. Overview of Positioning Control
6 TI 34M6K01-01E
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.
1. Overview of Positioning Control
TI 34M6K01-01E 7
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.
Servodriver
Positioningmodule(unit)
Sequence CPU
Analogvoltage
Drive current
Position dataSpeed data
Speed feedback (encoder input)
Servo motor
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.
Servodriver
Positioningmodule(unit)
SequenceCPU
Pulse train
Drive current
Position dataSpeed data
Position and speed feedback (encoder input)
Servo motor
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
1. Overview of Positioning Control
8 TI 34M6K01-01E
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.
Stepdriver
Positioningmodule
SequenceCPU
Pulse train
Drive current
Position dataSpeed data
Stepper motor
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.
1. Overview of Positioning Control
TI 34M6K01-01E 9
1.6 Principle of Servo Systems
This section briefly describes the principles of positioning control using a servo system (AC servo)
Pulsegenratorfor path
generation
D/Aconverter
Speedcontroll
erMotor
Speeddetector
Encoder
-
Positionfeedback
Deviationcounter
Deviationpulse
SpeedreferenceAnalogvoltage
Speed feedback
Positionreference
pulse Drivecurrent
Positionreference
Speedreference
Positioningdata
Feedback pulsesFeedback pulses
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
1. Overview of Positioning Control
10 TI 34M6K01-01E
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.
A
B
Path taken isinsignificant
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.
A
B
A
B
Linear interpolation Circular interpolation
Figure 1.14 CP Control
1. Overview of Positioning Control
TI 34M6K01-01E 11
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.
Starts rotation Rotating atconstant speed
Stops at desginatedposition
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.
1. Overview of Positioning Control
12 TI 34M6K01-01E
1.10 Speed Profiles of Positioning Actions Figure 1.16 shows the speed profile of a simple positioning action.
Accelerationtime
Deceleration time
1 Startup 5 Stop
2 A
ccel
erat
ion
3 Constantspeed
4 Deceleration
Speed
Time
Targetspeed
Distancetraveled
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.
Accelerationtime
Speed
Time
Target speed
Distancetraveled
Actual acceleration/deceleration time
Actual speed attained
Decelerationtime
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).
1. Overview of Positioning Control
TI 34M6K01-01E 13
Acceleration time Deceleration time
Speed
Time
Targetspeed
Distancetraveled
Figure 1.18 2-line-segment Acceleration and Deceleration
Acceleration time Deceleration time
Speed
Time
Targetspeed
Distancetravelled
Figure 1.19 3-line-segment Acceleration and Deceleration
Acceleraton time Deceleration time
Speed
Time
Targetspeed
Distancetravelled
Figure 1.20 S-shaped Acceleration and Deceleration
2. Types of Positioning Modules for FA-M3 and Their Features
14 TI 34M6K01-01E
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
Name Positioning Module Positioning Modules (with pulse output)
Positioning Modules (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
Compatible drivers Pulse input servo driver Step driver Analog input servo driver
Control mode Position control
Position control Speed control
Position control to speed control switchover
Position control Speed control
Position control to speed control switchover
Command types Absolute or incremental
position command Number command
Absolute position command Absolute or incremental position 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
Position data Can be stored in positioning module (64 points per axis) Stored in CPU module Stored in CPU module
Speed data Can be stored in positioning module (16 speeds per axis) Stored in CPU module Stored in CPU module
Interpolation systems - 2-axis linear interpolation
PTP operation Multi-axis linear interpolation 2-axis circular interpolation
PTP operation Multi-axis linear interpolation 2-axis circular interpolation
Pattern data Can be stored in positioning module (16 data per axis) ― ―
En-route operation No Yes Yes Change in target position or speed during positioning
No Yes Yes
Posi
tion
cont
rol
Axis movement using manual pulsar No No Yes
Speed command -249,750 to +249,750 pps -2M to +2M pps
Spee
d co
ntro
l
Change in speed during positioning
No Yes Yes
Acceleration/ deceleration mode Trapezoidal Trapezoidal
Trapezoidal 2-segment polygonal curve 3-segment polygonal curve
Acce
lera
tion
/dec
eler
atio
n
Acceleration/ deceleration time
0 to 10,000ms Acceleration and deceleration independently programmable
0 to 32,767ms Acceleration and deceleration independently programmable
0 to 32,767ms Acceleration and deceleration independently programmable
*1: As of March, 2002
2. Types of Positioning Modules for FA-M3 and Their Features
TI 34M6K01-01E 15
Table 2.1 Specifications of Positioning Modules (2/2) Item Specifications
Name Positioning Module (with multi-channel pulse output)
Positioning Module (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
Compatible drivers Pulse input servo driver Stepper motor driver
Pulse input servo driver Stepper motor driver
Control mode Position control Position control
Command type Absolute or incremental position command
Absolute or 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) Speed data Stored in CPU module Stored in CPU module Interpolation systems Stored in CPU module Stored in CPU module
Pattern data PTP operation Multi-axis interpolation
PTP operation Multi-axis interpolation
En-route operation ― ― Change in target position or speed during positioning
No No
Axis movement using manual pulsar No Yes
Posi
tion
cont
rol
Maximum pulse count No No Speed command
Spee
d co
ntro
l
Change in speed during positioning
No No
Trapezoidal S-shaped Acceleration
/deceleration mode Trapezoidal
Acce
lera
tion/
dece
lera
tion
Acceleration/deceleration time
0 to 32,767ms Acceleration and deceleration independently programmable
0 to 32,767ms Acceleration and deceleration independently programmable
*1: As of March 2002
2. Types of Positioning Modules for FA-M3 and Their Features F3NC01/02
16 TI 34M6K01-01E
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.
Acceleration time Deceleration time
Targetspeed
Maximumspeed
Startupspeed
Acceleration timeMax. speed - Startup speed
Deceleration time
Max. speed - Startup speed
Speed
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
Time
Speed ofpattern data 3
Speed ofpattern data 1
Speed ofpattern data 2
Acceleration
Deceleration
Target position of pattern data 1
Target position of pattern data 2
Target position of pattern data 3 Figure 2.2 Pattern Operation
2. Types of Positioning Modules for FA-M3 and Their Features F3NC01/02
TI 34M6K01-01E 17
(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
Position atcommand startup
Targetposition
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
AX2
Pattern data 1
Pattern data 2
Pattern data 3
Position atstartup
Figure 2.4 Pattern Operation under Linear Interpolation Control Mode
2. Types of Positioning Modules for FA-M3 and Their Features F3NC01/02
18 TI 34M6K01-01E
(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.
.
2. Types of Positioning Modules for FA-M3 and Their Features F3NC11/12
TI 34M6K01-01E 19
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.
Target speed
Time
Speed
Accelerationtime
Decelerationtime
Distancetraveled
Actual speed attained
Actual acceleration/decel. time
Time
Speed
Target speed
Accelerationtime
Decelerationtime
Distancetraveled
Time
Speed
Targetspeed
Acceleration time Deceleration time
Startuptime
Acceleration and deceleration times withstartup speed specified
Figure 2.5 Positioning Operation (speed, acceleration time and deceleration time in
trapezoidal drive or triangular drive)
2. Types of Positioning Modules for FA-M3 and Their Features F3NC11/12
20 TI 34M6K01-01E
(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.
Time
SpeedTarget speed for
X-axis
Acceleration time Deceleration time
Distance traveledby X axis
Distance traveledby Y axis
Target speed forY-axis
Xaxis
Y axis
Distance traveled by X axis
Dis
tanc
e tra
vele
d by
Y a
xis
Figure 2.6 Multi-axis Linear Interpolation (for 2-axis)
2. Types of Positioning Modules for FA-M3 and Their Features F3NC11/12
TI 34M6K01-01E 21
(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.
Time
X-axisspeed
Start↑ Start↑
Normal positioning Operation
Time
X-axisspeed
Start↑ Start↑
En-routeinterval
Start↑
En-routeinterval
En-route Operation
Figure 2.7 Normal Positioning Operation and En-route Operation
X axis
Y axis
Figure 2.8 Example of En-route Operation (for 2-axis Linear Interpolation)
2. Types of Positioning Modules for FA-M3 and Their Features F3NC11/12
22 TI 34M6K01-01E
(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.
Time
Speed
Start↑Request to change
target position
↑Time
Speed
Start↑ ↑Request to change
target position
With No Change in Direction With Change in Direction
Figure 2.9 Operation When Target Position Is Changed during Positioning
Request to changetarget position issued
Old target position
new target position
Y axis
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.
Time
Speed
Start↑ ↑ ↑Request to
change speedRequest to
change speed Figure 2.11 Operation When Speed is Changed During Positioning
2. Types of Positioning Modules for FA-M3 and Their Features F3NC11/12
TI 34M6K01-01E 23
(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.
Circularinterpolation path
Angular travel(270 °)
Starting angle(-45 [315] °)
Direction of zero angle
X-axis radius
X-axis center position
Targetposition Starting
position
X axis
Y axis
Y-a
xis r
adiu
s
Y-ax
is c
ente
r pos
ition
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.
Time
Speed
Start↑ ↑Request to
change speed
↑Request to
change speed
↑Request to
change speed
↑Request to
change speed Figure 2.13 Speed Control and Speed Change Operation
2. Types of Positioning Modules for FA-M3 and Their Features F3NC11/12
24 TI 34M6K01-01E
(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.
Time
Speed
Startup↑ ↑
Target position (travel)
Request to swtich to position control Figure 2.14 Speed Control to Position Control Switchover (with no Z-phase count
specified)
Z-phase
Time
Speed
Startup↑ ↑
Target position (travel)
Request to swtich to position control
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.
2. Types of Positioning Modules for FA-M3 and Their Features F3NC11/12
TI 34M6K01-01E 25
(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.
Time
Speed
Forward Jogging relay
Joggingbegins
Joggingends
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.
2. Types of Positioning Modules for FA-M3 and Their Features F3NC51/52
26 TI 34M6K01-01E
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.
Target speed
Time
Speed
Accelerationtime
Decelerationtime
Distancetraveled
Actual speed attained
Actual acceleration/decel. time
Time
Speed
Target speed
Accelerationtime
Decelerationtime
Distancetraveled
Figure 2.17 Positioning Operation
(speed, acceleration time and deceleration time in trapezoidal drive or triangular drive)
Speed Speed
Time Time
2-line Segment S-ahaped (3-line Segment)
Figure 2.18 Acceleration and Deceleration under 2-line-segment and S-shape (3-line
Segment) Acceleration/deceleration Mode
2. Types of Positioning Modules for FA-M3 and Their Features F3NC51/52
TI 34M6K01-01E 27
(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.
Time
SpeedTarget speed for
X-axis
Acceleration time Deceleration time
Distance traveledby X axis
Distance traveledby Y axis
Target speed forY-axis
X axis
Y axis
Distance traveled by X axis
Dis
tanc
e tra
vele
d by
Y a
xis
Figure 2.19 Multi-axis Linear Interpolation (for 2-axis)
2. Types of Positioning Modules for FA-M3 and Their Features F3NC51/52
28 TI 34M6K01-01E
(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.
Time
X-axisspeed
Start↑ Start↑
Normal positioning Operation
Time
X-axisspeed
Start↑ Start↑
En-routeinterval
Start↑
En-routeinterval
En-route Operation
Figure 2.20 Normal Positioning Operation and En-route Operation
X axis
Y axis
Figure 2.21 Example of En-route Operation (for 2-axis Linear Interpolation)
2. Types of Positioning Modules for FA-M3 and Their Features F3NC51/52
TI 34M6K01-01E 29
(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.
Time
Speed
Start↑Request to change
target position
↑Time
Speed
Start↑ ↑Request to change
target position
With No Change in Direction With Change in Direction
Figure 2.22 Operation When Target Position Is Changed during Positioning
Request to changetarget position issued
Old target position
new target position
Y axis
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.
Time
Speed
Start↑ ↑ ↑Request to
change speedRequest to
change speed Figure 2.24 Operation When Speed is Changed During Positioning
2. Types of Positioning Modules for FA-M3 and Their Features F3NC51/52
30 TI 34M6K01-01E
(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.
Circularinterpolation path
Angular travel(270 °)
Starting angle(-45 [315] °)
Direction of zero angle
X-axis radius
X-axis center position
Targetposition Starting
position
X axis
Y axis
Y-ax
is ra
dius
Y-ax
is c
ente
r pos
ition
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.
Time
Speed
Start↑ ↑Request to
change speed
↑Request to
change speed
↑Request to
change speed
↑Request to
change speed Figure 2.26 Speed Control and Speed Change Operation
2. Types of Positioning Modules for FA-M3 and Their Features F3NC51/52
TI 34M6K01-01E 31
(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.
Time
Speed
Startup↑ ↑
Target position (travel)
Request to swtich to position control Figure 2.27 Speed Control to Position Control Switchover (with no Z-phase count
specified)
Z-phase
Time
Speed
Startup↑ ↑
Target position (travel)
Request to swtich to position control
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.
2. Types of Positioning Modules for FA-M3 and Their Features F3NC51/52
32 TI 34M6K01-01E
(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.
Time
Speed
Forward Jogging relay
Joggingbegins
Joggingends
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.
2. Types of Positioning Modules for FA-M3 and Their Features F3YP04/08
TI 34M6K01-01E 33
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.
Target speed
Time
Speed
Accelerationtime
Decelerationtime
Distancetraveled
Actual speed attained
Actual acceleration/decel. time
Time
Speed
Target speed
Accelerationtime
Decelerationtime
Distancetraveled
Time
Speed
Targetspeed
Acceleration time Deceleration time
Startuptime
Acceleration and deceleration times withstartup speed specified
Figure 2.30 Positioning Operation (speed, acceleration time and deceleration time in trapezoidal drive or triangular drive)
2. Types of Positioning Modules for FA-M3 and Their Features F3YP04/08
34 TI 34M6K01-01E
(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.
Time
SpeedTarget speed for
X-axis
Acceleration time Deceleration time
Distance traveledby X axis
Distance traveledby Y axis
Target speed forY-axis
X axis
Y axis
Distance traveled by X axis
Dis
tanc
e tra
vele
d by
Y a
xis
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.
Time
Speed
Forward Jogging relay
Joggingbegins
Joggingends
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.
2. Types of Positioning Modules for FA-M3 and Their Features F3YP14/18
TI 34M6K01-01E 35
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.
Acceleration time Deceleration time
Speed
Time
Taragetspeed
Distancetraveled
Acceleration time Deceleration timeActual acceleration time and decel. time
Time
Speed
Target speed
Actual speed attained
Target speed
Time
Speed
Accelerationtime
Decelerationtime
Distancetraveled
Actual speed attained
Actual acceleration/decel. time
Time
Speed
Target speed
Accelerationtime
Decelerationtime
Distancetraveled
Time
Speed
Targetspeed
Acceleration time Deceleration time
Startup time
Acceleration and deceleration times with startupspeed specified
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)
2. Types of Positioning Modules for FA-M3 and Their Features F3YP14/18
36 TI 34M6K01-01E
(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.
Time
SpeedTarget speed for
X-axis
Acceleration time Deceleration time
Distance traveledby X axis
Distance traveledby Y axis
Target speed forY-axis
X axis
Y axis
Distance traveled by X axis
Dis
tanc
e tra
vele
d by
Y a
xis
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.
Time
Speed
Forward Jogging relay
Joggingbegins
Joggingends
Figure 2.35 Jogging Operation (Forward Jogging)
2. Types of Positioning Modules for FA-M3 and Their Features F3YP14/18
TI 34M6K01-01E 37
(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.
Forward limit Reverse limitOrigin
Startup speedSearch speed 2
Z-phase pulse
Forward limit Reverse limitOrigin
Z-phase pulse
Forward limit Reverse limitOrigin
Startup speed
Search speed 1Search speed 2
Z-phase pulse
Forward limit Reverse limitOrigin
Z-phase pulse
! Starting from the positive side of the orign switch:
! Starting with the origin input turned on:
! Starting between the reverse limit input and origin input:
! Starting with the reverse limit input turned on:
Figure 2.3.6 Automatic Origin Search with origin input
2. Types of Positioning Modules for FA-M3 and Their Features F3YP14/18
38 TI 34M6K01-01E
Forward limit Reverse limit
Startup speed
Search speed 1Search speed 2
Z-phase pulse
Forward limit Reverse limit
Startup speedSearch speed 2
Z-phase pulse
! Starting with the reverse limit turned off
! Starting with the reverse limit turned off
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.
2. Types of Positioning Modules for FA-M3 and Their Features
TI 34M6K01-01E 39
MEMO.
2. Types of Positioning Modules for FA-M3 and Their Features
40 TI 34M6K01-01E
MEMO.
3. Sample Programs for Positioning Module
TI 34M6K01-01E 41
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
600 mmX-axis
Y-axisForward limitSW for Y-axis
Y-axis origin SW
Reverse limit SWfor Y-axis
Reverse limitSW for X-axis
X-axis origin SW
Forward limitSW for 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
3. Sample Programs for Positioning Modules F3NC01/02
42 TI 34M6K01-01E
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/F3NC02Operation procedure
Turn on servo(when using AC servo motor)
Origin search
Register parameters
Command type?
Write command position no.and command speed no.
Write position dataand speed data
Turn on Execute DirectCommand relay
Turn on Execute NumberCommand relay
Pattern execution
Write 0 tocommand position number
Number command
Direct commandYes
No
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.
3. Sample Programs for Positioning Modules F3NC01/02
TI 34M6K01-01E 43
- 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.
3. Sample Programs for Positioning Modules F3NC01/02
44 TI 34M6K01-01E
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 AX1 AX2
Parameter Range of values (Default values are indicated within brackets)
024 232 Speed Command Scaling Factor
0:×0.1 (0.1pps to 2,500pps) 1:×1 (1pps to 25,000pps) (0) 2:×10 (10pps to 250kpps)
025 233 m 026 234
Electronic Gear n
1 to 3000 (1); 0.011 ≤(m/n) ≤ 10
027 235 Maximum Speed 1 to 25,000 (25,000); ≥ Startup 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)
035/036 243/244 CW Limit -83,886,080 to 83,886,070 (83,886,070) If electronic gear ratio (m/n) > 1, -83,886,080 ≤ Forward Limit×m/n ≤ 83,886,070
037/038 245/246 CCW Limit -83,886,080 to 83,886,070 (-83,886,080) 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)
041 249 Pulse Output Mode 0: pulse/direction signal (1) 1: CW pulse/CCW pulse
042 250 Origin Search Mode 0 to 7 (0)
043 - Positioning Control Mode 0: 2-axis PTP Mode (0) 1: 2-axis Linear Interpolation Mode
044 to 048 252 to 256 (Reserved)
049 257
Speed Data 1 (Origin Search Speed) (Speed for Return to Origin)
050 258 Speed Data 2 (Low Speed for Origin Search)
051 259 Speed Data 3 (Jogging Speed)
052 to 064 260 to 272 Speed Data 4 to 16
1 to 25,000 (1); between Startup Speed and Maximum Speed; Low speed for origin search ≤ origin search speed
065 to 080 273 to 288 Pattern Data 1 to 16 0 to 6,416 (0) position data number ×100+ speed data number
081/082 to
207/208
289/290 to
415/416 Position Data 1 to 64
83,886,080 to 83,886,070 (0) when using absolute position values 83,886,079 to 83,886,071 when using incremental position values
3. Sample Programs for Positioning Modules F3NC01/02
TI 34M6K01-01E 45
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.
3. Sample Programs for Positioning Modules F3NC01/02
46 TI 34M6K01-01E
- 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)
Ready input (default: 0)
CCW limit input (default: 1)
- 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.
Origin Search Mode
Z-phase Detection
Origin Search Direction
Use of Origin Proximity
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.
3. Sample Programs for Positioning Modules F3NC01/02
TI 34M6K01-01E 47
- 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.
3. Sample Programs for Positioning Modules F3NC01/02
48 TI 34M6K01-01E
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
AX1 AX2 Parameter Remarks
003/004 211/212 Current Position Current position during positioning [(1/10)pulse]
007 215 Current Speed Current speed during positioning [(×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 AX1 AX2
Description
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
3. Sample Programs for Positioning Modules F3NC01/02
TI 34M6K01-01E 49
*** 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.
3. Sample Programs for Positioning Modules F3NC01/02
50 TI 34M6K01-01E
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
3. Sample Programs for Positioning Modules F3NC01/02
TI 34M6K01-01E 51
2-axis PTP mode (For 2-axis linear interpolation mode,
set value to 1)
** Set speed data in data registers **
*** Set Y-axis parameters in data registers ***
Pulse output mode
Origin search mode
Interpolation mode
Origin search speed
Origin search low speed
Jogging speed
Set speed data4-16 to 0
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
3. Sample Programs for Positioning Modules F3NC01/02
52 TI 34M6K01-01E
2-axis PTP mode (For 2-axis linear interpolation
mode, Set the value to 1)
** Set speed data in data registers **
*** Write X-axis parameters to module ***
Swap words
CCW limit
Swap words
Z-phase pulse count
Contact input polarity
Origin search speed
Origin search low speed
Jogging speed
Set speed data 4-16 to 0
Request to set parameters
Write parameters
Write speed data
Set Parameters relay ON
Waiting for set parameters ACK flag ON
Command executing flag ON
Pulse output mode
Origin search mode
Interpolation mode
3. Sample Programs for Positioning Modules F3NC01/02
TI 34M6K01-01E 53
Set Parameters ACK relay for AX1
Set Parameters ACK relay for AX2
*** Write Y-axis parameters to module ***
Request to set parameters
Write parameters
Write speed data
Set ParametersrelayON
Waiting for set parameter ACK flag ON
Command executing flag ON
Set Parameters relay OFF
Waiting for set parameter ACK flag OFF
Command executing flag OFF
Set Parameters relay OFF
Waiting for set parameter ACK flag OFF
Command executing flag OFF
I00001
I00002
I00003
I00004
Y00446
X00412
Command executing
Request to setparameters ACK
Request to setparameters
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.
3. Sample Programs for Positioning Modules F3NC01/02
54 TI 34M6K01-01E
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.
3. Sample Programs for Positioning Modules F3NC01/02
TI 34M6K01-01E 55
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.
Error Notification relay forfor AX1
Reset Error relay OFF
Error Notification relay for for AX2
***** Reset error (RLSERR) *****
*** Y axis ***
*** 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
Rising edge of reset error request
Falling edge of reset error request
AX2 Execute Direct Command relay OFF
Reset Error relay ON
Reset Error relay OFF
3. Sample Programs for Positioning Modules F3NC01/02
56 TI 34M6K01-01E
I00201
I00202
I00203
X00412
Y00445
Error reset request
Error Nofiticationrelay 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.
3. Sample Programs for Positioning Modules F3NC01/02
TI 34M6K01-01E 57
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.
Error Notification relay for AX1
End of Positioning relayfor AX1
Error Notification relay for AX2
End of Positioning relayfor AX2
*** Execute X-axis forward jogging ***
*** Jogging (JOG) ***
*** Execute Y-axis forward jogging ***
Request to start forward jogging
Request to stop forward jogging
Start forward jogging
Command executing flag ON
Stop forward jogging
Command executing flag OFF
Request to start forward jogging
Request to stop forward jogging
Start forward jogging
Command executing flag ON
Stop forward jogging
Command executing flag OFF
3. Sample Programs for Positioning Modules F3NC01/02
58 TI 34M6K01-01E
Error Notification relay for AX1
End of Positioning relay for AX1
Error Notification relay for AX2
End of Positioning relayfor AX2
*** Execute X-axis reverse jogging ***
*** Execute Y-axis reverse jogging ***
Request to start reverse jogging
Request to stop reverse jogging
Start reverse jogging
Command executing flag ON
Stop reverse jogging
Command executing flag OFF
Request to start reverse jogging
Request to stop reverse jogging
Start reverse jogging
Command executing flag ON
Stop reverse jogging
Command executing flag OFF
Figure 3.6 Jogging Program
3. Sample Programs for Positioning Modules F3NC01/02
TI 34M6K01-01E 59
I00401
I00402
I00403
X00415
Y00440
I00404Command executing
Speed
Stop forwardjogging
Start forwardjogging
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
3. Sample Programs for Positioning Modules F3NC01/02
60 TI 34M6K01-01E
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.
End of Origin Search relay for AX1
Error Notification relay for AX1
End of Origin Search relay for AX2
Error Notification relay for AX2
***** Origin search (ZSEARCH) *****
*** Execute X-axis origin search ***
*** Execute Y-axis origin search ***
Request to search fororigin
Start Origin Search relay ON
Waiting for ACK flag ON
Command executingflag ON
Start Origin Search relay OFF
Waiting for ACK flag OFF
Command executingflag OFF
Request to search fororigin
Start Origin Search relay ON
Waiting for ACK flag ON
Command executingflag ON
Start Origin Search relay OFF
Waiting for ACK flag OFF
Command executingflag OFF
Figure 3.8 Origin Search Program
3. Sample Programs for Positioning Modules F3NC01/02
TI 34M6K01-01E 61
I00501
I00502
I00503
X00405
Y00437
I00504Command executing
End origin search
Origin input
Start Z-phasesearch
SpeedZ-phase detected
(origin established)
Start origin search
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.
3. Sample Programs for Positioning Modules F3NC01/02
62 TI 34M6K01-01E
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
AX1 AX2 Parameter Value Range
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
XP1(320,30)
P2(500,110)
P3(280,170)
P4(100,90)
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 (X/Y)
Speed [mm/s]
X 100 Moving to P1 Y 50 X 150 Moving to P2 Y 75 X 200 Moving to P3 Y 1000 X 150 Moving to P4 Y 75
The corresponding parameters values to be written to the positioning module are calculated as follows:
Movement Axis (X/Y)
Direct Command Position
Speed
X 800000 2500 Moving to P1 Y 75000 1250 X 1250000 3750 Moving to P2 Y 275000 2000 X 700000 5000 Moving to P3 Y 425000 2500 X 250000 3750 Moving to P4 Y 225000 2000
Figure 3.11 shows the corresponding sample program and Figure 3.12 shows the timing chart.
3. Sample Programs for Positioning Modules F3NC01/02
TI 34M6K01-01E 63
***** PTP Movement (execution using direct command ) (PTPMOV) *****
*** Set the number of target positions in data registers ***
*** Set X-axis target position and speed data in data registers ***
Number of target positions
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
3. Sample Programs for Positioning Modules F3NC01/02
64 TI 34M6K01-01E
Initiate positioning operation flag
Start positioning operation flag
*** Execute PTP operation ***
Target position P2
Swap words
Target speed
Target position P3
Swap words
Target speed
Target position P4
Swap words
Target speed
Initiate positioning flag ON
Clear data register for indexing
Target position data index
Write X-axis target position
Write X-axis target speed
Write Y-axis target position
Waiting for X-axis ACK flag ON
Execute Direct Command relay for Yaxis ON
Execute Direct Command relay for X axis ON
Write Y-axis target speed
3. Sample Programs for Positioning Modules F3NC01/02
TI 34M6K01-01E 65
Execute Direct Command ACK relay for X-axis
Execute Direct Command ACK relay
for Y-axis
Execute Direct Command ACK relays
Positioning in progress flags
End-of-positioning relays
Movement to final target position completed
Start from first target position
Waiting for Y-axis ACK flag ON
Command executing flag ON
Execute Direct Command relay for X axis OFF
Waiting for X-axis ACK flag OFF
X-axis positioning in progress flag ON
Execute Direct Command relay for Y axis OFF
Waiting for Y-axis ACK flag OFF
Y-axis positioning in progress flag ON
Start positioning flag ON
X-axis positioning in progress flag OFF
Y-axis positioning in progress flag OFF
Increment index register
Command executing flag OFF
Reset index register
Figure 3.11 PTP Operation (execution by direct command) Program
3. Sample Programs for Positioning Modules F3NC01/02
66 TI 34M6K01-01E
I00601
I00602
I00603
X00415
Y00433
Speed
X00401
I00605
Speed
I00604
X axis
Command executing
Positioning in progress
X-axis ExecuteDirect Command
End of positioning
I02603
X00431
Y00449
X00417
I02605
Y axis
Positioning in progress
Y-axis ExecuteDirect Command
End of positioning
I00612
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).
3. Sample Programs for Positioning Modules F3NC01/02
TI 34M6K01-01E 67
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
AX1 AX2 Parameter Value Range
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 ***
*** Set X-axis target position data in data registers ***
Number of target position data
Clear position data
P1
Swap words
P2
Swap words
P3
Swap words
P4
Swap words
3. Sample Programs for Positioning Modules F3NC01/02
68 TI 34M6K01-01E
*** Set Y-axis target position data in data registers ***
*** Set X-axis speed data in data registers ***
*** Set Y-axis speed data in data registers ***
Clear position data
P1
Swap words
P2
Swap words
P3
Swap words
P4
Swap words
3. Sample Programs for Positioning Modules F3NC01/02
TI 34M6K01-01E 69
*** Set command number data for both X and Y axes in data registers ***
*** Registers speed data and position data for X-axis ***
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
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
3. Sample Programs for Positioning Modules F3NC01/02
70 TI 34M6K01-01E
Initiate positioning flag
Start positioning flag
X-axis Execute Number Command
ACK relay
Y-axis Execute Number Command
ACK relay
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
Target position number index
Write X-axis number
Write Y-axis number
X-axis Execute Number Command relay f ON Y-axis Execute Number Command relay ON
X-axis Waiting for ACK flag ON
Y-axis Waiting for ACK flag ON
Command executing flag ON
X-axis Execute Number Command OFF
X-axis waiting for ACK flag OFF
X-axis positioning in progress flag OFF
Y-axis Execute Number Command OFF
Y-axis waiting for ACK flag OFF
Y-axis positioning in progress flag OFF
*** Start Positioning ***
3. Sample Programs for Positioning Modules F3NC01/02
TI 34M6K01-01E 71
Positioning in progress flags
Execute Number Command ACK relays
End of positioning
relays
Movement to final target position completed
Start from first target position
Start positioning operation flag ON
X-axis positioning in progress flag OFF
Y-axis positioning in progress flag OFF
Increment index register
Command executing flag OFF
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).
3. Sample Programs for Positioning Modules F3NC01/02
72 TI 34M6K01-01E
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
XP1(320,30)
P2(500,110)
P3(280,170)
P4(100,90)
Figure 3.14 Target Positions (Coordinate system is in mm)
***** Linear Interpolation Operation Program (STRMOV) ******
*** Set number of target position data in data registers ***
*** Set position data and speed data for X-axis **
No. of target position data
Target position P1
Swap words
Travel speed
Target position P2
Swap words
Travel speed
3. Sample Programs for Positioning Modules F3NC01/02
TI 34M6K01-01E 73
*** 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
Target position P3
Swap words
Travel speed
Target position P4
Swap words
Travel speed
3. Sample Programs for Positioning Modules F3NC01/02
74 TI 34M6K01-01E
Start positioning flag
Initiate positioning flag
AX1 Execute Direct Command ACK relay
Positioning in progress flag
AX1 End of Positioning relay
Movement to final target position completed
Starting from first target position
*** Start Linear Interpolation Operation ***
Start positioning flag ON
Clear index data register
Target position data index
Write X-axis direct command position
Write X-axis direct command speed
Write Y-axis direct command position
Write Y-axis direct command speed
X-axis Execute Direct Command relay ON
X-axis Wait for ACK flag ON
Command executing flag ON
X-axis Execute Direct Command relay OFF
X-axis Wait for ACK flag OFF
X-axis positioning in progress flag ON
Initiate positioning flag ON
X-axis positioning in progress flag OFF
Increment index register
Command executing flag OFF
Reset index register
Figure 3.15 Sample Program for Linear Interpolation Operation (execution by direct
command)
3. Sample Programs for Positioning Modules F3NC01/02
TI 34M6K01-01E 75
I00801
I00802
I00803
X00415
Y00433
X00401
I00805
Speed alongA-axis
I00804Positioning in progress
AX1 End ofPositioning
I00812
Speed alongY-axis
AX1 Execute DirectCommand
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).
3. Sample Programs for Positioning Modules F3NC01/02
76 TI 34M6K01-01E
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 ***
*** Set position data in data registers for Y-axis ***
Clear position data
P1
Swap words
P2
Swap words
P3
Swap words
P4
Swap words
Clear position data
P1
Swap words
P2
Swap words
3. Sample Programs for Positioning Modules F3NC01/02
TI 34M6K01-01E 77
*** Set speed data in data registers for X-axis ***
*** Set speed data in data registers for Y-axis ***
*** Set pattern data in data registers for X-axis ***
P3
Swap words
P4
Swap words
Vx1
Vx2
Vx3
Vx4
Vy1
Vy2
Vy3
Vy4
Clear pattern data
Position 1, Speed 4
Position 2, Speed 5
Position 3, Speed 6
Position 4, Speed 7
3. Sample Programs for Positioning Modules F3NC01/02
78 TI 34M6K01-01E
*** Set pattern data in data registers for Y axis ***
*** Pattern operation ***
*** Register speed data, position data, pattern data (setup parameters) ***
Clear pattern data
Position 1, Speed 4
Position 2, Speed 5
Position 3, Speed 6
Position 4, Speed 7
Start Positioning flag ON
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
3. Sample Programs for Positioning Modules F3NC01/02
TI 34M6K01-01E 79
Start positioning flag
Initiate positioning flag
AX1 Execute Number Command ACK relay
AX1 End of Positioning relay
Initiate PTP positioning flag ON
Write 0 to X-axis position command number Write 0 to X-axis position command number
X-axis Execute Number Command relay ON
X-axis waiting for ACK flag ON
Command executing flag ON
X-axis Execute Number Command relay OFF
X-axis waiting for ACK flag OFF
X-axis positioning in progress OFF
Initiate positioning flag ON
X-axis positioning in progress OFF
Command executing flag OFF
*** Start Positioning ***
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).
3. Sample Programs for Positioning Modules F3NC01/02
80 TI 34M6K01-01E
MEMO.
3. Sample Programs for Positioning Modules F3NC11/12
TI 34M6K01-01E 81
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 / F3NC12Operation Procedure
Turn servomotor on(when using AC servomotor)
Register parameters
Execute origin search
Execute various positioningactions
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.
3. Sample Programs for Positioning Modules F3NC11/12
82 TI 34M6K01-01E
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
AX1 AX2 Parameter Range of values
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]
036 236 Direction of Motor Rotation 0: Positive data indicates CW pulse 1: Negative data indicates CW pulse
037 237 Pulse Output Mode 0: Pulse and direction signal 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
3. Sample Programs for Positioning Modules F3NC11/12
TI 34M6K01-01E 83
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
Ready input
Reverse limit input
Encoder Z-phase input
3. Sample Programs for Positioning Modules F3NC11/12
84 TI 34M6K01-01E
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
AX1 AX2 Parameter Remarks
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]
047 247 Remaining Deceleration Time Time remaining for the generated path to arrive at the target position [ms]
048 248 Extended Status Accelerating, decelerating, over-ramping, waiting 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
AX1 AX2 Description
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
3. Sample Programs for Positioning Modules F3NC11/12
TI 34M6K01-01E 85
***** 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
3. Sample Programs for Positioning Modules F3NC11/12
86 TI 34M6K01-01E
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
3. Sample Programs for Positioning Modules F3NC11/12
TI 34M6K01-01E 87
Set Parameters relay
for AX1
Set Parameters relay
for AX2
*** Set parameters for X-axis in module ***
Request to set parameters Write parameters Set Parameters relay forX axis ON Waiting for execute command ACK flag ON Command executing flag ON Set Parameters relay forX 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 forY axis ON Waiting for execute command ACK flag ON Command executing flag ON Set Parameters relay forY axis OFF Waiting for set parameters ACK flag OFF Command executing flag OFF
3. Sample Programs for Positioning Modules F3NC11/12
88 TI 34M6K01-01E
I00001
I00002
I00003
I00004
Y00448
X00416
Command executing
Request to setparameters ACK
Request to setparameters
Figure 3.20 Set Parameters Program and Timing Chart for X Axis
3. Sample Programs for Positioning Modules F3NC11/12
TI 34M6K01-01E 89
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.
Error Notification relay
for AX1
Rising edge of
Reset Error relay
Error Notification
relay for AX2
***** Reset error (RLSERR) *****
*** X axis ***
Request to reset error ON Request to reset error OFF Start Operation relay for AX1 OFF Reset Error relay ON Reset Error relay OFF
*** Y axis ***
Request to reset error ON Request to reset error OFF Start Operation relay for AX2 OFF Reset Error relay ON Reset Error relay OFF
3. Sample Programs for Positioning Modules F3NC11/12
90 TI 34M6K01-01E
I00201
I00202
I00203
X00412
Y00445
Error reset request
Error Nofiticationrelay 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.
3. Sample Programs for Positioning Modules F3NC11/12
TI 34M6K01-01E 91
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
AX1 AX2 Parameter Value Range
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
3. Sample Programs for Positioning Modules F3NC11/12
92 TI 34M6K01-01E
Error Notification
relay for AX1
End of Positioning relay
for AX1
*** 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 Stop forward jogging Command executing flag OFF
*** 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
3. Sample Programs for Positioning Modules F3NC11/12
TI 34M6K01-01E 93
End of Positioning
relay for AX1
Error Notification
relay fAor AX1
End of Positioning
relay for AX2
Error Notification
relay for AX2
*** Execute reverse jogging for X-axis ***
*** Execute reverse jogging for Y-axis ***
Stop forward jogging Command executing flag OFF
Request to start reverse jogging Request to stop reverse jogging Write parameters Start reverse jogging Command executing flag ON Stop reverse jogging Command executing flag OFF
Request to start reverse jogging Request to stop reverse jogging Write parameters Start reverse jogging Command executing flag ON
3. Sample Programs for Positioning Modules F3NC11/12
94 TI 34M6K01-01E
End of Positioning relay
for AX2
Error Notification relay
for AX2
Stop reverse jogging Command executing flag OFF
Figure 3.22 Jogging Program
I00401
I00402
I00403
X00415
Y00442
I00404Command executing
Speed
Stop forwardjogging
Start forwardjogging
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
3. Sample Programs for Positioning Modules F3NC11/12
TI 34M6K01-01E 95
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
AX1 AX2 Parameter Value Range
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)
021 221 Origin Search Direction 0: Forward 1: Reverse
022 222 Z-phase Edge Selection 0: Rising edge 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
*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
015
014
013
012 11 10 9 8 7 6 5 4 3 2 1 0
0 0011
101
0 0011
101
0 0011
101
0 0011
101
0 0011
101
0 0011
101
Ignore falling edge of origin inputShift to Z-phase search on falling edge of origin inputDecelerate and stop on falling edge of origin inputStop immediately on falling edge of origin inputIgnore rising edge of origin inputShift to Z-phase search on rising edge of origin inputDecelerate and stop on rising edge of origin inputStop immediately on rising edge of origin inputIgnore falling edge of forward limitShift to Z-phase search on falling edge of forwarwd limitDecelerate and stop on falling edge of forward limitStop immediately on falling edge of forwarwd limitIgnore rising edge of forward limit *1Shift to Z-phase search on rising edge of forward limitDecelerate and stop on rising edge of forward limitStop immediately on rising edge of forwarwd limitIgnore falling edge of reverse limitShift to Z-phase search on falling edge of reverse limitDecelerate and stop on falling edge of reverse limitStop immediately on falling edge of reverse limitIgnore rising edge of reverse limit *2Shift to Z-phase search on rising edge of reverse limitDecelerate and stop on rising edge of reverse limitStop immediately on rising edge of reverse limit
3. Sample Programs for Positioning Modules F3NC11/12
96 TI 34M6K01-01E
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.
Reverse limitX axis I0104Y axis I2104
Origin switchX axis I0110Y axis I2110
Forward limit
Negative Positive
1
D
CB
A
Z phaseAfter origin input turns off, searchesforward for rising edge of one Z-phasepulse. Once detected, current position istaken as origin
Same search directionregardless of whetherforward limit swtich ison or off
Programmed movement sequencesfor different initial positions
Figure 3.24A Programmed Movement Sequence for Different Initial Position of the Work
piece
3. Sample Programs for Positioning Modules F3NC11/12
TI 34M6K01-01E 97
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
3. Sample Programs for Positioning Modules F3NC11/12
98 TI 34M6K01-01E
AX1 Origin switch
AX1 reverse limit switch
AX1 forward search
request flag
AX2 Origin switch
AX2 reverse limit switch
AX2 forward search
request flag
*** Set parameters for reverse origin search for X-axis in data registers ***
Request to search for origin X-axis reverse search flag ON Decelerate and stop 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
*** Set parameters for reverse origin search for Y-axis in data registers ***
Request to search for origin Y-axis reverse search flag ON 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 Origin search in forward direction
3. Sample Programs for Positioning Modules F3NC11/12
TI 34M6K01-01E 99
Figure 3.24 Origin Search Program
End of Origin Search
relay for AX1
Error Notification
relay for AX1
AX1 reverse search flag
End of Origin Search
relay for AX2
Error Notification
relay for AX2
AX2 reverse search flag
*** Execute Y-axis origin search ***
Write parameters Start Origin Search relay ON Waiting for ACK flag ON Command executing flag ON Start Origin Search relay OFF Waiting for ACK flag OFF Command executing flag OFF X-axis reverse search flag OFF Request X-axis forward search ON
*** Execute X-axis origin search ***
Write parameters Start Origin Search relay ON Waiting for ACK flag ON Command executing flag ON Start Origin Search relay OFF Waiting for ACK flag OFF Command executing flag OFF Y-axis reverse search flag OFF Request Y-axis forwardsearch ON
3. Sample Programs for Positioning Modules F3NC11/12
100 TI 34M6K01-01E
I00501
I00502
I00503
X00405
Y00437
I00504Command executing
End origin search
Origin input
Start Z-phasesearch
SpeedZ-phase detected
(origin established)
Start origin search
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.
3. Sample Programs for Positioning Modules F3NC11/12
TI 34M6K01-01E 101
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
AX1 AX2 Parameter Value Range
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]
018 218 Interpolation Mode 0: Normal operation 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.
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 (X/Y)
Speed [mm/s]
Acceleration Time [ms]
Deceleration Time [ms]
X 100 300 400 Moving to P1 Y 50 200 300 X 150 400 500 Moving to P2 Y 75 250 350 X 200 500 600 Moving to P3 Y 100 300 400 X 150 400 500 Moving to P4 Y 75 250 350
Y
XP 1( 320, 30)
P 2( 500, 110)
P 3( 280, 170)
P 4( 100, 90)
3. Sample Programs for Positioning Modules F3NC11/12
102 TI 34M6K01-01E
The corresponding parameters values to be written to the positioning module are calculated as follows:
Movement Axis (X/Y)
Speed [(1/65536)pulse/ms]
Current Position [pulse]
Acceleration Time [ms]
Deceleration Time [ms]
X 1638400 80000 300 400 Moving to P1 Y 819200 7500 200 300 X 2457600 125000 400 500 Moving to P2 Y 1228800 27500 250 350 X 3276800 70000 500 600 Moving to P3 Y 1638400 42500 300 400 X 2457600 25000 400 500 Moving to P4 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) *** *** Set target position data for X-axis in data registers ***
Number of target positions Target speed (100 mm/s) Acceleration time (300 ms)
3. Sample Programs for Positioning Modules F3NC11/12
TI 34M6K01-01E 103
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)
3. Sample Programs for Positioning Modules F3NC11/12
104 TI 34M6K01-01E
Acceleration time (200 ms) Deceleration time (300 ms) Target position (30 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)
Travel speed (75 mm/s) Acceleration time (250 ms) Deceleration time (350 ms) Target position (110 mm)
3. Sample Programs for Positioning Modules F3NC11/12
TI 34M6K01-01E 105
Initiate
positioning flag
Start
positioning flag
Start Operation ACK
relay for X axis
***** Execute PTP operation (PTPMOV) *****
Initiate positioning flag ON Clear data register forindexing Write X-axis startup speed Write Y-axis startup speed 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 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 executingflag ON Start Operation relay for X axis OFF Waiting for X-axis ACK flag OFF X-axis positioning in progress flag ON
3. Sample Programs for Positioning Modules F3NC11/12
106 TI 34M6K01-01E
Figure 3.27 PTP Operation Program
Start Operation ACK
relay for Y axis
Positioning in
progress flag
Start Operation
ACK relay
End of Positioning
relay
Start of positioning to first target point
End of positioning to last target point
Start Operation relay for Y axis OFF Waiting for Y-axis ACK flag OFF Y-axis positioning in progress flag ON Initiate positioning flag ON X-axis positioning in progress flag OFF Y-axis positioning in progress flag OFF Command executing flag OFF Increment index register Reset index register
3. Sample Programs for Positioning Modules F3NC11/12
TI 34M6K01-01E 107
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).
I00601
I00602
I00603
X00414
Y00433
Speed
X00401
I00605
Speed
I00604
X axis
Command executing
Positioning in progress
Start Operationfor X-axis positioning
End of positioning
I02603
X00431
Y00449
X00417
I02605
Y axis
Positioning in progress
Start Opreationfor Y-axis positioning
End of positioning
I00612
3. Sample Programs for Positioning Modules F3NC11/12
108 TI 34M6K01-01E
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.
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
Y
XP 1 ( 3 2 0 , 3 0 )
P 2 ( 5 0 0 , 1 1 0 )
P 3 ( 2 8 0 , 1 7 0 )
P 4 ( 1 0 0 , 9 0 )
3. Sample Programs for Positioning Modules F3NC11/12
TI 34M6K01-01E 109
Call subroutine for speed
calculation and setup
Initiate positioning
flag
Write Y-axis startup speed Write X-axis interpolation mode Write Y-axis interpolation mode Set X-axis previous position to current position 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) Target speed (Vx) 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
3. Sample Programs for Positioning Modules F3NC11/12
110 TI 34M6K01-01E
Start Operation ACK
relay for X axis
Start Operation ACK
relay for Y axis
Start Operation
ACK relay
Positioning in progress flag End of Positioning relay
Start of positioning to first target point
End of positioning to last target point
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 positioning flag ON 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 (SETV) *****
* Start position
* Target position
* Target speed
3. Sample Programs for Positioning Modules F3NC11/12
TI 34M6K01-01E 111
Figure 3.30 Linear Interpolation Operation Program
X-axis travel > Y-axis travel
Y-axis travel > X-axis travel
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) Write X-axis speed (preset value) Write Y-axis speed (calculated value) Calculate X-axis travel speed (Vx) Integer conversion (Vx) Write X-axis speed (calculated value) Write Y-axis speed (preset value)
3. Sample Programs for Positioning Modules F3NC11/12
112 TI 34M6K01-01E
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).
3. Sample Programs for Positioning Modules F3NC11/12
TI 34M6K01-01E 113
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 (PASSMOV) *****
Initiate positioning flag ON W rite parameters flag ON Clear index register W rite X-axis startup speed W rite Y-axis startup speed W rite X-axis interpolation mode W rite Y-axis interpolation mode Set X-axis to previous position to current position Set Y-axis previous position to current position
3. Sample Programs for Positioning Modules F3NC11/12
114 TI 34M6K01-01E
Write Parameters
enable flag
Initiate positioning flag
Call subroutine to calculate
and set travel speed
Initiate positioning flag
X-axis Start
Operation ACK relay
X-axis Start Operation
ACK relay
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) Target speed (Vx) Target speed (Vy) Set travel speed Target position data index Write X-axis target position data Waiting for X-axis ACKflag ON Waiting for Y-axis ACK flag ON Command executing flag ON Start Operation relay for X-axis OFF Waiting for X-axis ACKflag 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
3. Sample Programs for Positioning Modules F3NC11/12
TI 34M6K01-01E 115
Figure 3.31 Program for En-route Operation
Start Operation ACK relay off
Positioning in progress flag ON
Start deceleration
End-of-positioning relay
Increment index register Read X-axis remainingdeceleration time Read Y-axis remaining deceleration time Write parameters enable flag ON Positioning in progress flag ON Start positioning flag ON X-axis positioning in progress flag OFF Y-axis positioning in progress flag OFF Command executing flag OFF Positioning in progress flag OFF Reset index register
3. Sample Programs for Positioning Modules F3NC11/12
116 TI 34M6K01-01E
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).
I00801
I00802
I00803
X00415
Y00433
Speed
X00401
I00805
I00804 Command executing
Positioning in progress
I00806
0 -1 Valid -1 -1 Valid
I00812
I00816
Write parameters
0
En-route interval
Remainingdeceleration
time
3. Sample Programs for Positioning Modules F3NC11/12
TI 34M6K01-01E 117
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
AX1 AX2 Parameter Value Range
001/002 201/202 Position of Center -8388608 to 8388608 [pulse]
003/004 203/204 Radius 1 to 8388608 [pulse]
005/006 205/206 Starting Angle -23592960 to 23592960[(1/65536) degree] (-360 to 360 [degree])
007/008 207/208 Angular Travel -2123366400 to 2123366400 [(1/65536) degree](-90 to 90[revolutions])
009/010 209/210 Startup Angular Speed 1 to 23592960[(1/65536)degree/ms] (0 to 360[degree])
011/012 211/212 Target Angular Speed 1 to 23592960[(1/65536)degree/ms] (0 to 360[degree])
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]
018 218 Interpolation Mode 0: Normal operation 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
X
P (380,90)O (300,90)
R=80
Curent position
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]
3. Sample Programs for Positioning Modules F3NC11/12
118 TI 34M6K01-01E
- 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
3. Sample Programs for Positioning Modules F3NC11/12
TI 34M6K01-01E 119
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)
Startup speed Target speed Acceleration time Deceleration time
** Y axis **
3. Sample Programs for Positioning Modules F3NC11/12
120 TI 34M6K01-01E
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
3. Sample Programs for Positioning Modules F3NC11/12
TI 34M6K01-01E 121
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.
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
3. Sample Programs for Positioning Modules F3NC11/12
122 TI 34M6K01-01E
MEMO.
3. Sample Programs for Positioning Modules F3NC51/52
TI 34M6K01-01E 123
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 / NC52Operation Procedure
Turn servomotor on
Register parameters
Execute origin search
Execute various positioningactions
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.
3. Sample Programs for Positioning Modules F3NC51/52
124 TI 34M6K01-01E
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 AX1 AX2
Parameter Default Value Remarks or Value Range
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]
009/010 209/210 Over-acceleration Detection Value 131072000 1 to 131072000 [(1/65536) pulses/ms/ms] *1
011/012 211/212 Deviation Error Detection Value 134211727 1 to 134217727 [pulse]
013 213 Direction of Motor Rotation 0 0: Positive voltage denotes forward 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]
018 218 Encoder Method Designation 0
0: General-purpose incremental method 1: Sanyo Denki's Manchester coding 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
028 228 Sanyo ABS Rotation Direction 0
0: Encoder data increases in positive direction 1: Encoder data increases in negative direction
029 229 Contact Input Mode 0
0: Normal mode with limits 1: Normal mode without limits 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:
3. Sample Programs for Positioning Modules F3NC51/52
TI 34M6K01-01E 125
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
External trigger input
Origin input
General purpose input
3. Sample Programs for Positioning Modules F3NC51/52
126 TI 34M6K01-01E
- Contact output polarity Specify the logic of contact output. Set to $0000 to configure all contact outputs as NO outputs.
- 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.
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
3. Sample Programs for Positioning Modules F3NC51/52
TI 34M6K01-01E 127
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
AX1 AX2 Parameter Remarks or Value Range
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
104/105 304/305 Current Position Status (Command value) [pulse]
106/107 306/307 Current Speed Status (Command value) [(1/65536)pulse/ms]
108/109 308/309 Current Position Status (Encoder input value) [pulse]
110/111 310/311 Current Speed Status (Encoder input value) [(1/65536)pulse/ms]
112/113 312/313 Target Positions Status [pulse]
114 314 Extended Status Accelerating, decelerating, over-ramping, waiting for trigger, control mode and other information on movement
115 315 Remaining Deceleration Time Time remaining for the generated path to arrive at the target position [ms]
116 316 Contact Output Status State of external contact output
117/118 317/318
Absolute Data Status (Yasukawa Electric's ABS) Absolute Raw Data Received (Sanyo Denki's ABS)
[pulse] 30 bits of received data
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
AX1 AX2 Description
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
3. Sample Programs for Positioning Modules F3NC51/52
128 TI 34M6K01-01E
***** 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
3. Sample Programs for Positioning Modules F3NC51/52
TI 34M6K01-01E 129
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
3. Sample Programs for Positioning Modules F3NC51/52
130 TI 34M6K01-01E
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
3. Sample Programs for Positioning Modules F3NC51/52
TI 34M6K01-01E 131
Set parameters ACK
relay for AX1
*** Write X-axis parameters to module ***
Request to set parameters Write parameters Set Parameters relay for X axis ON Waiting for ACK flag ON 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 ***
Absolute offset value Absolute pulse count Sanyo Denki's ABS bit length Sanyo Denki's ABS rotation direction Contact input mode
Request to set parameters Write parameters Set Parameters relay for Y axis ON Waiting for ACK flag ON Command executingflag ON
3. Sample Programs for Positioning Modules F3NC51/52
132 TI 34M6K01-01E
Figure 3.37 Set Parameters Program and Timing Chart for X Axis
Set parameters ACK
relay for AX2
Set Parameters relay for Y axis OFF Waiting for Set Parameters ACK flag OFF Command executing flag OFF
I00001
I00002
I00003
I00004
Y00448
X00416
Command executing
Request to setparameters ACK
Request to setparameters
3. Sample Programs for Positioning Modules F3NC51/52
TI 34M6K01-01E 133
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.
Error Notification relay
for for AX1
Reset Error relay
OFF
Error Notification
relay for for AX2
***** Reset error (RLSERR) *****
*** X axis ***
Rising edge of request to reset error Falling edge of reseterror All output relays of AX1 OFF Reset Error relay ON Reset Error relay OFF
*** Y axis *** Rising edge of request to reset error Falling edge of reseterror All output relays of AX2 OFF Reset Error relay ON Reset Error relay OFF
3. Sample Programs for Positioning Modules F3NC51/52
134 TI 34M6K01-01E
I00201
I00202
I00203
X00412
Y00445
Request to reset error
Error Nofiticationrelay 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.
3. Sample Programs for Positioning Modules F3NC51/52
TI 34M6K01-01E 135
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.
Execute Extended Command
ACK relay for AX1
Error Notification
relay for AX1
Execute Extended Command
ACK relay for AX2
Error Notification
relay for AX2
***** Servo ON (SRVON) *****
*** X axis ***
*** Y axis ***
Request for servo ON Write 0 to extended command parameter Execute Extended Command relay ON Waiting for ACK flag ON Command executingflag ON Execute Extended Command relay OFF Waiting for ACK flag OFF Command executingflag OFF
Request for servo ON Write 0 to extended command parameter Execute Extended Command relay ON Waiting for ACK flag ON Command executing flag ON Execute Extended Command relay OFF Waiting for ACK flag OFF
3. Sample Programs for Positioning Modules F3NC51/52
136 TI 34M6K01-01E
Figure 3.39 Servo ON Program
I00301
I00302
I00303
X00402
Y00434
Execute ExtendedCommand relay ON
End of Positioningrelay ONI00304
X00414
Command executing
Execute ExtendedCommand ACK relay ON
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.
Command executing flag OFF
3. Sample Programs for Positioning Modules F3NC51/52
TI 34M6K01-01E 137
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
AX1 AX2 Parameter Value Range
041/042 241/242 Target Speed 1 to 131072000 [(1/65536) pulses/ms]
046 246 Acceleration Time 0 to 32767[ms]
047 247 Acceleration Mode Selection 0: Trapezoidal acceleration 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]
051 251 Deceleration Mode Selection 0: Trapezoidal acceleration 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)
3. Sample Programs for Positioning Modules F3NC51/52
138 TI 34M6K01-01E
***** 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
3. Sample Programs for Positioning Modules F3NC51/52
TI 34M6K01-01E 139
End of Positioning
relay for AX1
Error Notification
relay for AX1
End of Positioning
relay for AX2
Error Notification
relay for AX2
*** 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 Stop forward jogging Command executing flag OFF
*** Execute positive jogging for Y axis***
*** Execute reverse jogging for X-axis *** Request to start reverse jogging Request to stop reverse jogging
Request to start forward jogging Request to stop forward jogging Write parameters Start forward jogging Command executingflag ON Stop forward jogging Command executingflag OFF
3. Sample Programs for Positioning Modules F3NC51/52
140 TI 34M6K01-01E
Figure 3.41 Jogging Program
End of Positioning
relay for AX1
Error Notification
relay for AX1
End of Positioning
relay for AX2
Error Notification
relay for AX2
Write parameters Start reverse jogging Command executing flag ON Stop reverse jogging Command executing flag OFF
*** Execute reverse jogging for Y-axis negative
Request to start reverse jogging Request to stop reverse jogging Write parameters Start reverse jogging Command executingflag ON Stop reverse jogging Command executingflag OFF
3. Sample Programs for Positioning Modules F3NC51/52
TI 34M6K01-01E 141
I00401
I00402
I00403
X00414
Y00442
I00404Command executing time
Speed
Stopforward jogging
Start forwardjogging
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
3. Sample Programs for Positioning Modules F3NC51/52
142 TI 34M6K01-01E
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
AX1 AX2 Parameter Value Range
041/042 241/242 Target Speed 1 to 131072000 [(1/65536) pulses/ms]
046 246 Acceleration Time 0 to 32767[ms]
047 247 Acceleration Mode Selection 0: Trapezoidal acceleration 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]
051 251 Deceleration Mode Selection 0: Trapezoidal acceleration 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
064 264 Z-phase Edge Selection 0: Rising edge; 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
*1: Error when forward; *2: Error when reversing
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0011
101
0 0011
101
0 0011
101
0 0011
101
0 0011
101
0 0011
101
0 0011
101
0 0011
101
Igno re fa lling edge o f reve rse lim it
S h ift to Z -phase sea rch on ris ing edge o f reve rse lim it
Igno re fa lling edge o f o rig in inpu tS h ift to Z -phase sea rch on fa lling edge o f o rig in inpu tD ece le ra te and s top on fa lling edge o f o rig in inpu tS top im m ed ia te ly on fa lling edge o f o rig in inpu tIgno re ris ing edge o f o rig in inpu tS h ift to Z -phase sea rch on ris ing edge o f o rig in inpu tD ece le ra te and s top on ris ing edge o f o rig in inpu tS top im m ed ia te ly on ris ing edge o f o rig in inpu t
Igno re fa lling edge o f fo rw ard lim itS h ift to Z -phase sea rch on fa lling edge o f fo rw arw d lim itD ece le ra te and s top on fa lling edge o f fo rw ard lim itS top im m ed ia te ly on fa lling edge o f fo rw arw d lim itIgno re ris ing edge o f fo rw ard lim itS h ift to Z -phase sea rch on ris ing edge o f fo rw ard lim itD ece le ra te and s top on ris ing edge o f fo rw ard lim itS top im m ed ia te ly on ris ing edge o f fo rw arw d lim it
S h ift to Z -phase sea rch on fa lling edge o f reve rse lim itD ece le ra te and s top on fa lling edge o f reve rse lim itS top im m ed ia te ly on fa lling edge o f reve rse lim itIgno re ris ing edge o f reve rse lim it
D ece le ra te and s top on ris ing edge o f reve rse lim itS top im m ed ia te ly on ris ing edge o f reve rse lim it
Igno re fa lling edge o f exte rna l trigge r inpu tS h ift to Z -phase sea rch on fa lling edge o f exte rna l trigger inpu tD ece le ra te and s top on fa lling edge o f exte rna l trigge r inpu tS top im m ed ia te ly on fa lling edge o f exte rna l trigge r inputIgno re ris ing edge o f exte rna l trigge r inpu tS h ift to Z -phase sea rch on ris ing edge o f exte rna l trigger inpu tD ece le ra te and s top on ris ing edge o f exte rna l trigge r inpu tS top im m ed ia te ly on ris ing edge o f exte rna l trigge r input
3. Sample Programs for Positioning Modules F3NC51/52
TI 34M6K01-01E 143
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.
3. Sample Programs for Positioning Modules F3NC51/52
144 TI 34M6K01-01E
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)
Reverse limitX axis I0104Y axis I2104
Origin switchX axis I0110Y axis I2110
Forward limit
Negative Positive
1
D
CB
A
Z phaseAfter origin input turns off, searchesforward for rising edge of one Z-phasepulse. Once detected, current position istaken as origin
Same search directionregardless of whetherforward limit swtich ison or off
Programmed movement sequencesfor different initial positions
***** Origin search (ZSEARCH) *****
*** Set common origin search parameters for X-axis to data registers ***
Search speed Acceleration time Acceleration mode Deceleration time Deceleration mode
3. Sample Programs for Positioning Modules F3NC51/52
TI 34M6K01-01E 145
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
3. Sample Programs for Positioning Modules F3NC51/52
146 TI 34M6K01-01E
AX1 Origin switch
AX1 reverse limit switch
AX1 forward search
request flag
AX2 Origin switch
AX2 reverse limit switch
AX2 forward search
request flag
*** Set parameters for reverse origin search for X-axis in data registers ***
Request to search for origin X-axis reverse search flag ON Decelerate and stop 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
*** Set parameters for reverse origin search for Y-axis in data registers ***
Request to search for origin Y-axis reverse search flag ON 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 Origin search in forward direction
3. Sample Programs for Positioning Modules F3NC51/52
TI 34M6K01-01E 147
Figure 3.43 Origin Search Program
End of origin Search
relay for AX1
Error Notification
relay for AX1
AX1 reverse search
flag
End of origin Search
relay for AX2
Error Notification
relay for AX2
AX2 reverse search
flag
*** Execute X-axis origin search ***
Write parameters Start Origin Search relay ON Waiting for ACK flag ON Command executing flag ON
Start Origin Search relay OFF Waiting for ACK flag OFF Command executing flag OFF 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 Command executing flag ON
Start Origin Search relay OFF Waiting for ACK flag OFF Command executing flag OFF Y-axis reverse search flag OFF Request Y-axis positive search ON
3. Sample Programs for Positioning Modules F3NC51/52
148 TI 34M6K01-01E
I00501
I00502
I00503
X00405
Y00437
I00504Command executing
End origin search
Origin input
Start Z-phasesearch
SpeedZ-phase detected
(origin established)
Start origin search
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.
3. Sample Programs for Positioning Modules F3NC51/52
TI 34M6K01-01E 149
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 AX1 AX2
Parameter Value Range
041/042 241/242 Target Speed 1 to 131072000 [(1/65536) pulses/ms] *1
043/044 243/244 Target Position -134217728 to 134217727 [pulse]
045 245 Target Position Mode 0: Absolute position 1: Relative position (from the encoder position) 2: Relative position (from the previous target
)046 246 Acceleration Time 0 to 32767[ms]
047 247 Acceleration Mode Selection 0: Trapezoidal acceleration 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]
051 251 Deceleration Mode Selection 0: Trapezoidal acceleration 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]
057 257 Interpolation Mode Selection 0: Normal operation 1: X-axis circular Interpolation 2: Y-axis circular interpolation
058 258 Startup Mode Selection 0: Normal startup 1: Wait for external trigger 2: Wait for internal trigger
059 259 Position Detection Mode 0: No detection 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.
Figure 3.4.5 Target Positions (Coordinate system is in mm)
Y
XP 1( 320, 30)
P 2( 500, 110)
P 3( 280, 170)
P 4( 100, 90)
3. Sample Programs for Positioning Modules F3NC51/52
150 TI 34M6K01-01E
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 (X/Y)
Speed [mm/s]
Acceleration Time [ms]
Deceleration Time [ms]
X 100 300 400 Moving to P1 Y 50 200 300 X 150 400 500 Moving to P2 Y 75 250 350 X 200 500 600 Moving to P3 Y 100 300 400 X 150 400 500 Moving to P4 Y 75 250 350
The corresponding parameters values to be written to the positioning module are calculated as follows:
Movement Axis (X/Y)
Speed [(1/65536)pulse/ms
]
Current Position [pulse]
Acceleration Time [ms]
Deceleration Time [ms]
X 6553600 320000 300 400 Moving to P1 Y 3276800 30000 200 300 X 9830400 500000 400 500 Moving to P2 Y 4915200 110000 250 350 X 13107200 280000 500 600 Moving to P3 Y 6553600 170000 300 400 X 9830400 100000 400 500 Moving to P4 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
3. Sample Programs for Positioning Modules F3NC51/52
TI 34M6K01-01E 151
*** 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
3. Sample Programs for Positioning Modules F3NC51/52
152 TI 34M6K01-01E
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)
3. Sample Programs for Positioning Modules F3NC51/52
TI 34M6K01-01E 153
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
3. Sample Programs for Positioning Modules F3NC51/52
154 TI 34M6K01-01E
Acceleration time (500 ms) Acceleration mode (trapezoidal) Deceleration time (600 ms) Deceleration mode (trapezoidal)
Initiate positioning
flag
Start positioning
flag
Start Operation ACK
relay for X axis
***** Execute PTP operation (PTPMOV) *****
Start positioning flag ON Clear data register for indexing Write X-axis positioning parameters Write Y-axis positioning parameters Target position data index 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 ACKflag ON Waiting for Y-axis ACKflag ON Command executing flag ON Start Operation relay for X axis OFF Waiting for X-axis ACKflag OFF X-axis positioning in progress flag ON
3. Sample Programs for Positioning Modules F3NC51/52
TI 34M6K01-01E 155
Figure 3.46 PTP Operation Program
Start Operation ACK
relay for Y axis
Positioning in
progress flags
Start Operation
ACK relays
End of Positioning
relays
Start positioning to first target point
End of positioning to last target point
Start Operation relay for Y axis OFF Waiting for Y-axis ACK flag OFF Y-axis positioning in progress flag ON Initiate positioning flag ON X-axis positioning in progress flag OFF Y-axis positioning in progress flag OFF Command executing flag OFF Increment index register Reset index register
3. Sample Programs for Positioning Modules F3NC51/52
156 TI 34M6K01-01E
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).
I00601
I00602
I00603
X00414
Y00433
Speed
X00401
I00605
Speed
I00604
X axis
Command executing
Positioning in progress
Execute commandfor X-axis positioning
End of positioning
I02603
X00430
Y00449
X00417
I02605
Y axis
Positioning in progress
Execute commandfor Y-axis positioning
End of positioning
I00612
3. Sample Programs for Positioning Modules F3NC51/52
TI 34M6K01-01E 157
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.
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
Y
XP 1 ( 3 20 , 3 0 )
P 2 ( 5 0 0 , 1 10 )
P 3 ( 2 80 , 1 70 )
P 4 ( 1 00 , 9 0 )
***** Execute linear interpolation (STRMOV) *****
Initiate positioning flag ON Clear index register W rite X-axis positioning parameters W rite Y-axis positioning parameters
3. Sample Programs for Positioning Modules F3NC51/52
158 TI 34M6K01-01E
Subroutine call for calculating
and setting travel speed
Start Operation ACK relay
for X axis
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) 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 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
3. Sample Programs for Positioning Modules F3NC51/52
TI 34M6K01-01E 159
Start Operation ACK relay
for Y axis
Positioning in
progress flags
Start Operation
ACK relays
End of Positioning
relays
Start positioning to first target position
End of positioning
to last target position
Start Operation relay for Y axis OFF Waiting for Y-axis ACK flag OFF Y-axis positioning in progress flag ON
Initiate positioning flag ON 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 (SETV) *****
* Start position
* Target position
* Target speed
3. Sample Programs for Positioning Modules F3NC51/52
160 TI 34M6K01-01E
Figure 3.49 Linear Interpolation Movement Program
X-axis travel > Y-axis travel
Y-axis travel > X-axis travel
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) Write X-axis speed (preset value) Write Y-axis speed (calculated value) Calculate X-axis travel speed (Vx) Integer conversion (Vx) Write X-axis speed (calculated value) Write Y-axis speed (preset value)
3. Sample Programs for Positioning Modules F3NC51/52
TI 34M6K01-01E 161
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).
3. Sample Programs for Positioning Modules F3NC51/52
162 TI 34M6K01-01E
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.
W rite parameters enable flag
***** Change speed/position during positioning (PASSM OV) ***** Initiate positioning flag ON W rite parameters enable flag ON Clear index register W rite X-axis positioning parameters W rite Y-axis positioning parameters
Set previous position to X-axis 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
3. Sample Programs for Positioning Modules F3NC51/52
TI 34M6K01-01E 163
Initiate positioning flag
Call subroutine for calculating
and setting travel speed
Start positioning flag
Start Operation ACK
relay for X axis
Start Operation ACK
relay for Y axis
Start Operation ACK
relay OFF
Positioning in
progress flag ON
Set starting position to previous position (X0) Set starting position to previous position (Y0) Target position (X1) Target position (Y1) 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 ACKflag ON Waiting for Y-axis ACK flag ON Command executing flag ON Start Operation relay for X axis OFF Waiting for X-axis ACKflag 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
Increment index register Read X-axis remainingdeceleration time
3. Sample Programs for Positioning Modules F3NC51/52
164 TI 34M6K01-01E
Figure 3.50 Sample Program for En-route Operation
I00801
I00802
I00803
X00414
Y00433
Speed
X00401
I00805
I00804 Command executing
Positioning in progress
I00806
0 -1 Valid -1 -1 Valid
I00812
I00816
Write parameters
0
En-route interval
Remainingdeceleration
time
Figure 3.51 Timing Chart for X Axis for En-route Operation
Start deceleration
End of Positioning relay
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 Y-axis positioning in progress flag OFF Command executingflag OFF Positioning in progress flag OFF Reset index register
3. Sample Programs for Positioning Modules F3NC51/52
TI 34M6K01-01E 165
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).
3. Sample Programs for Positioning Modules F3NC51/52
166 TI 34M6K01-01E
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
AX1 AX2 Parameter Value Range
057 257 Interpolation Mode Selection
0: Normal operation 1: X-axis circular Interpolation 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]
086/087 286/287 Starting Angle -23592960 to 23592960 [(1/65536) degree] (-360 to 360 [degree])
088/089 288/289 Angular Travel -2123366400 to 2123366400 [(1/65536) degree] (-90 to 90 [revolutions])
090/091 290/291 Angular Speed Setpoint 1 to 23592960 [(1/65536) degree/ms] (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]
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
X
P (380,90)O (300,90)
R=80
Curent position
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]
3. Sample Programs for Positioning Modules F3NC51/52
TI 34M6K01-01E 167
- 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
3. Sample Programs for Positioning Modules F3NC51/52
168 TI 34M6K01-01E
*** X axis ***
Target angular speed Acceleration time Deceleration time Target position Correction pulse range
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
** Set PTP operation parameters (for moving to starting point) in data registers **
3. Sample Programs for Positioning Modules F3NC51/52
TI 34M6K01-01E 169
Deceleration time Deceleration mode
***** Move to the start point and prepare for circular interpolation *****
Initiate positioning flag ON Write positioning parameters for X-axis Write positioning parameters 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 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 Y-axis positioning in progress flag OFF
3. Sample Programs for Positioning Modules F3NC51/52
170 TI 34M6K01-01E
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.
Y-axis circular interpolation
Command executing flag OFF
*** Execute 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 executingflag ON
X-axis circular interpolation
3. Sample Programs for Positioning Modules F3NC51/52
TI 34M6K01-01E 171
MEMO.
3. Sample Programs for Positioning Modules F3NC51/52
172 TI 34M6K01-01E
MEMO.
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 / F3YP18Operation Procedure
Turn servomotor on(When using AC servo motor)
Register parameters
Executeautomatic origin search
Execute various positioningactions
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
AX1 AX2 Parameter Range of values
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
AX1 AX2 Parameter Remarks
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]
057 157 Contact Input Status States of contact inputs and encoder Z-phase 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 AX1 AX2
Description
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 ***
*** Y axis ***
Read status for AX1 Expand contact inputs
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 ***
*** Set Y-axis parameters in data registers ***
Contact input polarity Forward limit Reverse limit
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 Waiting for execute command ACK flag ON Command executing flag ON
176 TI 34M6K01-01E
3. Sample Programs for Positioning Modules F3YP04/08
Execute Command ACK relay for AX1
Execute Command ACK relay for AX2
***Write X-axis parameters to module ***
Execute Command relay for X axis OFF Waiting for execute command ACK flag OFF Command executing flag OFF 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 Waiting for execute command ACK flag ON Command executing flag OFF
I00101
I00102
I00103
I00104
Y00433
X00401
Command executing time
Request to setparameters ACK
Request to setparameters
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.
Error Notification relay forAX1
Falling edge of reset requestrelay
*** X axis ***
***** Reset error (RLSERR) *****
Rising edge of errorreset request relay
Falling edge of errorreset request relay
Read error status forX axis
Command code toreset error status forX-axis
Stop Immediately relayfor X axis OFF
Forward Joggingrelay for X axis OFF
Reverse Jogging relayfor X axis OFF
Execute Commandrelay for X axis ON
Command executingflag ON
Execute Commandrelay for X axis OFF
Command executingflag OFF
178 TI 34M6K01-01E
3. Sample Programs for Positioning Modules F3YP04/08
Error Notification relay for AX2
Rising edge of errorreset request relay
Falling edge of errorreset request relay
Read Y-axis errorstatus
Command code toreset Y-axis errors
Stop Immediately relayfor Y axis OFF
Forward Joggingrelay for Y axis OFF
Reverse Jogging relayfor Y axis OFF
Execute Commandrelay for Y axis ON
Command executingflag ON
Execute Commandrelay for Y axis OFF
Command executingflag OFF
*** Y axis ***
I00111
I00112
I00113
X00403
Y00433
Error reset request
Error Notificationrelay OFF
X00401
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
AX1 AX2 Parameter Value Range
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
TI 34M6K01-01E 181
Error Notification
relay for AX1
End of positioning
relay for AX1
*** Execute forward jogging for X axis ***
*** Set jogging parameters for Y-axis in data registers ***
Target speed for jogging Acceleration time Deceleration time Startup speed
Request to start forwardjogging Request to stop forwardjogging Write parameters Start forward jogging Command executing flag ON Stop forward jogging Command executing flag OFF
Request to start forwardjogging Request to stop forwardjogging Write parameters Start forward jogging Command executing flag ON
3. Sample Programs for Positioning Modules F3YP04/08
End of Positioning
relay for AX2
End of Positioning relay
for AX1
Error Notification
relay for AX1
Error Notification
relay for AX2
*** Execute reverse jogging for X axis ***
*** 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 Stop reverse jogging Command executing flag OFF
Request to start reverse jogging Request to stop reverse jogging Write parameters Start reverse jogging Command executing flag ON
Stop forward jogging Command executing flag OFF
182 TI 34M6K01-01E
3. Sample Programs for Positioning Modules F3YP04/08
End of Positioning relay
for AX2
Error Notification relay
for AX2
Stop reverse jogging Command executing flag OFF
Figure 3.58 Jogging Program
I00121
I00122
I00123
X00404
Y00435
I00124Command executing time
Speed
Stop forwardjogging
Start forwardjogging
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
AX1 AX2 Parameter Value Range
011 111 Command Code
0: Start Positioning command 1: Decelerate-and-Stop command 2: Origin Search command 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
015
014
013
012 11 10 9 8 7 6 5 4 3 2 1 0
0 0011
101
0 0011
101
0 0011
101
0 0011
101
0 0011
101
0 0011
101
Ignore falling edge of origin inputShift to Z-phase search on falling edge of origin inputDecelerate and stop on falling edge of origin inputStop immediately on falling edge of origin inputIgnore rising edge of origin inputShift to Z-phase search on rising edge of origin inputDecelerate and stop on rising edge of origin inputStop immediately on rising edge of origin inputIgnore falling edge of forward limitShift to Z-phase search on falling edge of forwarwd limitDecelerate and stop on falling edge of forward limitStop immediately on falling edge of forwarwd limitIgnore rising edge of forward limitShift to Z-phase search on rising edge of forward limitDecelerate and stop on rising edge of forward limitStop immediately on rising edge of forwarwd limitIgnore falling edge of reverse limitShift to Z-phase search on falling edge of reverse limitDecelerate and stop on falling edge of reverse limitStop immediately on falling edge of reverse limitIgnore rising edge of reverse limitShift to Z-phase search on rising edge of reverse limitDecelerate and stop on rising edge of reverse limitStop 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.
Reverse limitX axis I0144Y axis I2144
Origin switchX axis I0140Y axis I2140
Forward limit
Negative Positive
1
D
CB
A
Z phaseAfter origin input turns off, searchesforward for rising edge of one Z-phasepulse. Once detected, current position istaken as origin
Same search directionregardless of whetherforward limit swtich ison or off
Programmed movement sequencesfor 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)
Z-phase search count Z-phase search range Deviation pulse clear time
Command code for origin search Search speed Acceleration time Deceleration time Startup speed Z-phase edge selection
***** 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
*** Set Y-axis common origin search parameters in data registers ***
186 TI 34M6K01-01E
3. Sample Programs for Positioning Modules F3YP04/08
AX1 forward search request flag
AX2 origin switch
AX2 reverse limit switch
AX2 forward search request flag
Z-phase search count
Z-phase search range
Deviation pulse clear time
Request to start origin search
X-axis reverse search flag ON
Decelerate and stop on rising edge of origin input
Reverse origin search
*** Set reverse origin search parameters for X-axis in data registers ***
*** 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
Request to start origin search Y-axis reverse search flag ON
Decelerate and stop on rising edge of origin input Reverse origin search
*** Set reverse origin search parameters for Y-axis in data registers ***
*** Set forward origin search parameters for Y-axis in data registers ***
Shift to Z-phase search on falling edge of origin input Forward origin search
AX1 reverse limit switch
AX2 origin switch
TI 34M6K01-01E 187
3. Sample Programs for Positioning Modules F3YP04/08
Execute Command ACKrelay for AX1
Error Notificationrelay for AX1
End of Positioningrelay for AX1
Reverse search flag for AX1
Command execution disable(to be set elsewhere)
Command execution disable(to be set elsewhere)
*** Execute X-axis normal origin search ***
Write parameters
Execute Commandrelay ON
Waiting for ACK flagON
Command executingflag ON
Execute Commandrelay OFF
Waiting for ACK flagOFF
Command executingflag OFF
X-axis reverse searchflag OFF
Request X-axisforward search
Read origin searchstatus
*** Execute Y-axis normal origin search ***
Write parameters
Execute Commandrelay ON
Waiting for ACK flagON
Command executingflag ON
188 TI 34M6K01-01E
3. Sample Programs for Positioning Modules F3YP04/08
Execute CommandACK relay for AX2
Error Notification relay forAX2
End of Positioning relay forAX2
Reverse search flagfor AX2
Start origin searchrelay OFF
Waiting for ACK flagOFF
Command executingflag OFF
Y-axis reverse searchflag OFF
Request Y-axisforward search
Read origin searchstatus
Figure 3.60 Origin Search Program
I00131
I00132
I00133
X00401
Y00433
I00134Command executing time
End origin search
Origin input
Start Z-phasesearch
SpeedZ-phase detected
(origin established)
Start origin search
Deviation pulse clear output signal
X00404
Deviation pulseclear output
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
AX1 AX2 Parameter Value Range
011 111 Command Code
0: Start Positioning command 1: Decelerate-and-Stop command 2: Origin Search command 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
XP1(320,30)
P2(500,110)
P3(280,170)
P4(100,90)
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 (X/Y)
Speed [mm/s]
Acceleration Time [ms]
Deceleration Time [ms]
X 100 300 400 Moving to P1
Y 50 200 300 X 150 400 500 Moving to P2
Y 75 250 350 X 200 500 600 Moving to P3
Y 100 300 400 X 150 400 500 Moving to P4
Y 75 250 350
190 TI 34M6K01-01E
3. Sample Programs for Positioning Modules F3YP04/08
TI 34M6K01-01E 191
The corresponding parameters values to be written to the positioning module are calculated as follows:
Movement Axis (X/Y)
Speed [(1/65536)pulse/ms]
Current Position [pulse]
Acceleration Time [ms]
Deceleration Time [ms]
X 1638400 80000 300 400 Moving to P1
Y 819200 7500 200 300 X 2457600 125000 400 500 Moving to P2
Y 1228800 27500 250 350 X 3276800 70000 500 600 Moving to P3
Y 1638400 42500 300 400 X 2457600 25000 400 500 Moving to P4
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) ***
*** Set X-axis target position data to data registers ***
Number of target positions Command code to start positioning Target position mode Target position (320 mm)
3. Sample Programs for Positioning Modules F3YP04/08
Deceleration time (600 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 (500 ms) Startup speed
Command code to start positioning Target position mode Target position (500 mm) Travel speed (150 mm/s) Acceleration time (400 ms)
Travel speed (100 mm/s) Acceleration time (300 ms) Deceleration time (400 ms) Startup speed
192 TI 34M6K01-01E
3. Sample Programs for Positioning Modules F3YP04/08
TI 34M6K01-01E 193
Deceleration time (300 ms) Startup speed
Command code to start positioning Target position mode Target position (30 mm) Travel speed (50 mm/s) Acceleration time (200 ms)
Deceleration time (500 ms) Startup speed
Command code to start positioning Target position mode Target position (100 mm) Travel speed (150 mm/s) Acceleration time (400 ms)
Command code to start positioning Target position mode Target position (110 mm)
*** Set Y-axis target position data to data registers ***
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
TI 34M6K01-01E 195
Initiate
positioning flag
Start
positioning flag
Execute Command ACK
relay for X axis
Execute Command
ACK relay for Y axis
Execute Command
ACK relays
Positioning in
progress flags
End of Positioning
relays
*** Execute PTP operation (PTPMOV) ***
Initiate positioning flag ON X-axis positioning in progress flag OFF Y-axis positioning in progress flag OFF
Start positioning flag ON Clear data register for indexing Target position data index Write X-axis target position data Write Y-axis target position data 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 Command executing flag ON Execute Command relay for X axis OFF Waiting for X-axis ACK flag OFF X-axis positioning in progress flag ON Execute Command relay for Y axis OFF Waiting for Y-axis ACK flag OFF Y-axis positioning in progress flag ON
Initiate positioning flag
Start positioning flag
Execute Command ACK relay for X axis
Execute Command ACK relay for Y axis
Execute Command ACK relays
Positioning in progress flags
End of Positioningrelays
3. Sample Programs for Positioning Modules F3YP04/08
196 TI 34M6K01-01E
Figure 3.63 PTP Movement Sample Program
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).
Start positioning to first
target point
End of positioning to last target point
Command executing flag OFF Increment index register Reset index register
I00601
I00602
I00603
X00404
Y00433
Speed
X00401
I00605
Speed
I00604
X axis
Command executing time
Positioning in progress
Execute commandfor X-axis positioning
End of positioning
I02603
X00408
Y00437
X00405
I02605
Y axis
Positioning in progress
Execute commandfor Y-axis positioning
End of positioning
I00612
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
XP 1 ( 3 2 0 , 3 0 )
P 2 ( 5 0 0 , 1 1 0 )
P 3 ( 2 8 0 , 1 7 0 )
P 4 ( 1 0 0 , 9 0 )
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
TI 34M6K01-01E 197
***** Execute linear interpolation operation (STRMOV) *****
Initiate positioning flag ON Clear index register Set previous position to X-axis current position Set previous position to Y-axis current position
3. Sample Programs for Positioning Modules F3YP04/08
198 TI 34M6K01-01E
Initiate
positioning flag
Call subroutine to calculate and
set travel speeds
Execute Command ACK
relay for X axis
Execute Command
ACK relay for Y axis
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) Target speed (Vx) 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 Command executing flag ON Execute Command relay for X axis OFF Waiting for X-axis ACK flag OFF X-axis positioning in progress flag ON Execute Command relay for Y axis OFF Waiting for Y-axis ACK flag OFF Y-axis positioning in progress flag ON
3. Sample Programs for Positioning Modules F3YP04/08
TI 34M6K01-01E 199
End of Positioning
relay
Execute Command
ACK relay
Positioning in
progress flag
Start positioning to first point
End of positioning to last point
Start positioning flag ON 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 (SETV) *****
* Start Position
* Target Position
* Target Speed
End of positioning of either axis Compare travel distances
3. Sample Programs for Positioning Modules F3YP04/08
200 TI 34M6K01-01E
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).
AX1 travel > AX2 travel
AX2 travel > AX1 travel
Floating-pointconversion |X1-X0|
Floating-pointconversion |Y1-Y0|
Floating-pointconversion (Vx)
Floating-pointconversion (Vy)
Calculate Y-axisspeed (Vy)
Integer conversion(Vy)
Write X-axis speed(preset value)
Write Y-axis speed(calculated value)
Calculate X-axis speed(Vx)
Integer conversion(Vx)
Write X-axis speed(calculated value)
Write Y-axis speed(preset value)
3. Sample Programs for Positioning Modules F3YP04/08
TI 34M6K01-01E 201
MEMO.
3. Sample Programs for Positioning Modules F3YP04/08
202 TI 34M6K01-01E
MEMO.
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 / F3YP18Operation Procedure
Turn servomotor on(When using AC servomotor)
Register parameters
Executeautomatic origin search
Execute various positioningactions
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 Number Parameter Range of values
*01 Maximum Speed Selection 0: 499,750 [pps], 1: 3,998,000 [pps]
*02 Pulse Output Mode 0: Forward pulse/reverse pulse output 1: Travel pulse/direction output
*03 Direction of Rotation 0: Positive data indicates forward pulse output. 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]
*09/*10 Speed Limit
1 to 32751616 [(1/65536) pulse/ms] if Maximum Speed Selection is 0 1 to 262012928 [(1/65536) pulse/ms] if Maximum Speed Selection is 1
*11 Automatic Origin Search Mode 0: Use origin input 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
*17/*18 Automatic Origin Search Starting Speed 0 to Automatic Origin Search Speed 2
*19 Automatic Origin Search Acceleration Time 0 to 32767 [ms]
*20 Automatic Origin Search deceleration Time 0 to 32767 [ms]
*21 Automatic Origin Search Z-phase Edge Selection 0: Rising edge, 1: Falling edge
*22 Automatic Origin Search Z-phase Search Count 0 to 32767 [times]
*23/*24 Automatic Origin Search Z-phase Search Range
0 to 2147483647 or Automatic Origin Search Z-phase Pulse Count [pulses]
*25 Automatic Origin Search Deviation Pulse Clear Time 0 to 32767 [ms]
*26/*27 Automatic Origin Search Origin Offset Value -2147483648 to 2147483647 [pulses]
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 AX1 AX2
Parameter Remarks
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
091 191 Extended Status Status of the movement during positioning or during jogging
092/093 192/193 Number of Flash Memory Write Operations
Total number of write operations to the flash 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
AX1 AX2 Description
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.
*** 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
***** Read module status (READST) *****
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.
210 TI 34M6K01-01E
***** 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
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
Cancel parameterregistration
Execute Command ACK relayfor AX1
Auto. origin search Z-phase search range
Auto. origin searchdeviation pulse cleartime
Auto. origin searchorigin offset
Request to setparameters
*** Write X-axis parameters to module ***
Command code to setparameters
Write parameters
Execute commandrelay for X axis ON
Waiting for ExecuteCommand ACK flagON
Command Executingflag ON
Execute Commandrelay for X axis OFF
Waiting for ExecuteCommand ACK flagOFF
Command Executingflag OFF
Request to setparameters
*** Write Y-axis parameters to module ***
Command code to setparameters
Write parameters
Execute Commandrelay for Y axis ON
Waiting for ExecuteCommand ACK flagON
Command Executingflag ON
212 TI 34M6K01-01E
3. Sample Programs for Positioning Modules F3YP14/18
TI 34M6K01-01E 213
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).
Command execution disable(to be set elsewhere)
*** Save parameters to flash memory ***
Request to saveparameters
Command code tosave parameters
Execute Commandrelay ON
Waiting for ExecuteCommand ACK ON
Command Executingflag ON
Cancel request to writeparameters
Execute Command ACK relayfor AX2
Y00434 Execute Command
relay for Y axis OFF
Waiting for ExecuteCommand ACK flagOFF
Command Executingflag OFF
/I0001
/I0002
/I0003
/I0004
Y00433
X00401
Command executing
Request to setparameters ACK
Request to setparameters
3. Sample Programs for Positioning Modules F3YP14/18
Execute Command ACK
relay for AX1
Read alarm status
Execute Commandrelay OFF
Waiting for ExecuteCommand ACK OFF
Command Executingflag OFF
Execute Command ACKrelay for AX1
/I0021
/I0022
/I0023
/I0024
Y00433
X00401
Command executing
Request to saveparameters ACK
Request to saveparameters
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.
Error Notification relay forAX1
Falling edge of reset requestrelay
*** X axis ***
***** Reset error (RLSERR) *****
Rising edge of errorreset request relay
Falling edge of errorreset request relay
Read error status forX axis
Command code toreset error status forX-axis
Stop Immediately relayfor X axis OFF
Forward Joggingrelay for X axis OFF
Reverse Jogging relayfor X axis OFF
Execute Commandrelay for X axis ON
Command executingflag ON
Execute Commandrelay for X axis OFF
Command executingflag OFF
TI 34M6K01-01E 215
3. Sample Programs for Positioning Modules F3YP14/18
Error Notification relay for AX2
Rising edge of errorreset request relay
Falling edge of errorreset request relay
Read Y-axis errorstatus
Command code toreset Y-axis errors
Stop Immediately relayfor Y axis OFF
Forward Joggingrelay for Y axis OFF
Reverse Jogging relayfor Y axis OFF
Execute Commandrelay for Y axis ON
Command executingflag ON
Execute Commandrelay for Y axis OFF
Command executingflag OFF
*** Y axis ***
/I0001
/I0002
/I0003
X00417
Y00433
Request to reset error
Error Notificationrelay OFF
X00401
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
AX1 AX2 Parameter Value Range
045 145 Acceleration/deceleration Mode 0: Trapezoidal acceleration/deceleration (with 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]
050/051 150/151 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. - 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
Command execution disable(to be set elsewhere)
End of Positioning relay forAX1
Error Notification relay forAX1
*** Set jogging parameters for X-axis in data registers ***
***** Jog stepping (JOG) *****
*** Set jogging parameters for Y-axis in data registers ***
*** Execute forward jogging of X-axis ***
Acceleration/deceleration mode(S-shape)
Target speed for jogging
Acceleration time
Deceleration time
Acceleration/deceleration mode(S-shape)
Target speed forjogging
Acceleration time
Deceleration time
Request to startforward jogging
Request to stopforward jogging
Write parameters
Start forward jogging
Command executingflag ON
Stop forward jogging
Command executingflag OFF
Read alarm status
Stop forward jogging
Command executingflag OFF
218 TI 34M6K01-01E
3. Sample Programs for Positioning Modules F3YP14/18
TI 34M6K01-01E 219
Command execution disable (to be set elsewhere)
End of Positioning relay for AX2
Error Notification relay for AX2
End of Positioning relay for AX1
Error Notification 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
Stop forward jogging
Command executing flag OFF
Read alarm status
Stop forward jogging
Command executing flag OFF
*** 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
Stop reverse jogging
Command executing flag OFF
Read alarm status
Stop reverse jogging
Command executing flag OFF
Command execution disable (to be set elsewhere)
3. Sample Programs for Positioning Modules F3YP14/18
*** Execute reverse jogging for Y axis***
Command execution disable
(to be set elsewhere)
End of Positioning relay
for AX2
Error Notification relayfor AX2
Request to start reverse jogging Request to stop reverse jogging Write parameters Start reverse jogging Command executing flag ON Stop reverse jogging Command executing flag OFF Read alarm status Stop reverse jogging Command executing flag OFF
/I0001
/I0002
/I0003
X00425
Y00449
/I0004Command executing
Speed
Stop forwardjogging
Start forwardjogging
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
AX1 AX2 Parameter Value Range
041 141 Command Code
0: Start Positioning command 1: Decelerate-and-Stop command 2: Origin Search command 3: Set Parameters command 4: Set Current Position command 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]
015
014
013
012 11 10 9 8 7 6 5 4 3 2 1 0
0 0011
101
0 0011
101
0 0011
101
0 0011
101
0 0011
101
0 0011
101
Ignore falling edge of origin inputShift to Z-phase search on falling edge of origin inputDecelerate and stop on falling edge of origin inputStop immediately on falling edge of origin inputIgnore rising edge of origin inputShift to Z-phase search on rising edge of origin inputDecelerate and stop on rising edge of origin inputStop immediately on rising edge of origin inputIgnore falling edge of forward limitShift to Z-phase search on falling edge of forwarwd limitDecelerate and stop on falling edge of forward limitStop immediately on falling edge of forwarwd limitIgnore rising edge of forward limitShift to Z-phase search on rising edge of forward limitDecelerate and stop on rising edge of forward limitStop immediately on rising edge of forwarwd limitIgnore falling edge of reverse limitShift to Z-phase search on falling edge of reverse limitDecelerate and stop on falling edge of reverse limitStop immediately on falling edge of reverse limitIgnore rising edge of reverse limitShift to Z-phase search on rising edge of reverse limitDecelerate and stop on rising edge of reverse limitStop 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.
Reverse limitX axis I0144Y axis I2144
Origin switchX axis I0140Y axis I2140
Forward limit
Negative Positive
1
D
CB
A
Z phaseAfter origin input turns off, searchesforward for rising edge of one Z-phasepulse. Once detected, current position istaken as origin
Same search directionregardless of whetherforward limit swtich ison or off
Programmed movement sequencesfor 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.
Z-phase search count Z-phase search range Deviation pulse clear time
Command code for origin search Search speed Acceleration time Deceleration time Startup speed Z-phase edge selection
***** 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
*** Set Y-axis common origin search parameters for Y-axis in data registers ***
TI 34M6K01-01E 223
3. Sample Programs for Positioning Modules F3YP14/18
AX1 forward search request flag
AX2 origin switch
AX2 reverse limit switch
AX2 forward search request flag
Z-phase search count
Z-phase search range
Deviation pulse clear time
Request to search for origin
X-axis reverse search flag ON
Decelerate and stop on rising edge of origin input
Reverse origin search
*** Set reverse origin search parameters for X-axis in data registers ***
*** 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
Request to start origin search Y-axis reverse search flag ON
Decelerate and stop onrising edge of origin input Reverse origin search
*** Set reverse origin search parameters for Y-axis in data registers ***
*** Set forward origin search parameters for Y-axis in data registers ***
Shift to Z-phase search on falling edge of origin input Forward origin search
AX1 reverse limit switch
AX2 origin switch
224 TI 34M6K01-01E
3. Sample Programs for Positioning Modules F3YP14/18
TI 34M6K01-01E 225
Execute Command ACKrelay for AX1
Error Notificationrelay for AX1
End of Positioningrelay for AX1
Reverse search flag for AX1
Command execution disable(to be set elsewhere)
Command execution disable(to be set elsewhere)
*** Execute X-axis normal origin search ***
Write parameters
Execute Commandrelay ON
Waiting for ACK flagON
Command executingflag ON
Execute Commandrelay OFF
Waiting for ACK flagOFF
Command executingflag OFF
X-axis forward searchflag OFF
Request X-axisforward search
Read origin searchstatus
*** Execute Y-axis normal origin search ***
Write parameters
Execute Commandrelay ON
Waiting for ACK flagON
Command executingflag ON
3. Sample Programs for Positioning Modules F3YP14/18
Execute CommandACK relay for AX2
Error Notification relay forAX2
End of Positioning relay forAX2
Reverse search flagfor AX2
Start origin searchrelay OFF
Waiting for ACK flagOFF
Command executingflag OFF
Y-axis reverse searchflag OFF
Request Y-axisforward search
Read origin searchstatus
/I0001
/I0002
/I0003
X00401
Y00433
I0004Command executing time
End origin search
Origin input
Start Z-phasesearch
SpeedZ-phase detected
(origin established)
Start origin search
Deviation pulse clear ooutput signal
X00425
Deviation pulseclear output
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
forward limit Reverse limitOrigin
Startup speed
Search speed 1
Search speed 2
Z-phase pulse
- If origin input is on when origin search is initiated
forward limit Reverse limitOrigin
Startup speed
Search speed 2
Z-phasse pulse
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
- If the reverse limit input is on when origin search is initiated
Forward limit Reverse limitOrigin
Startup speed
Search speed 1
Search speed 2
Z-phase pulse
Forward limit Reverse limitOrigin
Startup speed
Search speed 2
Z-phase pulse
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.
Command execution disable(to be set elsewhere)
Execute CommandACK relay for AX1
Error Notification relay forAX1
End of Positioningrelay for AX1
Command execution disable(to be set elsewhere)
***** Automatic origin search (ATSEARCH) *****
*** Execute X-axis automatic origin search ***
Request for automaticorigin search
Command code (8)
Execute Commandrelay ON
Automatic origin searchoperating ON
Automatic originsearch executing ON
Read alarm status
Execute Commandrelay OFF
Automatic origin searchoperating OFF
Automatic originsearch executing OFF
Origin search status
*** Execute Y-axis automatic origin search ***
Request for automaticorigin search
Command code (8)
Execute Commandrelay ON
Automatic origin searchoperating ON
Automatic origin searchexecuting ON
TI 34M6K01-01E 229
3. Sample Programs for Positioning Modules F3YP14/18
Execute Command ACKrelay for AX2
End of Positioningrelay for AX2
Error Notificationrelay for AX2
Read alarm status
Execute Commandrelay OFF
Automatic originsearch operating OFF
Automatic origin searchexecuting OFF
Origin search status
/I0001
/I0002
/I0003
X00401
Y00433
I0004Command executing
End origin search
Origin input
Start Z-phasesearch
SpeedZ-phase detected
(origin established)
Start origin search
Deviation pulse clear ooutput signal
X00425
Outputs deviationpulse clear
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 AX1 AX2 Parameter Value Range
041 141 Command Code
0: Start Positioning command 1: Decelerate-and-Stop command 2: Origin Search command 3: Set Parameters command 4: Set Current Position command 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]
045 145 Acceleration/deceleration Mode 0: Trapezoidal acceleration/deceleration (with 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]
050/051 150/151 Startup Speed 0 to target speed [(1/65536) pulses/ms] (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
XP1(320,30)
P2(500,110)
P3(280,170)
P4(100,90)
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
(X/Y) Speed [mm/s]
Acceleration Time [ms]
Deceleration Time [ms]
X 100 300 400 Moving to P1
Y 50 200 300 X 150 400 500 Moving to P2
Y 75 250 350 X 200 500 600 Moving to P3
Y 100 300 400 X 150 400 500 Moving to P4
Y 75 250 350 The corresponding parameters values to be written to the positioning module are calculated as follows:
Movement Axis (X/Y)
Speed [(1/65536)pulse/ms]
Current Position [pulse]
Acceleration Time [ms]
Deceleration Time [ms]
X 1638400 80000 300 400 Moving to P1
Y 819200 7500 200 300 X 2457600 125000 400 500 Moving to P2
Y 1228800 27500 250 350 X 3276800 70000 500 600 Moving to P3
Y 1638400 42500 300 400 X 2457600 25000 400 500 Moving to P4
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) ***
*** Set Xaxis target position data in data registers ***
Number of target positions
Command code to start positioning
Target position mode
Target position (320 mm)
Acceleration/ deceleration mode (S-shape)
Acceleration time (300 ms)
Target speed (100 mm/s)
232 TI 34M6K01-01E
3. Sample Programs for Positioning Modules F3YP14/18
Deceleration time (400 ms) Startup speed
Deceleration time (500 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 (600 ms) Startup speed
Command code to start positioning Target position mode Target position (280 mm) Acceleration/deceleration mode (S-shaped) Target speed (200 mm/s) Acceleration time (500 ms)
TI 34M6K01-01E 233
3. Sample Programs for Positioning Modules F3YP14/18
Deceleration time (500 ms) Startup speed
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(300 ms) Startup speed
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)
*** Set Y-axis target position data in data registers ***
234 TI 34M6K01-01E
3. Sample Programs for Positioning Modules F3YP14/18
TI 34M6K01-01E 235
Command code to start positioning Target position mode Target position (110 mm) Acceleration/deceleration 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)
3. Sample Programs for Positioning Modules F3YP14/18
Command exaecution disable (to be set elsewhere)
Execute Command ACK relay for AX1
Error Notification relay for AX1
Execute Command ACK relay for AX2
Error Notification relay for AX2
Initiate positioning flag
Start positioning flag
*** Execute PTP operation ***
Acceleration /deceleration mode (S-shape) Target speed (150 mm/s) Acceleration time (400 ms) Deceleration time (500 ms) Startup speed
Start positioning flag ON Clear data register for indexing Target position data index Write X-axis target position data Write Y-axis target position data 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 Command executing flag ON Execute Command relay for X axis OFF Waiting for X-axis ACK flag OFF X-axis positioning in progress flag ON Execute Command relay for Y axis OFF Waiting for Y-axis ACK flag OFF Y-axis positioning in progress flag ON
236 TI 34M6K01-01E
3. Sample Programs for Positioning Modules F3YP14/18
End of relay for
End of relay for
Data is transferred a linear interpolation
through a global
Initiate positioning flag ON
X-axis positioning in progress flag OFF
Y-axis positioning in progress flag OFF
Command executing flag OFF
Increment index register
Reset index register
Transfer data to linear interpolation program
End of positioning relay for AX1
Data is transferred directly to a linear interpolation program via a global device
End of positioning relay for AX2
/I0001
/I0002
/I0003
X00425
Y00433
Speed
X00401
/I0005
Speed
/I0004
X axis
Com m and executing tim e
Positioning in progress
Execute commandfor X-axis positioning
End of positioning
/I0013
X00426
Y00434
X00402
/I0015
Y axis
Positioning in progress
Execute commandfor Y-axis positioning
End of positioning
/I0012
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
XP 1 ( 3 2 0 , 3 0 )
P 2 ( 5 0 0 , 1 1 0 )
P 3 ( 2 8 0 , 1 7 0 )
P 4 ( 1 0 0 , 9 0 )
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.
Target position and otherdata are passed from the PTP movement
program using global addresses
***** Execute linear interpolation operation (STRMOV) *****
Receive targetposition data
Initiate positioning flagON
Clear index register
Set previous position tocurrent position forX-axis
Set previous position tocurrent position for Y-axis
TI 34M6K01-01E 239
3. Sample Programs for Positioning Modules F3YP14/18
240 TI 34M6K01-01E
Initiate positioning flag
Start positioning flag
Call subroutine for speedcalculation and setup
Execute Command ACKrelay for AX1
Error Notification relayfor AX1
Execute Command ACKrelay for AX2
Error Notification relay for AX2
Initiate positioning flag
Start positioning flag
Command execution disable(to be set elsewhere)
Command execution disable(to be set elsewhere)
Target position dataindex
Write target positiondata for X-axis
Write target positiondata for Y-axis
Set start ing position toprevious position (X0)
Set start ing position toprevious position (Y0)
Target position (X1)
Target position (Y1)
Target speed (Vx)
Target speed (Vy)
Travel speed
Execute Commandrelay for X axis ON
Execute Commandrelay for Y axis ON
Waiting for X-axisACK flag ON
Waitting for Y-axisACK flag ON
Command executingflag ON
Execute Commandrelay for X axis OFF
Waiting for X-axis ACKflag OFF
X-axis positioning inprogress flag ON
Execute Commandrelay for Y axis OFF
Waiting for Y-axis ACKflag OFF
Y-axis positioning inprogress flag ON
3. Sample Programs for Positioning Modules F3YP14/18
TI 34M6K01-01E 241
End of Positioningrelay
Execute CommandACK relay
Positioning in progressflag
Command executingflag
Start positioning flagON
X-axis positioning inprogress flag OFF
Y-axis positioning inprogress flag OFF
Increment indexregister
Command executingflag OFF
Reset index register
***** Subroutine for calculating and setting travel speed *****
* Starting Position
* Target Position
* Target Speed
End of positioning ofeither axis
Compare traveldistances
3. Sample Programs for Positioning Modules F3YP14/18
AX1 travel > AX2 travel
Floating-pointconversion |X1-X0|
Floating-pointconversion |Y1-Y0|
Floating-pointconversion (Vx)
Floating-pointconversion (Vy)
Calculate Y-axisspeed (Vy)
Integer conversion(Vy)
Write X-axis speed(preset value)
Write Y-axis speed(calculated value)
Calculate X-axis speed(Vx)
Integer conversion(Vx)
Write X-axis speed(calculated value)
Write Y-axis speed(preset value)
AX2 travel > AX1 travel
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 AX1 AX2 Parameter Value Range
041 141 Command Code
0: Start Positioning command 1: Decelerate-and-Stop command 2: Origin Search command 3: Set Parameters command 4: Set Current Position command 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.
Time
Speed
Start↑ ↑ ↑Request to
change speedRequest to
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.
Command execution disable(to be set elsewhere)
Command execution disable(to be set elsewhere)
Command execution disable(to be set elsewhere)
***** Change speed *****
*** Set X-axis parameters in data registers ***
Flag to start speedchange for X-axis
Command code (6) tochange speed
Target speed(200 mm/s)
Acceleration time(500 mm/s)
Deceleration time(600 mm/s)
*** Set Y-axis parameters in data registers ***
Flag to start speedchange 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-axistarget speed
Execute Commandrelay for X axis ON
Waiting for X-axis ACKflag ON
X-axis commandexecuting flag ON
244 TI 34M6K01-01E
3. Sample Programs for Positioning Modules F3YP14/18
Execute Command ACKrelay for AX1
Error Notification relay for AX1
Command execution disable(to be set elsewhere)
Execute Command ACKrelay for AX2
Error Notification relay for AX2
I0099
Read X-axis alarmstatus
Execute Commandrelay for X axis OFF
W aiting for X-axisACK flag OFF
X-axis commandexecuting flag OFF
W rite new Y-axistarget speed
Execute Commandrelay for Y axis ON
W aiting for Y-axisACK flag ON
Y-axis commandexecuting flag ON
Read Y-axis alarmstatus
Execute Commandrelay for Y axis OFF
W aiting for Y-axisACK flag OFF
Y-axis commandexecuting flag OFF
*** Execute Y-axis speed change ***
/ I 0 0 0 1
/ I0 0 0 2
/ I0 0 0 3
Y 4 3 3
X 4 0 1
/ I0 0 0 4C o m m a n d e x e c u t i n g t im 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
TI 34M6K01-01E 249
Appendix A List of Input/Output Relays and Module Data
A1 F3NC01-0N/F3NC02-0N - Input Relays
Input Relay Number AX1 AX2
Operation When On
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 AX1 AX2 Operation When ON
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.
Appendix A. F3NC01/02
250 TI 34M6K01-01E
- List of Parameters Data Position Number AX1 AX2 Parameter Remarks or Value Range
(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
007 215 Current Speed Current speed during positioning [(×speed command scaling factor) pulse/ms]
008 216 Direct Command Speed 1 to 25,000
009 217 Command Position Number 0 to 64
010 218 Command Speed number 1 to 16
011 219 Pattern Number being Executed Pattern number during pattern execution
012 220 Position Number for Teaching 1 to 64 (1)
013 221 Module Status State of external contact inputs 014 to 020 222 to 228 (Reserved)
021/022 229/230 Number of Write Operations to Non-volatile Memory
Accumulated number of write operations to non-volatile memory
023 231 Error Code Error information code when error occurs
024 232 Speed Command Scaling Factor
0:×0.1 (0.1pps to 2,500pps) 1:×1 (1pps to 25,000pps) (0) 2:×10 (10pps to 250kpps)
025 233 m 026 234
Electronic Gear n
1 to 3,000 (1); 0.001≤ (m/n) ≤10
027 235 Maximum Speed 1 to 25,000 (25,000); ≥ Startup 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)
035/036 243/244 CW Limit -83,886,080 to 83,886,070 (83,886,070) If electronic gear ratio (m/n) > 1, -83,886,080 ≤ Forward Limit×m/n ≤ 83,886,070
037/038 245/246 CCW Limit -83,886,080 to 83,886,070 (-83,886,080) 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)
041 249 Pulse Output Mode 0: pulse/direction signal (1) 1: CW pulse/CCW pulse
042 250 Origin Search Mode 0 to 7 (0)
043 - Positioning Control Mode 0: 2-axis PTP Mode (0) 1: 2-axis Linear Interpolation Mode
044 to 048 252 to 256 (Reserved)
049 257
Speed Data 1 (Origin Search Speed) (Speed for Return to Origin)
050 258 Speed Data 2 (Low Speed for Origin Search)
051 259 Speed Data 3 (Jogging Speed)
1 to 25,000 (1); between Startup Speed and Maximum Speed; Low speed for origin search ≤ origin search speed
Appendix A. F3NC01/02
TI 34M6K01-01E 251
Data Position Number
AX1 AX2 Parameter Remarks or Value Range
(Default values are enclosed within brackets)
052 to 064 260 to 272 Speed Data 4 to 16
065 to 080 273 to 288 Pattern Data 1 to 16 0 to 6,416 (0) position data number ×100 + speed data number
081/082 to
207/208
289/290 to
415/416 Position Data 1 to 64
83,886,080 to 83,886,070 (0) when using absolute position values 83,886,079 to 83,886,071 when using incremental position values
Appendix A. F3NC11/12
252 TI 34M6K01-01E
A2 F3NC11-0N/F3NC12-0N - Input Relays
Input Relay Number AX1 AX2
Operation When ON
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 AX1 AX2
Operation When ON
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
Appendix A. F3NC11/12
TI 34M6K01-01E 253
- List of Parameters Data Position Number
AX1 AX2 Parameter Remarks or Value Range
001/002 201/202 Position of Center -8388608 to 8388608 [pulse]
003/004 203/204 Radius 1 to 8388608 [pulse]
005/006 205/206 Starting Angle -23592960 to 23592960[(1/65536) degree] (-360 to 360 [degree])
007/008 207/208 Angular Travel -2123366400 to 2123366400 [(1/65536) degree](-90 to 90[revolutions])
Startup Speed (for normal operation) 0 to 16367616[(1/65536)pulse/ms]
009/010 209/210 Startup Angular Speed (for circular interpolation operation)
0 to 23592960 [(1/65536)degree/ms] ( to 360 [degree])
Target Speed (for normal operation) 0 to 16367616[(1/65536)pulse/ms]
011/012 211/212 Target Angular Speed (for circular interpolation operation)
0 to 23592960 [(1/65536)degree/ms] (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]
018 218 Interpolation Mode 0: Normal operation 1: X-axis circular Interpolation 2: Y-axis circular interpolation
019 219 Control Mode Switchover Parameter Specified as bit pattern
020 220 Origin Search Mode For details, see Table 3.11 (P95)
021 221 Origin Search Direction 0: Forward 1: Reverse
022 222 Z-phase Edge Selection 0: Rising edge 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]
036 236 Direction of Motor Rotation 0: Positive data indicates CW pulse 1: Negative data indicates CW pulse
037 237 Pulse Output Mode 0: Pulse and direction signal 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]
047 247 Remaining Deceleration Time Time remaining for the generated path to arrive at the target position [ms]
048 248 Extended Status Accelerating, decelerating, over-ramping, waiting for trigger, control mode and other information on movement
Appendix A. F3NC51/52
254 TI 34M6K01-01E
A3 F3NC51-0N/F3NC52-0N - Input Relays
Input Relay Number AX1 AX2
Operation When ON
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 AX1 AX2
Operation When ON
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
Appendix A. F3NC51/52
TI 34M6K01-01E 255
- List of Parameters Data Position Number
AX1 AX2 Parameter Remarks or Value Range
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]
013 213 Direction of Motor Rotation 0: Positive voltage denotes forward movement 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]
018 218 Encoder Type 0: General-purpose incremental method 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
028 228 Sanyo ABS Rotation Direction 0: Encoder data increases in forward direction 1: Encoder data increases in reverse direction
029 229 Contact Input Mode
0: Normal mode with limits 1: Normal mode without limits 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]
045 245 Target Position Mode
0: Absolute position 1: Incremental position (from encoder position) 2: Incremental position (from previous target position)
046 246 Acceleration Time 0 to 32767[ms]
047 247 Acceleration Mode Selection 0: Trapezoidal acceleration 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]
051 251 Deceleration Mode Selection 0: Trapezoidal acceleration 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]
057 257 Interpolation Mode Selection 0: Normal operation 1: X-axis circular Interpolation 2: Y-axis circular interpolation
Appendix A. F3NC51/52
256 TI 34M6K01-01E
Data Position Number
AX1 AX2 Parameter Remarks or Value Range
058 258 Startup Mode Selection 0: Normal startup; 1: Wait for external trigger 2: Wait for internal trigger
059 259 Position Detection Mode 0: No detection; 1: Command value 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)
071 271 Extended Command Parameter
0: Servo ON; 1: Servo OFF 2: Brake ON; 3: Brake OFF 4: Constant deviation adjustment 5: Driver reset 10: Manual pulsar mode ON 11: Manual pulsar mode OFF
072/073 272/273 Constant Deviation Adjustment Amount -32768 to 32767 [pulse]
074 274 Manual Pulsar Scale Value -500 to 500 [times]
075 to 080 275 to 280 (Reserved)
081 281 Control Mode Switchover parameter
0: Switch to speed control mode 1: Switch to position control mode 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]
086/087 286/287 Starting Angle -23592960 to 23592960 [(1/65536) degree] (-360 to 360 [degree])
088/089 288/289 Angular Travel -2123366400 to 2123366400 [(1/65536) degree] (-90 to 90 [revolutions])
090/091 290/291 Angular Speed Setpoint 1 to 23592960 [(1/65536) degree/ms] (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
104/105 304/305 Current Position Status (Command value) [pulse]
106/107 306/307 Current Speed Status (Command value) [(1/65536)pulse/ms]
108/109 308/309 Current Position Status (Encoder input value) [pulse]
110/111 310/311 Current Speed Status (Encoder input value) [(1/65536)pulse/ms]
112/113 312/313 Target Positions Status [pulse]
114 314 Extended Status Accelerating, decelerating, over-ramping, waiting for trigger, control mode and other information on movement
Appendix A. F3NC51/52
TI 34M6K01-01E 257
Data Position Number
AX1 AX2 Parameter Remarks or Value Range
115 315 Remaining Deceleration Time Time remaining for the generated path to arrive at the target position [ms]
116 316 Contact Output Status State of external contact output
117/118 317/318
Absolute Data Status (Yasukawa Electric's ABS) Absolute Raw Data Received (Sanyo Denki's ABS)
[pulse] 30 bits of received data
Appendix A F3YP04/08
258 TI 34M6K01-01E
A4 F3YP04-0N/F3YP08-0N - Input Relays
Input relay number Operation when ON Input relay
number Operation when ON
X!!!01 Axis 1, Execute Command ACK X!!!17 Axis 5, Execute Command
ACK
X!!!02 Axis 1, Stop Immediately ACK X!!!18 Axis 5, Stop Immediately 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
X!!!05 Axis 2, Execute Command ACK X!!!21 Axis 6, Execute Command
ACK
X!!!06 Axis 2, Stop Immediately ACK X!!!22 Axis 6, Stop Immediately 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
X!!!09 Axis 3, Execute Command ACK X!!!25 Axis 7, Execute Command
ACK
X!!!10 Axis 3, Stop Immediately ACK X!!!26 Axis 7, Stop Immediately 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
X!!!13 Axis 4, Execute Command ACK X!!!29 Axis 8, Execute Command
ACK
X!!!14 Axis 4, Stop Immediately ACK X!!!30 Axis 8, Stop Immediately 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 number Operation when ON Output relay
number Operation when ON
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
Appendix A F3YP04/08
TI 34M6K01-01E 259
- List of Parameters Data Position
Number Parameter Description or Data Range
*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)
*11 Command Code
0: Start Positioning Command 1: Decelerate-and-Stop command 2: Origin Search command 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]
*25/*26 Z-phase Search Range 0 to 134217727/Z-phase search count [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.
*59 Origin Search Status Status during and at the end of origin search
The symbol �*� denotes the value of (axis number - 1). The values for axis 1 to axis 8 are 0 to 7 respectively.
Appendix A. F3YP14/18
260 TI 34M6K01-01E
A5 F3YP14-0N/F3YP18-0N - Input Relays
Input relay number Operation when ON Input relay
number Operation when ON
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 X!!!10 Axis 2, Stop Immediately ACK X!!!26 Axis 2, End of Positioning X!!!11 Axis 3, Stop Immediately ACK X!!!27 Axis 3, End of Positioning X!!!12 Axis 4, Stop Immediately ACK X!!!28 Axis 4, End of Positioning X!!!13 Axis 5, Stop Immediately ACK X!!!29 Axis 5, End of Positioning X!!!14 Axis 6, Stop Immediately ACK X!!!30 Axis 6, End of Positioning X!!!15 Axis 7, Stop Immediately ACK X!!!31 Axis 7, End of Positioning X!!!16 Axis 8, Stop Immediately ACK X!!!32 Axis 8, End of Positioning
!!! : Denotes the slot where the positioning module is installed.
- Output Relays
Output relay number Operation when ON Output relay
number Operation when ON
Y!!!33 ↑Axis 1, Execute Command Y!!!49 Axis 1, Forward Jogging Y!!!34 ↑Axis 2, Execute Command Y!!!50 Axis 2, Forward Jogging Y!!!35 ↑Axis 3, Execute Command Y!!!51 Axis 3, Forward Jogging Y!!!36 ↑Axis 4, Execute Command Y!!!52 Axis 4, Forward Jogging Y!!!37 ↑Axis 5, Execute Command Y!!!53 Axis 5, Forward Jogging Y!!!38 ↑Axis 6, Execute Command Y!!!54 Axis 6, Forward Jogging Y!!!39 ↑Axis 7, Execute Command Y!!!55 Axis 7, Forward Jogging Y!!!40 ↑Axis 8, Execute Command Y!!!56 Axis 8, Forward Jogging Y!!!41 ↑Axis 1, Stop Immediately Y!!!57 Axis 1, Reverse Jogging Y!!!42 ↑Axis 2, Stop Immediately Y!!!58 Axis 2, Reverse Jogging Y!!!43 ↑Axis 3, Stop Immediately Y!!!59 Axis 3, Reverse Jogging Y!!!44 ↑Axis 4, Stop Immediately Y!!!60 Axis 4, Reverse Jogging Y!!!45 ↑Axis 5, Stop Immediately Y!!!61 Axis 5, Reverse Jogging Y!!!46 ↑Axis 6, Stop Immediately Y!!!62 Axis 6, Reverse Jogging Y!!!47 ↑Axis 7, Stop Immediately Y!!!63 Axis 7, Reverse Jogging Y!!!48 ↑Axis 8, Stop Immediately Y!!!64 Axis 8, Reverse Jogging
!!! : Denotes the slot where the positioning module is installed. ↑ : Operates on rising edge of output relay
Appendix A. F3YP14/18
TI 34M6K01-01E 261
- List of Parameters Data Position
Number Parameter Remarks or Value Range *01 Maximum Speed Selection 0: 499,750 [pps], 1: 3,998,000 [pps]
*02 Pulse Output Mode 0: Forward/reverse pulse output 1: Pulse/direction output
*03 Direction of Rotation 0: Positive data indicates forward pulse output. 1: Negative data indicates for forward pulse output.
*04 Contact Input Polarity 1 bit for each contact point *05/*06 Forward Limit -2147483648 to 2147483647 [pulses] *07/*08 Reverse Limit -2147483648 to (Forward Limit - 1) [pulses]
*09/*10 Speed Limit
1 to 32751616 [(1/65536) pulse/ms] if Maximum Speed Selection is 0 1 to 262012928 [(1/65536) pulse/ms] if Maximum Speed Selection is 1
*11 Automatic Origin Search Mode 0: Use origin switch 1: Do not use origin switch
*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
*17/*18 Automatic Origin Search Startup Speed 0 to Automatic Origin Search Speed 2
*19 Automatic Origin Search Acceleration Time 0 to 32767 [ms]
*20 Automatic Origin Search deceleration Time 0 to 32767 [ms]
*21 Automatic Origin Search Z-phase Edge Selection 0: Rising edge, 1: Falling edge
*22 Automatic Origin Search Z-phase Search Count 0 to 32767 [times]
*23/*24 Automatic Origin Search Z-phase Search Range
0 to 2147483647/Automatic Origin Search Z-phase Pulse Count [pulses]
*25 Automatic Origin Search Deviation Pulse Clear Time 0 to 32767 [ms]
*26/*27 Automatic Origin Search Origin Offset Value -2147483648 to 2147483647 [pulses]
*41 Command Code
0: Start Positioning command 1: Decelerate and Stop command 2: Origin Search command 3: Set Parameters command 4: Set Current Position command 5: Reset Error command 6: Change Speed command 7: Change Target Position command 8: Automatic Origin Search command 9: Save Parameters command 99: Initialize Flash Memory command
*42 Target Position Mode 0: Absolute position, 1: Incremental position *43/*44 Target Position Reverse limit to forward limit [pulses]
*45 Acceleration/deceleration Mode
0: Trapezoidal acceleration/deceleration (with programmable startup speed) 1: S-shaped acceleration/deceleration
*46/*47 Target Speed 1 to speed limit [(1/65536) pulses/ms] *48 Acceleration Time 0 to 32767 [ms] *49 Deceleration Time 0 to 32767 [ms]
*50/*51 Startup Speed 0 to target speed [(1/65536) pulses/ms] (valid only for trapezoidal acceleration/deceleration)
*52 Origin Search Mode For details, see Table 3.73 (P221) *53 Origin Search Direction 0: Reverse, 1: Forward *54 Z-phase Edge Selection 0: Rising edge, 1: Falling edge *55 Z-phase Search Count 0 to 32767 [times]
*56/*57 Z-phase Search Range 0 to 2147483647/Z-phase search count [pulses] *58 Deviation Pulse Clear Time 0 to 32767 [ms]
The symbol �*� denotes the value of (axis number - 1). The values for axis 1 to axis 8 are 0 to 7 respectively.
Appendix A. F3YP14/18
262 TI 34M6K01-01E
Data Position Number Status Description or Data Range
*81/*82 Target Position Status [pulse] *83/*84 Current Position Status [pulse] *85/*86 Current Speed Status [(1/65536) pulses/ms]
*87 Contact Input Status States of contact inputs *88 Error Status Error code when an error occurs. *89 Alarm Status Alarm code when an alarm is generated. *90 Origin Search Status Status during and at the end of origin search
*91 Extended Status Operation status such as accelerating, constant speed, decelerating, changing speed, changing target position, etc.
*92/*93 Number of Flash Memory Write Operations 0 to 100,000 (times)
The symbol �*� denotes the value of (axis number - 1). The values for axis 1 to axis 8 are 0 to 7 respectively.
Appendix B. Mapping of Parameters Between New and Old YP Modules
TI 34M6K01-01E 263
Appendix B. Mapping of Parameters Between New and Old YP Models
B.1 Mapping of Parameters Between New and Old YP Models This table below lists the software changes required for migrating existing programs created for older versions of the ‘YP’ positioning modules (F3YP04/08) to the newer versions (F3YP14/18). Please note that new parameters of the newer versions of the ‘YP’ modules (F3YP14/18) are not included in this tables below. Note: The symbol ‘*’ denotes the value of (axis number - 1). The values for axis 1 to axis 8 are 0 to 7 respectively.
!!! : Denotes the slot where the positioning module is installed. Gray background: No change is required
" Registered Parameters
F3YP04/08 F3YP14/18 Data Position No. Data Position No. Parameter Name
*01 *04 Contact Input Polarity
*02/*03 *05/*06 Forward Limit
*04/*05 *07/*08 Reverse Limit
" Command Parameters
F3YP04/08 F3YP14/18 Data Position No. Data Position No. Parameter Name
*11 *41 Command Code
*12 *42 Target Position Mode
*13/*14 *43/*44 Target Position
*15/*16 *46/*47 Target Speed
*17 *48 Acceleration Time
*18 *49 Deceleration Time
*19/*20 *50/*51 Startup Speed
*21 *52 Origin Search Mode
*22 *53 Origin Search Direction
*23 *54 Z-phase Edge Selection
*24 *55 Z-phase Search Count
*25/*26 *56/*57 Z-phase Search Range
*27 *58 Deviation Pulse Clear Time
" Status
F3YP04/08 F3YP14/18 Data Position No. Data Position No. Parameter Name
*51/*52 *81/*82 Target Position Status
*53/*54 *83/*84 Current Position Status
*55/*56 *85/*86 Current Speed Status
*57 *87 Contact Input Status
*58 *88 Error Status
*59 *90 Origin Search Status
Appendix B. Mapping of Parameters Between New and Old YP Modules
264 TI 34M6K01-01E
" Input Relays " Output Relays F3YP04/08 F3YP14/18 F3YP04/08 F3YP14/18
Input Relay No. Input Relay No. Operation When On Output Relay
No. Output Relay No. Operation When On
X!!!01 X!!!01 Axis 1, Execute Command ACK Y!!!33 Y!!!33 Axis 1, Execute Command X!!!02 X!!!09 Axis 1, Stop Immediately ACK Y!!!34 Y!!!41 Axis 1, Stop Immediately X!!!03 X!!!17 Axis 1, Error Notification Y!!!35 Y!!!49 Axis 1, Forward Jogging X!!!04 X!!!25 Axis 1, End of Positioning Y!!!36 Y!!!57 Axis 1, Reverse Jogging X!!!05 X!!!02 Axis 2, Execute Command ACK Y!!!37 Y!!!34 Axis 2, Execute Command X!!!06 X!!!10 Axis 2, Stop Immediately ACK Y!!!38 Y!!!42 Axis 2, Stop Immediately X!!!07 X!!!18 Axis 2, Error Notification Y!!!39 Y!!!50 Axis 2, Forward Jogging X!!!08 X!!!26 Axis 2, End of Positioning Y!!!40 Y!!!58 Axis 2, Reverse Jogging X!!!09 X!!!03 Axis 3, Execute Command ACK Y!!!41 Y!!!35 Axis 3, Execute Command X!!!10 X!!!11 Axis 3, Stop Immediately ACK Y!!!42 Y!!!43 Axis 3, Stop Immediately X!!!11 X!!!19 Axis 3, Error Notification Y!!!43 Y!!!51 Axis 3, Forward Jogging X!!!12 X!!!27 Axis 3, End of Positioning Y!!!44 Y!!!59 Axis 3, Reverse Jogging X!!!13 X!!!04 Axis 4, Execute Command ACK Y!!!45 Y!!!36 Axis 4, Execute Command X!!!14 X!!!12 Axis 4, Stop Immediately ACK Y!!!46 Y!!!44 Axis 4, Stop Immediately X!!!15 X!!!20 Axis 4, Error Notification Y!!!47 Y!!!52 Axis 4, Forward Jogging X!!!16 X!!!28 Axis 4, End of Positioning Y!!!48 Y!!!60 Axis 4, Reverse Jogging X!!!17 X!!!05 Axis 5, Execute Command ACK Y!!!49 Y!!!37 Axis 5, Execute Command X!!!18 X!!!13 Axis 5, Stop Immediately ACK Y!!!50 Y!!!45 Axis 5, Stop Immediately X!!!19 X!!!21 Axis 5, Error Notification Y!!!51 Y!!!53 Axis 5, Forward jogging X!!!20 X!!!29 Axis 5, End of Positioning Y!!!52 Y!!!61 Axis 5, Reverse jogging X!!!21 X!!!06 Axis 6, Execute Command ACK Y!!!53 Y!!!38 Axis 6, Execute Command X!!!22 X!!!14 Axis 6, Stop Immediately ACK Y!!!54 Y!!!46 Axis 6, Stop Immediately X!!!23 X!!!22 Axis 6, Error Notification Y!!!55 Y!!!54 Axis 6, Forward Jogging X!!!24 X!!!30 Axis 6, End of Positioning Y!!!56 Y!!!62 Axis 6, Reverse Jogging X!!!25 X!!!07 Axis 7, Execute Command ACK Y!!!57 Y!!!39 Axis 7, Execute Command X!!!26 X!!!15 Axis 7, Stop Immediately ACK Y!!!58 Y!!!47 Axis 7, Stop Immediately X!!!27 X!!!23 Axis 7, Error Notification Y!!!59 Y!!!55 Axis 7, Forward Jogging X!!!28 X!!!31 Axis 7, End of Positioning Y!!!60 Y!!!63 Axis 7, Reverse Jogging X!!!29 X!!!08 Axis 8, Execute Command ACK Y!!!61 Y!!!40 Axis 8, Execute Command X!!!30 X!!!16 Axis 8, Stop Immediately ACK Y!!!62 Y!!!48 Axis 8, Stop Immediately X!!!31 X!!!24 Axis 8, Error Notification Y!!!63 Y!!!56 Axis 8, Forward Jogging X!!!32 X!!!32 Axis 8, End of Positioning Y!!!64 Y!!!64 Axis 8, Reverse Jogging