Introduction To FX Positioning Control Systems
Introduction To FX Positioning Control Systems
Foreword
This document contains text, diagrams and explanations to guide the reader in understanding positioning control. Store this document in a safe place so that you can take it out and read it whenever necessary.
This document confers no industrial property rights or any rights of any other kind, nor does it confer any patent licenses. Mitsubishi Electric Corporation cannot be held responsible for any problems involving industrial property rights which may occur as a result of using the contents noted in this document.
Outline Precautions
This document provides information for the use of the FX Series Programmable Controllers. The document has been written to be used by trained and competent personnel. The definition of such a person or persons is as follows: 1) Any engineer who is responsible for the planning, design and construction of automatic equipment using the product associated with this document should be of a competent nature, trained and qualified to the local and national standards required to fulfill that role. These engineers should be fully aware of all aspects of safety with regards to automated equipment. 2) Any commissioning or service engineer must be of a competent nature, trained and qualified to the local and national standards required to fulfill that job. These engineers should also be trained in the use and maintenance of the completed product. This includes being completely familiar with all associated documentation for the said product. All maintenance should be carried out in accordance with established safety practices. 3) All operators of the completed equipment should be trained to use that product in a safe and coordinated manner in compliance to established safety practices. The operators should also be familiar with documentation which is connected with the actual operation of the completed equipment. Note: The term 'completed equipment' refers to a third party constructed device which contains or uses the products associated with this document
The products in this document have been manufactured as general-purpose parts for general industries and have not been designed or manufactured to be incorporated in a device or system used in purposes related to human life. Before using the products in this document for special purposes such as nuclear power, electric power, aerospace, medicine or passenger movement vehicles, consult with Mitsubishi Electric. The products in this document have been manufactured under strict quality control. However, when installing the product(s) where major accidents or losses could occur if the product fails, install appropriate backup or failsafe functions in the system. When combining the products in this document with other products, please confirm the standard and the code, or regulations with which the user should follow. Moreover, please confirm the compatibility of the products to the system, machine and apparatus which a user is using. If in doubt at any stage during the installation of the product(s), always consult a professional electrical engineer who is qualified and trained to the local and national standards. If in doubt about the operation or use, please consult the nearest Mitsubishi Electric distributor. Since the examples indicated by this document, technical bulletin, catalog, etc. are used as a reference, please use it after confirming the function and safety of the equipment and system. Mitsubishi Electric will accept no responsibility for actual use of the product(s) based on these illustrative examples. This documents content, specification etc. may be changed without a notice for improvement. The information in this document has been carefully checked and is believed to be accurate; however, if you have noticed a doubtful point, a doubtful error, etc., please contact the nearest Mitsubishi Electric distributor.
Registration
Microsoft and Windows are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries. The company name and the product name to be described in this document are the registered trademarks or trademarks of each company.
Table of Contents
Introduction ............................................................................................................................... 5
1.1 What is positioning control? ............................................................................................................ 7 1.2 Actuators for positioning.................................................................................................................. 7 1.3 Positioning method type.................................................................................................................. 9
12
2.1 Advantages for using an AC servo system ................................................................................... 12 2.2 Examples of AC servo systems .................................................................................................... 13
15
26
Introduction
The purpose of this document is to guide beginners in understanding the basics of positioning control from general system setup examples to specific programming examples using the FX Series positioning family of controllers. After exploring the roles of the necessary positioning components, an overview of each product in the FX Family will be given in order to start programming. The following manuals are relevant sources and should be referred to when needed. Essential manual Manual required depending on application Manual with additional manual for detailed explanation
Manual name Manual number Contents Model name code
09R516
09R508
09R509
FX2NC (D/UL) Series Hardware Manual FX1N Series Hardware Manual FX1S Series Hardware Manual
09R509
09R511
09R510
Programming
Additional Manual FX3U/FX3UC Series Items related to programming in PLCs Programming Manual including explanation of basic instructions, JY997D16601 Basic & Applied Instruction applied instructions and various devices in Edition FX3U/FX3UC PLCs. FX Series Programming Manual II JY992D88101 Items related to programming in PLCs including explanation of basic instructions, applied instructions and various devices in FX1S/FX1N/FX2N/FX2NC PLCs. 09R517
Additional Manual
09R512
Manuals for communication control Common When using each product, refer also to the main unit manual for the PLC main unit to be installed.
Additional Manual FX Series Users Manual Data Communication Edition Details of simple link between PCs, parallel JY997D16901 link, computer link and no-protocol communication (RS instructions, FX2N-232IF) 09R715
Essential manual Manual required depending on application Manual with additional manual for detailed explanation
Manual name Manual number Contents Model name code
Manuals for positioning control Common When using each product, refer also to the main unit manual for the PLC main unit to be installed.
Additional Manual FX3U/FX3UC Series User's Manual Positioning Control Edition JY997D16801 Details of positioning functions of FX3U/FX3UC Series
09R620
Pulse output and positioning When using each product, refer also to the main unit manual for the PLC main unit to be installed.
Supplied with product Supplied with product Supplied with product Additional Manual Supplied with product Supplied with product Additional Manual Additional Manual FX3U-2HSY-ADP Installation Manual FX2N/FX-1PG User's Manual FX2N-10PG Installation Manual FX2N-10PG User's Manual FX2N-10GM User's Guide Procedures for handling the high-speed output special adapter JY997D16401 When using, refer also to FX3U/FX3UC Series User's Manual - Positioning Control Edition. JY992D65301 Procedures for handling the 1-axis pulse output special function block Procedures for handling the 1-axis pulse output special function block When using, refer to FX2N-10PG User's Manual. Details of 1-axis pulse output special function block
09R610
JY992D91901
JY992D93401
09R611
Procedures for handling the 1-axis positioning special function unit JY992D77701 When using, refer to FX2N-10GM/FX2N-20GM Hardware/Programming Manual. Procedures for handling the 2-axis positioning special function unit JY992D77601 When using, refer to FX2N-10GM/FX2N-20GM Hardware/Programming Manual. JY992D77801 JY993D86801 Procedures for handling the 1-axis/2-axis positioning special function unit Procedures for handling the 1-axis/2-axis positioning special function unit
09R612 09R612
Manuals for FX3U-20SSC-H Positioning Block SSCNET-III When using each product, refer also to the main unit manual for the PLC main unit to be installed.
Supplied with product Additional Manual Supplied with product FX3U-20SSC-H Installation Manual FX3U-20SSC-H User's Manual FX Configurator-FP Operation Manual Procedures for handling the 2-axis positioning special function block JY997D21101 When using, refer to FX3U-20SSC-H User's Manual. JY997D21301 JY997D21801 Describes FX3U-20SSC-H Positioning block details. Describes operation details of FX Configurator-FP Configuration Software.
-
09R622 09R916
1
The Basics of Positioning Control
1.
1.1
2
Positioning by AC Servo System
3
Components of Positioning Control
4
Learning to Use FX Positioning Control
1.2
Schematic drawing
Air cylinder
Pneumatic
Air source and high grade piping are required. High torque is not available. Multi-point positioning is complex and very difficult to achieve. Change in positioning is difficult.
Compressor
Workpiece
Brake motor
Positioning mechanism is simple. Repeatability is poor. Change in positioning is difficult. (When optical sensors or limit switches are used for stop)
Actuator(s)
Schematic drawing
Constant quantity feed hopper
Clutch brake
Frequent positioning is possible. Life of friction plate is limited. Change in positioning is difficult. (When optical sensors or limit switches are used for stop)
Speed reducer
Stepping motor
Simple positioning mechanism. If load is heavy, motor may step out and displacement can occur. Motor capacity is small. Precision is poor at high speed.
Controller
Positioning precision is accurate. Maintenance is required for motor DC servo system brushes. It is not suitable for rotation at high speed.
DC servo motor
Lifter
Multi-speed positioning is available using a high-speed counter. General purpose inverter and High precision positioning is not general purpose available. motor Large torque is not available at start. (Specialized inverter is required)
General-purpose inverter
Positioning precision is good. Maintenance is not required. Positioning address can be easily AC servo system changed. It is compact, and offers high power.
Cutter
1.3
1
The Basics of Positioning Control
2
Positioning by AC Servo System
Two limit switches are provided in places where a systems moving part passes. At the first limit switch, the motor speed is reduced. At the second limit switch, the motor turns off and the brake turns on to stop the moving part. Limit switch In this method, because position controllers are not required, the method system configuration can be realized at reasonable cost.
3
Components of Positioning Control
4
Learning to Use FX Positioning Control
Movement distance
A position detector (such as a pulse encoder) is set up in a motor or rotation axis. The pulse number generated from the position detector is counted by a high-speed counter. When the pulse number reaches the preset value, the moving part stops. Pulse count In this method, because limit method switches are not used, the stop position can be easily changed.
IM: Inductive motor PLG: Pulse generator INV: Inverter PLC: Programmable controller High speed Low speed Movement distance
An AC servo motor which rotates in proportion to the input pulse number is used as the drive motor. When the pulse number corresponding to the movement distance is input to the servo amplifier of the AC servo motor, positioning can be performed at high speed in proportion to the pulse frequency. (Guideline of stopping precision: Approximately 0.01 to 0.05 mm)*1
Movement distance
*1.
The stop precision shows a value in a case where the low speed is 10 to 100 mm/s.
1. Speed Control
In speed control applications with inverters, stop precision is not very accurate. With the limit switch method, a system operates without any feedback to the controller to indicate the location of the workpiece. With the pulse count method, the speed can be changed and the stop command can be executed at specific distances (at specific timings) according to the feedback from the pulse generator connected to the motor. Both the limit switch method and the pulse count method, however, are subject to a loss in stop precision due to the dispersion of distance that occurs for workpieces at different speeds. When automatically stopping a moving part driven by a motor, stop the motor by a position signal (using a limit switch or pulse count comparison). In general conditions, turn on the brake at the same time. The moving part continues by a coasting distance until it completely stops, after the stop command is given. The coasting distance is not controlled and it is represented as the shaded part in the figure below.
Speed
Coasting distance
Stop command
Time Stop
Dispersion in the stop distance changes as shown below. Dispersion is affected by the speed of the workpiece when the stop command is given and the speed reduction time delay after stop.
Speed Speed reduction start Time delay
Stop command
Stop
Stop
If the required stop precision is not satisfactory when stopping from the normal operation speed, the most effective method to improve the stop precision is to reduce the operation speed. However, if the operation speed is simply reduced, the machine efficiency may also be reduced. Therefore, in actual operation, the motor speed can be reduced from a high speed to a low speed before the motor is stopped, as shown below.
Speed High speed Time delay Poor stop precision Low speed Time Stop command Stop Speed reduction command Improved stop precision Speed High speed
10
2. Position control
Using the pulse command method with a servo amplifier, the weak points described above for speed control are improved. A pulse encoder is attached to the servo motor to detect the motor rotation quantity (workpiece movement distance) and feed the information directly to the servo amplifier in order to continuously and directly control the high-speed positioning operation to the target position. This method allows the workpiece to stop with better precision and eliminates the coasting and dispersion distance at stop. Furthermore, limit switches to stop normal positioning operations, along with counting methods from the PLC are not needed.
1
The Basics of Positioning Control
2
Positioning by AC Servo System
3
Components of Positioning Control
4
Learning to Use FX Positioning Control
11
2.
2.1
PLG Encoder
The positioning controller generates a specified quantity of forward rotation (or reverse rotation) pulses at a specified frequency.
The command pulse number is subtracted by the feedback pulse number, and the speed command to drive the servo motor is made from the deviation (accumulated pulse number). When the accumulated pulse number becomes 0, the servo motor stops.
The servo motor is equipped with a built-in encoder (pulse generator), dedicated to high speed response, and suitable for positioning control.
In the latest AC servo systems, conventional weak points have been improved as follows: Although the latest systems are completely digital, they are equipped with parameters in conformance to diversified mechanical specifications and electrical specifications so that simple set-up is possible. As frequent operation is enabled by a low inertia motor, the maximum torque is increased and the system can be applied to a wide variety of machines. The latest systems are equipped with an auto tuning function, with which the servo amplifier automatically detects the load inertia moment and adjusts the gain. This is possible even if the load inertia moment is unknown. The command communication cycle from the controller to the servo amplifier is improved for synchronization accuracy and better speed/positioning accuracy. The latest systems also allow for long-distance wiring, reduced noise resistance, and simplified wiring. The top advantages to using an AC servo system are described below.
Compact and light servo system In the FA workplace, a downsized AC servo system occupying less space is beneficial. Robust servo system In accordance with severe operation conditions, a tougher AC servo system is often required. Easy servo system AC servo systems are easier to handle than hydraulic equipment. Easy systems are also flexible for new staff. Good cost performance servo system An AC servo system with good cost performance saves a company in overall engineering costs.
12
2.2
1
The Basics of Positioning Control
2
Positioning by AC Servo System
3
Components of Positioning Control
Constant feed
In the press/shear process for cutting, punching, etc., the processed material is positioned with high precision to produce a constant sized product.
Uncoiler
Roll feeder
4
Learning to Use FX Positioning Control
Servo motor
Workpiece Drill M
Tapping
In order to tap a workpiece, 1. Quick feed, 2. Cutting feed and 3. Quick return are performed repeatedly.
Slide Timing belt M Pulley Feed motor Quick return Quick feed Cutting feed Ball screw
Drilling
In order to perform processing on a flat face, positioning with high Drilling in steel precision is performed by two motors sheet (X axis feed motor and Y axis feed motor).
M M
Index table
Index table
The position of the circular table is indexed. The index position is set on the outside (digital switch) or the inside (program). Shortcut drive is performed depending on the index position.
13
Type of machine
Description
Schematic drawing
Servo amplifier
Lifter movingup/down
As negative load is applied on the servo motor in positioning of the lifter in the vertical direction, a regenerative option is also used. In order to hold the lifter stationary and prevent drop of the lifter by power interruption, a servo motor with an electromagnetic brake is used.
Lifter
Servo motor
Regenerative option
Cart
A servo motor is mounted in the travel cart as the drive source. A mechanism such as rack and pinion is adopted to prevent slippage between the wheels and rails.
Drive wheel (on each of left and right sides)
Carrier robot
After the conveyor stops, the 2-axis servo system and the arm lifting mechanism transfer workpieces to a palette. The workpiece input positions on the palette can be set to many points so that setup change can be easily performed, even if the palette position and the palette shape change.
Travel head Y direction Slide arm Pallet Arm vertical axis (driven by air cylinder) Workpiece Conveyor Servo motor to drive travel head Servo motor to drive slide arm X direction
14
1
The Basics of Positioning Control
3.
2
Positioning by AC Servo System
3
Components of Positioning Control
4
Learning to Use FX Positioning Control
15
Position controller
AC power supply
Outputs the positioning speed and the movement quantity in command pulses to the servo amplifier. Transfers signals between the programmable controller. Controls return to the zero point.
Breaker
Electromagnetic contactor
Power board
Improves the power factor and cuts noise. Protects the power circuit.
In some types, the limit switch signal is wired to the position controller. Main circuit Position controller Converter Positioning command Command control pulse Parameter Zero point return control Servo ready Zero point signal (PG0)
Servo amplifier
AC
DC
Speed Deviation command counter Current (Electronic gear) control Pulse magnification Counter clear
10
Operation switch
Operation equipment
Gives inputs for manual/automatic mode, start/ stop, zero point return command, manual forward rotation/reverse rotation and manual pulse generator to the positioning controller.
Rectifies the AC power of the main circuit into the DC power in the converter, and smooths it in the smoothing circuit. When the DC power is converted into AC power in the inverter, the current supplied to the servo motor is changed by the PWM (pulse width modulation) control in the control circuit. The deviation counter receives and counts the command pulses from the positioning controller, subtracts the feedback pulses from them, then drives the servo motor until the accumulated pulse number becomes 0.
90
80
70
60
16
1
The Basics of Positioning Control
Servo motor
2
Positioning by AC Servo System
Dedicated to high speed response optimal to positioning control, has large start torque, large maximum torque and wide variable speed range 1/1 or more (1/1,000 to 1/5,000).
3
Components of Positioning Control
W hen a moving element goes beyond a limit switch (LS), the motor stops.
Servo motor
4
Learning to Use FX Positioning Control
Drive mechanism
In the case of large motor Cooling fan Limit switch (LS) Servo motor Speed reducer
Ball screw
Moving element
SM
Personal Computer
The actuator (moving part drive mechanism) is equipped with speed reducer, timing belt, ball screw and limit switch. Diversified auxiliary devices are also controlled in accordance with positioning. The PLC or the positioning controller also controls auxiliary devices. The auxiliary device operation completed signal is output to the PLC or the position controller.
Used to write programs to the position controller, allows setting and display of the data.
17
3.1
Positioning controller
Positioning controllers use programs and parameters to send positioning commands to the servo amplifier. Contents related to programs and parameters are described below.
3.1.1
1. PLS/DIR method
In the PLS/DIR method, one output sends pulses to the drive unit while the other output specifies the direction of travel.
Forward rotation Output #1 Output #2 Pulse train H L Direction Reverse rotation
H L
ON*1
OFF*1
*1.
ON and OFF represent the status of the controllers output. H and L respectively represent the HIGH status and the LOW status of the waveform. The command pulse pattern in the figure assumes negative logic.
2. FP/RP method
In the FP/RP method, each output has a different direction and operates individually to send pulses to the drive unit.
Forward rotation
Output #1 Output #2 Forward rotation H pulse train (FP) L Reverse rotation H pulse train (RP) L OFF*2
Reverse rotation
OFF*2
*2.
ON and OFF represent the status of the controllers output. H and L respectively represent the HIGH status and the LOW status of the waveform. The command pulse pattern in the figure assumes negative logic.
18
3.1.2
1
The Basics of Positioning Control
1. Feed quantity
The feed quantity determined by the target address tells the servo system how far to move the workpiece. So, for example, if a servo motor encoder generates 8,192 pulses for one rotation, the command pulse number 8,192 can be output to rotate the servo motor by 1 rotation.
2
Positioning by AC Servo System
2. Feed speed
The feed speed defines the amount of travel per unit of time for the workpiece. When a servo motor encoder generates 8,192 pulses for one rotation, the command pulse frequency (speed) 8,192 pulses/s should be output to rotate the servo motor by 1 rotation per second. Decrease the pulse frequency to rotate the servo motor at a lower speed. Increase the pulse frequency to rotate the servo motor at a higher speed.
3
Components of Positioning Control
3. Acceleration/deceleration time
When the start command is given, acceleration, operation at constant speed, and deceleration are performed for positioning. Set the acceleration time and the deceleration time in the controllers parameters.
Parameter: Max. speed Positioning speed
4
Learning to Use FX Positioning Control
Speed
19
3.1.3
Deceleration time Creep speed Zero point DOG switch DOG Forward end
Zero point return speed DOG switch activated Initial position Zero point return direction DOG Backward end
CLEAR signal * * The location of the DOG switch should be adjusted so that the backward end of the DOG is released between two consecutive zero point signals (1 pulse per rotation of the motor). In this example, the DOG length should not be less than the deceleration distance of the machine. Limit switch DOG switch
Initial position
Zero point
DOG search function In some PLC models, if the zero point return function is performed while the workpiece is stopped beyond the DOG switch, the machine moves until the limit switch is actuated, changes direction, then returns to the zero point again (DOG search function, zero point return retry function).
Escape operation
20
3.2
1
The Basics of Positioning Control
2
Positioning by AC Servo System
3.2.1
3
Components of Positioning Control
3.2.2
4
Learning to Use FX Positioning Control
3.2.3
3.2.4
21
3.2.5
SM
PLG
Position controller
These contacts of the dynamic brake turn ON when the power is interrupted.
Motor stop characteristics when the dynamic brake is actuated When the dynamic brake is not actuated Time Power: OFF Contacts of dynamic brake: ON
22
3.3
Drive mechanism
The drive mechanism converts the rotation motion of the servo motor into reciprocating or vertical motion through a speed reducer, timing belt, ball screw, etc. to move the machine.
1
The Basics of Positioning Control
3.3.1
2
Positioning by AC Servo System
3
Components of Positioning Control
PB
Pf Servo amplifier
v0 : Moving part speed during quick feed (mm/min) PB : Lead of ball screw (mm/rev) 1
n
4
Learning to Use FX Positioning Control
S : Transfer distance per rotation of motor (mm/rev) f0 N0 : Number of rotations of motor during quick feed (rev/min) Pf : Feedback pulse number (pulse/rev) Position controller f0 : Command pulse frequency during quick feed (pulse/sec)
The servo motor stops with the precision , which is within 1 pulse against the command pulse. The movement quantity of the workpiece is: [Output pulses from position controller] x [ ] The moving part speed is: [f0] x [ ] Either mm, inch, degree, or pulse can be selected for the positioning command unit. Accordingly, when data such as the movement quantity per pulse, positioning speed, or the positioning address in accordance with the positioning command unit are set, pulse trains are output for the target address, and positioning is performed.
23
Useful equations To define the system illustrated above, and v0 need to be determined using a series of equations. The speed of the moving part (v0) is constrained by the mechanical gearing system between the servo motor and moving part, the pitch of the ball screw, and the specification of the motor as shown through the following two formulas. Transfer distance per rotation of motor
S
mm rev = PB
1 n
N0
If N0 does not exceed the rated speed of the motor, this means that the servo system can be used for the application. In order to determine if the positioning controller is applicable, the command pulse frequency during quick feed (f0) should be checked to verify it does not exceed the maximum allowable frequency setting for the maximum speed parameter setting of the controller. Transfer distance per pulse
mm PLS =
S Pf
N0
1 60
During the above process, the Electronic gear ratio (often CMX/CDV for Mitsubishi servos) and Speed reduction ratio can be adjusted to fit the applications needs. In each of the absolute and incremental positioning methods, the entire movement distance of the machine should not exceed the maximum allowable pulse output number from the positioning controller.
24
3.3.2
1
The Basics of Positioning Control
1. Absolute method
In this method, a point (absolute address) is specified for positioning while the zero point is regarded as the reference. The start point is arbitrary.
Address 100 Address 100 Address 150 Address 300 Address 150 Address 100 Address 150 0 Zero point 100 Point A 150 Point B 300 Point C Start point End point
2
Positioning by AC Servo System
3
Components of Positioning Control
4
Learning to Use FX Positioning Control
2. Incremental method
In this method, positioning is performed through specification of the movement direction and the movement quantity while the current stop position is regarded as the start point.
Movement quantity +100 Movement quantity +100 Movement quantity -100 Start point End point
Movement quantity +100 Movement quantity -150 Movement quantity -100 Movement quantity +50 0 Zero point 100 Point A 150 Point B 300 Point C
25
4.
4.1
4.1.1
Overview of control
1. Number of Axes
The FX1S and FX1N transistor type PLCs support positioning on 2 axes with operation speeds up to 100,000 pulses/second (100 kHz). The FX3U(C) transistor type PLC main units support positioning speeds up to 100 kHz on 3 axes. If two FX3U-2HSY-ADP adapters are connected to the FX3U, 4 axes are available with operation speeds up to 200 kHz. The PLS/DIR pulse output method is used for all PLC main units to output pulses as shown in the following table.
1st Axis Applicable Model Pulse Output Direction Output*
1
3rd Axis
4th Axis
Output terminals for direction can be specified arbitrarily when the FX3U-2HSY-ADP is not used. Y4, Y5, Y6 and Y7 are used as an example. The FP/RP pulse output method is also available with the FX3U-2HSY-ADP. The FX3UC can not be connected with the FX3U-2HSY-ADP.
26
2. Limit switches
As with any other positioning system, inputs are needed to detect when the workpiece reaches the outer boundary limits in order to prevent damage to the machine. For the FX3U(C) programmable logic controller, limits are wired to the controller to be used with the DOG search zero return function for reversing the motors direction of travel in order to hunt for the DOG switch. These limits are called the forward rotation limit (LSF) and the reverse rotation limit (LSR). Hardware limits are used on the servo amplifier side to stop the motor in worst case scenarios. Example of limit switches for the FX3U(C) PLC:
Reverse rotation limit 2 (Servo amplifier side) Servo motor Reverse rotation Forward rotation Reverse rotation limit 1 (Programmable controller side) LSR Forward rotation limit 1 (Programmable controller side) LSF Forward rotation limit 2 (Servo amplifier side)
1
The Basics of Positioning Control
2
Positioning by AC Servo System
3
Components of Positioning Control
4
Learning to Use FX Positioning Control
JOG operation The motor moves in a specified direction depending on the logic and timing of the drive input signal. (There is no target position.)
DRVI
Start JOG command Start Speed Operation speed Stop Stop
1-speed positioning A start command accelerates the motor to a constant speed and moves the workpiece to a specified distance.
DRVI DRVA
Start Travel distance Target position
27
Applicable Model
Description
Positioning instruction
Instruction Illustration
Zero return The machine moves at a specified speed until the DOG input turns ON. The workpiece then slows to creep speed and stops before the CLEAR signal is output.
Speed
Creep speed
ZRN
Zero point DOG input ON CLEAR signal Start
Variable speed operation After starting with a specified speed, the motor can change its speed depending on commands from the PLC. (For the FX1S and FX1N, acceleration to different speeds is approximated with the RAMP instruction) Interrupt 1-speed positioning When an interrupt signal turns ON, the workpiece travels a specific distance at the same speed before decelerating to stop.
Speed
PLSV (RAMP)
Start Speed change Speed change
Speed
Travel distance
FX3U(C)
DVIT
Interrupt input
FX3U(C)
DOG search zero return The machine operates similar to the zero return instruction except for features to hunt for the DOG switch and to use the zero-phase signal.
DSZR
Input
FX3U(C)
Table operation For programming simplicity, position and speed data can be organized in table format for the DRVI, DRVA, DVIT and PLSV instructions.
DTBL Input
Y0
DTBL
Input
DTBL
Y0
K2
DTBL
Y0
K3
28
4.1.2
1
The Basics of Positioning Control
2
Positioning by AC Servo System
Programmed immediately after a positioning instruction. Turns ON when the preceding FX1S, FX1N, FX3U(C) instruction finishes its operation and stays ON until the instruction stops being driven. Enables a CLEAR signal to be output to the servo. Stop outputting Y000 pulses. (Immediate stop) OFF when Y000 is READY ON when Y000 is BUSY Programmed immediately after a positioning instruction. Turns ON when an instruction fails to complete correctly and stays ON until the instruction stops being driven. Enables an output to be used for the CLEAR signal for Y000. OFF ON Reverse rotation Forward rotation FX1S, FX1N FX1S, FX1N FX3U(C) FX1S, FX1N FX3U(C) FX3U(C)
3
Components of Positioning Control
4
Learning to Use FX Positioning Control
1-bit
M8341 M8342 M8343 M8344 M8348 M8464 D8145 D8342 D8146 D8343
Forward pulses on Y000 stop when this relay turns ON. Reverse pulses on Y000 stop when this relay turns ON. OFF when a positioning instruction is not active. ON when a positioning instruction is active. Enables the output terminal for the CLEAR signal to be changed for Y000. Sets the bias speed for Y000. Sets the maximum instructions on Y000. speed for positioning
16-bit
Maximum speed [Hz] Acceleration/ deceleration time [ms] Acceleration time [ms] Deceleration time [ms] CLEAR signal device specification
Sets the acceleration and deceleration time. Sets the acceleration time for Y000. Sets the deceleration time for Y000. Sets the output terminal for the CLEAR signal for Y000.
29
4.1.3
Program examples
Two positioning examples are included as a reference to get started with PLC programming.
*Use this for FX3U(C) PLCs M8349 *Use this for FX1S and FX1N PLCs
Stops outputting Y000 pulses. (Immediate stop) Stops outputting Y000 pulses. (Immediate stop) Resets "zero return completion" flag. Resets "forward rotation positioning completion" flag. Resets "reverse rotation positioning completion" flag. Enables the zero return operation with CLEAR signal outputting function. (CLEAR signal: Y010)
M8145
RST RST
M10 M11
RST
M12
M8464 M8341 *Use this for FX1S and FX1N PLCs M8140 Return to the zero point with CLEAR signal output Y002.
30
1
The Basics of Positioning Control
*Use this for FX3U(C) PLCs S0 S20 S21 M8349 Y000 output stop M5 Operation is stopped.
Return to Positioning Positioning zero point in forward in reverse rotation rotation *Use this for FX1S and FX1N PLCs S0 S20 S21
2
Positioning by AC Servo System
M5 Operation is stopped.
Return to Positioning Positioning zero point in forward in reverse rotation rotation M8002 Initial pulse
3
Components of Positioning Control
FNC 12 DMOV FNC 12 MOV FNC 12 MOV FNC 12 MOV K100000 K500 K100 K100 D8343 D8342 Sets the maximum speed. 100,000(Hz) D8344,D8343 Sets the bias speed. 500(Hz) D8342 Sets the acceleration time. 100(ms) D8348 Sets the deceleration time. 100(ms) D8349
D8348 D8349
4
Learning to Use FX Positioning Control
*Use this for FX1S and FX1N PLCs FNC 12 DMOV FNC 12 MOV FNC 12 MOV K100000 K500 D8146 D8145 Sets the maximum speed. 100,000(Hz) D8147,D8146 Sets the bias speed. 500(Hz) D8145 Sets the acceleration/ deceleration time. 100(ms) D8148
K100
D8148
X001
M5
Resets "zero return completion" flag. Resets "forward rotation positioning completion" flag. Resets "reverse rotation positioning completion" flag. Enters the zero point return state (S0).
M5
M10
Resets "forward rotation positioning completion" flag. Resets "reverse rotation positioning completion" flag. Enters the foward rotation positioning state (S20).
M5
M10
Resets "forward rotation positioning completion" flag. Resets "reverse rotation positioning completion" flag. Enters the reverse rotation positioning state (S21).
31
S0
Zero return Zero return instruction (CLEAR signal: Y010: FX3U(C) Y002: FX1S,FX1N)
X005
Y000
M8029 "Execution completion" flag Zero return *Use this for FX3U(C) PLCs M8340 M50 #1)
Y000 Waiting for Outputting 1 scan time *Use this for FX1S and FX1N PLCs M8147 M50
RST
S0
RST
S0
STL M51 Waiting for 1 scan time Positioning in forward rotation direction X004 *1 FNC 159 DDRVA K500000 K100000 Y000
S20
Positioning in forward rotation direction Moves to absolute position 500000 using the drive to Absolute instruction. (Y004=ON)
Stop command
Y004
Rotation direction signal
M8029 "Execution completion" flag *Use this for FX3U(C) PLCs M8340 M51
Designation Output Pulse of absolute pulse output position frequency destination number
SET
M11
#2)
RST Y000 Waiting for Outputting 1 scan time *Use this for FX1S and FX1N PLCs M8147 M51 RST
S20
S20
M51
*1. *2.
To stop the positioning operation, be sure to insert the stop contact before the positioning instruction so that STL instruction cannot be turned off (reset) until "pulse output monitor" flag (M8340 or M8147 (for Y000)) is turned off. To prevent simultaneous activation of positioning instructions, the instruction activation timing should be delayed by 1 scan time.
32
1
The Basics of Positioning Control
STL M52 Waiting for 1 scan time M8029 "Execution completion" flag *Use this for FX3U(C) PLCs M8340 M52 RST S21 X004
*3
S21
Positioning in reverse rotation direction Moves to absolute position 100 using the drive to Absolute instruction. (Y004=OFF)
Stop command
K100
K100000
Y000
Y004
2
Positioning by AC Servo System
Designation Output Pulse Rotation of absolute pulse output direction position frequency destination signal number
SET
M12
"Reverse rotation positioning completion" flag Ends the positioning operation in the reverse rotation direction. (Self-reset)
#3)
3
Components of Positioning Control
Y000 Waiting for Outputting 1 scan time *Use this for FX1S and FX1N PLCs M8147 M52
RST
S21
4
Learning to Use FX Positioning Control
RET
END *3. *4. To stop the positioning operation, be sure to insert the stop contact before the positioning instruction so that STL instruction cannot be turned off (reset) until "pulse output monitor" flag (M8340 or M8147 (for Y000)) is turned off. To prevent simultaneous activation of positioning instructions, the instruction activation timing should be delayed by 1 scan time.
The DTBL instruction helps to simplify the programming code and is set up beforehand (along with positioning parameters such as the bias speed, acceleration/deceleration, etc.) with GX Developer.
33
Forward positioning Output pulse frequency: 100,000 Hz 100 Origin after zero return
In this example, positioning may be performed arbitrarily along the path to the left. Using the JOG command, the workpiece is moved to any relative position. This is not illustrated to the left.
Required hardware and software are as follows: 1) FX3U(C) PLC version 2.20 or later 2) GX Developer 8.23Z or later Parameters for the DTBL instruction are set in GX Developer as shown below.
a) Double-click [Parameter] and then [PLC parameter] from the project tree on the left side of the screen. If the project tree is not displayed on the screen, click [View] on the menu bar, and then click [Project Data List].
b) Click on the [Memory capacity] tab and then enter a check in the [Positioning Instruction Settings] check box. Take note that 9,000 steps are needed to set the positioning data. Therefore, it is necessary to specify a [Memory capacity] of 16,000 steps or more.
34
1
The Basics of Positioning Control
c) Click on the [Positioning] tab and then set Y000 (pulse output destination) as follows. Setting item Bias speed (Hz) Maximum speed (Hz) Creep speed (Hz) Zero return speed (Hz) Acceleration time (ms) Deceleration time (ms) Interrupt input for DVIT instruction Setting value 500 100,000 1000 50,000 100 100 X000
2
Positioning by AC Servo System
3
Components of Positioning Control
d) Click the [Individual setting] button. The Positioning instruction settings window will appear. In this window, click on the [Y0] tab to display the positioning table for Y000 (pulse output destination). Set the data in the positioning table as follows: Setting item Rotation direction signal First device Positioning type No. 1 Number of pulses (PLS) Frequency (Hz) Positioning type Be sure to change the [Rotation direction signal] to Y004. e) Click the [OK] button and then the [End] button to close the parameters. f) Create the ladder program as shown below. No. 2 Number of pulses (PLS) Frequency (Hz) Positioning type No. 3 Number of pulses (PLS) Frequency (Hz) Positioning type No. 4 Number of pulses (PLS) Frequency (Hz) R0 DDRVI (Drive to increment) 999,999 30,000 DDRVI (Drive to increment) -999,999 30,000 DDRVA (Drive to absolute) 500,000 100,000 DDRVA (Drive to absolute) 100 100,000 Setting value Y004
4
Learning to Use FX Positioning Control
35
g) Once the ladder program is complete, click on [Online] from the top menu bar in GX Developer and select [Write to PLC]. The Write to PLC window will appear. h) Click the [Param + Prog] button and then click the [Execute] button. The parameters and the created program will be transferred to the PLC. To enable the transferred parameters, stop the PLC and then restart it.
36
1
The Basics of Positioning Control
X020 Immediate stop X014 Servo ready M8349 RST RST RST X026 Forward rotation limit X027
*1
Stops outputting Y000 pulses. (Immediate stop) Resets "zero return completion" flag. Resets "forward rotation positioning completion" flag. Resets "reverse rotation positioning completion" flag. Normal rotation limit (Y000) Reverse rotation limit (Y000) Enables the zero return operation with CLEAR signal outputting function. (CLEAR singal: Y020)
2
Positioning by AC Servo System
*1
3
Components of Positioning Control
FNC 12 MOVP
H0020
D8464
4
Learning to Use FX Positioning Control
Performs zero return in the forward rotation direction. Resets "zero return completion" flag. Resets "forward rotation positioning completion" flag. Resets "reverse rotation positioning" completion flag. Zero return is being performed. Zero return instruction with DOG search function (CLEAR singal: Y020)
M8342
Zero Positioning Normal return being end of performed zero (Y000) retum
M100 Zero retum being performed X030 Stop command M8029 "Execution completion" flag M8329 Abnormal end X022 M8348 JOG Positioning (+) being performed (Y000) M104 Completes the JOG(+) operation.
X010
X004
Y000
Y004
SET
"Zero return completion flag Normal end of zero return Abnormal end of zero return
RST RST
Resets "forward rotation positioning completion" flag. Resets "reverse rotation positioning" completion flag. JOG(+) operation is being performed. Executes No. 1 of the positioning table of Y000 (pulse output destination).
JOG(+) operation
M103 JOG(+) operation is being performed. X030 Stop command X022 JOG(+) M8329 Abnormal end
Y000
K1
*1. The forward and reverse rotation limit switches must be wired so that they are turned ON by default. When these limit switches turn OFF (due to the workpiece going out-of-bounds), M8343 or M8344 will turn ON and cause the pulse operation to stop.
37
X023 M8348 JOG Positioning (-) being performed (Y000) M105 JOG(-) operation is being performed.
RST RST
Resets "forward rotation positioning completion" flag. Resets "forward rotation positioning completion" flag. JOG(-) operation is being performed. Executes No. 2 of the positioning table of Y000 (pulse output destination).
JOG(-) operation
Y000
K2
M10
"Zero return completion" flag
M108
Normal end of positioning in forward rotation direction
M109
Abnormal end of positioning in forward rotation direction
RST RST
"Forward rotation positioning completion" flag "Reverse rotation positioning completion" flag Positioning operation being performed in forward rotation direction Executes No. 3 of the positioning table of Y000 (pulse output destination).
M107
Positioning operation being performed in forward rotation direction
Y000
K3
Table Pulse output number destination number SET M12 M108 M109
M8029 "Execution completion" flag M8329 Abnormal end X025 M8348 M10
"Zero return completion" flag
"Forward rotation positioning completion" flag "Forward rotation positioning normal end" flag "Forward rotation positioning abnormal end" flag
M111
Normal end of positioning in reverse rotation direction
M112
Abnormal end of positioning in reverse rotation direction
RST RST
"Forward rotation positioning completion" flag "Reverse rotation positioning completion" flag Positioning operation being performed in reverse rotation direction Executes No. 4 of the positioning table of Y000 (pulse output destination).
M110
Positioning operation being performed in reverse rotation direction
Y000
K4
Table Pulse output number destination number SET M13 M111 M112 END
"Reverse rotation positioning completion" flag "Reverse rotation positioning normal end" flag "Reverse rotation positioning abnormal end" flag
38
4.2
1
The Basics of Positioning Control
2
Positioning by AC Servo System
3
Components of Positioning Control
4
Learning to Use FX Positioning Control
4.2.1
Overview of control
Programmable logic controllers and inverters communicate with each other through passing parameter data and control operation data back and forth. Inverters, when used for variable frequency drive, require a frequency command and a start command to operate. Mitsubishis FREQROL Series inverters communicate with FX2N(C) and FX3U(C) PLCs via the Mitsubishi inverter computer link protocol to asynchronously control operations.
4.2.2
50 m
FX2N-485-BD (Terminal board)
FX2N
or
FX2N-CNV-BD FX2NC-485ADP
(Terminal block)
500 m
FX2N-CNV-BD FX0N-485ADP
(Terminal block)
39
FX Series
MITSUBISHI
X0 X1 X2 X3 X4 X5 X6 X7 Y0 Y1 Y2 Y3 Y4 Y5 Y6 Y7
FX2NC
or
FX2NC-485ADP
(Terminal block)
500 m
FX0N-485ADP
(Terminal block)
ch1
RD A RD RD B
SD A
SD
SD B
50 m
SG
FX3U-485-BD
(Terminal block)
RUN
STOP
FX3U
RD
ch1
RD A
ch1
RD B
SD A
SD
SD B
500 m
SG
FX3U-CNV-BD FX3U-485-BD
(Terminal block)
FX3U-485ADP(-MB)
(Terminal block)
ch1
500 m
FX3UC
FX3U-485ADP(-MB)
(Terminal block)
To use the special inverter communication instructions from the PLC, inverter and PLC communication parameters must be set. The FX2N(C) and FX3U(C) PLCs include the following special instructions to communicate with an inverter(s).
FX2N(C) K10 EXTR K11 K12 K13 FX3U(C) IVCK IVDR IVRD IVWR IVBWR*1 Function/Description Monitors operations of an inverter. Controls operations of an inverter. Reads a parameter from an inverter. Writes a parameter to an inverter. Writes a block of parameters to an inverter.
*1.
40
The programmable controller special auxiliary relays and inverter instruction codes listed in the table below are used in Section 4.2.3. For information on memory addresses that contain error codes and inverter communication operation statuses, refer to the FX Series Users Manual - Data Communication Edition (JY997D16901).
Function name RUN monitor Initial pulse Instruction execution complete flag Address M8000 M8002 Length 1-bit 1-bit Description ON when PLC is in RUN. ON for the first scan only. Applicable PLC FX2N(C), FX3U(C) FX2N(C), FX3U(C)
1
The Basics of Positioning Control
2
Positioning by AC Servo System
M8029
1-bit
Programmed immediately after an inverter communication instruction. Turns ON when the preceding instruction finishes its FX2N(C), FX3U(C) operation and stays ON until the instruction stops being driven. Applicable Inverter *2 *2 *2 *2 *2 *2
3
Components of Positioning Control
Function name Inverter reset Operation mode Running frequency write Run command Inverter status monitor Output frequency [speed]
Description Resets the inverter and does not request a response. Inverter reset takes about 2.2 seconds to complete. Sets the communication operation for the inverter. Changes the drive frequency by writing directly to the inverter RAM. Sets forward rotation (STF) or reverse rotation (STR). Monitors operation bits of the inverter. Monitors the frequency of the inverter.
4
Learning to Use FX Positioning Control
*2.
41
4.2.3
Program example
The following programming example is a hybrid program for FX2N(C) and FX3U(C) controllers to be used with an E500 Series inverter. The travel path and operation pattern are shown below. In the program below, the section Controlling the inverter to move in the forward or reverse rotation direction drives the inverter in the forward or reverse direction. When the forward rotation limit (X001) or reverse rotation limit (X000) is reached, the operation stops. For details on connecting the hardware for testing, refer to the appropriate product manual.
Reverse rotation limit (X000) Forward rotation limit (X001)
Reverse rotation (H0FA bit2 is ON) Acceleration time (Pr.7) Speed (Hz) 1s
Before programming, there are several parameter settings that must be set to the inverter and PLC.
, UP/
SET
Communication station number Communication speed Stop bit / Data length Parity check selection presence/absence
Communication check time interval 9999 Waiting time setting CRLF presence/absence selection 9999 1
42
1
The Basics of Positioning Control
2
Positioning by AC Servo System
3
Components of Positioning Control
b) Click on the [PLC system(2)] tab in the FX parameter window and set the parameters as shown below:
1 2 3
4
Learning to Use FX Positioning Control
Set CH1 as the channel to be used. Put a checkmark in the [Operate communication setting] checkbox to activate the communication settings. Set [Protocol] to "Non-procedural", [Data length] to "7bit", [Parity] to "Even", and [Stop bit] to "1bit". Set [Transmission speed] to "9600" to match the speed setting in the inverter. Ignore these items.
43
e) Once the ladder program is complete, click on [Online] from the top menu bar in GX Developer and select [Write to PLC]. The Write to PLC window will appear. f) Click the [Param+Prog] button and then click the [Execute] button. The parameters and the created program will be transferred to the PLC. To enable the transferred parameters, stop the PLC and then restart it.
M8002
Initial pulse
SET
M10
M10
Driving of write instruction
K1
ch.1
FNC271 IVDR
K0
H0FB
H2
Write value
K1
ch.1
K0
H0FD
H9696
Write value
FNC180 EXTR
K11
Function number (Control)
K0
H0FB
H2
Write value
44
1
The Basics of Positioning Control
D200
The maximum frequency (Pr. 1) is specified The maximum frequency (Pr. 1) is set to "120 Hz" The minimum frequency (Pr. 2) is specified The minimum frequency (Pr. 2) is set to "5 Hz" The acceleration time (Pr. 7) is specified The acceleration time (Pr. 7) is set to "1 sec" The deceleration time (Pr. 8) is specified The deceleration time (Pr. 8) is set to "1 sec" The parameters are written at one time [D200 - D207 Pr. 1, Pr. 2, Pr. 7 and Pr. 8]
D201
2
Positioning by AC Servo System
D202
D203
3
Components of Positioning Control
D204
D205
4
Learning to Use FX Positioning Control
D206
D207
K12000
120 Hz
The maximum frequency (Pr. 1) is set to "120 Hz" [K12000 Pr. 1] The minimum frequency (Pr. 2) is set to "5 Hz" [K500 Pr. 2] The acceleration time (Pr. 7) is set to "1 sec" [K10 Pr. 7]
K13
K0
K2
Pr.2
K500
5 Hz
K13
K0
K7
Pr.7
K10
1s
K13
K0
K8
Pr.8
K10
1s
RST
M10
45
SET
M11
M11
Driving of write instruction
FNC 12 MOVP *Use this for FX3U(C) PLCs FNC271 IVDR K0 H0ED
K4000
D10
D10
K1
*Use this for FX2N(C) PLCs FNC180 EXTR K11 K0 H0ED D10
Setting the operation speed of the inverter to 40 Hz while the PLC is in RUN mode.
Function Inverter Inverter Operation number station instruction speed code (Control) number
RST
M11
X000
Reverse rotation limit*1
SET
M15
X001
Forward rotation limit*1
X002
Forward rotation command input
X000
Reverse rotation limit*1
X001
Forward rotation limit*1
RST
M15
X003
Reverse rotation command input
M15
X002
X003
Reverse rotation command input
M21
Forward rotation command b1 of "H0FA" is set to ON Reverse rotation command b2 of "H0FA" is set to ON
X003
Reverse rotation command input
X002
Forward rotation command input
M22
M8002
Initial pulse
D81
SET
M12
*1.
The forward and reverse rotation limit switches must be wired so that they are turned ON by default. When either of these limit switches turns OFF (due to the workpiece going out-of-bounds), the inverter operation will be stopped.
46
1
The Basics of Positioning Control
*Use this for FX3U(C) PLCs M12
Driving of write instruction
FNC271 IVDR
K0
H0FA
K2M20
K1
ch.1
2
Controlling the inverter to move in the forward or reverse rotation direction.
Positioning by AC Servo System
*Use this for FX2N(C) PLCs FNC180 EXTR K11 K0 H0FA K2M20
Function Inverter Inverter Write number station instruction value code (Control) number
M8029
"Execution completion" flag
RST
M12
3
Components of Positioning Control
M10
M11
M12
MC
*2
N0
M70
4
Learning to Use FX Positioning Control
N0
M70 *Use this for FX3U(C) PLCs M8000 RUN monitor FNC270 IVCK K0 H07A K2M100 K1
ch.1
K0
H07A
K2M100
Read Function Inverter Inverter number station instruction destination (Monitor) number code
M100 Inverter running M101 Forward rotation M102 Reverse rotation M103 Up to frequency M104 Overload is applied M106 Frequency is detected M107 Alarm occurrence
Y000 Indicator lamp, etc. Y001 Indicator lamp, etc. Y002 Indicator lamp, etc. Y003 Indicator lamp, etc. Y004 Indicator lamp, etc. Y006 Indicator lamp, etc. Y007 Indicator lamp, etc. Contents of status (according to necessity)
*2.
MC denotes the start of a master control block. In this example, the master control block "N0" is only executed when data is not being written to the inverter.
47
*Use this for FX2N(C) PLCs FNC180 EXTR K10 K0 H06F D50 Monitor frequency value with D50 [D50 "H06F"]
Function Inverter Inverter Read number station instruction destina(Monitor) number code tion
MCR*3
N0 END
*3.
MCR denotes the end of a master control block. In this example, the master control block "N0" is only executed when data is not being written to the inverter.
48
4.3
FX2N-1PG-E positioning
The FX2N(C) and FX3U(C) PLCs support connection with the FX2N-1PG-E special function block. Special function blocks are separate pieces of hardware that can be connected to PLCs to enhance control. Since special function blocks process information separately from the PLC, the scan time of the PLC is not adversely affected during operations controlled by special function blocks. This provides an advantage for programming. Additionally, special function blocks such as the FX2N-1PG-E offer separate, more advanced control through the use of their own inputs and outputs. An important reference for understanding positioning with the FX2N-1PG-E is: FX2N-1PG/FX-1PG Users Manual (JY992D65301) It is assumed that you will have read the above manual or that you will have it nearby for reference.
1
The Basics of Positioning Control
2
Positioning by AC Servo System
4.3.1
Overview of control
The FX2N-1PG-E is a popular unit for performing general point-to-point positioning operations on 1 axis up to 100,000 pulses/second (100 kHz). A stepper motor or servo motor can be used with the FX2N-1PG-E to perform positioning operations. Some of the main advantages to using the FX2N-1PG-E for positioning as opposed to the FX1S, FX1N or FX3U(C) include: the flexible use of the zero point signal PG0, two speed positioning operations with or without interrupt, and the option to choose the FP/RP pulse output method.
3
Components of Positioning Control
4
Learning to Use FX Positioning Control
4.3.2
Maximum speed Bias speed Acceleration/ Deceleration time Target address 1 Operating speed 1 Target address 2 Operating speed 2 Operation command b0 b1 Error reset STOP command Forward rotation limit Reverse rotation limit Relative/Absolute positioning
#25
b2 b3 b7 b10
*1.
49
4.3.3
Program example
In the example that follows, a two speed positioning instruction is used to move a drill 100 mm toward a block of wood with a high speed pulse frequency of 40 kHz. When the drill reaches the wood, the speed decreases to 10 kHz. The drill is then driven for 50 mm into the wood before decelerating to stop.
Drill Wood
M
1PG
High speed
Low speed
The two speed positioning operation is illustrated in the following graph. Neither the zero point return nor the JOG instructions are used in the ladder program.
Frequency (Hz) 40,000 20,000 0 100 Target address 1 BFM #18, #17 50 Target address 2 BFM #22, 21 150 200 Operation speed 1 BFM #20, #19 Operation speed 2 BFM #24, #23
50
Although the following ladder program is not very complicated, it is important to establish good programming practice by paying attention to the order with which the PLC writes and reads to the buffer memory of the FX2N-1PG-E. Before writing the Operation command (START command) to the modules BFM from the PLC, several settings must be established such as Target addresses 1 & 2, Operation speeds 1 & 2, and various settings such as the bias speed, maximum speed, and the acceleration/deceleration time. The most critical part of the program is the section where the operation commands are enabled by writing bits M0 to M15 to BFM#25. When the positioning START command turns ON, the operation begins with the specified settings. The ladder program example on the following page can be programmed with an FX2N(C) or FX3U(C) PLC and does not require an actuator (i.e., servo system) for testing. The following inputs are used in the program:
Inputs X000 X001 X002 X003 X007 Error reset STOP command Forward rotation limit Reverse rotation limit 2-speed positioning START command
50
1
The Basics of Positioning Control
M8002 Initial pulse FNC79 TO K0 Unit No. K0 BFM # K4000 Pulse rate K1 No. of transfer points K1 No. of transfer points K1 Set the units to m 10 Combined system [H32
3
FNC79 DTO
K0 Unit No.
K1 BFM #
2
Positioning by AC Servo System
mm #3]
FNC79 TO
K0 Unit No.
K3
H32
BFM # Parameter No. of setting transfer points K4 K40000 K1 Set the maximum speed (Hz) [K40000 #5,#4]
3
Components of Positioning Control
FNC79 DTO
K0 Unit No.
BFM # Maximum No. of speed transfer points K6 BFM # K0 Bias speed K1 No. of transfer points K1 No. of transfer points K1 Set the acceleration/ deceleration time (ms) [K100 #15] Set the bias speed (Hz) [K0 #6]
FNC79 TO
K0 Unit No.
4
Learning to Use FX Positioning Control
FNC79 TO
K0 Unit No.
K15 BFM #
FNC78 FROM
K0 Unit No.
K28 BFM #
Status No. of Info. transfer M20-M31 points D20 Error code K1 No. of transfer points Read error code [D20 #29]
FNC78 FROM
K0 Unit No.
K29 BFM #
M0
Reset error
M1
STOP X002
STOP operation
M2
Forward rotation limit*1 X003
M3
Reverse rotation limit*1 M8000
M7
RUN monitor
*1. The forward and reverse rotation limit switches must be wired so that they are turned ON by default. When these limit switches turn OFF(due the workpiece going out-of-bounds), M2 or M3 will turn ON and cause the pulse operation to stop.
51
X007 START
FNC 79 DTO
K0 Unit No
K17 BFM #
K1 No. of transfer points K1 No. of transfer points K1 No. of transfer points K1 No. of transfer points
FNC 79 DTO
K0 Unit No.
K19 BFM #
FNC 79 DTO
K0 Unit No.
K21 BFM #
FNC 79 DTO
K0 Unit No.
K23 BFM #
M10
M8000 RUN monitor
FNC 79 TO
K0 Unit No.
K25 BFM #
K4M0
K1
Operation No. of commands transfer M0-M15 points D10 Current address K1 No. of transfer points
FNC 78 DFROM
K0 Unit No.
K26 BFM #
END
52
4.4
FX2N-10PG positioning
The FX2N(C) and FX3U(C) PLCs support connection with the FX2N-10PG special function block. As described in Section 4.3, special function blocks are separate pieces of hardware that can be connected to a PLC to enhance control. Due to the separate processing sequence that takes place in special function blocks through the use of buffer memory data, special function blocks provide a distinct advantage to PLC programming through individualized control that expands and improves PLC operations. Additionally, special function blocks such as the FX2N-10PG include extra input points and output points. An important reference for understanding positioning with the FX2N-10PG is: FX2N-10PG Users Manual (JY992D93401) It is assumed that you will have read the above manual or that you will have it nearby for reference.
1
The Basics of Positioning Control
2
Positioning by AC Servo System
3
Components of Positioning Control
4.4.1
Overview of control
The FX2N-10PG is used to perform point-to-point positioning operations on 1 axis up to 1,000,000 pulses/ second (1 MHz). With the FX2N-10PG differential line driver type outputs that provide improved stability and better noise immunity, a stepper motor or servo motor can be controlled to perform a variety of positioning operations including multi-speed positioning and interrupt stop positioning. The controller also supports the connection of a manual pulse generator dial to control individual pulses from a position dial. Another advantage to using the FX2N-10PG is the ability to use a defined set of positioning operations in table format with up to 200 predefined table operations.
4
Learning to Use FX Positioning Control
4.4.2
53
*1.
4.4.3
Program example
In the program example that follows, a series of three individual 1-speed positioning operations are controlled from the FX2N-10PG with an output signal from the PLC that turns ON between each operation. An event timing chart is included on the next page to help understand the logic flow of the program. This example uses a conveyor system to carry boxes from one location to another. Each intermittent positioning operation positions a box in front of a scanner to scan it for 2 seconds. During each 2-second scan, Y000 from the PLC turns ON to illuminate an indicator light. The number of boxes to be scanned can be varied by changing the value of the counter, C100, in the program.
Barcode scanner
M 10PG
Conveyor belt
The positioning pattern is shown in the following figure. Neither the zero point return nor the JOG instructions are used in the ladder program example.
Frequency (Hz) 50,000 25,000 0 Target address 1 BFM #14, #13
50
In order for the program to function correctly for the specified number of repetition cycles, the START command input (X007) must not be turned ON again during the positioning operation. If the START command is turned ON again, the counter C100 is reset, which clears the number of repetitions.
54
The following program can be used with an FX2N(C) or FX3U(C) PLC and does not require an actuator (i.e., servo system) for testing. The input and output points include:
Inputs X000 X001 X002 X003 X007 Error reset STOP command Forward rotation limit Reverse rotation limit START command Y000 Outputs Indicator lamp (ON for 2 sec. intervals)
1
The Basics of Positioning Control
2
Positioning by AC Servo System
The following figure is an event timing chart for part of the operation in the program below.
X007 (START) M9 (START command) C100 T0 M26 (Positioning Complete Flag) Y000 2 sec. One operation cycle
*1
3
Components of Positioning Control
4
Learning to Use FX Positioning Control
Positioning complete
*1.
The positioning complete flag will only be ON at the very beginning of the program when it is not the first time to operate the equipment and the power has not been recycled.
55
FNC 79 DTO
K0
K32
FNC 79 DTO
K0 Unit No.
K34 BFM #
FNC 79 TO
K0
K36
H32
Unit No. BFM # Parameter No. of setting transfer points FNC 79 DTO K0 Unit No. K0 K50000 K1
mm
BFM # Maximum No.of speed transfer points K2 BFM # K0 Bias speed K1 No.of transfer points K1 No. of transfer points K1 No. of transfer points K1 Read status information [K3M20 #28] Set the deceleration time (ms) [K100 #12] Set the acceleration time (ms) [K100 #11] Set the bias speed (Hz) [K0 #2]
FNC 79 TO
K0 Unit No.
FNC 79 TO
K0 Unit No.
K11 BFM #
FNC 79 TO
K0 Unit No.
K12 BFM #
FNC 78 FROM
K0 Unit No.
K28 BFM #
Status No. of Info. transfer M20-M31 points D20 Error code K1 No.of transfer points M0 Reset error Read error code [D20 #37]
FNC 78 FROM
K0 Unit No.
K37 BFM #
X000 Error reset X001 M1 STOP X002 M2 Forward rotation limit *1 X003 M3 Reverse rotation limit *1 Reverse rotation limit Forward rotation limit STOP operation
*1.
The forward and reverse rotation limit switches must be wired so that they are turned ON by default. When these limit swiches turn OFF (due to the workpiece going out-of-bounds), M2 or M3 will turn ON and cause the pulse operation to stop.
56
1
The Basics of Positioning Control
M8000 M8 RUN monitor X007 M9 START T0 2-sec. timer M8002 Initial pulse FNC 79 TO K0 K27 H1 K1 Set 1-speed positioning [H1 #27] START positioning Use relative positioning
2
Positioning by AC Servo System
3
Components of Positioning Control
FNC 79 DTO
K0
K13
K50
K1
4
Learning to Use FX Positioning Control
FNC 79 DTO
K0
K15
K50000
speed 1
K1
No. of transfer points
X001 STOP
FNC 79 TO
K0 Unit No.
K26
K4M0
K1
BFM # Operation
FNC 78 DFROM
K0 Unit No.
K24 BFM #
D10
Current address
K1
No. of transfer points
END
57
4.5
4.5.1
Overview of control
Along with the capability to be used for independent control, the FX2N-10GM (1 axis of control) and FX2N20GM (2 axes of control) can be used as special function blocks in conjunction with an FX2N(C) or FX3U(C) PLC to transfer data back and forth via dedicated buffer memory addresses. These addresses overlap with and replace the special M and special D registers in the 10GM and 20GM. One particular advantage to using a PLC with the FX2N-10GM is the ability to use the table method where up to 100 positioning operations can be defined and saved for consecutive execution. The FX2N-10GM and FX2N-20GM output pulse trains to control a stepper/servo motor with a maximum output frequency of 200,000 pulses/second (200 kHz). This offers the same speed as the FX3U high speed positioning adapters, except that the GM controllers use open collector type outputs instead of differential line driver type. Combined with standard positioning operations such as 1-speed and 2-speed positioning, the 10GM and 20GM include an electrical zero return function to return the motor(s) to a specific user-defined address without the use of a hardware DOG switch. This feature is unique since it is not available with any of the other FX Series controllers. The main differences between the FX2N-10GM and FX2N-20GM are listed in the following table.
FX2N-10GM Inputs/Outputs Expandable I/O Memory type Memory size Table method 4 inputs, 6 outputs No EEPROM 3.8K steps Yes CON1: Control + I/O CON2: Axis1 FX2N-20GM 8 inputs, 8 outputs Yes (48 additional I/O) Built-in RAM (RAM has battery backup) (EEPROM cassette optional) 7.8K steps No CON1: I/O CON2: Control CON3: Axis1 CON4: Axis2
Connectors
4.5.2
58
1. Operation objective
The objective of this example is to use the FX2N-20GM to trace a path using 1-speed, linear interpolation, and circular interpolation operations. Path of travel
270
1
The Basics of Positioning Control
2
Positioning by AC Servo System
3
Components of Positioning Control
4
Learning to Use FX Positioning Control
B 0 270
Operation Details
Point A B C D E F G H Coordinate (X, Y) (0, 0) (80, 100) (110, 200) (200, 200) (200, 100) (150, 100) (150, 70) End point Description This point can be anywhere. Move to zero point, wait for 2 seconds Output Y0 turns ON, wait for 2 seconds Output Y0 turns OFF, wait for 2 seconds
The output Y0 is used to imitate a pen, or other end effector. Each point-to-point operation is described as follows: (A to B) Return to Electrical Zero (B to C) High speed positioning (C to D) Linear interpolation (D to E) High speed positioning (E to F) Clockwise circular interpolation (F to G) High speed positioning (G to H) High speed positioning
59
Many programs can be stored in a GM controller at one time. This example uses program number 0.
The "DRV Ret" command is used to move from the start point to the electrical zero point.
This command is the start of a continuous steady path using linear interpolation to position D.
Only the X-axis is used in this 1-speed positioning instruction to move to position E.
For a smooth arc to position F, circular interpolation is used. This example shows the start and end positions as well as the radius (r) and speed (f).
Only the X-axis is used in this 1-speed positioning instruction to move to position G.
Here, Y0 is turned OFF to mimic the end of use for an end effector.
A timer is used to ensure the end effector operation has finished completely.
This command rapidly moves the Y-axis for a short distance so that it can reach position H.
This denotes the end of the program, where the controller waits for the next start command.
60
1
The Basics of Positioning Control
2
Positioning by AC Servo System
3
Components of Positioning Control
4
Learning to Use FX Positioning Control
61
5. Setting parameters
In addition to the preparation of a positioning program, diversified parameters should be set in the FX2N20GM. In this example, only a few parameters need to be set. (When working with various equipment such as a mechanical plotter that uses an X-Y plotting table, the parameters should be set in accordance with the mechanism being used. These settings depend on the specific plotter type and should be located in the documentation provided with the plotter.) Below are the four positioning parameter windows from VPS. The settings on these windows should be copied for BOTH the X- and Y- axes before performing positioning. First, open the Parameter Units window by selecting [Parameters] [Positioning] [Units] from the main menu bar at the top of the screen.
Next, open the Parameter Speed window by selecting [Parameters] [Positioning] [Speed] from the menu bar at the top of the screen.
The [Max speed] is set very low in order for the VPS software to trace the path during operation through the Monitoring Window. In turn, both the JOG speed and interpolation value must be reduced. (In practice, it is impossible to have the JOG speed set to a value higher than the Max speed setting.)
62
Next, open the Parameter Machine Zero window by selecting [Parameters] [Positioning] [Machine Zero] from the menu bar at the top of the screen.
1
The Basics of Positioning Control
2
Positioning by AC Servo System
3
Components of Positioning Control
4
Learning to Use FX Positioning Control
Since mechanical hardware will not be connected to the FX2N-20GM for this example, it is not necessary to configure the limit switch and DOG switch settings in the parameters. It is, however, necessary to reduce the [Creep speed] and the [Zero return speed]. For the last parameter screen, open the Parameter Settings window by selecting [Parameters] [Positioning] [Settings] from the menu bar at the top of the screen.
NO CHANGES
None of the parameters in the Parameter Settings window need to be changed. When using a mechanical plotter, however, these settings become more important.
63
4.5.3
Monitor icon
After minimizing the Sub-Task Monitor Mode window, resize the Monitoring Window and X-axis and Yaxis Monitor Mode windows.
Before starting the operation, it is necessary to set the start point. This can be done by using the [X JOG+] and [Y JOG-] buttons or by double clicking on the current position [X: 0 Y: 0] display. Double click the current position display in the Monitoring window to set the start point.
After editing the current address to X: 50 and Y: 125, click on the [Write to FX-GM] button for each axis.
As the address information is changed, red lines will appear on the plotter. This shows the current position. To clear these red lines before positioning, double click on the plotting area, and then click on the [Clear] button.
64
The next step is to switch the FX2N-20GM to AUTO mode by moving the switch on the unit to AUTO. Finally, on the Monitoring Window screen, click on either the [X START] or [Y START] buttons. The positioning operation will be performed and the plot result should look identical to the one shown in the following picture.
1
The Basics of Positioning Control
2
Positioning by AC Servo System
3
Components of Positioning Control
4
Learning to Use FX Positioning Control
To run the program again, set a new start position (or let it start from where it is), clean the plot area, and press the [X START] or [Y START] button again. If the plot does not look like the one above, check the flow chart program against the program listed in Section 4.5.2 (3).
65
4.6
FX3U-20SSC-H positioning
The FX3U(C) PLC supports connection with the FX3U-20SSC-H special function block, which is an advanced module to perform positioning operations on two axes using Mitsubishis fiber optic communication servo network known as SSCNET III (Servo System Controller Network). Important references for understanding positioning with the FX3U-20SSC-H include: FX3U-20SSC-H Users Manual (JY997D21301) FX Configurator-FP Operation Manual (JY997D21801) It is assumed that you will have read the above manuals or that you will have them nearby for reference.
4.6.1
Overview of control
Using an FX3U PLC with the FX3U-20SSC-H (20SSC-H) module and two Mitsubishi MR-J3-B servo amplifier systems, high speed positioning with pulse output frequencies up to 50,000,000 pulses/second (50 MHz) is possible on two axes. However, since motors compatible with the MR-J3-B servo amplifier system have a maximum rated speed of 6,000 RPM, the maximum controllable speed from the 20SSC-H becomes:
6,000 rev min 262,144 PLS rev 1 PLS = 26,214,400 60 sec
The FX3U-20SSC-H provides several advantages compared to other controllers in the FX family:
FX3U-20SSC-H Feature Bidirectional communication Wiring Advantage With SSCNET III, the PLC can communicate with the servo amplifier to monitor torque, servo status flags, servo parameters and absolute position data. Easy to use wiring. High immunity to noise from external devices. Long distance wiring (50m). Software Easy setup of parameters and table data (up to 300 table operations per axis). Convenient use of monitoring and testing functions.
With the use of a built-in Flash ROM, the FX3U-20SSC-H can store data permanently via non-volatile storage. Since the flash memory transfers all of its data to the buffer memory of the 20SSC-H each time the power is turned ON, the flash memory provides extra benefit for applications requiring a default set of data to be automatically loaded. This eliminates the need to use a PLC program for setting parameters and table data, which can greatly simplify the length and complexity of a ladder program. The FX3U-20SSC-H includes an input connector to connect manual pulse generator dials and various switches such as the START, DOG, and interrupt switches. These inputs assist in controlling positioning operations and are necessary to operate instructions such as the interrupt 1-speed constant quantity feed instruction and the DOG type mechanical zero return command.
66
4.6.2
1
The Basics of Positioning Control
2
Positioning by AC Servo System
1. Setting parameters
Prior to setting positioning parameters and servo parameters, check to verify the connection between the PLC and the personal computer is valid. Since ladder logic in the PLC is not used in this example, set the RUN/STOP switch on the PLC to [STOP]. a) Open a new file in FX Configurator-FP by clicking on the [Make new file] button.
3
Components of Positioning Control
b) Expand the tree of folders in the [File data list] panel on the left-hand side of the screen by double clicking on [Unset file / FX3U-20SSC-H], [Edit], and then [Monitor]. c) Go to [Online] [Connection setup] [Comm. Test] Verify that the devices are communicating properly. d) Double click on [Positioning parameters] in the [File data list] panel on the left-hand side of the screen to modify the positioning parameters. Set items in the [Item] column for both the X- and Y- axes as shown:
4
Learning to Use FX Positioning Control
e) Next, double click on [Servo parameters] in the [File data list] panel on the left-hand side of the screen to modify the servo parameters. Set items from the [Kind] column for both the X- and Y- axes as shown:
67
No.
Command Code
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Incremental address specification X-axis positioning at 1-step speed Y-axis positioning at 1-step speed XY-axis speed positioning at 1-step
Circular interpolation (CNT,CW) Dwell XY-axis speed XY-axis speed Dwell XY-axis speed XY-axis speed Dwell Circular interpolation (CNT,CCW) Dwell XY-axis speed XY-axis speed Dwell Linear interpolation Dwell Jump End
68
1
The Basics of Positioning Control
2
Positioning by AC Servo System
3
Components of Positioning Control
4
Learning to Use FX Positioning Control
69
4.6.3
Next, select the [XY-axis table operation] from the [X-axis] [Pattern] combination box and click on the [Start] button to begin positioning. Note that because the table operation includes a "Jump" command, the operation will continuously loop from row 0 to row 20.
To stop positioning, click on the [All axis stop] or [Stop] button. After stopping the table operation, a variety of other positioning operations can be tested from the [X-axis] [Pattern] combination box such as 1-speed positioning, 2-speed positioning, and linear interpolation. For additional control in TEST MODE, the tabs at the top of the "X-axis Operation test" window can be used according to the following information:
Position start Positioning operations can be executed from this window. Target address and operation speed data is defined here. Feed present value CHG The value of the current address can be changed using this window. Speed CHG Two operations for changing the speed of the motor are available from this window. OPR By clicking on the [REQ. OPR] button, zero return is executed. JOG/MPG JOG operation and manual pulsar operation testing can be performed from this window.
70
4.6.4
1
The Basics of Positioning Control
2
Positioning by AC Servo System
The following buffer memory addresses are used in the ladder program example below. For details on other BFM addresses, refer to the FX3U-20SSC-H Users Manual (JY997D21301).
BFM Area BFM # #1, #0 Monitor data #101, #100 #28 #128 #501, #500 #503, #502 X-axis current address Y-axis current address X-axis status information Y-axis status information X-axis Target address 1 X-axis Operation speed 1 X-axis Operation command 1 b0 b1 b2 b3 #518 b4 b5 b6 Control data b8 b9 #618 b0 b6 #519 b4 b0 b10 #521 Positioning parameter data #14013, #14012 Error reset STOP Forward rotation limit Reverse rotation limit Forward rotation JOG(+) Reverse rotation JOG(-) Zero-return Relative/Absolute positioning START command Error reset Zero-return Item Set value D1, D0 D101, D100 D10 D110 10,000,000 2,000,000 M0 - M15 M0 M1 M2 M3 M4 M5 M6 M8 (b8 =1) M9 M100 - M115 M100 M106 M20 - M35 X001, X002 X004 X005 Table row #0 Hz (PLS/sec) X007 X003 X007 X006 X000 X010 X001 X002 X003 Relative positioning X004, X005 PLS Hz (PLS/sec) PLS PLS Note
3
Components of Positioning Control
4
Learning to Use FX Positioning Control
Positioning parameter enable command M24 1-speed positioning Table operation (simultaneous) H1 H400 0 1,000,000
#520
71
4.6.5
Program example
The following program uses buffer memory communication to perform JOG positioning, 1-speed positioning, and table operation control. The XY-table created in the previous section can be used in this example. For this example, FX Configurator-FP should be used to specify the servos, change the maximum speed, and to set the zero return mode as described in Section 4.6.2. The ladder program is to be used with an FX3U(C) PLC and MR-J3-B servo system. Without these components, the program cannot be tested. Input points from the PLC include:
Inputs X000 X001 X002 X003 X004 X005 X006 X007 X010 X-axis Forward rotation limit X-axis Forward rotation JOG(+) X-axis Reverse rotation JOG(-) X- and Y-axis Zero return START command (X-axis 1-speed operation) START command (XY-axis Table operation) STOP command Error reset X-axis Reverse rotation limit
FNC 12 DMOV
U0\ G0 BFM #
D0 X-axis current address D100 Y-axis current address D10 X-axis status information D110 Y-axis status information M2
FNC 12 DMOV
FNC 12 MOV
FNC 12 MOV
X000 Forward rotation limit *1 X010 Reverse rotation limit *1 X001 X-axis JOG(+) X002 PLS X-axis JOG(-) FNC 12 DMOVP
M3
*1.
The forward and reverse rotation limit switches must be wired so that they are turned ON by default. When these limit switches turn OFF (due to the workpiece going out-of-bounds), M2 or M3 will turn ON and cause the pulse operation to stop.
72
1
The Basics of Positioning Control
M8000 RUN monitor X001 X-axis JOG(+) X002 X-axis JOG(-) X003 PLS Zero return M6 X-axis zero return X002 X-axis JOG(-) X001 M5 X-axis JOG(+) X-axis JOG(-) operation is being performed FNC 12 MOV U0\ G519 X-operation BFM # command 2 M20-M35 K4M20 M4 Write X-axis Operation command 2 [K4M20 #519]
2
Positioning by AC Servo System
3
Components of Positioning Control
M106
4
Learning to Use FX Positioning Control
FNC 12 MOVP
FNC 12 DMOVP
U0\ G500 X-axis Target BFM # address 1 K10000000 K2000000 X-axis Operation speed 1 U0\ G502 BFM #
FNC 12 DMOVP
FNC 12 MOVP
U0\ G520 XY-Table BFM # operation (simultaneous) H400 U0\ G521 XY-Table BFM # row #0 K0
FNC 12 MOVP
X004 PLS X-axis 1-speed operation X005 XY-axis Table operation M9 START positioning
73
X006 M1 X-axis STOP X007 PLS Error reset M0 Reset X-axis error STOP operation
PLS
M100
U0\ G518 X-operation BFM # command 1 M0-M15 K4M0 U0\ G618 Y-operation BFM # command 1 M100-M115 K4M100 END
FNC 12 MOV
74
MEMO
1
The Basics of Positioning Control
2
Positioning by AC Servo System
3
Components of Positioning Control
4
Learning to Use FX Positioning Control
75
Revised History
Date 11/2007 Revision A First Edition Description
76
HEAD OFFICE: TOKYO BUILDING, 2-7-3 MARUNOUCHI, CHIYODA-KU, TOKYO 100-8310, JAPAN HIMEJI WORKS: 840, CHIYODA CHO, HIMEJI, JAPAN
HIME-SH006-A0711(MEE)