XMC-E32A E32C Manual V1.5 202007 EN
XMC-E32A E32C Manual V1.5 202007 EN
XMC-E32A(/DC)
XMC-E16A(/DC)
XMC-E08A(/DC)
XMC-E32C(/DC)
Safety Instruction
For your safety and effective operation, please read the safety instructions thoroughly before using the product.
► Safety Instructions should always be observed in order to prevent accident or risk with the safe and
► Instructions are divided into “Warning” and “Caution”, and the meaning of the terms is as follows.
Warning This symbol indicates the possibility of serious injury or death if some applicable
instruction is violated.
This symbol indicates the possibility of severe or slight injury, and property
Caution
damages if some applicable instruction is violated.
Moreover, even classified events under its caution category may develop into serious accidents relying on
situations. Therefore we strongly advise users to observe all precautions properly just like warnings.
► The marks displayed on the product and in the user’s manual have the following meanings.
► The user’s manual even after read shall be kept available and accessible to any user of the product.
1
Safety Instruction
Caution
Design the analog input / output signal or pulse input / output line at least 100mm away
from high voltage line or power line so that it is not affected by noise or magnetic field
direct vibration from being applied to the PLC. It may cause electric shock, fire or malfunction.
metallic dust from entering the product. It may cause electric shock, fire or malfunction.
Caution
Use PLC only in the environment specified in PLC manual or general standard of datasheet.
If not, electric shock, fire, abnormal operation of the product may be caused.
Before install or remove the module, be sure PLC power is off. If not, electric shock or damage
Be sure that every module is securely attached after adding a module or an extension
connector. If the product is installed loosely or incorrectly, abnormal operation, error or dropping
may be caused. In addition, contact failures under poor cable installation will be causing
malfunctions as well.
Make sure that the I / O connector is securely fastened. It may cause wrong input or output.
2
Safety Instruction
Warning
Prior to wiring works, make sure that every power is turned off. If not, electric shock or
Caution
Check rated voltages and terminal arrangements in each product prior to its wiring
process. Applying incorrect voltages other than rated voltages and misarrangement among
Secure terminal screws tightly applying with specified torque. If the screws get loose, short
circuit, fire or abnormal operation may be caused. Securing screws too tightly will cause
Be sure to earth to the ground using Class 3 wires for PE terminals which is exclusively
used for PLC. If the terminals not grounded correctly, abnormal operation or electric shock
may be caused.
Don’t let any foreign materials such as wiring waste inside the module while wiring,
3
Safety Instruction
Prior to cleaning or tightening the terminal screws, let all the external power off including
Caution
Prior to installing or disassembling the module, let all the external power off including
Keep any wireless equipment such as walkie-talkie or cell phones at least 30cm away
Caution
Product or battery waste shall be processed as industrial waste. The waste may discharge
4
Revision History
Revision History
Version Date Remark Revised position
V 1.0 2017.4 First Edition -
Added ‘speed unit’ and ‘filter time constant’ in encoder parameter 5-12, 18
Added LS_ReadCamTableMasterPos function block 6-141~142
V 1.1 2017.11 Added G-Code of ‘G21’ 9-12, 26
Added Acceleration/Constant speed/Deceleration Operation flags Appendix 1-6
Added appendix chapter of ‘Using EtherCAT slaves from other companies’ Appendix 6
Setting range of encoder position filter constant is corrected 5-12~13, 7-24
Added LS_OnOffCam function block 6-143~145
Added LS_RotaryKnifeCamGen function block 6-146~148
V1.2 2018.6 Added LS_CrossSealCamGen function block 6-149~151
Revised TransitionMode about LS_MoveLinearTimeAbsolute and
6-160, 6-162
LS_MoveLinearTimeRelative
Added error code (0x1124, 0x1170~0x1179) A 2-14, A2-16
V1.3 2018.12 Added XMC-E32C function block Ch15, A7
Added XMC-E16A and XMC-E08A function blocks Ch2, Ch6, Ch13
Added wiring specifications Chapter 3
Set up Ethercat Network/Added Flags Chapter 4
Set up NC Spindles, Encoder Latch, Added Position Control Range
Chapter 5
Expansion
Added LS_OnOffCamEx, NC_RetraceMove, NC_BlockSkip, NC_DryRun,
NC_ToolMode, NC_ReadToolMode, NC_MirrorImage, NC_SpindleControl,
Chapter 6
NC_BlockOptionalSkip, NC_ManualToolComp, NC_ChgSpindleGear,
V1.4 2019.5 FILE_OPEN, FILE_CLOSE, FILE_WRITE, FILE_READ, FILE_SEEK
Added Parameters Chapter 7
Added NC Control Expansion Function Chapter 9
Added Built-in Cnet Function Chapter 15
Added Flags according to NC Control Expansion Function Appendix 1
Added Error Information according to Cnet, NC Control Expansion Function Appendix 2
Added the Explanation of Cnet Communications Code Words Appendix 7
Added EtherCAT Diagnostic Function Appendix 8
Format and contents modification according to the change of company
V1.5 2020.7 -
name(LSIS LS ELECTRIC)
5
개정 이력
6
Revision History
7
Abut User’s Manual
8
사용설명서에 대해서
The User’s Manual describes the product. If necessary, you may refer to the following description and order accordingly. In
addition, you may connect our website (http://www.ls-electric.com/) and download the information as a PDF file.
Relevant User’s Manuals
Title Description
XG5000 User’s Manual XG5000 software user manual describing online function such as programming, print,
(for XGK, XGB) monitoring, debugging by using XGK, XGB CPU.
XG5000 User’s Manual XG5000 software user manual describing online function such as programming, print,
(for XGI, XGR) monitoring, debugging by using XGI, XGR CPU.
XGK/XGB Instructions & User’s manual for programming to explain how to use instructions that are used PLC
Programming User’s Manual system with XGK, XGB CPU.
XGI/XGR/XEC Instructions & User’s manual for programming to explain how to use instructions that are used PLC
Programming User’s Manual system with XGI, XGR, XEC CPU.
XGK-CPUA/CPUE/CPUH/CPUS/CPUU user manual describing about XGK CPU
XGK CPU User’s Manual
module, power module, base, IO module, specification of extension cable and system
(XGK-CPUA/E/H/S/U)
configuration, EMC standard.
XGI-CPUU/CPUH/CPUS user manual describing about XGI CPU module, power
XGI CPU User’s Manual
module, base, IO module, specification of extension cable and system configuration,
(XGI-CPUU/CPUH/CPUS)
EMC standard.
XGR- CPUH/F, CPUH/T user manual describing about XGR CPU module, power
XGR Redundant Series
module, extension drive, base, IO module, specification of extension cable and system
User’s Manual
configuration, EMC standard.
XG-PM software user manual describing online function such as motion programing,
XG-PM User’s Manual
monitoring, debugging by using Positioning Module.
1) The differences according to product name and figure, please check the chapter of specifications, function blocks, analog
and serial interfaces.
2) This manual is based on the following versions.
XMC-E32A XMC-E16A XMC-E08A XMC-E32C XG5000
V1.40 V1.40 V1.40 V1.40 V4.28
9
Table of Content
◎ Table of Content ◎
10
Table of Content
3.3.8 Encoder Input (DC 5V Line Driver Output) Wiring Example .......................................................................................... 3 - 20
11
Table of Content
12
Table of Content
(MC_MoveContinuousAbsolute) ...................................................................................................................................... 6 - 34
(MC_MoveContinuousRelative) ..................................................................................................................................... 6 - 38
13
Table of Content
6.4.13 All axis Setting the current position (MC_SetPositionAll) ............................................................................................ 6 - 102
6.4.15 Extended electrical gearing by specifying the position (MC_GearInPosEx) ............................................................. 6 - 104
6.5.3 Removes all axes from the group (MC_UngroupAllAxes) ........................................................................................... 6 - 111
6.5.6 Performs the search home of all axes in the group (MC_GroupHome) ...................................................................... 6 - 114
6.5.7 Sets the position of all axes in the group without moving (MC_GroupSetPosition) .................................................... 6 - 115
14
Table of Content
6.6.23 Read the slave location of the CAM table (LS_ReadCamTableSlavePos) .............................................................. 6 - 178
15
Table of Content
6.6.40 Epansion Variable electrical gearing by specifying the position (LS_VarGearInPosEx) ........................................... 6 – 207
6.7.4 Linear Interpolation Operation for Absolute Position of Coordinate System (LS_MoveLinearAbsolute) ................... 6 - 217
6.7.5 Linear Interpolation Operation for Incremental Position of Coordinate System (LS_MoveLinearRelative) ............... 6 - 220
6.7.6 Time Linear Interpolation Operation for Absolute Position of Coordinate System
6.7.7 Time Linear Interpolation Operation for Incremental Position of Coordinate System
16
Table of Content
17
Table of Content
6.10.3 Connects to a relative TCP port.(TCP Client operation) (SOCKET_TCPCONNECT) ............................................. 6 – 308
6.10.9 Check information for each channel of socket service (SOCKET_SVCINFO).......................................................... 6 – 320
6.10.10 Initializes the receive buffer of a TCP or UDP socket. (SOCKET_BUFCLEAR) ..................................................... 6 – 321
6.10.12 Read local Ethernet IP, SUBNET MASK, GATEWAY (L_NET_INFO)................................................................... 6 – 323
6.10.13 Local Ethernet IP, SUBNET MASK, GATEWAY settings (SET_IP)........................................................................ 6 – 324
18
Table of Content
8.2.10 Axis Group Control Buffer Mode and Transition Mode ................................................................................................. 8 - 45
19
Table of Content
8.3.9 Connection function less than the set number ............................................................................................................... 8 – 101
8.4.6 Time Linear Interpolation Operation for Absolute Position of Coordinate System ...................................................... 8 - 114
20
Table of Content
8.6.3 Cam data extension function compatibility check (XG5000 / XMC) .............................................................................. 8 - 150
8.6.4 Cam data extension function compatibility check(SD memory card/XG5000/ XMC)................................................... 8 - 151
21
Table of Content
10.6.2 Time to Process the Forced I/O On/Off and Processing Method .............................................................................. 10 - 31
22
Table of Content
23
Table of Content
24
Table of Content
25
Table of Content
26
Table of Content
15.7.1 Summary........................................................................................................................................................................... 15 - 22
27
Table of Content
28
Table of Content
29
Table of Content
30
Chapter 1 Overview
Chapter 1 Overview
This user’s manual describes the standard of motion controller, installation method, the method to use each function, programming
and the wiring with external equipment.
1.1 Characteristics
The characteristics of motion controller are as follows. Motion controllers are used for overall control purposes that require the functions
listed below.
(1) Various motion control function
It has various functions needed for motion control system such as position control, speed control etc.
(a) It supports various motion control commands.
1) It supports a number of function blocks.
2) It supports a number of motion function blocks compliant to PLCopen standards.
3) Motion programs are supported in the form of LD or ST by using XG5000.
(b) It can control actual/virtual axis of up to 32 axes, virtual axis of 4 axes. The actual axis of 32 axes can be set and operated as a
virtual axis. EtherCAT I/O of 64 slaves, and supports digital input 8 points, digital output 16 points,, analog input 2 channels,
analog output 2 channels and encoder input of 2 channels.
(c) Various sing-axis operations are available.
1) Position control
2) Velocity Control
3) Synchronous Control
4) Torque Control
5) Multi-axis simultaneous start
(d) Various multi-axis group operations are available.
1) Circular interpolation
2) Linear interpolation
3) Helical interpolation
4) Group homing / Changes group position
(e) Switching control in operation is available.
1) Position/Speed control switching
2) Position/Torque control switching
3) Speed/Torque control switching
(f) Cam Control is available.
By using XG5000, you can set profile data for cam control and use program commands to start and cancel cam operation, and
to skip cam. Users can create up to 32 cam profiles.
(g) Various Homing Control Function.
As for a homing method, you can use Homing method supported by each servo drive model. (Refer to the instruction manual of
each servo drive for more detailed homing methods and servo parameter settings.)
(h) For the Acceleration/Deceleration method, trapezoidal acceleration/deceleration and S-shaped acceleration/deceleration is
supported, and S-shaped acceleration/deceleration can be implemented by setting jerk on a motion function block.
1-1
Chapter 1 Overview
Notes
1. What is EtherCAT?
EtherCAT, Open Industrial Ethernet Solution, is developed by Beckhoff at 2002 and at 2003, November EtherCAT
Technology Group (ETG-http://www.ethercat.org) is organized and it opens its technology. At 2005, February, that is
authorized as IEC standard specification. Because of fast control speed and easiness for use and maintenance, it is widely
used in the industrial field and conforming its performance
In our positioning module, data communication with service driver is done with master-slave method through EtherCAT, and
electric Ethernet Cable is used.
1-2
Chapter 1 Overview
PLC/HMI
Writing sequence Program
Working
1-3
Chapter 1 Overview
Describe Representative functions of motion controller (Coordinate & Linear Interpolation, Circular Interpolation & Stop) briefly.
[ Example ]
■ Starting Position : 1000
■ target Position : 8000
Value of Forward movement is 7000 (7000=8000-1000)
0 1000 8000
Starting Position
Reverse Forward
1-4
Chapter 1 Overview
[ Example ]
■ Starting Position : 5000
■ Target Position : -7000
In this condition, it moves reversely and stops at -2000.
-2000 0 5000
Y2
Y axis
movement Starting position(X1, Y1) Goal position(X2, Y2)
value
Y1 Operating by linear
X axis interpolation X axis
Reverse Forward
direction direction
X axis movement value
X2
Y axis Reverse direction X1
[ Example ]
■ Start position(1000, 4000),
■ Target position (10000, 1000)
The action is as follows in the condition above
1-5
Chapter 1 Overview
(Y axis)
Starting
4000 position
Goal
1000 Position
X axis
0
1000 5000 10000
Y2
Y axis
movement Starting position(X1, Y1) Linear interpolation end
value position(X2, Y2)
Y1
Movement by Linear interpolation
X axis X axis
Reverse Forward
direction X axis movement value direction
X2
Y axis Reverse direction X1
[ Example ]
■ Start position (1000, 4000),
■ Target position (9000, -3000)
The action is as follows in the condition above
(Y axis)
Starting
4000 position
Y axis
movement value
(-3000) Linear
interpolation end
1000 position
(X axis)
0
1000 5000 10000
1-6
Chapter 1 Overview
Forward
direction Middle point position
Goal position
Center point
of circular arc
Starting point
Reverse Forward
direction direction
Reverse Origin
direction
3) Movement direction is decided automatically depends on set target position and auxiliary point of circular interpol
ation.
Forward Direction
Goal
Operating by circular interpolation
Position
Starting
position Center point
of circular arc
Radius
Reverse Forward
Direction Direction
Origin
Reverse Direction
1-7
Chapter 1 Overview
2) If the goal position is same as starting position, it is available to have an operation like a circle that has dista
nce from starting point to auxiliary point as its radius.
Forward Direction
Operating by circular interpolation
Center point
of the circle
Starting position
& Goal position
Reverse Forward
Direction Direction
Origin
Reverse Direction
3) The direction of movement is determined according to the selection of paths (CW, CCW) to be set at the tim
e of motion function block.
Center
point
Op e rat in g b y ci rcul a r
in terpola tion whe n the
Starting Circular angle sign of the radius > 0
< 180°
Reverse Position Forward
Direction Direction
Origin
Reverse Direction Center
point
2) In circular interpolation of radius specification method, the target position cannot be set the same as starting po
sition.
3) The operational directions and the size of the arc are determined by the path selection (CW, CCW) of circular
interpolation commands and the sign of the radius.
1-8
Chapter 1 Overview
+Z
End Helical
position Interpolation
Straight
interpolation
Part
+Y
Center
Position
+X
Starting
Position Circular interpolation part
1-9
Chapter 1 Overview
(1) Execution is made by speed control commands, and the operation proceeds at the established rate until buffer comm
ands are executed, or stop commands are entered.
(2) Speed control has forward operation and reverse operation.
(a) Forward direction: In case of velocity > 0 and forward direction, or velocity < 0 and reverse direction
(b) Reverse direction: In case velocity > 0 and reverse direction, or velocity < 0 and reverse direction.
(3) Operation timing
Speed
Time
Operation
Command
In
Operation It will not be ON
even though stop
Signal of positioning
complete
Stop command
1-10
Chapter 1 Overview
(1) The execution is made by the torque control command, and the operation is done in the set torque until the buffer c
ommand or stop command is entered.
(2) Torque control includes forward operation and a reverse operation..
(a) Forward direction: In case of torque > 0 and forward direction, or torque < 0 and reverse direction
(b) Reverse direction: In case torque > 0 and reverse direction, or torque < 0 and reverse direction.
(3) Operation timing
Torque
Time
Operation
Command
In
Operation It will not be ON
even though stop
Signal of positioning
complete
Stop command
1-11
Chapter 1 Overview
1-12
Chapter 2 Specifications
Chapter 2 Specifications
2.1 General specifications
Relevant
No. Item Specifications
specifications
Ambient
1 0 ~ 55 ℃ -
temperature
Storage
2 -25 ~ +70 ℃ -
temperature
Ambient
3 5 ~ 95%RH (Non-condensing) -
humidity
Storage
4 5 ~ 95%RH (Non-condensing) -
humidity
In case of occasional vibration - -
Frequency Acceleration speed Amplitude Number
5 ≤ f < 8.4Hz − 3.5mm
Vibration 8.4 ≤ f ≤ 150Hz 9.8m/s2{1G} −
5
resistance In case of continuous vibration 10 times for each IEC61131-2
Frequency Acceleration speed Amplitude direction of X, Y and Z
5 ≤ f < 8.4Hz − 1.75mm
8.4 ≤ f ≤ 150Hz 4.9m/s2{0.5G} −
Maximum shock acceleration: 147㎨{15G}
Shock
6 Duration: 11ms IEC61131-2
resistance
Pulse waveform: Half-sine (3 times for each direction of X, Y and Z)
Square wave AC: ± 1,500 V LS ELECTRIC
impulse noise DC:± 900 V standard
Electrostatic IEC61131-2
Voltage : 4kV (contact discharging)
discharge IEC61000-4-2
Noise Radiated
7 IEC61131-2,
resistance electromagnetic 80 ~ 1,000 ㎒, 10 V/m
IEC61000-4-3
field noise
Classificati Digital/analog I/O,
Fast transient /Burst Power IEC61131-2
on Communication interface
noise IEC61000-4-4
Voltage 2kV 1kV
Operating
8 Free from corrosive gases and excessive dust -
atmosphere
9 Altitude Up to 2,000m -
Pollution
10 Less than equal to 2 -
degree
11 Cooling Air cooling -
Notes
IEC (International Electrotechnical Commission)
An international nongovernmental organization which promotes internationally cooperated standardization in electric/electronic
field, publishes international standards and manages applicable estimation system related with.
2) Pollution degree
An index indicating pollution degree of the operating environment which decides insulation performance of the devices. For
instance, Pollution degree 2 indicates the state generally that only non-conductive pollution occurs. However, this state contains
temporary conduction due to dew produced.
2-1
Chapter 2 Specifications
Specifications
Item
AC Power DC Power
Rated input voltage AC100V ~ AC240V DC19.2 ~ 28.8V
Input frequency 50/ 60 ㎐ −
0.7A or less (AC110V)
Input current 1.6A or less
0.4A or less (AC120V)
Input Inrush current 120Apeak or less(AC240V, Phase 90 degree) 100Apeak or less (DC28.8V)
Leakage current 3mA or less 3mA or less
Efficiency 65% or more 65% or more
Permitted momentary 10ms or less
10ms or less
power failure
Output voltage ripple Output voltage ripple
Voltage Current Current
range range
Output voltage
+5V 4.90~5.20V 4A 4.90~5.15V 4A
+24V 21.1~26.9V 0.4A − −
Output Output Ripple Noise Ripple Noise
Ripple & Noise +5V 100mVpp or less 200mVpp or less 100mVpp or less 200mVpp or less
+24V 400mVpp or less −
Over current +5V 4.4A or higher 4.4A or higher
protection +24V 0.44A or higher −
For protection of the power supply, you are recommended to use the power supply with the maximum of 4A fuse.
Notes
2-2
Chapter 2 Specifications
2-3
Chapter 2 Specifications
2-4
Chapter 2 Specifications
Ethernet Communication
distance Max. 100m between nodes
Loader service (XG5000)
LS ELECTRIC protocol supported (XGT, MODBUS TCP)
Service FTP server: Function to read/write files of the SD memory card from other devices
SNTP client
Characteristics USB 2.0, 1 channel
USB
Service The loader service (XG5000) is supported
Error indication Indicated by LED
Weight 790g
Note1) LREAL range: 2.2250738585072e-308 ~ 1.79769313486232e+308
Long real number (+LREAL) positive range: 0 < x ≤1.79769313486232e+308
Note2) the analog function is supported only by analog-type products (XMC-E32A/E16A/E08A).
Note3) the serial communication function is supported only by communication-type products (XMC-E32C).
2-5
Chapter 2 Specifications
Item Specifications
2-6
Chapter 2 Specifications
Item Specifications
Response OffOn
0.5/1/3/5/10/20/70/100 ㎳ (set by I/O parameter) Initial value: 3 ㎳
time OnOff
00 %IX0.0.0
00
01 %IX0.0.1
R
02 %IX0.0.2
R 03 %IX0.0.3
04 %IX0.0.4
내부회로
07 05 %IX0.0.5
06 %IX0.0.6
COM
07 %IX0.0.7
COM
COM -
DC24V
COM -
2-7
Chapter 2 Specifications
2-8
Chapter 2 Specifications
Item Specifications
Input voltage 5V (3V ~ 6V)
input current 2 ㎃ to 7.5 ㎃
Min. On guarantee In accordance with RS-422A Line Driver Level
2.5V
voltage
Max. Off guarantee
1V
voltage
1) Pulse width
Over 2.5㎲
2) Phase difference
Input pulse
When A phase input pulse is
ahead of B phase input pulse
A : Position value increases
phase
When B phase input pulse is
B ahead of A phase input pulse
phase : Position value decreases
Over 0.625㎲
Contact
Circuit configuration Signal name Type
Point
5V
ENC1 A+ Encoder A+ input
*Note
1) DC5V A ENC1 A- Encoder A- input
B ENC1B+ Encoder B+ input
0V
ENC1B- Encoder B- input
A+
ENC2 A+ Encoder2 A+ input
*Note 5V
A- ENC2 A- Encoder2 A- input
2) DC5V
B+ ENC2 B+ Encoder2 B+ input
0V B-
ENC2 B- Encoder 2 B- input
Caution
Note 1 : Encoder of 5V voltage output type(Open collector) When using 12V, 24V type MPG, change the input voltage from
5V to 12V or 24V and in case of 12V, connect 910Ω resistor to ENC1 A+(pin 1), ENC1 B+ (pin3), in case of 24V, 2.4㏀
resistor, before connecting the power source (adding PULL-UP resistor is needed)
Note 2 : Encoder of 5V voltage output type(Line driver)
2-9
Chapter 2 Specifications
Part names
(1) XMC-E32A
④
⑤ ⑥⑨ ⑭ ⑫
②
① ⑦ ⑧ ⑩ ⑪ ⑬
2-10
Chapter 2 Specifications
※ With exception of the outer part where the product name is shown, the XMC-E16A and XMC-E08A are identical to the XMC-
E32A.
Caution
After inserting the SD memory into the SD memory slot entrance (display①) as shown below, press the middle part
of SD memory (②) and install it completely. If the SD memory is not inserted correctly in the SD memory slot
(direction reversed, up / down (left / right) tilting or twisting) It may not operate normally.
①
②
2-11
Chapter 2 Specifications
(2) XMC-E32C
④
⑤ ⑥⑨ ⑭ ⑫
②
① ⑦ ⑧ ⑩ ⑪ ⑬
2-12
Chapter 2 Specifications
2-13
Chapter 2 Specifications
Caution
*Note 1
Wiring of encoder 1 is an example about 5V voltage output (open collector) type. When using 12V, 24V type MPG, change the
input voltage from 5V to 12V or 24V and in case of 12V, connect 910Ω resistor to ENC1 A+(pin 1), ENC1 B+ (pin3), in case of
24V, 2.4㏀ resistor, before connecting the power source (adding PULL-UP resistor is needed)
*Note 2
Wiring of encoder 2 is example about 5V voltage output type (line driver)
2-14
Chapter 2 Specifications
This describes the internal circuit of the module when connecting the encoder.
Input/output
Internal circuit No. terminal Signal name
classification
Internal
내부회로
16
circuit
18
COM
DC24V
00 L
R
Internal
circuit
내부회로
15
L
DC12/24V
2-15
Chapter 2 Specifications
2-16
Chapter3 Operation Order and Installation
Start
Write the servo parameter in the XG5000 and download it to servo Reading/Writing servo parameter and servo tuning are
available by XG5000
End
3-1
Chapter3 Operation Order and Installation
3.2 Installation
3.2.1 Safety Precautions
Danger
Please design protection circuit at the external of Controller for entire system to operate safely because an abnormal
output or a malfunction may cause accident when any error of external power or malfunction of Controller.
(1) It should be installed at the external side of Controller to emergency stop circuit, protection circuit, interlock circuit of
opposition action such as forward /reverse operation and interlock circuit for protecting machine damage such as
upper/lower limit of positioning.
.
(2) If Controller detects the following error, all operation stops and all output is off.
Available to hold output according to parameter setting
(a) When over current protection equipment or over voltage protection operates
(b) When self-diagnosis function error such as WDT error in Controller occurs
When error about IO control part that is not detected by Controller, all output is off.
Design Fail Safe circuit at the external of Controller for machine to operate safely. Please refer to 3.5.1 Fail-Safe
Circuit Configuration Example
(1) Because of error of output device, Relay, TR, etc., output may not be normal. About output signal that may cause
the heavy accident, design supervisory circuit to external.
When load current is more than rating or over current by load short flows continuously, danger of heat, fire may occur
so design safety circuit to external such as fuse.
Design for external power supply to be done first after Controller power supply is done. If external power supply is
done first, it may cause accident by misoutput, misoperation.
In case communication error occurs, for operation status of each station, refer to each communication manual.
There may be a risk of accidents due to incorrect output and malfunction.
In case of controlling the Controller while peripheral is connected to Controller, configure the interlock circuit for system
to operate safely. During operation, in case of executing program change, operation status change, familiarize the
manual and check the safety status. Especially, in case of controlling long distance Controller, user may not response
to error of Controller promptly because of communication error or etc.
Limit how to take action in case of data communication error between Controller and external device adding installing
interlock circuit at the Controller program.
3-2
Chapter3 Operation Order and Installation
Danger
Don’t close the control line or communication cable to main circuit or power line.
Limit how to take action in case of data communication error between Controller and external device adding installing
interlock circuit at the Controller program.
Distance should be more than 100mm. It may cause malfunction by noise.
In case of controlling lamp load, heater, solenoid valve, etc. in case of Off -> On, large current (10 times of normal
current) may flows, so consider changing the module to module that has margin at rated current.
Process output may not work properly according to difference of delay of Controller main power and external power for
process (especially DC in case of) Controller power On-Off and of start time.
For example, in case of turning on Controller main power after supplying external power for process, DC output
module may malfunction when Controller is on, so configure the circuit to turn on the Controller main power first
Or in case of external power error or Controller error, it may cause the malfunction.
Not to lead above error to entire system, part causing breakdown of machine or accident should be configured at the
external of Controller.
3-3
Chapter3 Operation Order and Installation
Caution
Motion controller must be mounted to hook for fixation properly before its fixation.
The Controller may be damaged from over-applied force.
Caution in handling
3-4
Chapter3 Operation Order and Installation
3-5
Chapter3 Operation Order and Installation
30㎜ or
higher*1
Motion Door
Controller
20㎜ or
30㎜ or higher*3
higher*1
5㎜ or 5㎜ or higher
higher*1
3-6
Chapter3 Operation Order and Installation
3-7
Chapter3 Operation Order and Installation
3-8
Chapter3 Operation Order and Installation
OrOr more
more
Or more
Or more
3-9
Chapter3 Operation Order and Installation
3-10
Chapter3 Operation Order and Installation
AC
AC power
100V~240V power
Constant
voltage AC100-240V
transformer
(2) Connect the power source of which inter-cable or cable-ground noise is small.
(When there is much noise, connect insulated transformer.)
(3) Isolate the controller power, I/O devices and power devices as follows.
Main PLC
Constant
power power
voltage
AC220V
transformer
Input/output
power
SMPS
24V
Main circuit
device
(4) If using DC24V of the controller, do not connect DC24V of several power modules in parallel.
(5) AC power cables should be compactly twisted and connected in the shortest distance.
(6) AC power cables should be as thick as possible (2mm2) to reduce voltage drop.
(7) AC power cables should not be installed close to main circuit cable (high voltage/high current) and I/O signal cable. They
should be 100mm away from such cables
(8) Use the shielded insulation trans or noise filter when a noise invasion is expected.
(9) Wiring of each input power should be twisted as short as possible and the wiring of shielding transformer or noise filter
should not be arranged via a duct.
3-11
Chapter3 Operation Order and Installation
(10) To prevent surge from lightning, use the lightning surge absorber as presented below.
Controller
I/O device
E1 E2
Surge absorber to prevent lighting
Notes
1) Isolate the grounding (E1) of lightning surge absorber from the grounding (E2) of the controller.
2) Select a lightning surge absorber type so that the max. Voltage may not the specified allowable voltage of the
absorber.
3) When you use the magnetic lighting contactor (MC) for AC/DC, it is recommended to use a ferrite core close to
the power. terminals as shown below
Ferrite core
(CU1330B, E-TECH)
(CU1330G, E-TECH)
(ZCAT3035-1330, TDK)
(TU1335,ESONG EMC)
Output DC
(5) When applying pipe-wiring, make sure to firmly ground the piping.
3-12
Chapter3 Operation Order and Installation
(2) LG ( ) is grounding for a power filter and used as a noise countermeasure. This controller performs sufficient noise
countermeasures, but it is recommended to use LG if there is no specific reason. For the location of LG, please refer to the
names of each part of 2.4.1.
(3) PE () is grounding to prevent an electric shock. It should be in contact with ground portion to prevent accidents. When Din
rail is installed, it is in contact with the DIN rail. When the panel is installed, it is contact with the panel through the screw for
panel installation. For the location of PE, please refer to Section 3.2.3 Installing and Removing the Motion Controller.
(a) Exclusive grounding: best (b) common grounding: good (c) common grounding: defective
(c) Use the grounding cable more than 2 mm2. To shorten the length of the grounding cable, place the grounding point as
close to the controller as possible.
(d) If any malfunction from grounding is detected, separate the PE and LG.
LG PE LG PE LG PE
(a) Exclusive grounding: best (b) common grounding: good (c) common grounding: defective
(5) PE( ) is basically in contact with DIN rail. However, if DIN rail is coated, it may not be grounded. In this case, use a
3-13
Chapter3 Operation Order and Installation
Thermal Thermal
Connection type Cable specification (mm2) Tightening Torque
resistance resistance
Power and
1.5(AWG16)~2.5(AWG12) Copper 60℃ 0.51N•m
protection ground
3-14
Chapter3 Operation Order and Installation
RA
MC1 Ry1
NFB
MC1
Power R L1
AC200~ 230V S NF L2 XGT Servo
50/ 60 ㎐
T L3 XML-FB04AMK
*Note4
XDL-L7NHA004B
C1 U U
V V M
C2
W W
B+
*Note5 Regenerative ENC
resistor B/Bl E
Digital input
DC 24V Digital output
+24V IN 6 (DO1)
1 BRAKE+
3.3kΩ
2 BRAKE-
POT 11 (DI1)
(DO2)
(DI2) 17 ALARM+
NOT 12
(DI3) 18 ALARM-
HOME 7
(DI4) (DO3)
STOP 8 3 READY+
GAIN2 14 (DI6)
(DO4)
19 ZSPD+
(DI7)
PCL 9
20 ZSPD-
(DI8)
NCL 10
** INPOS1
PROBE1 ** ** TLMT
PROBE2 ** ** VLMT
EMG ** ** INSPD
A-RST ** ** WARN
LVSF1 ** ** TGON
LVSF2 ** ** INPOS2
SVON ** I/O
XMC-E32A
+
DC 5V
-
DC 24V
STO
*Note1 EMG
Safety Input Safety Output
Encoder1
5V 1 ENC1 A+ 3.3kΩ
STO1- 3 7 EDM+
A 2 ENC1 A-
B 3 ENC1 B+ STO1+ 4 8 EDM-
Z 4 ENC1 B- 3.3kΩ
STO2- 5
0V
STO2+ 6
3-15
Chapter3 Operation Order and Installation
Caution
*Note 1
Wiring of encoder 1 is an example about 5V voltage output (open collector) type.
*Note 2
Wiring of encoder 2 is example about 5V voltage output type (line driver)
*Note 3
When connecting more than 2 servo drivers, connect first servo driver’s IN to the motion controller’s OUT and for other servo
drivers, connect previous servo driver’s OUT to next servo driver’s IN. Last servo driver’s OUT doesn’t need to be connected. Axis
number can be set through “Slave/Axis Connection” in XG5000. However, when the servo drive is automatically connected, the
axis order is automatically set according to the connection order.
*Note 4
NF is abbreviation of Noise Filer. It is necessary to prevent the noise from coming in.
*Note 5
Use after making a short circuit between terminals B and BI as regenerative resistor of L7NHA001B~L7NHA004B (50[W],
100[Ω]), L7NHA008B~L7NHA010B (100[W], 40[Ω]), L7NHA020B~ L7NHA035B (150[W], 13[Ω]) is contained inside. In case of a
high regeneration capacity due to frequent acceleration/deceleration, open the shorting pin (B, BI) and connect external resistor to
B and BI to use.
3-16
Chapter3 Operation Order and Installation
(2) This is wiring example connecting SanMotion R Advanced Model EtherCAT servo drive/motor to motion controller. For detail
on installation and wiring, refer to the driver manual.
NFB
SanMotion R Advanced Model Servo Motor
*Note4 MC1
with EtherCAT Coe Interface
R U U
Power AC
200~230V NF S V V
50/60Hz *N ote4 T W W
FG FG
r
Operation
t Brake Power
+
MC ON OFF
Input
1 -
2
PG
3
Alarm Emergency
stop
4
RB1 5
Regenerative
resistor
EN1/2 6
RB2 7
8
CN3 9
OUT1+ 10
1
OUT1-
XMC-E32A 2
OUT2+ 3
OUT2- 4 CN2
CONT1+ 5
+ 1
BAT+
5V CONT1-
- 6
2
BAT-
CONT2+ 7
*Note1 3
CONT2- 8
Encode r1 1 4
5V ENC1 A+
2
A ENC1 A-
5
HWGOFF1+
3
B ENC1 B+ Connect to next servo driver *Note3
Z
4
ENC1 B- 6
HWGOFF1-
0V HWGOFF2+
7
CN1(EtherCAT Output) HWGOFF2-
*Note2 1~6 8
Encode r2 5V EDM+
19 9
A+ ENC2 A+
20
ENC2 A-
Ethernet Cable 10
EDM-
A-
21
ENC2 B+
OUT 1~6 CN0(EtherCAT Input)
B+
22
B- ENC2 B-
Z+
Z-
0V
Caution
*Note 1
Wiring of encoder 1 is an example about 5V voltage output (open collector) type.
*Note 2
Wiring of encoder 2 is example about 5V voltage output type (line driver)
*Note 3
When connecting more than 2 servo drivers, connect first servo driver’s IN to the motion controller’s OUT and for other servo drivers, connect
previous servo driver’s OUT to next servo driver’s IN. Last servo driver’s OUT doesn’t need to be connected. Axis number can be set through
“Slave/Axis Connection” in XG5000. However, when the servo drive is automatically connected, the axis order is automatically set according to
the connection order.
*Note 4
NF is abbreviation of Noise Filer. It is necessary to prevent the noise from coming in.
3-17
Chapter3 Operation Order and Installation
(3) This is wiring example connecting BeckHoff AX2000 servo drive/motor to motion controller. For detail on installation and
wiring, refer to the driver manual.
BRAKE+ 1 B+
X0B
BRAKE- 2 B-
1 L1
2 L2
Encoder
3 L3 X1
4 PE Resolver
Connect to the next servo driver X2
X4
1 X3
+24V
2
Analog-In 1+ 4
3
Analog-In 1- 5
XGND
4
AGND 1
XMC-E32A + - Analog-In 2+ 6
24V DC Analog-In 2- 7
Power supply
Analog-Out 1 8
AGND 10
5V
+ When connecting
external regenerative
X8 +24V
-
resistor, remove the Analog-Out 2 9
jumper 2 -RBint
DGND 18
*Note1 1 -RB
Encoder1 1
Regenerative PSTOP 13
5V ENC1 A+ resistor
2 3 -RBext
A
3
ENC1 A- NSTOP 14
B
4
ENC1 B+ 4 -DC DIGITAL-IN1 11
Z ENC1 B-
0V DIGITAL-IN2 12
Ethernet Cable
OUT IN ENABLE 15
Encoder2 *Note2
5V DIGITAL-OUT1 16
A+
19
ENC2 A+ X11
A-
20
ENC2 A- DIGITAL-OUT2 17
21
ENC2 B+
OUT
B+ 2
22
B- ENC2 B- BTB/RTO
Z+ 3
Z-
0V
Connect to the next servo driver *Note3
Caution
*Note 1
Wiring of encoder 1 is an example about 5V voltage output (open collector) type.
*Note 2
Wiring of encoder 2 is example about 5V voltage output type (line driver)
*Note 3
When connecting more than 2 servo drivers, connect first servo driver’s IN to the positioning module’s OUT and for other servo drivers, connect
previous servo driver’s OUT to next servo driver’s IN. Last servo driver’s OUT doesn’t need to be connected. Axis number can be set through
“Slave/Axis Connection” in XG5000. However, when the servo drive is automatically connected, the axis order is automatically set according to
the connection order.
*Note 4
NF is abbreviation of Noise Filer. It is necessary to prevent the noise from coming in.
3-18
Chapter3 Operation Order and Installation
XMC-E32A
A phase -
B phase +
OUTB
F.G 0V 5V
B phase -
5 V DC
Notes
Before Wiring, please consider maximum output distance of pulse generator.
3-19
Chapter3 Operation Order and Installation
XMC-E32A
OUTA-
A phase -
OUTB+
B phase +
OUTB-
B phase -
F.G 0V 5V
5 V DC
Notes
Before Wiring, please consider maximum output distance of pulse generator.
3-20
Chapter3 Operation Order and Installation
XMC-E32A
External input
point signal
00
R
Internal
07 circuit
COM
DC24V
R
Internal
circuit
15 L
DC12/24V
3-21
Chapter3 Operation Order and Installation
3.4 EMC
3.4.1 EMC Standard
(1) EMC Standard
The EMC Directive specifies the products must 'be so constructed that they do not cause excessive electromagnetic
interference (emissions) 'and 'are not unduly affected by electromagnetic interference (immunity)'. The applicable products
are requested to meet these requirements. This section summarizes the precautions on conformance to the EMC Directive
of the machinery assembled using motion control.
The details of these precautions are based on the requirements and the applicable standards control. However, LSIS will not
guarantee that the overall machinery manufactured according to these details conforms to the below-described directives.
The method of conformance to the EMC directive and the judgment on whether or not the machinery conforms to the EMC
Directive must be determined finally by the manufacturer of the machinery.
3-22
Chapter3 Operation Order and Installation
1) Control panel
The motion controller control panel must have the following features:
(a) Use SPCC (Cold Rolled Mild Steel) for the control panel.
(b) The steel plate should be thicker than 1.6mm.
(c) Use isolating transformers to protect the power supply from external surge voltage.
(d) The control panel must have a structure which the radio waves does not leak out. For example, make the door as a box-
structure so that the panel body and the door are overlapped each other. This structure reduces the surge voltage
generate by PLC.
Panel
Door
Seal
(e) To ensure good electrical contact with the control panel or base plate, mask painting and weld so that good surface
contact can be made between the panel and plate.
3-23
Chapter3 Operation Order and Installation
(a) Earth the control panel with a thick wire so that a low impedance connection to ground can be ensured even at high
frequencies.
(b) The function of LG (Line Ground) and PE (Frame Ground) terminals is to pass the noise generated in the PLC system
to the ground, so an impedance that is as low as possible must be ensured.
(c) The earthing wire itself can generate the noise, so wire as short and thick to prevent from acting as an antenna.
(d) Attach ferrite core under the power cable to satisfy CE specification.
Ferrite core
3-24
Chapter3 Operation Order and Installation
3-25
Chapter3 Operation Order and Installation
3-26
Chapter3 Operation Order and Installation
T1
%QX0.0.0
_T1S %QX0.0.0 Off delay timer
T2
External load MC
L
%QX0.0.1
~
%QX0.0.15
L
%QX0.0.
24V
0
3-27
Chapter3 Operation Order and Installation
3.6 Maintenance
Be sure to perform daily and periodic maintenance and inspection in order to maintain the moiton controller in the best
conditions.
The I/O module mainly consists of semiconductor devices and its service life is semi-permanent. However, periodic
inspection is requested for ambient environment may cause damage to the devices.
When inspecting one or two times per six months, check the following items.
3-28
Chapter3 Operation Order and Installation
Check the following items once or twice every six months, and perform corrective actions as needed.
Check Items Checking Methods Judgment Action
Ambient temperature 0 ~ 55 °C Adjust to meet general
Measured with a
operating Ambient humidity 5 ~ 95%RH specification
thermometer/hygrometer
atmosphere There should be no (environment standard in
Pollution degree measure corrosive gas
corrosive gases control panel)
The module should be The module should be
Looseness, Ingress Retighten screws or hook
move the unit mounted securely.
Place the product
horizontally so that dust
does not enter the
Controller
ventilation holes, and
Status Dust or foreign
Visual checks No dust or foreign material remove dust or foreign
material
material with a dry cloth.
Be careful not to let foreign
material into the ventilation
holes.
Loose terminal Screws should not be
Re-tighten screws Tighten
screws loose.
Connection Distance between
Visual checks Proper clearance Check screw
status terminals
Screws should not be Retighten connector
Loose connectors Visual checks
loose. mounting screws
Measure voltage between Refer to general
Line voltage check Change supply power
input terminals specifications
3-29
Chapter3 Operation Order and Installation
3.7 Troubleshooting
The following explains contents, diagnosis and corrective actions for various errors that can occur during system operation.
3-30
Chapter3 Operation Order and Installation
3.7.2 Troubleshooting
This section explains the procedure for determining the cause of troubles as well as the errors and corrective actions.
Trouble contents
When RUN, STOP LED is Measure when RUN, STOP LED is OFF
OFF
When PROGRAM WRITE Measure when PROGRAM WRITE does not work.
does not work
3-31
Chapter3 Operation Order and Installation
No Power supply.
Is the power supplying?
Yes No Yes
Is PWR LED On?
Yes No Yes
Is PWR LED On?
3-32
Chapter3 Operation Order and Installation
No
No
Is ERR LED still
flickering?
Complet Yes
Notes
In case of minor error, and the does not stop but you should check the error contents promptly and take an
action. If not, it may cause the critical error.
3-33
Chapter3 Operation Order and Installation
No
Is RUN LED off?
Yes
3-34
Chapter3 Operation Order and Installation
(4) Measure in case the I/O module does not operate normally
Here describes the measure procedure when I/O Module does operation normally during operation, as shown on the
program example below.
No
Is Output module output to SOL1 LED
on?
Ye
s
Measure SOL1 terminal voltage Make the correct wiring. Change the connector of Monitor SOL1 state by
by the tester. terminal block. XG5000.
No No
No No
Ye
Is the contact condition of the Is it normal ?
Do the inputs work as expected? Is the output wiring correct ? s
terminal block connector good ?
Ye
Ye
s
Ye s
s
Cont
After removing the external i
wiring, check the conduction
state of module output
Ye
s No
Is it normal ?
3-35
Chapter3 Operation Order and Installation
Conti
No
Are the Input module LEDs for SWITCH1
and SWITCH2 On?
Ye
s
Ye
Do the inputs work as expected? Do the inputs work as expected? Are the module screw
s terminals tightened?
No No
Ye No Ye
s s
Ye Ye
Is the contact condition
s Is the wiring correct? of the terminal block s
connector good ?
No No
After removing the external
wiring, check the input
state by forced input.
Replace the Input Check the input device Recheck from beginning of Replace the Input
module (SWITCH 1, 2) state. this flowchart module
3-36
Chapter3 Operation Order and Installation
If the trouble occurs when using motion controller, fill in the following questionnaire and then contact customer’s service
center by phone or FAX.
For errors relating to special or communication modules, use the questionnaire included in the User’s manual of the unit.
3-37
Chapter3 Operation Order and Installation
3.7.4 Cases
Input circuit troubles and corrective actions
(1) Input Circuit Error Type and Corrective Actions
The followings describe possible troubles with input circuits, as well as corrective actions.
Phenomena Causes Measures
Leakage current of external device Connect an appropriate register and capacity,
(Such as a drive by proximity switch) which will make the voltage lower across the
Input signal
terminals of the input module.
does not turn off
AC input AC input
C Leakage C
R
R
~
External ~
~ ~
External device External device
Leakage current of external device Connect an appropriate register, which will make the
Input signal (Drive by switch with LED indicator) voltage higher than the OFF voltage across the input
doesn’t turn off. module terminal and common terminal. DC input
DC input
Leakage DC input
R
R
External
L E1 DC input
E E
L
E
3-38
Chapter3 Operation Order and Installation
Leakage through a surge suppressor Drive the relay using a contact and drive the
When the load is
connected in parallel to the load. C−R type timer using the since.
C−R timer, time
Use other timer than the C−R contact some
constant fluctuates.
Output timers.
Load Note) Have half-ware rectified internal circuits
C therefore, be cautious.
~
R Leakage Timer
T
Outpu X
~
t
Circulating current by using two different power Use only one power supply.
The load does not sources Connect a sneak current prevention diode.
turn off.(for DC)
Outpu Outp
Load Load
E1 E
E2 E
3-39
Chapter3 Operation Order and Installation
Over current at off state Insert a small L/R magnetic contact and drive the load
[The large solenoid current fluidic load (L/R is large) using the same contact.
such as is directly driven with the transistor output.
Outpu
Outpu
Surge current of the white lamp on. To suppress the surge current make the dark
current of 1/3 to 1/5 rated current flow.
Output Outp
E1 R E
3-40
Chapter4 Motion Control Operation
This picture describes process of parameter and operation data saved in the controller.
XG5000
【 XMC-E32A 】
XG5000 I/F
Internal buffer
Motion/NC
User program Basic parameter
status
Sequence control Motion/NC
commands System status
parameter
SD Card service *1
4-1
Chapter4 Motion Control Operation
Motion controller can control up to 32 axes of actual motor axis and 4 virtual axes through EtherCAT. Among 32 axes, you can
control the axes that are not connected to the slave by setting them as virtual axes and 4 axes are provided for the virtual axes only.
Motion control block diagram of motion controller is shown below.
XMC-E32A
Servo drive
EtherCAT
Motion Motion control Comm.
Program Communication
command and Feedback
execution process
analysis data process control
(Position/ M
Velocity/
Torque)
E
Encoder1, Encoder2
External input/output
input
E E
4-2
Chapter4 Motion Control Operation
The main task completes the motion within the period set by the user, and it performs I/O refresh, program proce
ss, motion control and processes EtherCAT synchronous communication. The set period of the main task is 0.5/1/2/
4ms and it can be set in the basic parameter of the motion controller. (For smooth motion control, the maximum
main task is limited to 4 ms.)
The period of the periodic task can be set in multiples of the main task’s period set by the user, and the periodic
task is processed in the remaining time after the main task is completed during the period of each task. Therefore, t
he periodic task can be performed over a number of main task periods.
The initialization task is only performed once at the beginning when the motion controller is entering the RUN mo
de, and it is normally used for setting the initial data of the system and the parameter.
Number of
Task types Operation
Programs
· It performs I/O refresh, processing of programs assigned to main task and motion
control.
· It performs the above tasks at a time for each of the established control period
(main task cycle).
Main task
· It has higher priority than periodic task.
· It uses programs that require synchronized control and high-speed operation
processing through allocation since it is possible to process program fast.
· Period possible to be set: 0.5ms, 1ms, 2ms, 4ms
· It performs processing of programs assigned to main task.
· It is performed for the remaining time after implementation of main task operation
within the control period, and can be performed over multiple cycles.
Up to 256
· Since it has lower priority than main task in the execution of motion control
Periodic task commands within main task program, the motion control commands executed in
the main task program are processed first.
· It uses programs of processing other monitoring data and control of device that
doesn’t require high-speed processing through allocation.
· Period possible to be set: 1ms ~ 100ms (Set to a multiple of the main task cycle)
· It performs processing of programs assigned to the initialization task after
implementing I/O refresh.
Initial Task · If the initial task completion (_INIT_DONE) flag is set by the initialization task
program, the task is completed, and the execution of the main task and periodic
task program starts.
Notes
If the main task cycle is set outside the setting range, an error 0x0260 occurs.
If the periodic task cycle is not set to the multiple of the main task, an error 0x0261 occurs.
If the error occurs, check the task cycle.
4-3
Chapter4 Motion Control Operation
Perform
Program Stop Program
periodic task
Periodic task period
4-4
Chapter4 Motion Control Operation
History
Periodic
error
History
Periodic Periodic
warning warning
Main task period Main task period Main task period Main task period
RUN RUN RUN ERROR
Performance time
of main task
Perform
Waiting Program Waiting Program
periodic task
Performance time of periodic task
Periodic task period
4-5
Chapter4 Motion Control Operation
Perform
Waiting Program Waiting Program
periodic task
Performance time of periodic task
Periodic task period
4-6
Chapter4 Motion Control Operation
Slave Slave
Main task period Main task period Main task period Main task period
Update input
status
Perform I/O
Program
Motion I/O
Program
Motion I/O
Program
Motion I/O
Program
Motion
main task refresh control refresh control refresh control refresh control
Processing
related
program
If the periodic task program is executed within several main tasks, the motion control result of each main task is reflected
in the periodic task program. Please keep this in mind when writing the periodic task program.
4-7
Chapter4 Motion Control Operation
OUT
IN
4-8
Chapter4 Motion Control Operation
Init
(PI) (IP)
Pre-Operational (SI)
(OP) Safe-Operational
(SO) (OS)
Operational
The communication between the master-slave of EtherCAT communication begins from the Initial state and progresses to the
Operational state. In the motion controller, the slave servo drive can be controlled with a normal process data communication
when it is in operational state.
If a communication error occurs while the motion controller performs the slave and EhterCAT communication at operational
state, the communication state is changed to the Initial state and the communication between the slaves is discontinued. In this
case, the factor of communication error should be removed and reconnect with the slave to restart the communication.
4-9
Chapter4 Motion Control Operation
Object Dictionary
TxPDO
Index Sub-Index Description Type Index Sub-Index
0x6041 - Status Word UINT 0x6040 0x00
0x6064 0x00
0x6061 - Operation Display BYTE 0x6061 0x00
Slave manufacturers sometimes set many RxPDO and TxPDO in advance and provide Slave Information File including this
information in xml format. When initially setting and test operating this slave information file, it should be transmitted to the motion
controller using the XG5000. This slave information file should be analyzed and communicated to the PDO data which is
optimized for controlling.
4-10
Chapter4 Motion Control Operation
Ethernet header
In general, the exchange data size between the master and the slave is often small. In this case, the master performs
Ethernet communication with the slave in a single frame. At this time, considering the essential elements, the single frame
has a specification consisting of up to 1518 bytes (14+2+1498+4). The figure below shows the configuration of a single
frame.
14byte 2 byte 1498byte 4byte
On the other hand, if the number of slaves to communicate increases or the number of process data increases, the data
size to be exchanged exceeds the standard size of 1518 bytes of single frame. At this time, data exchange is performed by
transmitting multiple frames by composing an additional frame. At this time, multiple frames are called multi-frames.
When multi-frame is set by user setting multiple slaves and a sufficient number of PDOs, the program utility automatically
completes multi-frame setting. The figure below shows the multi-frame state that has been set up.
Multi-frame is a convenient function that can be processed at once when there is a lot of data to be exchanged with the
slave.
4-11
Chapter4 Motion Control Operation
Item Specifications
EtherCAT Master
4-12
Chapter4 Motion Control Operation
2) Using Branches
EtherCAT Master
Junction Slave
EtherCAT Out In
Out
EtherCAT Slave EtherCAT Slave
Out
In Out In Out
EtherCAT Slave
In Out
In
Out
Out
EtherCAT Out
(2) Precautions
1) When connecting to EtherCAT slaves, be careful of not connecting to In/Out in reverse.
2) Equipment with several junction slaves is not allowed.
3) When using cable duplication with junction slaves, do not use the remaining ports of the junction slave.
4) Junction slaves must use products that provide the EtherCAT reference clock.
5) When connecting to EtherCAT, configuration of the slave setting should be identical with the real configuration.
4-13
Chapter4 Motion Control Operation
2) When the slave information window displays, check a slave name, select the confirmation button and add slaves.
3) If adding other slaves, select slaves in the slave selection window by clicking the “...” button next to a slaves name.
4-14
Chapter4 Motion Control Operation
4) When adding other slaves, click the “...” button in the slave information window.
5) Confirm if a slave is correctly added in the network view screen.
4-15
Chapter4 Motion Control Operation
CST mode
Index Name
6040h Control word
6041h Status word
6071h Target torque
6077h Torque actual value
4-16
Chapter4 Motion Control Operation
In the EtherCAT Slave Setting you can perform whether to Use the DC of Slaves/PDO Setting/Market Demand Setting.
For more information see Chapter 5 Memory, Parameter and I/O Signal - (4) EtherCAT Parameter.
4-17
Chapter4 Motion Control Operation
4-18
Chapter4 Motion Control Operation
(1) If the network setting is different from the number of slaves while connecting to EtherCAT
Variable Error message
_EC_ERR_INFO1 NetConfig SlaveQtyxx Actualxx
(2) If the network setting is different from real slaves while connecting to EtherCAT
Variable Error messages
_EC_ERR_INFO1 Check Slave xx VendorID
(3) If the network setting is different from real slaves while connecting to EtherCAT
Variable Error messages
_EC_ERR_INFO1 Check Slave xx Product Code
(4) If the network cables are connected differently from the setting while connecting to EtherCAT
Variable Error messages
_EC_ERR_INFO1 Slave xx DL Statusxx
(5) If the PDO working counter error occurs while connecting to EtherCAT
Variable Error messages
_EC_ERR_INFO1 PDO Communication Error
4-19
Chapter4 Motion Control Operation
_EC_TRANSMITTED_OK UDINT %FD2084 Number of Transmitted The EtherCAT frame is damaged due
Frames to noise
_EC_RECEIVED_OK UDINT %FD2085 Number of Received
Frames
_EC_CRCERR_CNT UDINT %FD2086 CRC error frame reception The EtherCAT frame is damaged
_EC_CARRIER_SENSE_ERR UDINT %FD2088 EtherCAT Carrier sense Another device rather that the
error EtherCAT device is connected
_EC_COLLISION_CNT UDINT %FD2087 The mumber of Collision The repeater hub is connected
Frames
_EC_LINKOFF_CNT UDINT %FD2089 Link-off count The EtherCAT cable is not connected
_EC_OVERSIZE_FRAME UDINT %FD2090 Oversize frame reception The EtherCAT frame is damaged
Another device rather that the
EtherCAT device is connected
_EC_UNDERSIZE_FRAME UDINT %FD2091 Undersize frame reception The EtherCAT frame is damaged
Another device rather that the
EtherCAT device is connected
_EC_JABBER_FRAME UDINT %FD2092 Jabber frame reception The EtherCAT frame is damaged
Another device rather that the
EtherCAT device is connected
_EC_PDO_ERR_CNT_TOTAL UDINT %FD2104 PDO Error Count An error has occurred during PDO
(Accumulated) communication
_EC_PDO_ERR_CNT_MAX UDINT %FD2106 PDO Error Count (Max.) An error has occurred during PDO
communication
_EC_LOST_FRAME UDINT %FD2105 Number of Damaged The EtherCAT frame is damaged due
Frames to noise
4-20
Chapter4 Motion Control Operation
4-21
Chapter4 Motion Control Operation
Caution
Since the motion control program is stored in eMMC when the power is off, the number of program writes is limited to 100,000
times. Please be careful when using the program.
4-22
Chapter4 Motion Control Operation
4-23
Chapter4 Motion Control Operation
4-24
Chapter5 Memory and Parameter
5.1 Memory
5-1
Chapter5 Memory and Parameter
5.1.2 Device
(1) Device type
Types of device supported in motion control module are shown in the Table below.
Type Capacity Usage
Assigned when adding a symbolic variable to the automatic
Automatic variable (A) 4,096KB variable area
(able to set 2,408KB of retain)
Internal device area (able to set 1,024KB of retain by
Direct variable (M) 2,048KB
selecting in the area of basic parameter)
Input variable(I) 16KB Built-in digital input, TxPDO data of the EtherCAT slave
Output variable(Q) 16KB Built-in digital output, RxPDO data of the EtherCAT slave
Variables related to motion control status and module
System variable(F) 128KB
operation status
Special variable(U) 1KB Built-in analog operations and state variables
Special variable(K) 18KB SD memory, data log and encoder flag area
5-2
Chapter5 Memory and Parameter
%I[size prefix]n1.n2.n3
No. Description
Size prefix X(1 bit), B(1 byte), W(1 word), D(1 double word), L(1 long word)
n1 0~127 block assigned
n2 0~15 block assigned
n3 64 bit assignment. n3 data based on [size prefix]
5-3
Chapter5 Memory and Parameter
5-4
Chapter5 Memory and Parameter
5-5
Chapter5 Memory and Parameter
5-6
Chapter5 Memory and Parameter
5-7
Chapter5 Memory and Parameter
5-8
Chapter5 Memory and Parameter
5.1.3 Parameter
5-9
Chapter5 Memory and Parameter
5-10
Chapter5 Memory and Parameter
5-11
Chapter5 Memory and Parameter
Input signal
Time
Input signal
5-12
Chapter5 Memory and Parameter
(b) Encoder
Encoder parameter is explained as follows.
Item Content Setting range Initial values
0: pulse
1: mm
Encoder 1 unit Set display unit of encoder position. 0: pulse
2: inch
3:degree
Encoder1 Pulses per rotation Set Encoder1 pulses per rotation 1 ~ 4294967295 8192 pls
Set the movement amount of the load side 0.000000001 ~
Encoder1 Travel per rotation 10 pls
moved per encoder 1 rotation. 4294967295
0:CW/CCW 1 phase 1
multiplication
1: PULSE/DIR 1
multiplication
2: PULSE/DIR 2
Set the input mode in accordance with the multiplication 3: PHASE A/B 1
Encoder1 Pulse input
output shape of encoder. 3: PHASE A/B 1 multiplication
multiplication
4: PHASE A/B 2
multiplication
5: PHASE A/B 4
multiplication
Encorder1 max. value 2147483647 pls
Set position display range of encoder. Long real(LREAL)
Encoder1 Min. value -2147483648 pls
0: Unit/sec
Encoder1 Speed unit Set the encoder speed display unit. 1: Unit/min 0: Unit/sec
2: rpm
0: Unused
1: 500kPPS
2: 200kPPS
Limit the frequency of pulse input to
Encoder1 input filter value 3. 100kPPS 0: Unused
encoder.
4: 10kPPS
5: 1kPPS
6: 0.2kPPS
Encoder1 position filter time Set the time constant (in hours) of the filter to
0 ~ 1000 0 ms
constant calculate the encoder's position average.
5-13
Chapter5 Memory and Parameter
Encoder2position filter time Set the time constant (in hours) of the filter to
0 ~ 1000 0 ms
constant calculate the encoder's position average.
5-14
Chapter5 Memory and Parameter
Notes
When the encoder unit is different from the synchronous operation axis, it operates by the synchronous ratio
regardless of the unit.
[Example]
• Encoder unit: pulse
• Encoder resolution: 4096 pulse
• Unit of Synchronous operation axis: mm
• Master axis : Slave axis = 2 : 1
Encoder1 travel of synchronous operation axis per rotation = 4,096 x1 /2 = 2,048 [mm]
· Encoder unit: mm
5-15
Chapter5 Memory and Parameter
2) PULSE/DIR 1 multiplication
Count operation is performed when a phase input pulse increases, whether to be added or subtracted is decided by B phase.
5-16
Chapter5 Memory and Parameter
3) PULSE/DIR 2 multiplication
Count operation is performed when a phase input pulse increases and decreases, and whether to be added or subtracted is
decided by B phase.
5-17
Chapter5 Memory and Parameter
5-18
Chapter5 Memory and Parameter
5-19
Chapter5 Memory and Parameter
5-20
Chapter5 Memory and Parameter
(a) Master
It sets the master functions related to the EtherCAT slave connection when connecting to the network.
The items for master setting are as follows.
1) Registration information
When the criteria of ‘Slave Revision Check’ are set to ‘0: Do not check’, if the slave that is incompatible with the Revision
of the slave parameter is connected, it may not operate normally. Therefore, make sure to check the compatibility between
the Revisions before use.
5-21
Chapter5 Memory and Parameter
- ‘1: Check’
It compares the serial number information set in the slave parameter with the one in the connected slave, and if a
discrepancy is found, the network configuration mismatch error (error code: 0x0F1F) occurs and the communication
connection process is terminated.
If the ‘Slave Serial Number Check’ is set to 1: Check’, you can see the changes of the network when the network
configuration order is changed or the slave is replaced so it is useful for maintenance such as resetting the slave
parameters, etc. You need to reset the serial number in XG5000 to connect to the changed network configuration.
If you want to register the variable name and use it in the program, you can register the variable to be used in the program
by selecting "Register Variable".
5-22
Chapter5 Memory and Parameter
(b) Slave
1) General Information
Check the information of EtherCAT slave to be used for network connection. It can be identified on the Slave Information tab
displayed after executing ‘Open’ of each slave connected to the sub-trees of [EtherCAT parameters]-[Slave] on the XG5000
project tree. To add slaves (servo drive, EtherCAT I/O, etc.), the EtherCAT parameters should be written in the Project Write.
The general information items of the slave are as follows
a) Slave name
It selects the slave to be connected to the motion control module and displays the name of the selected slave. L7NH servo
drive is selected as the initial value when adding the slave to the slave data.
When selecting the slave, the slave information is retrieved from the XML file in the folder below to display the available list.
\EtherCATXML folder in XG5000 installation folder’
5-23
Chapter5 Memory and Parameter
If there is a slave to be newly added, copy the corresponding XML file to the above folder and then, restart XG5000 or
execute the 'ESI Rescan' menu which is activated by right-clicking in the 'ESI Library' window.
b) Station number
It displays the station number applied to the selected slave. The display range is from 1 to 64 and it cannot be arbitrarily
changed by a user.
To change the slave station number, select the slave in the project tree and among menus by right-clicking, execute the
'Properties' menu and then, change the station number on the slave information.
However, the station number is automatically set according to the order of connection when the slave is connected
automatically.
c) Vendor
The vendor name of the selected slave is automatically displayed. The user cannot change it arbitrarily.
d) Version
The Revision information of the selected slave is displayed automatically. The user cannot change it arbitrarily.
e) Serial number
The serial number of the selected slave is displayed. When "Read Serial Number" is executed during EtherCAT
communication, serial number of the current product is displayed.
f) Whether DC is used
If the slave supports the DC function, it is automatically set form the XML file. If you do not want to use the DC function,
select ‘0: Unused’.
Notes
DC (Distributed Clock): It is used to synchronize the EtherCAT master with the EtherCAT slave, enabling high-
precision synchronous control between the EtherCAT slaves.
The DC shares the time information between the EtherCAT master and EtherCAT slave to synchronize each slave. In
order to share the time information, the first slave connected to the motion control module provides the Reference Clock.
The Reference Clock distributes the time information to each slave in every communication cycle.
2) PDO setting
RxPDO sets the synchronous data which is transmitted from the motion controller to the slave in every communication
cycle. The RxPDO items supported by the relevant slave are automatically set when selecting the slave. You can use the
‘Edit’ function to add or delete objects you want.
5-24
Chapter5 Memory and Parameter
Notes
For the slave used as the motion axis, when editing the RxPDO object, the following objectives must be included as
they are essential items used in the motion control module.
0x6040:0 Control word
0x607A:0 Target position
The synchronous data allocated here is automatically assigned to I/O devices and it can be registered as I/O variables and
referred in the user program.
For example, the ‘Controlworld’ object of RxPDO synchronous data of L7N servo drive connected to the slave 1 is
registered as I/O flag Rx1_1_0_ControlWord (%QW64).
TxPDO sets the synchronous data read from the slave of the motion controller in every communication cycle. When
selecting the slave, the TxPDO items supported by the relevant slave are set automatically. You can use the ‘Edit’ function
to add or delete objects you want. When editing the PDO object, the following objects must be included as they are
essential items used in the motion control module.
Notes
For the slave used as the motion axis, when editing the TxPDO object, the following objectives must be included as
they are essential items used in the motion control module.
0x6041:0 Status word
0x6064:0 Actual position
The synchronous data allocated here is automatically assigned to I/O devices and it can be registered as I/O variables
and referred in the user program.
For example, the‘‘Statusword’ object of TxPDO synchronous data of L7N servo drive connected to the slave 2 is
registered as I/O flag Tx_1_2_0_StatusWord(%IW68).
3) SDO Parameter
Set the SDO (Service Data Object) parameters operated in the slave.
- The parameters are not stored on the motion controller but are operated on the slave.
- For the setting and operation of the parameters, refer to the Appendix 3 Setting Example.
5-25
Chapter5 Memory and Parameter
4) Start command
- It is the function to set the specific object during transition of the slave during EtherCAT connecting operation.
- It is used for initialization of the slave parameters as well as slave Rx and TxPDO address assignment and item settings.
- It is provided up to 50 per a slave.
Notes
The configuration of the transition follows the below EtherCAT state transition diagram.
5) Online service
- For more information on the online service, refer to Chapter 08 Motion Control Functions -8.5.FoE Functions.
5-26
Chapter5 Memory and Parameter
The axes can be set to "Slave", "Virtual axis", "Disabled". The axis that is set to ‘Disabled’ is not included in the axis
parameters.
5-27
Chapter5 Memory and Parameter
a) Unit
This is used to set the command unit during motion control, and depending on the control target, the unit of pulse, mm, inch,
and degree can be set for each axis.
When changing the setting of the unit, other parameters or variable values are not changed. Therefore, when changing the
units, the relevant parameters must be reset so that they can be adjusted to the setting range of the relevant unit.
5-28
Chapter5 Memory and Parameter
parameter. For example, if the setting of the 「unit」is in mm, the unit of the speed command is ‘mm/min’.
When set to ‘2: rpm’, it is applied as the rpm. If the speed command unit is rpm and it is internally changed to the unit speed,
values set in the 「Pulses per rotation」and 「Travel per rotation」parameters are used.
When changing the setting of the speed command unit, other parameters or variable values are not changed. Therefore,
the related parameters must also be reset according to the setting range of the relevant unit.
In case the operation speed of the serve axis exceeds the speed limit in synchronized operation (gear, cam)
In case the setting for「error level of tracking error」is ‘1: alarm’ and the error of tracking error occurs
In case the emergency stop command is executed during the test operation in XG5000
In case an error occurs in the command executed while axis is currently operating during the checking of
execution conditions
5-29
Chapter5 Memory and Parameter
[Example]
When the machine which is moved by ball screw is connected to the encoder with gear, the setting of the encoder unit
/ Encoder Pulses per rotation / Encoder Travel per rotation is as follows.
· unit: mm
· Pulses per rotation = 524288 (19Bit Encoder)
· Travel per rotation = Ball screw pitch
= 10.0 mm
· Gear ratio(Motor) = 7
· Machine side gear ratio = n
Notes
If [Unit]is set to ‘0: pulse’ in the above [Setting example], it will move to the position corresponding to the number of
encoder pulses without regards to the motor side gear ratio or machine side gear ratio.
That is, the instructions of 524,288 * 7/5 = 734,003 pulse should be issued in order to move 10mm.
5-30
Chapter5 Memory and Parameter
5-31
Chapter5 Memory and Parameter
5-32
Chapter5 Memory and Parameter
2) Expansion setting
The following explains extended parameter of operation parameter
5-33
Chapter5 Memory and Parameter
The range check of the software upper limit and lower limit is conducted at the beginning of operation and during the
operation.
If the soft upper limit and lower limit is detected, an error occurs and the module suddenly stops a motor. Therefore,
check the cause of the error and use it after resetting the error when restarting the operation.
If the software upper/lower limit was set by default values (upper limit: 2,147,483,647, lower limit: -2,147,483,648) or
same value, then it would not detect software upper/lower limit.
Infinite running
5-34
Chapter5 Memory and Parameter
This item sets the distance to target position where the In-position flag (_AXxx_INPOS) becomes on.
During operating motion control, the in-position flag( (_AXxx_INPOS) turns off and when the difference between target
command position and current position is less than the command in-position width, the in-position flag( (_AXxx_INPOS)
turns on. the in-position flag can be used as trigger when executing other auxiliary tasks before completing position
control.
Position
Command inposition width
Target position
Command
position Current
position
Time
Speed
Command
speed
Current
speed
Time
Start
Inposition flag
5-35
Chapter5 Memory and Parameter
5-36
Chapter5 Memory and Parameter
5-37
Chapter5 Memory and Parameter
5-38
Chapter5 Memory and Parameter
Even when the parameter value is set to '1: detect', if the software upper limit/lower limit is set to the initial value (upper
limit: 2,147,483,647, lower limit:-2,147,483,648) or the same value, software limit is not detected.
5-39
Chapter5 Memory and Parameter
기어
Gear
1m
1m 우측으로
movement 이동(정방향)
right side (Forward) Occurrence of
direction
방향변경 change
1mmovement
1m 좌측으로left이동(역방향)
side (Reverse) 백래쉬 Backlash발생
백래쉬including
Transfer amount 보정을 포함한
Backlash 이동량 amount
compensation
백래쉬
Backlash
The backlash compensation amount can be set to the pulse unit from 0 to 65535. If the ‘Unit’ parameter value is not ‘0:
pulse’, Please set a range as follows:
0 ≤ [Backlash compensation amount X (Pulse number per rotation / Transfer distance per rotation) X (Gear ratio on the
motor / Gear ratio on the machine)] ≤ 65535
Notes
1. The ‘backlash compensation amount’ parameter generally operates only on the axis connected to the S axis of
the NC channel that is for the spindle axis on which the spindle device does not support the backlash
compensation function. For the NC channel/axis excluding general axes and the NC S axis, use the backlash
function that a servo drive supports.
2. The ‘backlash compensation amount’ is output by adding the amount traveled to the original position when the
traveling direction of machine changes after becoming the origin fix state. The backlash compensation amount
applies only to the position control operation such as the spindle orientation operation but does not apply to the
speed control.
Drive
L7NH, PEGASUS,
LS
iX7NH
① When the absolute positon of drive occurs damaged situation (the encoder cable open) in the homing status, it is
used to initializing homing status and prevent malfunction of operation caused by an absolute position error.
② This function only operates drive that supports an absolute position valid signal.
③ The drive absolute position error detection of extended parameter is 1: the function operates when homing status is
set to initialization.
④ If detecting that an absolute position valid signal of drive change from On to Off through EtherCAT communication,
the homing status of the relevant axis is initialized and axis error (absolute position abnormality detection error:
0x1240) occurs.
5-40
Chapter5 Memory and Parameter
⑤ If the absolute position valid signal is off while the communication is connected through EtherCA connection
command, the homing status of relevant axis is initialized.
⑥ When changing the drive absolute position error detection of extended parameter from 0: not detect to 1: drive
absolute position error detection, if the absolute position valid signal of relevant axis is off, the homing status of
relevant axis is initialized and an axis error (an absolute position abnormality detedction error: 0x1241) is occurred.
⑦ If executing the current position setting function while drive absolute position valid signal of relevant axis is off, the
axis errors (an absolute position abnormality detection error during executing the current position setting: 0x1096)
occurs
5-41
Chapter5 Memory and Parameter
If confirming a position by attaching a separate encoder to the motor of the spindle axis, the position can be
confirmed by connecting encoder signals to the built-in ENC1 of a motion controller.
When using the ‘built-in ENC1’, set the ‘built-in parameter - encoder’ as follows:
- Unit of Encoder 1 = 0: pulse
- Encorder1 max. value = 2147483647 pls
- Encorder1 min. value = -2147483648 pls
3: Built-in ENC2
If confirming a position by attaching a separate encoder to the motor of the spindle axis, the position can be
confirmed by connecting encoder signals to the built-in ENC2 of a motion controller.
When using the ‘built-in ENC2’, set the ‘built-in parameter - encoder’ as follows:
- Unit of Encoder 2 = 0: pulse
- Encorder2 max. value = 2147483647 pls
- Encorder2 min. value = -2147483648 pls
‘4: EtherCAT ENC’
Set it if confirming a position by attaching a separate encoder to the motor of the spindle axis and connecting it to
the EtherCAT slave (high speed counter device). To confirm the encoder position value read from the EtherCAT
slave, the following parameter setting is needed.
- Number of pulses per rotation of the spindle EtherCAT encoder
- Spindle EtherCAT encoder position variable/address
b) Number of pulses per rotation of the spindle EtherCAT encoder
If the ‘spindle encoder selection’ parameter is set to ‘4: EtherCAT ENC’, set the resolution of the encoder attached to a
motor.
c) Spindle EtherCAT encoder position variable/address
If the ‘spindle encoder selection’ parameter is set to ‘4: EtherCAT ENC’, the position value of the encoder read from the
EtherCAT slave sets the saved variable/address. You can specify the input variable (I) and direct variable (M).
The address value that can be set according to variables is as follows:
- %ID0 ~ %ID4095
- %MD0 ~ %MD524287
d) The P Gain of the Spindle Positioning Mode
The spindle axis is basically operated with speed control, and the speed command value is output to the device that
controls the spindle axis. However, some spindle functions may require position control operation. When the spindle
axis executes position control operations such as the homing operation and orientation operation, the position loop that
calculates the output speed with the command position and the current position operates.
The ‘P Gain of the Spindle Positioning Mode’ sets all the responses from the position loop. The bigger the gain value is
set the higher the responses become. However, as vibration can occur according to load if setting the gain value too big,
adjust the gain value accordingly after taking proper actions for safety.
e) The Feed Forward Gain of the Spindle Positioning Mode
The ‘Feed Forward Gain of the Spindle Positioning Mode’ is used to add the control value that is proportional to a speed
command of the spindle axis from the position loop to the output speed. The bigger the gain value is set the less the
tolerance is. But as vibration or overshoot can occur according to load if setting the gain value too big, adjust the gain
value accordingly after taking proper actions for safety.
5-42
Chapter5 Memory and Parameter
Notes
From the position loop of the spindle axis, the ‘P Gain of the Spindle Positioning Mode’ and ‘Feed Forward Gain of
the Spindle Positioning Mode’ values are operated as follows.
5-43
Chapter5 Memory and Parameter
Set the Z phase position as the homing after executing the homing operation on the NC function module of a motion
controller and starting reverse operation.
When executing the NC_Home command, execute the homing operation with parameters; zero navigation speed of
the homing operation and acceleration/deceleration of the homing operation. Set the device where the Z phase signal
used as the Zero signal of the homing operation for ‘Z phase variable/address’ parameters is saved.
34: Forward direction, Z phase
Set the Z phase position as the homing after executing the homing operation on the NC function module of a motion
controller and starting forward operation.
When executing the NC_Home command, execute the homing operation with parameters; zero navigation speed of
the homing operation and acceleration/deceleration of the homing operation. Set the device where the Z phase signal
used as the Zero signal of the homing operation for ‘Z phase variable/address’ parameters is saved.
35: Set the homing of the current position
It is used when setting the current position of the spindle axis to the homing.
b) Switch navigation speed of the homing operation, Zero navigation speed of the homing operation,
5-44
Chapter5 Memory and Parameter
5-45
Chapter5 Memory and Parameter
c) Override mode
When executing override command at relevant axis group, set how to apply the input values.
0: Specified by ratio, 1: Specified by unit can be set. If setting 0: Specified by ratio, the factor value of override command
operates as ratio for the current setting item. If setting 1: Specified by unit, the factor value operates absolute specified value
of setting item.
d) Interpolation operation blending angle limit, Interpolation operation blending allowable angle
Set the blending angle limit function for the relevant axis group. You can set to operation after the deceleration stop
in the place where a shock is expected to occur due to the large angle difference between the two operations of
blending angle limit. You can set 0: disable , 1: enable in interpolation operation blending angle limit and set the
value of 2 to 178 in the interpolation operation blending allowable angle. For details, refer to chapter 8.4.11
Interpolation operation blending angle limit function.
5-46
Chapter5 Memory and Parameter
operation. For details, refer to chapter 8.4.15 Coordinate operation output filter function.
(a) XYZ
XYZ is a robot where the axis set in 「axis setting 1」in X-axis, the axis set in 「axis setting2」in Y-axis, and the axis set in
「axis setting 3」in Z-axis make a one-to-one correspondence and move in Cartesian coordinate. If the type of coordinate
system is set to XYZ, there is no need to set the coordinate system parameters.
5-47
Chapter5 Memory and Parameter
(b) Delta3/3R
Delta is the delta robot consisting of three rotation axes. If you set the coordinate system type as Delta, you need to set the
parameters of the five coordinate systems; Rf / Rm / Lf / Lm
Parameter Description
Rf
Length from the center of the fixed frame to
Fixed frame radius (Rf)
the link of the fixed frame(mm)
(c) LinearDelta3/3R
LinearDelta is the delta robot consisting of three linear axes. If you set the coordinate system type as LinearDelta, you
need to set the parameters of the five coordinate systems; Lm / Hf / RfTop / RfBottom / Rm.
Parameter Description
RfBottom
Height of fixed frame (Hf) Height of fixed frame (mm)
d) T-Gantry/R
For T-Gantry robots, the machine parameter setting does not need additionally.
5-48
Chapter5 Memory and Parameter
3) Tools setting
Tool setting item is explained as follows.
Item Content Setting range Initial values
X-axis offset Set the X axis offset at the end(tool) of robot Long real(LREAL) 0
Y-axis offset Set the Y axis offset at the end(tool) of robot Long real(LREAL) 0
Z-axis offset Set the Z axis offset at the end(tool) of robot Long real(LREAL) 0
The tool setting parameter enables the position of the tool to be set as an offset so that the end of the tool can be controlled when
using a separate tool at the end of the robot.
(a) Rectangle
Parameter Description
Y Axis
Work space parameter1 X min(mm)
Work space parameter2 X max(mm)
Work space parameter3 Y min(mm)
Ymax
X Axis
5-49
Chapter5 Memory and Parameter
(c) Delta
Z Axis Parameter Value
YAxis
Work space parameter1 Zu(mm)
Work space parameter2 Hcy(mm)
Zu
Rco
(d) Sector
Parameter Value
Y Axis Work space parameter1 L start(mm)
Work space parameter2 L end(mm)
Work space parameter3 Z min(mm)
Work space parameter4 Z max(mm)
EndAngle Work space parameter5 SartAngle(degree)
StartAngle
Work space parameter6 EndAngle(degree)
X Axis
5) PCS setting
PCS setting item is explained as follows.
The PCS parameter sets the origin of the workpiece to PCS to facilitate the operation of moving over a specific workpiece in
the coordinate system operation. In the PCS coordinate system operation, the coordinate system operation is performed with
the set PCS as the origin.
5-50
Chapter5 Memory and Parameter
(7) NC Parameter
Set the parameters related to NC control.
- For more details, please refer to Chapter 9 NC control function -9.4 NC parameters.
5-51
Chapter 6 Motion Function Block
MC_Stop
Done Stopping
ErrorStop *1
*6
*4 *3
MC_Home
*1 ErrorStop:
: in case axis error occurs regardless of the current state of axis
*2 Disabled:
: in case MC_Power.Enable input is Off when axis error does not occur
*3 ErrorStop Disabled
: in case MC_Reset command has issued when MC_Power.Status output is Off
*4 ErrorStop Standstill
: in case MC_Reset command has issued when MC_Power.Status output is on and MC_Power.Enable input is On
*5 Disabled Standstill
: in case of turning On MC_Power.Enable input when MC_Power.Status output is On
*6 Stopping Standstill
: in case of turning Off MC_Stop.Execute input when MC_Stop.Done output is On
6-1
Chapter 6 Motion Function Block
Disabled state indicates the state in which no command is given to a single axis, and no
error occurs.
In case there is no motion controller at the time of first operation, each axis begins in the
disabled state.
Disabled Afterwards, axis status is changed to standstill state in case servo-on status emerges when
(Disabled) Enable input of servo On/Off (MC_Power) motion function block is On.
The axis becomes disabled state when Enable input of serve On/Off (MC_Power) motion
function block is Off in case of not being in ErrorStop state.
In case there is motion function block which is currently being performed, the command is
interrupted. (CommandAborted output of the existing motion function blocks is On.)
No matter which state the current axis is in, it is changed to ErrorStop state when axis error
occurs, and the axis decelerates to stop.
ErrorStop In the state where error occurs, ErrorStop state is maintained even though servo On/Off
(ErrorStop) (MC_Power) motion function block is executed.
The motion axis which is in ErrorStop state maintains stationary state, and any command
except for error reset is not executed.
Standstill When the power of axis is activated, there is no error in the axis and any command is not
(Standstill) made, the axis state indicates StandStill state.
Homing
Homing state indicates the axis is in homing operation.
(Homing)
In case Stop immediately (MC_Stop) function block is executed, the axis state is changed
Stop to stopping state. When the axis is in stopping state, other motion commands cannot be
(Stopping) given to the axis until the Stop is completed (until Done output is activated). If Done output
is On, and Execute input is On, the state is switched to Standstill status.
Continuous Motion It indicates state where operation continues until the current axis becomes operation stop
(Continuous Motion) status.
Discrete Motion
It indicates reduced operating status with target position.
(Discrete Motion)
Synchronized Motion
Synchronized motion indicates axis is in synchronized operation.
Synchronized Motion
6-2
Chapter 6 Motion Function Block
*1
MC_GroupHalt
GroupMoving MC
_G *2
rou
MC_GroupStop pS
top
Error GroupStopping
GroupHoming Error
Done Error
MC Done
_G p
ro *1 Sto
up up *3 GroupErrorStop
Ho ro
me _G
C
M Error
et
MC_GroupEnable R es *2
ro up
GroupDisabled GroupStandby G
MC_GroupDisable M C_
*6 MC_UngroupAllAxes
MC_RemoveAxisFromFroup
MC_AddAxisToGroup *4 MC_AddAxisToGroup
MC_RemoveAxisFromGroup MC_RemoveAxisFromGroup
MC_UngroupAllAxes *5
*1 GroupMoving
: In case of performing the motion function block of general group operation
*2 GroupStopping, GroupErrorStop
The relevant motion function block is not performed when different motion function block is performed in GroupStopping or
GroupErrorStop state, and when MC_GroupReset function block is performed in GroupErrorStop state, the state of the relevant
group is changed to GroupStandby.
*3 GroupStopping GroupStandby
When MC_GroupStop.DONE output is On and MC_SroupStop.EXECUTE input is Off
*4 GroupStandby GroupDisabled
In case there is no axis belonging to the group when performing the axis remove command (MC_RemoveAxisFromGroup,
MC_UnGroupAllAxes)
*5 GroupStandby
In case more than one axis belongs to the group when performing the axis add or remove command in group
(MC_AddAxisToGroup, MC_RemoveAxisFromGroup)
*6 GroupDisabled
When performing MC_GroupDisable or MC_UnGroupAllDisable function block, the relevant group is changed to GroupDisabled
state regardless of its current state.
6-3
Chapter 6 Motion Function Block
Execute
Busy
Active
Done
Error
CommandAborted
(a) (b) (c) (a) (d) (e) (a) (f) (g) (a) (h)
Variable Description
This is an input to run the relevant function block in Edge operation (OffOn) function
Execute
block. (Figure a state)
This is an output to indicate the relevant motion function block is currently running ((= not
completed), and it indicates the output of motion function block can be changed.
Busy Busy output is On in the rising Edge of Execute input (Figure a state), and it is Off when
Done output is On (Figure b state), CommandAborted output is On (Figure d state), or
Error output is On (Figure f state).
This indicates the relevant motion function block is actually controlling axis.
When running many motion function block to one axis (in case only one motion function
Active block is controlling and other notion function blocks are Buffered), Active output is On in
only one motion function block which is controlling, and in motion function blocks which
are Buffered, Busy output is On.
This is an output to indicate operation of the relevant motion function block has been
successfully completed.
Done If Done output is On, Busy and Active output is Off. (Figure d state)
Done output is Off when Execute input is Off (Figure e state), if Execute output was Off
when Done output became On, it remains On only during 1 scan (Figure h state).
This is an output to indicate an error occurs while running motion function block.
Error Error output is Off when Execute input is Off (Figure f state). If Execute output was Off
when Error output became On, it remains On only during 1 scan (Figure h state).
This outputs error code regarding the relevant error when an error occurs while running
ErrorID
motion function block. ErrorID output and elimination time are same with Error output.
This indicates the relevant motion function block is interrupted by the other motion function
block. CommandAborted output is Off when Execute input is Off (Figure g state). If
CommandAborted
Execute output was Off when Done output became On, it remains On only during one
scan.
※ When Execute input is On in Edge operation (Execute input) motion function block, depending on the state of
axis, one output in Busy, Done, Error, and CommandAborted output is On. Busy, Done, Error, and
CommandAborted output are available to be On one at a time, and if one output in four is On, other three outputs
become Off.
6-4
Chapter 6 Motion Function Block
Enable
Busy
Vaild
Error
Variable Description
This runs motion function block in the rising Edge (Figure a state), and stops it in the falling Edge
Enable
(Figure b state). In other words, it is executed when the Enable input is a level action.
This is an output to indicate the relevant motion function block is currently running ((= not completed),
and it indicates the output of motion function block can be changed.
Busy
Busy output is On in the rising Edge of Enable input (Figure b state), and it remains on while motion
function is in operation.
This is an output to indicate the relevant motion function block is successfully performed and output
Valid & motion are valid.
Valid output is Off when Enable input is Off (Figure b state).
This is an output to indicate an error occurs while running motion function block.
If an error which cannot be automatically restored occurs while motion function block is in operation,
Error output is On, Busy & Valid output is Off (Figure d state), and motion function block stops
operating.
Error Error output is Off when Enable input is Off (Figure e state).
If an error which can be automatically restored occurs while function block is in operation, Error output
is On and Valid input is Off (Figure f state).
When the error in the relevant motion function block is restored, Error output is Off, and operation is
resumed (Figure g state).
This outputs error code regarding the relevant error when an error occurs while running motion
ErrorID function block.
ErrorID output and elimination time are same with Error output.
6-5
Chapter 6 Motion Function Block
Notes
1. Axis inputnote1)
Each motion function block can be specified by Axis input to the axis which is subject to the relevant command. Motion
controller can control 1~32 real/virtual axes and 33~36 virtual axes, and 1001~1002 encoders can be used as main axis
depending on motion function block. Therefore, values of 1~32, 33~36, and 1001~1002 can be input in Axis input depending
on motion function block. When it is out of the range which is available to set in each motion function block, "error 0x0006”
occurs.
2. Jerk
Jerk sets the amount of change of acceleration/deceleration. If Jerk is set to a non-zero value, the speed profile becomes S-
shaped, which can reduce the impact of the machine during acceleration / deceleration. If Jerk value is set larger, acceleration
/ deceleration is performed close to the straight line. If Jerk value is set to 0, acceleration / deceleration operation speed profile
becomes linear.
speed speed
Note 1) Explain the range to set axis input variables on the basis of XMC-E32A.
6-6
Chapter 6 Motion Function Block
Notes
The maximum number of commands that can wait for their execution in buffers on axis control is 100. An error (error code:
0x1022) occurs when executing more than 100 commands in a buffer mode.
- When executing Edge operation motion function block in the Off state of ContinuousUpdate input (turn On the Execute input),
the relevant motion function block is operated by application of the parameter at the time when Execute input was On (rising
Edge). In this case, the change of the parameter input value in the middle of execution of motion function block does not affect
operation.
When wanting to change the parameter while the relevant motion function block is in operation, change the parameter and turn
On Execute input again.
- When executing Edge operation motion function block in the On state of ContinuousUpdate input (turn On the Execute input),
the parameter of the time when Execute input was On (rising Edge) is applied at first.
When changing the parameter while ContinuousUpdate input is On, the relevant motion function block operates reflecting the
every change in parameter.
But, if you change the parameter at the completion or after the stop of the operation of the relevant motion function block (Busy
output is Off), the change is not reflected any more. (Parameter changing operation using ContinuousUpdate does not rerun the
motion function block which is completed or interrupted, In other words, ContinuousUpdate operation is applied only to the
motion function block which is currently running.)
- For a function block without ContinuousUpdate input, the changed parameters can be applied by re-executing the function block
(Execute input is On) before the command is completed.
- As for level operation motion function block, it is operated by the application of the parameter at the time when Enable input was
On (rising Edge), and continuous change of parameter is available while Enable input is On.
6-7
Chapter 6 Motion Function Block
Notes
The maximum number of buffers that can wait for execution on axis group control is 100. An error (error code: 0x2022) occurs
when executing more than 100 commands in a buffer mode.
TransitionMode “TMNone”
Do not generate a connection track.
The Figure below shows the case when running BufferMode of motion function block in the setting of ‘Aborting’. The
Figure in the left shows that motion function block ② is executed in the setting of ‘Aborting’ while motion function block ①
is running. Motion function block ① is forced to be terminated at 'end point ① / starting point ②' without reaching 'end
point ①'. The Figure in the right shows that the next motion function block is executed at the moment of the execution of
‘Aborting’ function block.
6-8
Chapter 6 Motion Function Block
The Figure below shows the case when running BufferMode of motion function block in the setting of ‘BlendingXXXX’. The Figure in
the left shows that motion function block ② is executed in the setting of ‘BlendingXXXX’ while motion function block ① is running.
Accelerates/decelerates from the target position of motion function block ① to the speed set in motion function block ②
(Low, Previous, Next, High) and performs continuous operation. If you look at the figure on the right, when the ‘BlendingXXXX’
function block is executed, the next motion function block is executed at the speed (Low, Previous, Next, High) set in ‘BlendingXXXX’ after
reaching the original target position.
The Figure below shows the generation of a connection track which draws radius circle in two linear interpolation commands.
The Figure in the left shows that motion function block ② is executed in the setting of “TMcornerDistance” while motion function
block ① is running. The original target position of motion function block ① was end point ① / starting point ②, but straight-
line motion is stopped and circular motion is started at the point ahead as far as radius 'd' (end point ①). Circular operation
starts at end point ① and finishes at starting point ②, and executes motion function block ②.
The Figure in the right shows that the speed does not stop in the middle of two function blocks and continues.
6-9
Chapter 6 Motion Function Block
6-10
Chapter 6 Motion Function Block
6-11
Chapter 6 Motion Function Block
6-12
Chapter 6 Motion Function Block
6-13
Chapter 6 Motion Function Block
6-14
Chapter 6 Motion Function Block
6-15
Chapter 6 Motion Function Block
Note 1) An input variable of the function block (MC_CAMIN, etc.) that sets operation of axes.
Note 2) An input variable of the function blocks (LS_ReadSDO, LS_WriteSDO, LS_SaveSDO) that sets operation of
slaves.
6-16
Chapter 6 Motion Function Block
MC_Power
BOOL Enable Status BOOL
UINT Axis Axis UINT
Vaild BOOL
Error BOOL
ErrorID WORD
Input-Output
UINT Axis Specify the axis to be commanded (See 6.2.1 Setting Range by Product)
Input
BOOL Enable Servo motor of the relevant axis is servo On while input is activated.
Output
BOOL Status Indicate the power permission status of the relevant axis.
Indicate the validity of motion function block output.
BOOL Valid
(same with Status output here)
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
(1) This motion function block is to give servo On/Off command to the relevant axis.
(2) When enable input changes from Off to On, the Servo On command is given to the relevant axis. When it changes from On to
Off, the Servo Off command is given to it.
(3) If servo On command is executed when the axis is in 'Disable' state, the axis state is 'StandStill', and failure in servo On brings
'ErrorStop' state.
6-17
Chapter 6 Motion Function Block
MC_Home
BOOL Execute Done BOOL
UINT Axis Axis UINT
LREAL Position Busy BOOL
UINT BufferMode Active BOOL
CommandAborted BOOL
Error BOOL
ErrorID WORD
Input-Output
UINT Axis Specify the axis to be commanded (See 6.2.1 Setting Range by Product)
Input
BOOL Execute Start the homing operation in rising Edge.
Specify the absolute position of axis when reference signal is detected. (When the
LREAL Position command position value is converted to a pulse, it is set within the range of -
2147483648 to 2147483647.)
Specify the sequential operation setting of motion function block.
UINT BufferMode
(Refer to 6.1.4.BufferMode )
Output
BOOL Done Indicate the completion state of motion function block.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Active Indicate that the current motion function block is controlling the relevant axis.
BOOL CommandAborted Indicate that the current motion function block is interrupted by other command.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
(1) This motion function block is to give a homing command to the relevant axis.
(2) Homing method is operated as specified in the operation parameter of the relevant axis in advance.
(3) As for Position input, absolute position of axis is specified when Reference Signal is detected or homing is completed.
(4) While this motion function block is running, the axis is 'Homing' state, and when the command is completed, it is switched to
'Standstill'.
(5) If the function block is re-executed (Execute input is On) before the instruction is terminated, the changed parameters are applied.
Only Position input can be updated.
6-18
Chapter 6 Motion Function Block
%MX1
MC_HOME.Busy
MC_HOME.Active
MC_HOME.Done
_AXxx_HOME(%JXxx.55)
Position
Speed
6-19
Chapter 6 Motion Function Block
MC_Stop
BOOL Execute Done BOOL
UINT Axis Axis UINT
LREAL Deceleration Busy BOOL
LREAL Jerk CommandAborted BOOL
Error BOOL
ErrorID WORD
Input-Output
UINT Axis Specify the axis to be commanded (See 6.2.1 Setting Range by Product)
Input
BOOL Execute Give immediate stop command to the relevant axis in the rising Edge.
LREAL Deceleration Specify the deceleration in time of stop. [u/s2]
LREAL Jerk Specify the change rate of acceleration/deceleration. [u/s3]
Output
BOOL Done Indicate that the speed of the relevant axis reaches 0.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL CommandAborted Indicate that the current motion function block is interrupted while it is running.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
(1) This motion function block is to give a emergency stop command to the relevant axis.
(2) When executing immediate stop (MC_Stop) motion function block, the existing motion function block being executed in the
relevant axis is stopped, and the axis state changed to 'Stopping'. When the relevant axis is in 'Stopping’ state, other motion function
block cannot be executed in the relevant axis until the stopping is completed (until the Done output is activated).
(3) CommandAborted output indicates that the current motion function block is interrupted while it was executed. Other motion
function block cannot interrupt immediate stop (MC_Stop) motion function block while immediate stop (MC_Stop) motion function
block is running, therefore, CommandAborted output is On in general when the power of servo is blocked or servo Off command
is executed.
(4) If Execute input is On or the speed of axis is not 0, the axis is in 'Stopping' state, and when Done output is On and Execute input
is Off, it is switched to 'Standstill' state.
(5) If the function block is re-executed (Execute input is On) before the instruction is terminated, the changed parameters are
applied.
Only Deceleration and Jerk input can be updated
(6) When executing Stop immediately of motion function block during homing, 0x6040.4 Homing Bit is turned Off and 0x6040.8
Halt Bit On to immediately stop the axis. The axis stop according to homing bit and halt bit refer to the user manual of each
servo drive. For example, The LS servo drive stops depending on Quick stop deceleration when homing bit is off during homing.
6-20
Chapter 6 Motion Function Block
MC_Halt
BOOL Execute Done BOOL
UINT Axis Axis UINT
LREAL Deceleration Busy BOOL
LREAL Jerk Active BOOL
UINT BufferMode CommandAborted BOOL
Error BOOL
ErrorID WORD
Input-Output
UINT Axis Specify the axis to be commanded (See 6.2.1 Setting Range by Product)
Input
BOOL Execute Give stop command to the relevant axis in the rising Edge.
LREAL Deceleration Specify deceleration in time of stop. [u/s2]
LREAL Jerk Specify the change rate of acceleration/deceleration. [u/s3]
Specify the sequential operation setting of motion function block.
UINT BufferMode
(Refer to 6.1.4.BufferMode )
Output
BOOL Done Indicate that the speed of the relevant axis reaches 0.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Active Indicate that the current motion function block is controlling the relevant axis.
BOOL CommandAborted Indicate that the current motion function block is interrupted while it is running.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
(1) This motion function block is to give a stop command to the relevant axis.
(2) The axis is 'DiscreteMotion' state while this motion function block is running, and when the speed of the relevant axis is 0, ‘Done’
output is On and changed to 'Standstill' state.
(3) BufferMode can be selected, unlike MC_Stop command. Halt command (MC_Halt) can be stopped by another motion function
block.
(4) If the function block is re-executed (Execute input is On) before the instruction is terminated, the changed parameters are
applied.
Deceleration, Jerk input can be updated.
6-21
Chapter 6 Motion Function Block
MC_MoveAbsolute
BOOL Execute Done BOOL
UINT Axis Axis UINT
BOOL ContinuousUpdate Busy BOOL
LREAL Position Active BOOL
LREAL Velocity CommandAborted BOOL
LREAL Acceleration Error BOOL
LREAL Deceleration ErrorID WORD
LREAL Jerk
UINT Direction
UINT BufferMode
Input-Output
UINT Axis Specify the axis to be commanded (See 6.2.1 Setting Range by Product)
Input
Give an absolute position operation command to the relevant axis in the rising
BOOL Execute
edge
Specify the update setting of input value.
BOOL ContinuousUpdate (Refer to 6.1.5.Changes in Parameters during Execution of Motion Function
Block).
LREAL Position Specify the target position.
LREAL Velocity Specify the maximum speed. [u/s]
LREAL Acceleration Specify the acceleration. [u/s2]
LREAL Deceleration Specify the deceleration. [u/s2]
LREAL Jerk Specify the change rate of acceleration/deceleration. [u/s3]
Specify the operation direction.
UINT Direction (0~4: 0-Not specified, 1-Forward direction, 2-Shortest distance, 3-Reverse
direction, 4-Current direction)
Specify the sequential operation setting of motion function block.
UINT BufferMode
(Refer to 6.1.4.BufferMode)
Output
BOOL Done Indicate whether to reach the specified position.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Active Indicate that the current motion function block is controlling the relevant axis.
BOOL CommandAborted Indicate that the current motion function block is interrupted while it is running.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
(1) This motion function block is to give the relevant absolute position operation commands.
(2) Set the operation direction of the axis in infinite length repetition operation in Direction input, and if infinite length repetition
operation is set to Prohibited, Direction input is ignored. When Direction input is the shortest distance (=2), the relevant axis doing
Infinite length repetition operation automatically selects the direction which allows the shortest distance. The available range is 0-
4 (0-Not specified, 1-Forward direction, 2-Shortest distance, 3-Reverse direction, 4-Current direction), and "error 0x1017” occurs
in case of excess of the range.
(3) On condition that there is no motion function block is on standby after the current motion function block, If the speed is 0 after
6-22
Chapter 6 Motion Function Block
reaching the target point, operation is completed and Done output is On.
(4) The axis is in 'DiscreteMotion' state while this motion function block is running, and it is switched to 'Standstill' state when operation
is completed.
(5) If the function block is re-executed (Execute input is On) before the instruction is terminated, the changed parameters are
applied.
Only Position, Velocity, Acceleration, Deceleration, Jerk, Direction input can be updated.
(6) Velocity input can be set to 0 or changed.
(7) During the deceleration operation, even if the Velocity and Acceleration inputs are changed by using the ContinuousUpdate
function or the command re-execution function, the deceleration operation is not affected and the previous deceleration
operation continues.
(8) Example program
This example shows the movement from the current command position of 50,000,000 to the 100,000,000 position.
(a) Function block setting
Position
Velocity
6-23
Chapter 6 Motion Function Block
Position
Velocity
6-24
Chapter 6 Motion Function Block
MC_MoveRelative
BOOL Execute Done BOOL
UINT Axis Axis UINT
BOOL ContinuousUpdate Busy BOOL
LREAL Distance Active BOOL
LREAL Velocity CommandAborted BOOL
LREAL Acceleration Error BOOL
LREAL Deceleration ErrorID WORD
LREAL Jerk
UINT BufferMode
Input-Output
UINT Axis Specify the axis to be commanded (See 6.2.1 Setting Range by Product)
Input
Give an absolute position operation command to the relevant axis in the rising
BOOL Execute
edge
Specify the update setting of input value.
BOOL ContinuousUpdate
Reference
LREAL Distance Specify the target distance.
LREAL Velocity Specify the maximum speed. [u/s]
LREAL Acceleration Specify the acceleration. [u/s2]
LREAL Deceleration Specify the deceleration. [u/s2]
LREAL Jerk Specify the change rate of acceleration/deceleration. [u/s3]
Specify the sequential operation setting of motion function block.
UINT BufferMode
(Refer to 6.1.4.BufferMode )
Output
BOOL Done Indicate whether to reach the specified distance.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Active Indicate that the current motion function block is controlling the relevant axis.
BOOL CommandAborted Indicate that the current motion function block is interrupted while it is running.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
(1) Output the number of error occurred while motion function block is running.
(2) Relative position motion (MC_MoveRelative) is the motion function block which moves as far as the target distance specified in
Distance input from the current position.
(3) Moving direction is decided depending on the sign of the target distance specified in Distance input, and positive (+ or No sign)
moving direction leads to the forward direction, and negative (-) moving direction leads to the reverse direction.
(4) If there is no motion function block is on standby after the current motion function block and the speed is 0 after moving to the target
distance, operation is completed and Done output is On.
(5) The axis is in "DiscreteMotion" state when this motion function block is running, and it is switched to "StandStill" state when
operation is completed.
(6) If the function block is re-executed (Execute input is On) before the instruction is terminated, the changed parameters are applied.
Only Distance, Velocity, Acceleration, Deceleration, Jerk input can be updated.
6-25
Chapter 6 Motion Function Block
(8) During the deceleration operation, even if the Velocity and Acceleration inputs are changed by using the ContinuousUpdate
function or the command re-execution function, the deceleration operation is not affected and the previous deceleration operation
continues.
(9) Example program
This example shows the movement from the current command position of 50,000,000 to the 150,000,000 position by moving
the distance corresponding to the set value (100,000,000).
(a) Function block setting
Position
Velocity
6-26
Chapter 6 Motion Function Block
Position
Velocity
6-27
Chapter 6 Motion Function Block
MC_MoveAdditive
BOOL Execute Done BOOL
UINT Axis Axis UINT
BOOL ContinousUpdate Busy BOOL
LREAL Distance Active BOOL
LREAL Velocity CommandAborted BOOL
LREAL Acceleration Error BOOL
LREAL Deceleration ErrorID WORD
LREAL Jerk
UINT BufferMode
Input-Output
UINT Axis Specify the axis to be commanded (See 6.2.1 Setting Range by Product)
Input
Give an absolute position operation command to the relevant axis in the rising
BOOL Execute
Edge.
Specify the update setting of input value.
BOOL ContinuousUpdate
Reference
LREAL Distance Specify the target distance.
LREAL Velocity Specify the maximum speed. [u/s]
LREAL Acceleration Specify the acceleration. [u/s2]
LREAL Deceleration Specify the deceleration. [u/s2]
LREAL Jerk Specify the change rate of acceleration/deceleration. [u/s3]
Specify the sequential operation setting of motion function block.
UINT BufferMode
(Refer to 6.1.4.BufferMode )
Output
BOOL Done Indicate whether to reach the specified distance.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Active Indicate that the current motion function block is controlling the relevant axis.
BOOL CommandAborted Indicate that the current motion function block is interrupted while it is running.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
(1) This motion function block is to give the relevant additive position operation commands.
(2) Additive position motion (MC_MoveAdditive) is the motion function block which additionally moves as far as the position specified
in Distance input from the final target position of the currently running motion function block or the latest motion function block
executed in 'DiscreteMotion' state. If the current axis is executing motion function block ‘ContinuousMotion’ state, it executes
operation based on the position where additive position motion (MC_MoveAdditve) is executing.
(3) The direction of the movement is determined by the positivity/negativity of the set distance. Positive distance (+ or no sign) means
forward movement, and negative distance (-) means reverse movement.
(4) When reaching the target position without motion function block on standby after the current motion function block, 'Done' output
is On.
(5) The axis is in 'DiscreteMotion' state while this motion function block is running, and it is switched to 'Standstill' state when operation
is completed.
6-28
Chapter 6 Motion Function Block
(6) If the function block is re-executed (Execute input is On) before the instruction is terminated, the changed parameters are applied.
Only Distance, Velocity, Acceleration, Deceleration, Jerk input can be updated.
(7) Velocity input can be set to 0 or changed.
(8) During the deceleration operation, even if the Velocity and Acceleration inputs are changed by using the ContinuousUpdate
function or the command re-execution function, the deceleration operation is not affected and the previous deceleration
operation continues.
(9) Example program
This example shows the movement from the current command position of 50,000,000 to the 150,000,000 position by moving
the distance corresponding to the set value (100,000,000).
(a) Function block setting
Position
Velocity
6-29
Chapter 6 Motion Function Block
Position
Velocity
6-30
Chapter 6 Motion Function Block
MC_MoveVelocity
BOOL Execute InVelocity BOOL
UINT Axis Axis UINT
BOOL ContinuousUpdate Busy BOOL
LREAL Velocity Active BOOL
LREAL Acceleration CommandAborted BOOL
LREAL Deceleration Error BOOL
LREAL Jerk ErrorID WORD
UINT Direction
UINT BufferMode
Input-Output
UINT Axis Specify the axis to be commanded (See 6.2.1 Setting Range by Product)
Input
Give an absolute position operation command to the relevant axis in the rising
BOOL Execute
edge
Specify the update setting of input value.
BOOL ContinuousUpdate (Refer to 6.1.5.Changes in Parameters during Execution of Motion Function
Block)
LREAL Velocity Specify the operation speed. [u/s]
LREAL Acceleration Specify the acceleration. [u/s2]
LREAL Deceleration Specify the deceleration. [u/s2]
LREAL Jerk Specify the change rate of acceleration/deceleration. [u/s3]
Specify the operation direction. (1 ~ 3 : 1-Forward direction, 2-Reverse direction,
UINT Direction
3-Current direction)
Specify the sequential operation setting of motion function block.
UINT BufferMode
(Refer to 6.1.4.BufferMode)
Output
BOOL InVelocity Indicate whether to reach the specified speed.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Active Indicate that the current motion function block is controlling the relevant axis.
BOOL CommandAborted Indicate that the current motion function block is interrupted while it is running.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
(1) This motion function block is to give specified velocity operation command to the relevant axis.
(2) In order to stop the specified speed operation, you can make a stop command or execute another motion function block.
(3) Specify the operation speed in Velocity input. Positive sign (+ or No sign) of the operation speed value leads to forward direction,
and negative (-) sign leads to reverse direction.
(4) Specify the operation direction in Direction input. But, the operation direction is affected by the sign of the specified speed value
by Velocity input. For example, if you specify the negative number for the Velocity value and reverse direction for Direction input,
the relevant axis lastly does forward direction operation.
(5) The output InVelocity is turned on when the axis reaches the specified speed, and it is turned off when the specified speed
operation is stopped.
6-31
Chapter 6 Motion Function Block
(6) The axis is in 'ContinuousMotion' state while this motion function block is running.
(7) If the function block is re-executed (Execute input is On) before the instruction is terminated, the changed parameters are
applied.
Only Distance, Velocity, Acceleration, Deceleration, Jerk, Direction input can be updated.
(8) Velocity input can be set to 0 or changed.
(9) Example program
This example program shows the movement at a velocity of 10,000,000. Once the set velocity is reached, InVelocityoutput is
on.
(a) Function block setting
Velocity
Position
6-32
Chapter 6 Motion Function Block
Position
Velocity
6-33
Chapter 6 Motion Function Block
(MC_MoveContinuousAbsolute)
MC_MoveContinousAbsolute
BOOL Execute InEndVelocity BOOL
UINT Axis Axis UINT
BOOL ContinousUpdate Busy BOOL
LREAL Position Active BOOL
LREAL EndVelocity CommandAborted BOOL
LREAL Velocity Error BOOL
LREAL Acceleration ErrorID WORD
LREAL Deceleration
LREAL Jerk
UINT Direction
UINT BufferMode
Input-Output
UINT Axis Specify the axis to be commanded (See 6.2.1 Setting Range by Product)
Input
Give an absolute position operation command to the relevant axis in the rising
BOOL Execute
edge
Specify the update setting of input value.
BOOL ContinuousUpdate
Reference
LREAL Position Specify the target position.
LREAL EndVelocity Specify the operation speed after reaching the target position. [u/s]
LREAL Velocity Specify the maximum speed to reach the target position. [u/s]
LREAL Acceleration Specify the acceleration. [u/s2]
LREAL Deceleration Specify the deceleration. [u/s2]
LREAL Jerk Specify the change rate of acceleration/deceleration. [u/s3]
Specify the operation direction in case of infinite length repeat operation.
UINT Direction (0~4: 0-Not specified, 1-Forward direction, 2-Shortest distance, 3-Reverse
direction, 4-Current direction)
Specify the sequential operation setting of motion function block.
UINT BufferMode
(Refer to 6.1.4.BufferMode)
Output
BOOL InEndVelocity Indicate the operation at the specified speed after reaching the target position.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Active Indicate that the current motion function block is controlling the relevant axis.
BOOL CommandAborted Indicate that the current motion function block is interrupted while it is running.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
(1) This motion function block is to give Specified velocity operation after relative position operation command to the relevant axis.
(2) When executing MC_MoveContinuousAbsolute, the relevant axis moves to the position specified in Position and operates at
the specified speed in EndVelocity if there is no motion function block is on standby.
6-34
Chapter 6 Motion Function Block
(3) Giving a stop command or execution of other motion function block allow to interrupt speed operation.
(4) Set the operation direction of the axis in infinite length repetition operation in Direction input, and if infinite length repetition
operation is set to Prohibited, Direction input is ignored. When Direction input is the shortest distance (=2), the relevant axis
selects the direction which allows the shortest distance and operates if it does infinite length repetition operation. The range
can be set to 0~4(0-No specified, 1-Forward direction, 2-Shortest distance, 3-Reverse direction, 4-Current direction), if the
value outside the range is set and motion function block is executed, Error is On and “0x1017” occurs in ErrorID.
(5) Output InEndVelocity is on when the relevant axis starts speed operation after reaching the specified position, and when the
specified operation is interrupted, it is Off.
(6) The axis is in 'ContinuousMotion' state while this command is executing.
(7) If the function block is re-executed (Execute input is On) before the instruction is terminated, the changed parameters are
applied.
Only Position, EndVelocity, Velocity, Acceleration, Deceleration, Jerk, Direction input can be updated. (However, in case of
InEndVelocity=On, it is reflected only EndVelocity inputs.
(8) Velocity and EndVelocityy input can be set to 0 or changed.
(9) Example program
This example program shows the operation at a speed of 20,000,000 after moving from the current command position of
50,000,000 to the 100,000,000 position. Once the set position is reached, InEndVelocity output is on.
(a) Function block setting
6-35
Chapter 6 Motion Function Block
Velocity
Position
6-36
Chapter 6 Motion Function Block
Position
Velocity
6-37
Chapter 6 Motion Function Block
(MC_MoveContinuousRelative)
Motion Function Block
MC_MoveContinousRelative
BOOL Execute InEndVelocity BOOL
UINT Axis Axis UINT
BOOL ContinousUpdate Busy BOOL
LREAL Distance Active BOOL
LREAL EndVelocity CommandAborted BOOL
LREAL Velocity Error BOOL
LREAL Acceleration ErrorID WORD
LREAL Deceleration
LREAL Jerk
UINT BufferMode
Input-Output
UINT Axis Specify the axis to be commanded (See 6.2.1 Setting Range by Product)
Input
Give an absolute position operation command to the relevant axis in the rising
BOOL Execute
edge
Specify the update setting of input value.
BOOL ContinuousUpdate
Reference
LREAL Distance Specify the target distance.
LREAL EndVelocity Specify the operation speed after reaching the target position. [u/s]
LREAL Velocity Specify the maximum speed to reach the target position. [u/s]
LREAL Acceleration Specify the acceleration. [u/s2]
LREAL Deceleration Specify the deceleration. [u/s2]
LREAL Jerk Specify the change rate of acceleration/deceleration. [u/s3]
Specify the sequential operation setting of motion function block.
UINT BufferMode
(Refer to 6.1.4.BufferMode input)
Output
BOOL InEndVelocity Indicate the operation at the specified speed after reaching the target position.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Active Indicate that the current motion function block is controlling the relevant axis.
BOOL CommandAborted Indicate that the current motion function block is interrupted while it is running.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
(1) This motion function block gives MC_MoveContinuousRelative command to the relevant axis.
(2) When executing MC_MoveContinuousRelative, the relevant axis operates at the speed specified in EndVelocity after moving
the distance specified in Distance if there is no motion function block is on standby.
(3) Giving a stop command or operation of other motion function block allow to interrupt specified velocity motion.
(4) Output InEndVelocity is On when the relevant axis starts speed operation and reaches the specified speed after moving the
specified distance, and when specified velocity motion is interrupted, it is Off.
(5) The axis is in 'ContinuousMotion' state while this motion function block is running.
(6) If the function block is re-executed (Execute input is On) before the instruction is terminated, the changed parameters are
applied.
6-38
Chapter 6 Motion Function Block
Only Distance, EndVelocity, Velocity, Acceleration, Deceleration, Jerk input can be updated. (However, in case of
InEndVelocity=On, it is reflected only EndVelocity inputs.
(7) Velocity and EndVelocityy input can be set to 0 or changed.
(8) Example program
This example program shows the operation at a velocity of 20,000,000 after moving from the current command position of
50,000,000 to the 150,000,000 position by moving the distance corresponding to the set value (100,000,000). Once the set
position is reached, InEndVelocity output is on.
(a) Function block setting
Velocity
Position
6-39
Chapter 6 Motion Function Block
Position
Velocity
6-40
Chapter 6 Motion Function Block
MC_TorqueControl
BOOL Execute InTorque BOOL
UINT Axis Axis UINT
BOOL ContinousUpdate Busy BOOL
LREAL Torque Active BOOL
LREAL TorqueRamp CommandAborted BOOL
LREAL Velocity Error BOOL
LREAL Acceleration ErrorID WORD
LREAL Deceleration
LREAL Jerk
UINT Direction
UINT BufferMode
Input-Output
UINT Axis Specify the axis to be commanded (See 6.2.1 Setting Range by Product, Real
axis)
Input
Give an absolute position operation command to the relevant axis in the rising
BOOL Execute
edge
Specify the update setting of input value.
BOOL ContinuousUpdate
Reference
LREAL Torque Specify the target torque. [u]
LREAL TorqueRamp Specify the ascending slope of torque. [u/s]
LREAL Velocity Unused
LREAL Acceleration Unused
LREAL Deceleration Unused
LREAL Jerk Unused
UINT Direction Specify the operation direction. (1~2 : 1-Forward direction, 2-Reverse direction)
Specify the sequential operation setting of motion function block.
UINT BufferMode
(Refer to 6.1.4 BufferMode input)
Output
BOOL InTorque Indicate that the input torque value and currently operating torque value are same.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Active Indicate that the current motion function block is controlling the relevant axis.
BOOL CommandAborted Indicate that the current motion function block is interrupted while it is running.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
(1) This motion function block is to give torque control command to the relevant axis.
(2) When executing torque control (MC_Torque), the relevant axis performs the control to keep the torque value specified in Torque
input.
(3) Giving a stop command or operation of other motion function block allow to interrupt specified velocity motion.
(4) Specify the gradient to reach the target torque value in TorqueRamp input.
(5) Specify the operation direction in Direction input. When setting the value outside the range and executing motion function block,
6-41
Chapter 6 Motion Function Block
Velocity
Target torque reach Stop command execution
Torque
(Target) Torque
=Stop command
deceleration
Time
Execute
InTorque
Busy
Active
Stop
command
execution
6-42
Chapter 6 Motion Function Block
MC_SetPosition
BOOL Execute Done BOOL
UINT Axis Axis UINT
LREAL Position Busy BOOL
BOOL Relative CommandAborted BOOL
UINT ExecutionMode Error BOOL
ErrorID WORD
Input-Output
UINT Axis Specify the axis to be commanded (See 6.2.1 Setting Range by Product)
Input
BOOL Execute Specify the current position of the relevant axis in the rising Edge.
LREAL Position Specify the position.
BOOL Relative 0: Position value=Absolute position, 1: Position value=Relative position
0: Immediately applied the position value,
UINT ExecutionMode
1: Applied at the same point with ‘Buffered’ of Buffermode
Output
BOOL Done Indicate the completion state of motion function block.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL CommandAborted Indicate that the current motion function block is interrupted while it is running.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
(1) This motion function block is to set the current position of the relevant axis.
(2) Specify the position in Position input. When executing motion function block, if Relative input is Off, the position of the relevant
axis is replaced by the value of Position input, and if Relative input is On, the value of Position input is added to the current
position of the relevant axis.
(3) ExecutionMode input specifies the setting point. 0 means to be set immediately after motion function block, and 1 means to be
set at the same point with ‘Buffered’ in sequential operation setting. The value unable to be set causes "error0x101B”.
0 (mcImmediately): Change the parameter value immediately after executing function block (rising Edge in Execute input). If
the relevant axis is in running, operation can be affected.
1 (mcQueued): Changed at the same point with ‘Buffered’ in Buffermode. (Refer to 6.1.4 Buffermode input)
6-43
Chapter 6 Motion Function Block
Position
6-44
Chapter 6 Motion Function Block
MC_SetOverride
BOOL Enable Enabled BOOL
UINT Axis Axis UINT
LREAL VelFactor Busy BOOL
LREAL AccFactor Error BOOL
LREAL JerkFactor ErrorID WORD
Input-Output
UINT Axis Specify the axis to be commanded (See 6.2.1 Setting Range by Product)
Input
BOOL Enable Execute override operation in the relevant axis while input is activated.
LREAL VelFactor Specify the override rate of speed.
LREAL AccFactor Specify the override rate of acceleration/deceleration.
LREAL JerkFactor Specify the override rate of the change rate of acceleration.
Output
BOOL Enabled Indicate that the override rate was applied successfully.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
(1) This motion function block is to override the speed of the relevant axis, acceleration, and the change rate of acceleration.
(2) Override rate which is applied to the relevant axis can be specified and changed while Enable input is On. If Enable input is
Off, override rate right before the Off is maintained.
(3) Specify the speed override ratio for the VelFactor input. If the specified value is 0.0, the relevant axis stops but it is not changed
to 'StandStill' state.
(4) Specify acceleration/deceleration and override rate of jerk (change rate of acceleration) in AccFactor and JerkFactor input
respectively.
(5) Negative number cannot be input in each Facotr, and if it is input, "error 0x10C1” occurs.
(6) Default of each override rate is 1.0, and it means 100% of the command speed of function block currently running.
(7) Override operation does not affect the serve axis of the relevant axis.
6-45
Chapter 6 Motion Function Block
Velocity
Position
6-46
Chapter 6 Motion Function Block
MC_ReadParameter
BOOL Enable Vaild BOOL
UINT Axis Axis UINT
INT ParameterNumber Busy BOOL
Error BOOL
ErrorID WORD
Value LREAL
Input-Output
UINT Axis Specify the axis to be commanded (See 6.2.1 Setting Range by Product)
Input
BOOL Enable The relevant parameters are output while the input is enabled.
INT ParameterNumber Specify the number of parameter to read.
Output
BOOL Vaild Indicate whether the output of the current motion function block is valid.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
LREAL Value Output the values of the parameters.
(1) This command is a motion function block which outputs parameter of the relevant axis.
(2) The value of the relevant parameter is continuously output in Value while Enable input is On.
(3) Specify the number of parameter to read in ParameterNumber input.
6-47
Chapter 6 Motion Function Block
6-48
Chapter 6 Motion Function Block
6-49
Chapter 6 Motion Function Block
6-50
Chapter 6 Motion Function Block
MC_WriteParameter
BOOL Execute Done BOOL
UINT Axis Axis UINT
INT ParameterNumber Busy BOOL
LREAL Value Error BOOL
UINT ExcutionMode ErrorID WORD
Input-Output
UINT Axis Specify the axis to be commanded (See 6.2.1 Setting Range by Product)
Input
BOOL Execute Rising Edge corresponding parameters of input is written.
INT ParameterNumber Specify the number of parameter to write.
LREAL Value Specify the value of parameter to write.
UINT ExecutionMode Specify the time when parameter is written.
Output
BOOL Vaild Indicate whether parameter is successfully written.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
(1) This motion function block is to write the value specified in parameter of the relevant axis.
(2) The parameters will be written in the rising edge of the Execute input.
(3) Specify the number of parameter to write in ParameterNumber input. The value unable to be set causes "error 0x10F0”.
(4) Specify the value to write in parameter for Value input.
(5) In ExecutionMode, correct the time when parameter is written and the values below can be set. The value unable to be set
causes "error 0x101B”.
0 (mcImmediately): Change the parameter value immediately after executing function block (rising Edge in Execute input). If
the relevant axis is in running, operation can be affected.
1 (mcQueued): Changed at the same point with ‘Buffered’ in Buffermode. (Refer to 6.1.4.BufferMode input )
6-51
Chapter 6 Motion Function Block
6-52
Chapter 6 Motion Function Block
6-53
Chapter 6 Motion Function Block
6-54
Chapter 6 Motion Function Block
MC_Reset
BOOL Execute Done BOOL
UINT Axis Axis UINT
BOOL ErrorType Busy BOOL
Error BOOL
ErrorID WORD
Input-Output
UINT Axis Specify the axis to be commanded (See 6.2.1 Setting Range by Product)
Input
BOOL Execute Reset the axis error in the rising Edge of input.
BOOL ErrorType The types of error to be reset (0: Axis error, 1: Common error)
Output
BOOL Done Indicates whether the axis error was successfully reset
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
(1) This motion function block is to reset the error of the relevant axis. When setting ErrorType to '0' and executing motion function
block in case the relevant axis is in ' ErrorStop' state, every axis error is reset and the axis state is switched to 'StandStill' or 'Disabled'
state.
(2) If ErrorType is set to ‘1’ and motion function block is executed,
Common error occurred in the relevant module is reset.
(3) Motion function block is executed in the rising Edge of Execute input.
6-55
Chapter 6 Motion Function Block
MC_TouchProbe
BOOL Execute Done BOOL
UINT Axis Axis UINT
UINT TriggerInput TriggerInput UINT
BOOL WindowOnly Busy BOOL
LREAL FirstPosition CommandAborted BOOL
LREAL LastPosition Error BOOL
ErrorID WORD
RecordedPosition LREAL
Input-Output
UINT Axis Specify the axis to be commanded (See 6.2.1 Setting Range by Product, Real
axis)
UINT TriggerInput Specify the signal to be used as a trigger.
(0: Touch probe 1 rising edge, 1: Touch probe 2 rising edge)
Input
BOOL Execute TouchProbe function starts at the rising Edge of input.
BOOL WindowOnly Activate the window mode.
LREAL FirstPosition Specify the starting position of allowable area in the window mode.
LREAL LastPosition Specify the end position of allowable area in the window mode.
Output
BOOL Done Indicate that the trigger signal is successfully recorded.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL CommandAborted Indicate that the current motion function block is interrupted while it is running.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
Read RecordedPosition Output the axis position where the trigger occurs.
(1) This motion function block is to execute 'TouchProbe' function which records the axis position at the time when the trigger event
occurs.
(2) TouchProbe function starts at the rising Edge of Execute input.
(3) Specify the signal to be used as a trigger in TriggerInput. The value unable to be set causes "error 0x10E1”.
(4) If the touch probe command satisfies the trigger condition, the Done output is On, and the position value at the trigger point is
saved in the RecordedPosition output. The RecordedPosition output is not initialized and retains the previously stored value
even if the Execute input changes to On or Off or an error occurs. The RecordedPosition output is updated when the touch
probe command is re-executed to normally satisfy the trigger condition.
(5) When activating the window mode, allowable area where accepts the trigger signal of axis can be set. Operation timing of each
signal when the window mode is activated is as below.
6-56
Chapter 6 Motion Function Block
MC_TouchProbeEx
BOOL Execute Done BOOL
UINT Axis Axis UINT
UINT TriggerInput TriggerInput UINT
UINT TriggerMode Busy BOOL
BOOL WindowOnly CommandAborted BOOL
LREAL FirstPosition Error BOOL
LREAL LastPosition ErrorID WORD
RecordedPosition LREAL
Input-Output
UINT Axis Specify the axis to be commanded (See 6.2.1 Setting Range by Product, Real
axis)
UINT TriggerInput Specify the signal to be used as a trigger.
(0: Touch probe 1 rising edge, 1: Touch probe 2 rising edge,
2: Touch probe 1 falling edge, 3: Touch probe 2 falling edge)
4: Touch probe 1 index[Enc. Z] pulse, 5: Touch probe 2 index[Enc. Z] pulse)
Input
BOOL Execute TouchProbe function starts at the rising Edge of input.
UINT TriggerMode Set the trigger mode. (0: single trigger, 1 : continuous trigger)
BOOL WindowOnly Activate the window mode.
LREAL FirstPosition Specify the starting position of allowable area in the window mode.
LREAL LastPosition Specify the end position of allowable area in the window mode.
Output
BOOL Done Indicate that the trigger signal is successfully recorded.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL CommandAborted Indicate that the current motion function block is interrupted while it is running.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
REAL RecordedPosition Output the axis position where the trigger occurs.
(1) This motion function block is an extended touch probe function block that includes the functions of the existing touch probe
(MC_TouchProbe).
(2) Expansion TouchProbe function starts at the rising Edge of Execute input.
(3) Specify the signal to be used as a trigger in TriggerInput. The input range (0~1) of the existing (MC_TouchProbe) function block
and the input range (0~5) of the extended function touch probe (MC_TouchProbeEx) function block are different. The value
unable to be set causes "error 0x10E2”.
(4) When setting the touch probe index [Enc.Z] pulse (4, 5) in TriggerInput, the index pulse rising edge signal of the encoder
installed in the motor of the axis to be commanded is used as the position recording trigger. Therefore, the touch probe 1 index
[Enc. Z] Pulse and touch probe 2 index [Enc. Z] pulse records the same data and selects whether to use touch probe 1 or
touch probe 2 for the data storage channel.
(5) TriggerMode specifies the trigger mode. The value unable to be set causes "error 0x10E3”. If TriggerMode is set to continuous
trigger, position recording continues according to the signal set in TriggerInput until execution is stopped with the
MC_AbortTrigger function block.
(6) Similar to the MC_TouchProbe function block, the setting can be canceled with the MC_AbortTrigger function block.
(7) When activating the window mode, allowable area where accepts the trigger signal of axis can be set. Operation timing of each
signal when the window mode is activated is as below.
6-57
Chapter 6 Motion Function Block
Notes
In the case of using Touch Probe, please set the slave parameters before use.
1. At XG50000, click the registration information of the servo drive.
6-58
Chapter 6 Motion Function Block
3. Select Touch Probe item in the edit window and click the arrow (downward), and include it in the PDO communication
data. Touch Probe related PDO item are as follows.
1) RxPDO
Touch probe function(0x60B8)
2) TxPDO
Touch probe Status(0x60B9)
Touch Probe 1 forward direction position value (0x60BA)
Touch Probe 1 backward direction position value (0x60BB)
Touch Probe 2 forward direction position value (0x60BC)
Touch Probe 2 backward direction position value (0x60BD)
4. After PDO item is edited, must write ‘EtherCAT parameter’ in motion controller.
6-59
Chapter 6 Motion Function Block
End pointition
End pointition
Starting pointition
Time
Location is not recorded Location is not recorded
< When the TriggerInput input value is the rising edge of the touch probe and the touch probe function is in window mode, the
operation timing >
End pointition
End pointition
Starting pointition
Time
Location is not recorded Location is not recorded
< When the TriggerInput input value is the falling edge of the touch probe and the touch probe function is in window mode, the
operation timing >
6-60
Chapter 6 Motion Function Block
6-61
Chapter 6 Motion Function Block
MC_AbortTrigger
BOOL Execute Done BOOL
UINT Axis Axis UINT
UINT TriggerInput TriggerInput USINT
Busy BOOL
Error BOOL
ErrorID WORD
Input-Output
Specify the axis to be commanded. (See 6.2.1 Setting Range by Product, Real
UINT Axis
axis)
UINT TriggerInput Specify the trigger signal to be disengaged. (0: Touch probe 1, 1: Touch probe 2)
Input
BOOL Execute The trigger on standby in the relevant axis in the rising Edge is disengaged.
Output
BOOL Done Indicate the completion state of motion function block.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
(1) This motion function block is to disengage the trigger which is on standby in the relevant axis.
(2) Specify the trigger signal to be disengaged in TriggerInput. The value unable to be set causes "error 0x10E1”.
6-62
Chapter 6 Motion Function Block
MC_MoveSuperImposed
BOOL Execute Done BOOL
UINT Axis Axis UINT
BOOL ContinuousUpdate Busy BOOL
LREAL Distance Active BOOL
LREAL VelocityDiff CommandAborted BOOL
LREAL Acceleration Error BOOL
LREAL Deceleration ErrorID WORD
LREAL Jerk CoveredDistance LREAL
Input-Output
UINT Axis Specify the axis to be commanded (See 6.2.1 Setting Range by Product)
Input
BOOL Execute Give a SuperImposed operation command to the relevant axis in the rising Edge.
BOOL ContinuousUpdate Specify the update setting of input value.
(Refer to 6.1.5.Changes in Parameters during Execution of Motion Function Block)
LREAL Distance Specify the target distance. [u]
LREAL VelocityDiff Specify the added velocity. [u/s]
LREAL Acceleration Specify the added acceleration. [u/s2]
LREAL Deceleration Specify the added deceleration. [u/s2]
LREAL Jerk Specify the added change rate of acceleration/deceleration. [u/s3]
Output
BOOL Done Indicate whether to reach the specified distance.
BOOL Busy Indicate that execution of the function block is not completed.
BOOL Active Indicate that the current motion function block is controlling the relevant axis.
BOOL CommandAborted Indicate that the current motion function block is interrupted by other command
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the error number that occurred while the function block is running.
LREAL CoveredDistance Indicate the distance moved with SuperImposed operation after SuperImposed
command.
(1) This motion function block is a command issuing SuperImposed operation order to the relevant axis.
(2) SuperImposed is a command ordering to move from the current position at the time of the command to the target distance set
by Distance input.
(3) The direction of the movement is determined by the positivity/negativity of the set distance. Positive distance (+ or no sign)
means forward movement, and negative distance (-) means reverse movement.
(4) After moving the target distance, when the velocity reaches 0, the command is completed and Done output is on.
6-63
Chapter 6 Motion Function Block
MC_HaltSuperImposed
BOOL Execute Done BOOL
UINT Axis Axis UINT
LREAL Deceleration Busy BOOL
LREAL Jerk CommandAborted BOOL
Error BOOL
ErrorID WORD
Input-Output
UINT Axis Specify the axis to be commanded (See 6.2.1 Setting Range by Product)
Input
BOOL Execute Give a SuperImposed operation halt command to the relevant axis in the rising
Edge.
LREAL Deceleration Specify deceleration in time of stop. [u/s2]
LREAL Jerk Specify the change rate of acceleration/deceleration. [u/s3]
Output
BOOL Done Indicates that SuperImposed operation of the relevant axis is stopped.
BOOL Busy Indicate that execution of the function block is not completed.
BOOL CommandAborted Indicate that the current motion function block is interrupted while it is running.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the error number that occurred while the function block is running.
(1) This motion function block is a command issuing an order to halt superImposed operation to the relevant axis.
(2) Halt command for SuperImposed operation is a command ordering to decelerate and halt at a given acceleration and jerk at
the time of performing the command.
(3) After moving the target distance, when the velocity reaches 0, the command is completed and Done output is on.
6-64
Chapter 6 Motion Function Block
LS_Home
BOOL Execute Done BOOL
UINT Axis Axis UINT
LREAL Position Busy BOOL
SINT HomingMethod Active BOOL
LREAL SwitchSearchSpeed CommandAborted BOOL
LREAL ZeroSearchSpeed Error BOOL
LREAL HomingAcc ErrorID WORD
LREAL HomeOffset
UINT DoneBehavior
UINT BufferMode
Input-Output
UINT Axis Specify the axis to be commanded (See 6.2.1 Setting Range by Product)
Input
BOOL Execute Start the homing operation in rising Edge.
Specify the absolute position of axis when reference signal is detected. (When the
LREAL Position command position value is converted to a pulse, it is set within the range of -
2147483648 to 2147483647.)
SINT HomingMethod Set the homing method (0x6098)
LREAL SwitchSearchSpeed Set the switch search speed (0x6099:1) when returning to the homing.
LREAL ZeroSearchSpeed Set the zero search speed (0x6099:2) when returning to the homing.
LREAL HomingAcc Set acceleration/deceleration (0x609A) when returning to homing.
LREAL HomeOffset Set Offest (0x607C) when returning to homing.
Set the movement (0x201E) after homing is completed.
UINT DoneBehavior (Used by drives other than our own L7N, the value has no effect on third-party
drives)
Specify the sequential operation setting of motion function block.
UINT BufferMode
(Refer to 6.1.4 BufferMode input)
Output
BOOL Done Indicate the completion state of motion function block.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Active Indicate that the current motion function block is controlling the relevant axis.
BOOL CommandAborted Indicate that the current motion function block is interrupted by other command.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
(1) This motion function block is to give a expansion homing command to the relevant axis.
(2) The homing method operates as set in the function block. (The homing method may be different for each drive, so please refer
to the user manual of the drive you are using. When using our XDL-N series servo drive, please refer to 8.1 Origin
Determination)
(3) As for Position input, absolute position of axis is specified when Reference Signal is detected or homing is completed.
(4) While this motion function block is running, the axis is 'Homing' state, and when the command is completed, it is switched to
'Standstill'.
(5) If the function block is re-executed (Execute input is On) before the instruction is terminated, the changed parameters are
6-65
Chapter 6 Motion Function Block
applied.
Only Position input can be updated.
(6) The input range for SwitchSearchSpeed, ZeroSearchSpeed, and HomingAcc is 0 ≤ Parameter ≤ 1073741824 in pulse units,
and the input range for HomeOffset is -2147483648≤ Parameter ≤2147483647 in pulse units. If a value is input in a unit other
than pulse unit, it is converted to pulse unit and checked if the value is out of range, and an error occurs if it is out of range.
(7) In the case of DoneBehavior, this is a function to set the movement method after homing is completed. It is used for drives
other than our own L7N, and the value set in the function block does not affect when a third-party drive is used.
0: After homing is completed, the motor does not rotate and the Home Offset value becomes Zero Position.
1: After homing is completed, the motor moves as much as the Home Offset value, and it becomes the Zero Position at the
position where the movement is completed.
6-66
Chapter 6 Motion Function Block
MC_Reset2
BOOL Execute Done BOOL
UINT Axis Axis UINT
UINT ErrorType Busy BOOL
Error BOOL
ErrorID WORD
Input-Output
UINT Axis Specify the axis to be commanded (See 6.2.1 Setting Range by Product)
Input
BOOL Execute Reset the axis error in the rising Edge of input.
The types of error to be reset (0: Axis error, 1: Common error, 2: Axis error and
UINT ErrorType
Common error)
Output
BOOL Done Indicates whether the axis error was successfully reset
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
(1) This motion function block is to reset the error of the relevant axis. When setting ErrorType to '0' and executing motion function
block in case the relevant axis is in ' ErrorStop' state, every axis error is reset and the axis state is switched to 'StandStill' or 'Disabled'
state.
(2) If ErrorType is set to ‘1’ and motion function block is executed, Common error occurred in the relevant module is reset. If ErrorType
is set to ‘2’ and motion function block is executed, errors and common errors occurring in the set axis are reset.
(3) Motion function block is executed in the rising Edge of Execute input.
(4) “Error 0x1023” occurs when a value greater than 2 is entered for ErrorType
(5) BufferMode can be selected, unlike MC_Stop Halt command (MC_Halt) can be stopped by another motion function block.
6-67
Chapter 6 Motion Function Block
MC_ReadMotionInfo
BOOL Enable Vaild BOOL
UINT Axis Axis UINT
INT ParameterNumber Busy BOOL
Error BOOL
ErrorID WORD
Value32 REAL
Value64 LREAL
Input-Output
UINT Axis Specify the axis to be commanded (See 6.2.1 Setting Range by Product)
Input
BOOL Enable The relevant parameters are output while the input is enabled.
INT ParameterNumber Specify the number of parameter to read.
Output
BOOL Valid Indicate whether the output of the current motion function block is valid.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
REAL Value32 Outputs the parameter value as a real number.
LREAL Value64 Outputs the parameter value as a Long Real Number.
(1) This command is a motion function block which outputs motion information of the relevant axis.
(2) While Enable input is On, the value of the item set by ParameterNumber is continuously output to Value32 and
Value64.
(3) Specify the number of item to read in ParameterNumber input. The number is as follows.
6-68
Chapter 6 Motion Function Block
MC_ReadActualPosition
BOOL Enable Vaild BOOL
UINT Axis Axis UINT
Busy BOOL
Error BOOL
ErrorID WORD
Value32 REAL
Value64 LREAL
Input-Output
UINT Axis Specify the axis to be commanded (See 6.2.1 Setting Range by Product)
Input
BOOL Enable The relevant parameters are output while the input is enabled.
Output
BOOL Valid Indicate whether the output of the current motion function block is valid.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
REAL Value32 Outputs the current position value as a real number.
LREAL Value64 Outputs the current position value as a Long Real Number.
(1) This command is a motion function block which outputs current position of the relevant axis.
(2) While Enable input is On, the current position value is continuously output to Value32 and Value64 in the
unit of position set on the axis.
6-69
Chapter 6 Motion Function Block
MC_ReadActualVelocity
BOOL Enable Vaild BOOL
UINT Axis Axis UINT
Busy BOOL
Error BOOL
ErrorID WORD
Value32 REAL
Value64 LREAL
Input-Output
UINT Axis Specify the axis to be commanded (See 6.2.1 Setting Range by Product)
Input
BOOL Enable The relevant parameters are output while the input is enabled.
Output
BOOL Valid Indicate whether the output of the current motion function block is valid.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
REAL Value32 Outputs the current speed value as a real number.
LREAL Value64 Outputs the current speed value as a Long Real Number.
(1) This speed is a motion function block which outputs current speed of the relevant axis.
(2) While Enable input is On, the current speed value is continuously output to Value32 and Value64 in the unit of speed set on
the axis.
6-70
Chapter 6 Motion Function Block
MC_ReadActualTorque
BOOL Enable Vaild BOOL
UINT Axis Axis UINT
Busy BOOL
Error BOOL
ErrorID WORD
Value32 REAL
Value64 LREAL
Input-Output
UINT Axis Specify the axis to be commanded (See 6.2.1 Setting Range by Product)
Input
BOOL Enable The relevant parameters are output while the input is enabled.
Output
BOOL Valid Indicate whether the output of the current motion function block is valid.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
REAL Value32 Outputs the current torque value as a real number.
LREAL Value64 Outputs the current torque value as a Long Real Number.
(1) This command is a motion function block which outputs current torque of the relevant axis.
(2) While the Enable input is On, the current torque value is continuously output as a % value of the rated torque in Value32
and Value 64.
(3) If the actual torque value (0x6077) is not included in the servo drive TxPDO setting, the value is not displayed normally.
6-71
Chapter 6 Motion Function Block
MC_ReadCommandedPosition
BOOL Enable Vaild BOOL
UINT Axis Axis UINT
Busy BOOL
Error BOOL
ErrorID WORD
Value32 REAL
Value64 LREAL
Input-Output
UINT Axis Specify the axis to be commanded (See 6.2.1 Setting Range by Product)
Input
BOOL Enable The relevant parameters are output while the input is enabled.
Output
BOOL Valid Indicate whether the output of the current motion function block is valid.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
REAL Value32 Outputs current position value as a real number.
LREAL Value64 Outputs command position value as a Long Real Number.
(1) This command is a motion function block which outputs command position of the relevant axis.
(2) While Enable input is On, the command position value is continuously output to Value32 and Value64 in the
unit of position set on the axis.
6-72
Chapter 6 Motion Function Block
MC_ReadCommandedVelocity
BOOL Enable Vaild BOOL
UINT Axis Axis UINT
Busy BOOL
Error BOOL
ErrorID WORD
Value32 REAL
Value64 LREAL
Input-Output
UINT Axis Specify the axis to be commanded (See 6.2.1 Setting Range by Product)
Input
BOOL Enable The relevant parameters are output while the input is enabled.
Output
BOOL Valid Indicate whether the output of the current motion function block is valid.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
REAL Value32 Outputs command speed value as a real number.
LREAL Value64 Outputs command position value as a Long Real Number.
(1) This command is a motion function block which outputs command speed of the relevant axis.
(2) While Enable input is On, the command speed value is continuously output to Value32 and Value64 in the unit of
speed set on the axis.
6-73
Chapter 6 Motion Function Block
MC_ReadCommandedTorque
BOOL Enable Vaild BOOL
UINT Axis Axis UINT
Busy BOOL
Error BOOL
ErrorID WORD
Value32 REAL
Value64 LREAL
Input-Output
UINT Axis Specify the axis to be commanded (See 6.2.1 Setting Range by Product)
Input
BOOL Enable The relevant parameters are output while the input is enabled.
Output
BOOL Valid Indicate whether the output of the current motion function block is valid.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
REAL Value32 Outputs command torque value as a real number.
LREAL Value64 Outputs command torque value as a Long Real Number.
(1) This command is a motion function block which outputs command torque of the relevant axis.
(2) While the Enable input is On, the command torque value is continuously output as a % value of the rated torque
in Value32 and Value 64.
(3) If the actual torque value (0x6077) is not included in the servo drive TxPDO setting, the value is not displayed
normally.
6-74
Chapter 6 Motion Function Block
MC_CamIn
BOOL Execute InSync BOOL
UINT Master Master UINT
UINT Slave Slave UINT
LREAL ContinousUpdate Busy BOOL
LREAL MasterOffset Active BOOL
LREAL SlaveOffset CommandAborted BOOL
LREAL MasterScaling Error BOOL
LREAL SlaveScaling ErrorID WORD
LREAL MasterStartDistance EndOfProfile BOOL
LREAL MasterSyncPosition
UINT StartMode
UINT MasterValueSource
UINT CamTableID
UINT BufferMode
Input-Output
UINT Master Set main axis (See 6.2.1 Setting Range by Product), Available to set variables only
Set the serve axis. (See 6.2.1 Setting Range by Product), Available to set variables
UINT Slave
only
Input
BOOL Execute Give cam operation command to the relevant axis in the rising Edge.
Specify the update setting of input value.
BOOL ContinuousUpdate
Reference
LREAL MasterOffset Set the offset value of the main axis.
LREAL SlaveOffset Set the offset value of the slave cam table.
LREAL MasterScaling Specify the magnification of the main axis.
LREAL SlaveScaling Specify the magnification of the slave axis cam table.
Specify the position of the main-axis where the cam operation of the master axis
LREAL MasterStartDistance
starts.
LREAL MasterSyncPosition Specify the starting point at cam table when cam operation starts.
Set the cam operation mode.
0: Cam table is applied as an absolute value. (mcAbsolute)
UINT StartMode
1: Cam table is applied as a relative value based on the command start position.
(mcRelative)
Select the source of the main axis for cam operation.
UINT MasterValueSource 0: Synchronizes to the command position of the main axis.
1: Synchronizes to the current position of the main axis.
UINT CamTableID Specify the cam table to operate. ( refer toSee 6.2.1 Setting Range by Product)
Specify the sequential operation setting of motion function block.
UINT BufferMode
(Refer to 6.1.4 BufferMode input)
6-75
Chapter 6 Motion Function Block
Output
Indicate that cam operation is normally being fulfilled.
BOOL InSync
(Indicate that the serve axis is following the cam table.)
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Active Indicate that the current motion function block is controlling the relevant axis.
BOOL CommandAborted Indicate that the current motion function block is interrupted while it is running.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
(8) This motion function block is to operate the serve axis cam depending on the main axis.
(9) Cam operation command can be given to the serve axis even if the main axis is in stop state.
(10) To halt cam operation, MC_CamOut command should be issued on the sub-axis, or another motion function block should be
operated (in case of Aborting).
(11) If this motion function block is aborted by another command (BufferMode=0 of newly executed command), the cam operation
is stopped, and the CommandAborted output is on.
(12) If another command is executed by Buffered while this motion function block is being executed (BufferMode=1~5 of newly
executed command), the operation of the cam profiled cycle is terminated, and then the newly executed command is run
subsequently. InSync / Busy / Active / CommandAborted / Error output of MC_CamIn function block are all Off.
(13) The axis is in 'Synchronized Motion' while this motion function block is running.
(14) Set the offset of the cam table to be applied in MasterOffset and SlaveOffset. MasterOffset determines the offset from the
master axis start point, and Slaveoffset determines the offset from the slave axis start point. Refer to the Figure below. Using
offset may change the start position for cam operation, causing an abrupt operation. In such a case, MasterSyncPosition,
MasterStartDistance should be used.
Before After
applying applying
Serve axis
Position
After
applying
Serve axis
Position
Before
applying
SlaveOffset
(15) Set the magnification of cam data to be applied in MasterScaling and SlaveScaling. MasterScaling determines the scale rate
of the main-axis data, and SlaveScaling determines the scale rate of the sub-axis data. Refer to the Figure below.
6-76
Chapter 6 Motion Function Block
After applying
SlaveScaling = 2.0 SlaveScaling
SlaveScaling = 1.0
After applying
MasterScaling
(16) MasterSyncPosition specifies the position of the master axis within the table where the synchronization of actual cam operation
is completed, and MasterStartDistance specifies the relative position of the master axis where the synchronization starts.
Synchronization starts at a position as far away as MasterStartDistance from MasterSyncPosition. If unable to start
synchronized operation at Cycle 1 as shown below (if the distance from the start position to the synchronized operation start
position is shorter than MasterStartDistance), synchronized operation starts at Cycle 2.
Synchronization Synchronized Operation
section section
Serve axis
Position
SlaveOffset
Serve axis
Position
SlaveOffset
Actual synchronization position can vary depending on MasterScaling and SlaveScaling because MasterSyncPosition is a
value based on the inside of cam table, but MasterOffset and MasterStartDistance value remain unaffected.
(9) The changed parameters can be applied when ContinuousUpdate input is On. Only MasterOffset, SlaveOffset, MasterScaling,
SlaveScaling, MasterStartDistance, MasterSyncPosition can be updated (However, In InSync=On case, MasterOffset,
SlaveOffset, MasterScaling, SlaveScaling can be updated.)
6-77
Chapter 6 Motion Function Block
(10) Once cam operation starts normally, InSync output is On, and EndOfProfile output is 1 scan On every time one cam table
operation is completed.
Main axis
Position
MasterSyncPosition
MasterStartDistance
Synchronization
section Synchronized operation section Time
Serve axis
Position
Time
InSync
EndOfProfile
1 Scan
(11) Cam operation mode is set in StartMode. The setting range is either 0 or 1. If the input value exceeds the setting range, an
error occurs. If it is set to 0, the cam table start position is set to the main-axis position of 0. If it is set to 1, the cam table start
position is set to the current position of the main-axis.
(12) MasterValueSource selects the source of the main axis to be synchronized. If set to 0, the serve axis performs cam operations
based on the command position of the main axis calculated in the motion controller, and if set to 1, the serve axis performs
cam operations based on the current position received via communication from the servo drive of the main axis.
(13) CamTableID sets the number of cam table to be applied to cam operation. The setting range is from 1 to 32. If the input value
exceeds the setting range, an error "0x1115" occurs at the motion function block.
(14) The corresponding axis is in a "SynchronizedMotion” state when this motion function block is running.
(15) Example program
This example shows generating a cam profile, executing MC_CAMIN command on the sub-axis, moving the main-axis to the
200,000 position
(a) Function block setting
6-78
Chapter 6 Motion Function Block
MC_MoveRelative On
MC_MOVERELATIVE.Done
MC_CAMIN On
MC_CAMIN.Busy
MC_CAMIN.Active
MC_CAMIN.Insync
_AXxx_Synchronized (%JXxx.84 )
6-79
Chapter 6 Motion Function Block
6-80
Chapter 6 Motion Function Block
MC_CamOut
BOOL Execute Done BOOL
UINT Slave Slave UINT
Busy BOOL
Error BOOL
ErrorID WORD
Input-Output
UINT Slave Set the serve axis. ( refer toSee 6.2.1 Setting Range by Product)
Input
BOOL Execute Give cam operation stop command to the relevant axis in the rising Edge.
Output
BOOL Done Indicate the completion state of motion function block.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
(1) This motion function block immediately disengages cam operation running in the serve axis.
(2) If motion function block of which BufferMode is Aborting in the serve axis where cam operation is running, cam operation is
automatically disengaged and the relevant motion function block is executed. To execute cam operation abort (MC_CamOut)
motion function block, the relevant axis do operation which keeps the speed at the time when cam operation is disengaged. If
you want to completely stop the serve axis, use stop (MC_Halt) or immediate stop (MC_Stop) motion function block.
(3) When MC_CamOut motion function block is executed, the InSync output of MC_CamIn function block and the Synchronized
status flag (_AXxx_Synchronized) is off.
(4) Example program
This example shows generating a cam profile, executing MC_CAMIN command on the sub-axis, moving main-axis to the
200,000 position and then executing MC_CAMOUT The sub-axis maintains the velocity at the time when the cam operation
is terminated.
(a) Function block setting
6-81
Chapter 6 Motion Function Block
6-82
Chapter 6 Motion Function Block
MC_GearIn
BOOL Execute InGear BOOL
UINT Master Master UINT
UINT Slave Slave UINT
BOOL ContinousUpdate Busy BOOL
INT RatioNumerator Active BOOL
UINT RatioDenominator CommandAborted BOOL
UINT MasterValueSource Error BOOL
LREAL Acceleration ErrorID WORD
LREAL Deceleration
LREAL Jerk
UINT BufferMode
Input-Output
UINT Master Set main axis ( refer toSee 6.2.1 Setting Range by Product)
UINT Slave Set the serve axis. ( refer toSee 6.2.1 Setting Range by Product)
Input
BOOL Execute Give gear operation command to the relevant axis in the rising Edge.
Specify the update setting of input value.
BOOL ContinuousUpdate
(Refer to 6.1.5 Chnges in Parameters during Execution of motion Function Block)
INT RatioNumerator Specify the numerator of gear ratio. (-32768 ~ 32767)
UINT RatioDenominator Specify the denominator of gear ratio. (0 ~ 65535)
Select data of the main axis to be synchronized.
UINT MasterValueSource 0: Synchronize in the command position of the main axis.
1: Synchronize in the current position of the main axis.
LREAL Acceleration Specify the acceleration at the beginning of gear operation synchronization. [u/s2]
LREAL Deceleration Specify the deceleration at the beginning of gear operation synchronization. [u/s2]
LREAL Jerk Specify the change rate of acceleration/deceleration. [u/s3]
Specify the sequential operation setting of motion function block.
UINT BufferMode
(Refer to 6.1.4 BufferMode input)
Output
BOOL InGear Indicate that gear operation is running by applying gear ration.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Active Indicate that the current motion function block is controlling the relevant axis.
BOOL CommandAborted Indicate that the current motion function block is interrupted while it is running.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
(1) This motion function block is an operation to synchronize the speed of the main axis and the serve axis depending on gear
ratio which is set.
(2) Giving gear operation abort (MC_GearOut) commands to the relevant axis or execution of other motion function block allow
disengaging gear operation.
(3) RatioNumerator and RatioDenominator set the numerator and denominator to be applied to the serve axis respectively. If the
numerator is set to negative number, the rotation direction of the serve axis is the opposite of the main axis.
(4) MasterValueSource select the data of the main axis which is a standard of synchronization. If it is set to 0, synchronization
6-83
Chapter 6 Motion Function Block
operation is based on the command position of the main axis of motion controller, and if it is set to 1, synchronization operation
is based on the current position. Other values set besides these two make Error of motion function block On and cause “0x1114”
in ErrorID.
(5) When this motion function block is executed, the sub axis accelerates/decelerates at a speed suitable for the gear ratio and
synchronizes with the main axis.
(6) If this motion function block is aborted by another command (BufferMode=0 of newly executed command), the cam operation
is stopped, and the CommandAborted output is on.
(7) If another command is executed by Buffered while this motion function block is being executed (BufferMode=1~5 of newly
executed command), the status of gear operation (InGear phase) is terminated, and then the newly executed command is run
subsequently. InGear / Busy / Active / CommandAborted / Error output of this function block are all Off.
(8) The serve axis is in 'SynchronizedMotion' while this motion function block is running.
(9) The changed parameters can be applied when ContinuousUpdate input is On.
Only RatioNumerator, RatioDenominator, Acceleration, Deceleration input can be updated. (However, in case of InGear=On
case, RatioNumerator, RatioDenominator input can be updated)
(8) Example program
This example shows the operation of 2–axis up to 50,000,000 when moving 1-axis (main-axis) to 100,000,000 after executing
MC_GearIn command on axis 2(sub-axis) at the current position of 0.
6-84
Chapter 6 Motion Function Block
Axis1 position
Axis2 position
Axis2 velocity
6-85
Chapter 6 Motion Function Block
MC_GearOut
BOOL Execute Done BOOL
UINT Slave Slave UINT
Busy BOOL
Error BOOL
ErrorID WORD
Input-Output
UINT Slave Set the serve axis. ( refer toSee 6.2.1 Setting Range by Product)
Input
BOOL Execute Specify the sequential operation setting of motion function block.
Output
BOOL Done Indicate the completion state of motion function block.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
(1) This motion function block immediately disengages gear operation running in the spindle.
(2) If motion function block of which BufferMode is Aborting in the spindle where cam operation is running, gear operation is
automatically disengaged and the relevant motion function block is executed. If gear operation abort (MC_GearOut) motion
function block is only to be executed, the relevant axis performs operation to maintain the speed at the time when gear
operation is disengaged. If you want to completely stop the serve axis, use stop (MC_Halt) or immediate stop (MC_Stop)
motion function block.
6-86
Chapter 6 Motion Function Block
Axis2 velocity
6-87
Chapter 6 Motion Function Block
Input-Output
UINT Master Set main axis ( refer toSee 6.2.1 Setting Range by Product)
UINT Slave Set the serve axis. ( refer toSee 6.2.1 Setting Range by Product)
Input
BOOL Execute Give gear operation command to the relevant axis in the rising Edge.
INT RatioNumerator Specify the numerator of gear ratio. (-32768~32767)
UINT RatioDenominator Specify the denominator of gear ratio. (0~65535)
Select the standard of the main axis value to be synchronized.
UINT MasterValueSource 0(mcSetValue): Synchronize in the target position of the main axis.
1(mcActualValue): Synchronize in the current position of the main axis.
LREAL MasterSyncPosition Specify the position of the main axis where gear operation starts.
LREAL SlaveSyncPosition Specify the position of the spindle where gear operation starts.
LREAL SyncMode Unused
LREAL MasterStartDistance Specify the distance of the main axis where synchronization starts.
Specify the maximum speed of the spindle at the beginning of synchronization.
LREAL Velocity
[u/s]
Specify the maximum acceleration of the spindle at the beginning of
LREAL Acceleration
synchronization. [u/s2]
Specify the maximum deceleration of the spindle at the beginning of
LREAL Deceleration
synchronization. [u/s2]
LREAL Jerk Unused
Specify the sequential operation setting of motion function block.
UINT BufferMode
(Refer to 6.1.4.BufferMode input)
6-88
Chapter 6 Motion Function Block
Output
Indicate that gear operation is normally being fulfilled as the specified gear ratio is
BOOL InSync
applied.
BOOL StartSync Indicate synchronization is starting.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Active Indicate that the current motion function block is controlling the relevant axis.
BOOL CommandAborted Indicate that the current motion function block is interrupted while it is running.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
(1) This motion function block is an operation to synchronize the speed of the main axis and the spindle in the set position depending
on gear ratio which is set in the specific position.
(2) Giving gear operation abort (MC_GearOut) commands to the spindle or operation of other motion function block allow stopping
gear operation.
(3) RatioNumerator and RatioDenominator set the numerator and denominator of gear ratio to be applied to the spindle respectively.
If the numerator is set to negative number, the rotation direction of the spindle goes into reverse of the main axis.
(4) MasterValueSource selects the source of the main axis to be synchronized. If it is set to 0 (mcSetValue), synchronization is
performed by putting the target position of the main axis in the current motion control period as a source, and if it is set to
1(mcActualValue), synchronization is performed by putting the current position of the main axis got feedback from the current
motion control period as a source. Other values set besides these two cause "error 0x10D1”.
(5) Input the positions of the main axis and the spindle where gear operation is completed synchronization in MasterSyncPosition
input and SlaveSyncPosition input respectively. Input the distance where the spindle starts synchronization in
MasterStartDistance input, and the spindle starts synchronization at the position away the distance set in MasterStartDistance
input from the position set in MasterSyncPosition input.
(6) Once synchronization starts, StartSync output is On. When synchronization is completed and gear operation starts, StartSync
output is Off and InSync output is On.
(7) If this motion function block is aborted by another command (BufferMode=0 of newly executed command), the cam operation
is stopped, and the CommandAborted output is on.
(8) If another command is executed by Buffered while this motion function block is being executed (BufferMode=1~5 of newly
executed command), the status of gear operation (InGear phase) is terminated, and then the newly executed command is run
subsequently. InSync / Busy / Active / CommandAborted / Error output of this function block are all Off.
(9) The serve axis is in 'SynchronizedMotion' while this motion function block is running.
6-89
Chapter 6 Motion Function Block
(10) If the function block is re-executed (Execute input is On) before the instruction is terminated, the changed parameters are
applied.
Only RatioNumerator, RatioDenominator, MasterSyncPosition, SlaveSyncPosition, MasterStartDistance, Velocity,
Acceleration, Deceleration input can be updated. (However, in case of InGear=On, RatioNumerator, RatioDenominator input
can be updated.
(9) Example program
This example program executes MC_GearInPos function block in which sub-axis starts synchronization from a position away
as long as the distance of MasterStartDistance (500,000) from MasterSyncPosition(1,000,000), and executes
MC_MoveRelative for relative movement to the 2,000,000 position. Once synchronization starts, StartSyncoutput is on (a) and
when the synchronization is completed and gear operation starts, StartSync output is off, and InSyncoutput is on.
(a) Function block setting
6-90
Chapter 6 Motion Function Block
6-91
Chapter 6 Motion Function Block
%MX1
MC_MOVERELATIVE.Done
%MX2
MC_GEARINPOS.StartSync
MC_GEARINPOS.Insync
MC_GEARINPOS.Active
_AXxx_Synchronized(%JXxx.84 )
Axis1 velocity
Axis2 velocity
Axis2 position
Axis1 position
(a) (b)
6-92
Chapter 6 Motion Function Block
Axis1 velocity
Axis2 velocity
Axis1 position
Axis2 position
6-93
Chapter 6 Motion Function Block
MC_Phasing
BOOL Execute Done BOOL
UINT Master Master UINT
UINT Slave Slave UINT
LREAL PhaseShift Busy BOOL
LREAL Velocity Active BOOL
LREAL Acceleration CommandAborted BOOL
LREAL Deceleration Error BOOL
LREAL Jerk ErrorID WORD
CoveredPhaseShift LREAL
Input-Output
UINT Master Set main axis ( refer toSee 6.2.1 Setting Range by Product)
UINT Slave Set the serve axis. ( refer toSee 6.2.1 Setting Range by Product)
Input
BOOL Execute Give a phase compensation command to the relevant axis in the rising Edge
LREAL PhaseShift Specify the main axis compensation amount.
LREAL Velocity Specify the operation speed. [u/s]
LREAL Acceleration Specify the acceleration. [u/s2]
LREAL Deceleration Specify the deceleration. [u/s2]
LREAL Jerk Specify the change rate of acceleration/deceleration. [u/s3]
Output
BOOL Done Indicate whether to reach the specified phase compensation distance.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Active Indicate that the current motion function block is controlling the relevant axis.
BOOL CommandAborted Indicate that the current motion function block is interrupted while it is running.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
Continuously output the compensation amount reflected while the phase
LREAL CoveredPhaseShift
compensation is running
(1) This motion function block performs phase correction of axis during synchronous control operation. Phase correction is performed
on the main-axis position referred to by sub-axis in synchronous control operation, to perform synchronous control operation of
the sub-axis to the corrected main-axis position.
(2) Once phase correction command is executed, the current position of the main-axis is phase-corrected using the phase shift
setting at PhaseShift- Velocity / Acceleration /Deceleration / Jerk.
(3) Phase correction does not change the actual command position or current position of the main-axis. Phase correction is
performed on the main-axis position referred to by sub-axis in synchronous control operation. In other words, the main-axis does
not know that phase correction is executed by the sub-axis.
(4) Phase correction of the same amount can be performed again from the current position by re-executing the function block
(Execute input is on) before the command is completed. In other words, phase shift is a relative value from the execution point.
(5) After executing phase correction command, when the phase shift is reached, Done output is on.
6-94
Chapter 6 Motion Function Block
MC_PowerAll
BOOL Enable Status BOOL
Vaild BOOL
Error BOOL
ErrorID WORD
Input
BOOL Enable Servo motor of the all axis is servo On while input is activated.
Output
BOOL Status Indicate the power permission status of the all axis.
Indicate the validity of motion function block output.
BOOL Valid
(same with Status output here)
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
(1) This motion function block is to give servo On/Off command to the all axis.
(2) When the enable input is changed from Off to On, the servo on command is issued to the servo ready axis among all axes, and
when the enable input is changed from On to Off, the servo off command is issued.
(3) “Error 0x0E90” occurs when there is an axis that has failed to turn servo on/off among configuration axes.
(4) If servo On command is executed when the axis is in 'Disable' state, the axis state is 'StandStill', and failure in servo On brings
'ErrorStop' state.
6-95
Chapter 6 Motion Function Block
MC_HomeAll
BOOL Execute Done BOOL
LREAL Position Busy BOOL
UINT BufferMode Active BOOL
CommandAborted BOOL
Error BOOL
ErrorID WORD
Input
BOOL Execute Start the homing operation in rising Edge.
Specify the absolute position of axis when reference signal is detected. (When the
LREAL Position command position value is converted to a pulse, it is set within the range of -
2147483648 to 2147483647.)
Specify the sequential operation setting of motion function block.
UINT BufferMode
(Refer to 6.1.4 BufferMode input)
Output
BOOL Done Indicate the completion state of motion function block.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Active Indicate that the current motion function block is controlling the relevant axis.
BOOL CommandAborted Indicate that the current motion function block is interrupted by other command.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
(1) This motion function block is to give a homing command to the all axis.
(2) Homing method is operated as specified in the operation parameter of the each axis in advance.
(3) As for Position input, absolute position of axis is specified when Reference Signal is detected or homing is completed.
(4) While this motion function block is running, the axis is 'Homing' state, and when the command is completed, it is switched to
'Standstill'.
(5) “Error 0x0E91” occurs when there is an axis that has failed to turn homing among configuration axes.
(5) Unlike the MC_Home command, even if the input parameter value is changed before the command is finished and the function
block is re-executed (Execute input is On), it is not updated unlike the MC_Home command.
6-96
Chapter 6 Motion Function Block
LS_HomeAll
BOOL Execute Done BOOL
LREAL Position Busy BOOL
SINT HomingMethod Active BOOL
LREAL SwitchSearchSpeed CommandAborted BOOL
LREAL ZeroSearchSpeed Error BOOL
LREAL HomingAcc ErrorID WORD
LREAL HomeOffset
UINT DoneBehavior
UINT BufferMode
Input
BOOL Execute Start the homing operation in rising Edge.
Specify the absolute position of axis when reference signal is detected. (When the
LREAL Position command position value is converted to a pulse, it is set within the range of -
2147483648 to 2147483647.)
SINT HomingMethod Set the homing method (0x6098)
LREAL SwitchSearchSpeed Set the switch search speed (0x6099:1) when returning to the homing.
LREAL ZeroSearchSpeed Set the zero search speed (0x6099:2) when returning to the homing.
LREAL HomingAcc Set acceleration/deceleration (0x609A) when returning to homing.
LREAL HomeOffset Set Offest (0x607C) when returning to homing.
Set the movement (0x201E) after homing is completed.
UINT DoneBehavior (Used by drives other than our own L7N, the value has no effect on third-party
drives)
Specify the sequential operation setting of motion function block.
UINT BufferMode
(Refer to 6.1.4 BufferMode input)
Output
BOOL Done Indicate the completion state of motion function block.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Active Indicate that the current motion function block is controlling the relevant axis.
BOOL CommandAborted Indicate that the current motion function block is interrupted by other command.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
(1) This motion function block is to give a expansion homing command to the all axis.
(2) The homing method operates as set in the function block. (The homing method may be different for each drive, so please refer
to the user manual of the drive you are using. When using our XDL-N series servo drive, please refer to 8.1 Origin
Determination)
(3) As for Position input, absolute position of axis is specified when Reference Signal is detected or homing is completed.
(4) While this motion function block is running, the axis is 'Homing' state, and when the command is completed, it is switched to
'Standstill'.
(5) “Error 0x0E92” occurs when there is an axis that has failed to turn homing among configuration axes.
(6) Unlike the LS_Home command, even if the input parameter value is changed before the command is finished and the function
block is re-executed (Execute input is On), it is not updated unlike the MC_Home command.
6-97
Chapter 6 Motion Function Block
(7) The input range for SwitchSearchSpeed, ZeroSearchSpeed, and HomingAcc is 0 ≤ Parameter ≤ 1073741824 in pulse units,
and the input range for HomeOffset is -2147483648≤ Parameter ≤2147483647 in pulse units. If a value is input in a unit other
than pulse unit, it is converted to pulse unit and checked if the value is out of range, and an error occurs if it is out of range.
(8) In the case of DoneBehavior, this is a function to set the movement method after homing is completed. It is used for drives
other than our own L7N, and the value set in the function block does not affect when a third-party drive is used.
0: After homing is completed, the motor does not rotate and the Home Offset value becomes Zero Position.
1: After homing is completed, the motor moves as much as the Home Offset value, and it becomes the Zero Position at the
position where the movement is completed.
6-98
Chapter 6 Motion Function Block
MC_StopAll
BOOL Execute Done BOOL
LREAL Deceleration Busy BOOL
LREAL Jerk CommandAborted BOOL
Error BOOL
ErrorID WORD
Input
BOOL Execute Give immediate stop command to the relevant axis in the rising Edge.
LREAL Deceleration Specify the deceleration in time of stop. [u/s2]
LREAL Jerk Specify the change rate of acceleration/deceleration. [u/s3]
Output
BOOL Done Indicate that the speed of the relevant axis reaches 0.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL CommandAborted Indicate that the current motion function block is interrupted while it is running.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
(1) This motion function block is to give a Emergency Stop command to the all axis.
(2) When all axis execute immediate stop (MC_StopAll) motion function block, the existing motion function block being executed in
the all axis is stopped, All the axis state changed to 'Stopping'. When the relevant axis is in 'Stopping’ state, other motion function
block cannot be executed in the relevant axis until the stopping is completed (until the Done output is activated).
(3) CommandAborted output indicates that the current motion function block is interrupted while it was executed. Other motion
function block cannot interrupt immediate stop (MC_StopAll) motion function block while all axis execute immediate stop
(MC_StopAll) motion function block is running, therefore, CommandAborted output is On in general when the power of servo is
blocked or servo Off command is executed.
(4) If Execute input is On or the speed of axis is not 0, the axis is in 'Stopping' state, and when Done output is On and Execute input
is Off, it is switched to 'Standstill' state.
(5) “Error 0x0E93” occurs when there is an axis that has failed to immediate stop among configuration axes.
(5) Unlike the MC_Home command, even if the input parameter value is changed before the command is finished and the function
block is re-executed (Execute input is On), it is not updated unlike the MC_Stop command.
6-99
Chapter 6 Motion Function Block
MC_HaltAll
BOOL Execute Done BOOL
LREAL Deceleration Busy BOOL
LREAL Jerk Active BOOL
UINT BufferMode CommandAborted BOOL
Error BOOL
ErrorID WORD
Input
BOOL Execute Give stop command to the relevant axis in the rising Edge.
LREAL Deceleration Specify deceleration in time of stop. [u/s2]
LREAL Jerk Specify the change rate of acceleration/deceleration. [u/s3]
Specify the sequential operation setting of motion function block.
UINT BufferMode
(Refer to 6.1.4 BufferMode input)
Output
BOOL Done Indicate that the speed of the relevant axis reaches 0.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Active Indicate that the current motion function block is controlling the relevant axis.
BOOL CommandAborted Indicate that the current motion function block is interrupted while it is running.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
(1) This motion function block is to give a stop command to the all axis.
(2) The axis is 'DiscreteMotion' state while this motion function block is running, and when the speed of the relevant axis is 0, ‘Done’
output is On and changed to 'Standstill' state.
(3) BufferMode can be set like the MC_Halt command, and if there is at least one axis whose stop command (MC_Halt) is
interrupted by another motion function block, it is displayed as Error.
(4) “Error 0x0E94” occurs when there is an axis that has failed to stop among configuration axes.
(3) Unlike the MC_Halt command, even if the input parameter value is changed before the command is finished and the function
block is re-executed (Execute input is On), it is not updated unlike the MC_Stop command.
6-100
Chapter 6 Motion Function Block
MC_Reset2All
BOOL Execute Done BOOL
UINT ErrorType Busy BOOL
Error BOOL
ErrorID WORD
Input
BOOL Execute Reset the axis error in the rising Edge of input.
The types of error to be reset (0: Axis error, 1: Common error, 2: Axis error and
UINT ErrorType
Common error)
Output
BOOL Done Indicates whether the axis error was successfully reset
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
(1) This motion function block is to reset the error of the all axis. When setting ErrorType to '0' and executing motion function block in
case the axis is in ' ErrorStop' state, every axis error is reset and the axis state is switched to 'StandStill' or 'Disabled' state.
(2) If ErrorType is set to ‘1’ and motion function block is executed, Common error occurred in the relevant module is reset. If ErrorType
is set to ‘2’ and motion function block is executed, errors and common errors occurring in the set axis are reset.
(3) Motion function block is executed in the rising Edge of Execute input.
(4) “Error 0x0E95” occurs when there is an axis that has failed to error reset among configuration axes.
6-101
Chapter 6 Motion Function Block
MC_SetPositionAll
BOOL Execute Done BOOL
LREAL Position Busy BOOL
BOOL Relative CommandAborted BOOL
UINT ExcutionMode Error BOOL
ErrorID WORD
Input
BOOL Execute Specify the current position of the relevant axis in the rising Edge.
LREAL Position Specify the position.
BOOL Relative 0: Position value=Absolute position, 1: Position value=Relative position
0: Immediately applied the position value,
UINT ExecutionMode
1: Applied at the same point with ‘Buffered’ of Buffermode
Output
BOOL Done Indicate the completion state of motion function block.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL CommandAborted Indicate that the current motion function block is interrupted while it is running.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
(1) This motion function block is to set the current position of the all axis.
(2) Specify the position in Position input. When executing motion function block, if Relative input is Off, the position of the relevant
axis is replaced by the value of Position input, and if Relative input is On, the value of Position input is added to the current
position of the relevant axis.
(3) “Error 0x0E96” occurs when there is an axis that has failed to turn current position setting among configuration axes.
(4) ExecutionMode input specifies the setting point. 0 means to be set immediately after motion function block, and 1 means to be
set at the same point with ‘Buffered’ in sequential operation setting. If a value that cannot be set is set, “Error 0x101B” occurs
on the relevant axis.
0 (mcImmediately): Change the parameter value immediately after executing function block (rising Edge in Execute input). If
the relevant axis is in running, operation can be affected.
1 (mcQueued): Changed at the same point with ‘Buffered’ in Buffermode. (Refer to 6.1.4 BufferMode input)
6-102
Chapter 6 Motion Function Block
MC_GearInEx
BOOL Execute InGear BOOL
UINT Master Master UINT
UINT Slave Slave UINT
BOOL ContinousUpdate Busy BOOL
DINT RatioNumerator Active BOOL
UDINT RatioDenominator CommandAborted BOOL
UINT MasterValueSource Error BOOL
LREAL Acceleration ErrorID WORD
LREAL Deceleration
LREAL Jerk
UINT BufferMode
Input-Output
UINT Master Set main axis ( refer toSee 6.2.1 Setting Range by Product)
UINT Slave Set the serve axis. ( refer toSee 6.2.1 Setting Range by Product)
Input
BOOL Execute Give gear operation command to the relevant axis in the rising Edge.
Specify the update setting of input value.
BOOL ContinuousUpdate
(Refer to 6.1.5 Changes in Parameters during Execution of Motion Function Block)
DINT RatioNumerator Specify the numerator of gear ratio. (-2147483648 ~ 2147483647)
UDINT RatioDenominator Specify the denominator of gear ratio. (0 ~ 4294967295)
Select data of the main axis to be synchronized.
UINT MasterValueSource 0: Synchronize in the command position of the main axis.
1: Synchronize in the current position of the main axis.
LREAL Acceleration Specify the acceleration at the beginning of gear operation synchronization. [u/s2]
LREAL Deceleration Specify the deceleration at the beginning of gear operation synchronization. [u/s2]
LREAL Jerk Specify the change rate of acceleration/deceleration. [u/s3]
Specify the sequential operation setting of motion function block.
UINT BufferMode
(Refer to 6.1.4 BufferMode input)
Output
BOOL InGear Indicate that gear operation is running by applying gear ration.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Active Indicate that the current motion function block is controlling the relevant axis.
BOOL CommandAborted Indicate that the current motion function block is interrupted while it is running.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
(1) In this motion function block, RatioNumerator input and RatioDenominator input are expanded to DINT and UDINT respectively.
(2) The rest of the settings and functions are the same as those of the MC_GearIn function block. Please refer to the description of
the MC_GearIn function block.
6-103
Chapter 6 Motion Function Block
MC_GearInPosEx
BOOL Execute InSync BOOL
UINT Master Master UINT
UINT Slave Slave UINT
DINT RatioNumerator StartSync BOOL
UDINT RatioDenominator Busy BOOL
UINT MasterValueSource Active BOOL
LREAL MasterSyncPosition CommandAborted BOOL
LREAL SlaveSyncPosition Error BOOL
UINT SyncMode ErrorID WORD
LREAL MasterStartDistance
LREAL Velocity
LREAL Acceleration
LREAL Deceleration
LREAL Jerk
UINT BufferMode
Input-Output
UINT Master Set main axis ( refer toSee 6.2.1 Setting Range by Product)
UINT Slave Set the serve axis. ( refer toSee 6.2.1 Setting Range by Product)
Input
BOOL Execute Give gear operation command to the relevant axis in the rising Edge.
DINT RatioNumerator Specify the numerator of gear ratio. (-2147483648 ~ 2147483647)
UDINT RatioDenominator Specify the denominator of gear ratio. (0 ~ 4294967295)
Select the standard of the main axis value to be synchronized.
UINT MasterValueSource 0(mcSetValue): Synchronize in the target position of the main axis.
1(mcActualValue): Synchronize in the current position of the main axis.
LREAL MasterSyncPosition Specify the position of the main axis where gear operation starts.
LREAL SlaveSyncPosition Specify the position of the spindle where gear operation starts.
LREAL SyncMode Unused
LREAL MasterStartDistance Specify the distance of the main axis where synchronization starts.
Specify the maximum speed of the spindle at the beginning of synchronization.
LREAL Velocity
[u/s]
Specify the maximum acceleration of the spindle at the beginning of
LREAL Acceleration
synchronization. [u/s2]
Specify the maximum deceleration of the spindle at the beginning of
LREAL Deceleration
synchronization. [u/s2]
LREAL Jerk Unused
Specify the sequential operation setting of motion function block.
UINT BufferMode
(Refer to 6.1.4 BufferMode input)
6-104
Chapter 6 Motion Function Block
Output
Indicate that gear operation is normally being fulfilled as the specified gear ratio is
BOOL InSync
applied.
BOOL StartSync Indicate synchronization is starting.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Active Indicate that the current motion function block is controlling the relevant axis.
BOOL CommandAborted Indicate that the current motion function block is interrupted while it is running.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
(1) In this motion function block, RatioNumerator input and RatioDenominator input are expanded to DINT and UDINT
respectively.
(2) The rest of the settings and functions are the same as those of the MC_GearInPos function block. Please refer to the
description of the MC_GearInPos function block.
6-105
Chapter 6 Motion Function Block
LS_MoveLink
BOOL Execute Done BOOL
UINT Master Master UINT
UINT Slave Slave UINT
DINT RatioNumber StartSync BOOL
UDINT RatioDenominator InSync BOOL
UINT MasterValueSource Busy BOOL
LREAL MasterStartDistance Active BOOL
LREAL MasterSyncPosition CommandAborted BOOL
LREAL MasterEndDistance Error BOOL
LREAL SlaveSyncPosition ErrorID WORD
LREAL SlaveEndPosition
LREAL SlaveWailtPosition
UINT BufferMode
Input-Output
Set main axis (1~32: Real/Virtual Axes,33~36: Virtual Axes,
UINT Master
1001~1002: Encoder)
UINT Slave Set the serve axis. (1~32: Real/Virtual Axes,33~36: Virtual Axes)
Input
BOOL Execute Give an link operation command to the relevant axis in the rising edge
DINT RatioNumerator Specifies the numerator value of the gear ratio.
UDINT RatioDenominator Specifies the denominator value of the gear ratio.
Select the standard of the main axis value to be synchronized.
0(mcSetValue): Synchronize in the target position of the main axis.
UINT MasterValueSource
1(mcActualValue): Synchronize in the current position of the main
axis.
Specify the move distance of the main axis where synchronization
LREAL MasterStartDistance
starts.
LREAL MasterSyncPosition Specify the position of the main axis where sync. operation starts.
Specifies the movement distance of the main axis of operation to stop
synchronization.
LREAL MasterEndDistance
(Movement distance of main axis from SlaveEndPosition to
SlaveWaitPosition)
LREAL SlaveSyncPosition Specify the position of the main axis where sync. operation starts.
LREAL SlaveEndPosition Specify the position of the main axis where sync. operation end.
LREAL SlaveWaitPosition Specifies the position where the slave axis waits.
Specify the sequential operation setting of motion function block.
UINT BufferMode
(Refer to 6.1.4 BufferMode input)
Output
Indicate that gear operation is normally being fulfilled as the specified
BOOL Done
gear ratio is applied.
BOOL StartSync Indicates that tracking operation is being performed.
Indicate that gear operation is normally being fulfilled as the specified
BOOL InSync
gear ratio is applied.
6-106
Chapter 6 Motion Function Block
BOOL Busy Indicate that the execution of motion function block is not completed.
Indicate that the current motion function block is controlling the relevant
BOOL Active
axis.
Indicate that the current motion function block is interrupted while it is
BOOL CommandAborted
running.
BOOL Error Indicates whether an error occurs or not.
Output the number of error occurred while motion function block is
WORD ErrorID
running.
(5) This motion function block is an operation to synchronize the speed of the main axis and the spindle in the set position depending
on gear ratio which is set in the specific position.
(6) In link operation, the main axis must always operate in the forward direction.
(7) Link operation consists of three operations: catch operation, gear operation, and release operation.
(8) Link operation is terminated when the subordinate axis reaches SlaveWaitPosition. To stop the link operation, it is necessary to
give a stop (MC_Stop) command to the subordinate axis or operate another motion function block.
(9) RatioNumerator and RatioDenominator set the numerator and denominator of gear ratio to be applied to the spindle respectively.
If the numerator is set to negative number, the rotation direction of the spindle goes into reverse of the main axis. If the numerator
value is set to 0, “Error 0x1091” occurs.
(10) “Error 0x1192” occurs when the SlaveEndPosition value is set smaller than the SlaveSyncPosition when the gear ratio set by the
RatioNumerator and RatioDenominator values is positive.
(11) MasterValueSource selects the source of the main axis to be synchronized. If it is set to 0 (mcSetValue), synchronization is
performed by putting the target position of the main axis in the current motion control period as a source, and if it is set to
1(mcActualValue), synchronization is performed by putting the current position of the main axis got feedback from the current
motion control period as a source. Other values set besides these two cause "error 0x1193”.
(11) In the MasterSyncPosition input and SlaveSyncPosition input, input the positions of the main and sub-axis, respectively, to
complete the following operation and start the gear operation. In the MasterSyncPosition input and SlaveSyncPosition input,
input the positions of the main and sub-axis, respectively, to complete the following operation and start the gear operation.
(12) When gear operation starts and the main axis reaches the SlaveEndPosition by the main axis, the gear operation ends and the
main axis moves as much as the distance set in the MasterEndDistance input, while the subordinate axis performs the release
action to reach the SlaveWaitPositon. When the release operation is completed, the link operation is terminated.
(13) The MasterStartDistance value should always be set to a value greater than 0. If the MasterStartDistance value is set to less
than 0, “Error 0x1195” occurs.
(14) If SlaveEndPosition and SlaveWaitPosition are set identically, release operation is performed before reaching SlaveEndPosition.
The position of the main axis where the release operation starts is the position obtained by subtracting the movement distance
set in the MasterEndDistance input from the position of the main axis corresponding to SlaveEndPosition.
(15) The MasterEndDistance value should always be set to a value greater than 0. If the MasterEndDistance value is set to less than
0, “Error 0x1196” occurs.
(16) Once tracking operation starts, StartSync output is On. When the tracking operation is completed and gear operation starts,
the StartSync output is turned off and the InSync output is turned on. When the release operation starts, InSync output is Off.
When the position of the sub-axis reaches the SlaveWaitPosition and the release operation ends, the Done output is On.
(17) If this motion function block is aborted by another command (BufferMode=0 of newly executed command), the cam operation
is stopped, and the CommandAborted output is on.
(18) If another command is executed by Buffered while this motion function block is being executed (BufferMode=1~5 of newly
executed command), the status of gear operation (InGear phase) is terminated, and then the newly executed command is run
subsequently. InSync / Busy / Active / CommandAborted / Error output of this function block are all Off.
(19) The serve axis is in 'SynchronizedMotion' while this motion function block is running.
6-107
Chapter 6 Motion Function Block
Execute
Start
Sync
InSync
Done
MasterEndDistance
Master
Position
MasterSyncPosition
MasterStartDistance
MasterStartPosition
=MasterSyncPosition-MasterStartDistance
SlaveEndPosition
Slave
Position
SlaveSyncPosition
SlaveWaitPosition
Catch Release
GearOperation
Operation Operation
6-108
Chapter 6 Motion Function Block
MC_AddAxisToGroup
BOOL Execute Done BOOL
UINT AxesGroup AxesGroup UINT
UINT Axis Axis UINT
UINT IdentInGroup Busy BOOL
Error BOOL
ErrorID WORD
Input-Output
UINT AxesGroup Set the group where the relevant axis is added. (1 ~ 16: 1Group ~ 16 Group)
Set the axis to be added to the relevant group. ( refer toSee 6.2.1 Setting Range
UINT Axis
by Product)
Input
BOOL Execute Give group axis addition command to the relevant axis in the rising Edge.
UINT IdentInGroup Set the ID of the relevant axis to be used in the relevant group. (1 ~ 10)
Output
BOOL Done Indicate the completion state of motion function block.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
(1) This motion function block adds Axis specified axis to the axis group specified in AxesGroup input.
(2) ID in the axis group specified to IdentInGroup must have unique value for each axis. (ID of each axis must be different.)
Maximum 10 axes can be included in each axis group, axis ID can be specified in the range of 1~10. If the specified axis
number is outside the range, “error 0x0006” occurs, and if numbers in the axis group overlap, “error 0x2051” occurs.
(3) Axis group setting can be performed in the same way at XG5000 axis group parameter setting.
6-109
Chapter 6 Motion Function Block
MC_RemoveAxisFromGroup
BOOL Execute Done BOOL
UINT AxesGroup AxesGroup UINT
UINT IdentInGroup Busy BOOL
Error BOOL
ErrorID WORD
Input-Output
UINT AxesGroup Set the group where the relevant axis is removed. (1 ~ 16: 1Group ~ 16 Group)
Input
BOOL Execute Give group axis exclusion command to the relevant group in the rising Edge.
Set the axis number in the relevant group to be removed from the relevant group.
UINT IdentInGroup
(1 ~ 10)
Output
BOOL Done Indicate the completion state of motion function block.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
(1) This motion function block removes the axis which is specified to IdentInGroup in the axis group specified in AxesGroup input.
(2) If the execution of group axis exclusion is tried when the axis group is not in GroupDisabled, GroupStandBy, and
GroupErrorStop state, "error 0x2003 or 0x2004 or 0x2005" occurs and the axis is not removed. In other words, the axis cannot
be removed when the axis group does not completely stop.
6-110
Chapter 6 Motion Function Block
MC_UngroupAllAxes
BOOL Execute Done BOOL
UINT AxesGroup AxesGroup UINT
Busy BOOL
Error BOOL
ErrorID WORD
Input-Output
UINT AxesGroup Set the group where every axis is to be removed. (1 ~ 16: 1Group ~ 16 Group)
Input
BOOL Execute Give MC_UngroupAllAxes command to the relevant group in the rising Edge.
Output
BOOL Done Indicate the completion state of motion function block.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
(1) This motion function block removes every axis which belongs to the axis group specified in AxesGroup input.
(2) If this motion function block is executed when the axis group is not in GroupDisabled, GroupStandBy, and GroupErrorStop
state, "error 0x2003 or 0x2004 or 0x2005" occurs and the axis is not removed. In other words, the axis cannot be removed
when the axis group does not completely stop.
(3) When the axis which belongs to the group is successfully removed, the relevant group is switched to GroupDisabled state.
6-111
Chapter 6 Motion Function Block
MC_GroupEnable
BOOL Execute Done BOOL
UINT AxesGroup AxesGroup UINT
Busy BOOL
Error BOOL
ErrorID WORD
Input-Output
UINT AxesGroup Set the group to be activated. (1 ~ 16: 1Group ~ 16 Group)
Input
BOOL Execute Give group activation command to the relevant group in the rising Edge.
Output
BOOL Done Indicate the completion state of motion function block.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
(1) This motion function block is to activate the axis group specified in AxesGroup input.
(2) When giving this command to the axis group in GroupDisable state, the relevant axis group is switched to GroupStandby state.
(3) This motion function block does not affect the power state of each axis in the relevant group.
6-112
Chapter 6 Motion Function Block
MC_GroupDisable
BOOL Execute Done BOOL
UINT AxesGroup AxesGroup UINT
Busy BOOL
Error BOOL
ErrorID WORD
Input-Output
UINT AxesGroup Set the group to be deactivated. (1 ~ 16: 1Group ~ 16 Group)
Input
BOOL Execute Give group disablement command to the relevant group in the rising Edge.
Output
BOOL Done Indicate the completion state of motion function block.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
(1) This motion function block is to deactivate the axis group specified in AxesGroup input.
(2) The axis group which executes this motion function block is switched to GroupDisabled.
(3) This motion function block does not affect the power state of each axis in the relevant group.
6-113
Chapter 6 Motion Function Block
6.5.6 Performs the search home of all axes in the group (MC_GroupHome)
MC_GroupHome
BOOL Execute Done BOOL
UINT AxesGroup AxesGroup UINT
ARRAY[0..3] OF LREAL[ ] Position Busy BOOL
UINT BufferMode Active BOOL
CommandAborted BOOL
Error BOOL
ErrorID WORD
Input-Output
UINT AxesGroup Set the group returning to home. (1 ~ 16: 1Group ~ 16 Group)
Input
BOOL Execute Give group homing command to the relevant group in the rising Edge.
LREAL[ ] Position Specify the absolute position of each axis when reference signal is detected.
Specify the sequential operation setting of motion function block.
UINT BufferMode
(Refer to 6.1.4.BufferMode input)
Output
BOOL Done Indicate the completion state of motion function block.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Active Indicate that the current motion function block is controlling the relevant axis.
BOOL CommandAborted Indicate that the current motion function block is interrupted while it is running.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
(1) This motion function block is to give homing command to the axis group specified in AxesGroup input.
(2) Homing method is operated as specified in servo parameter of the relevant axis in advance.
(3) In Position input, specify the absolute position to the array to be set when homing is completed or Reference Signal is detected.
Values in the array and the axis in the group correspond in the order of [①, ②, … ⑨, ⑩]. (①~⑩ are the axis ID in the axis
group)
(4) The axis group is in 'GroupHoming' state while this motion function block is running, and it is switched to 'GroupStandby' state
when motion function block is completed.
(5) If the function block is re-executed (Execute input is On) before the instruction is terminated, the changed parameters are
applied.
Only Position input can be updated.
6-114
Chapter 6 Motion Function Block
6.5.7 Sets the position of all axes in the group without moving (MC_GroupSetPosition)
MC_GroupSetPosition
BOOL Execute Done BOOL
UINT AxesGroup AxesGroup UINT
ARRAY[0..3] OF LREAL Position Busy BOOL
BOOL Relative Active BOOL
UINT ExecutionMode CommandAborted BOOL
Error BOOL
ErrorID WORD
Input-Output
UINT AxesGroup Select the group to set the current position. (1 ~ 16: 1Group ~ 16 Group)
Input
Give group current position setting command to the relevant group in the rising
BOOL Execute
Edge.
LREAL[ ] Position Specify the position.
BOOL Relative 0: Position value=Absolute position, 1:Position value=Incremental position
0: Immediately applied the position value,
UINT ExecutionMode
1: Applied at the same point with ‘Buffered’ of Buffermode
Output
BOOL Done Indicate the completion state of motion function block.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Active Indicate that the current motion function block is controlling the relevant axis.
BOOL CommandAborted Indicate that the current motion function block is interrupted while it is running.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
(1) This motion function block sets the current position of the relevant axis group.
(2) Specify the position of each axis in the group to the array. When executing this motion function block, if Relative input is Off,
the position of the relevant axis is replaced by the Position input value, and if Relative input is On, the Position input value is
added to the current position of the relevant axis. Values in the array and the axis in the group correspond in the order of [①,
②, … ⑨, ⑩]. (①~⑩ are the axis ID in the axis group)
(3) ExecutionMode input specifies the setting point. When the input is 0, setting is performed upon executing the command.
When the input is 1, setting is performed at the same time as "Buffered" at the sequential operation. The value unable to be set
causes "error 0x201B”.
0 (mcImmediately): Change the value of parameter immediately after the execution of motion function block (rising Edge in
Execute input). If the relevant axis is in running, operation can be affected.
1 (mcQueued): Changed at the same point with ‘Buffered’ in Buffermode. (Refer to 6.1.4.BufferMode input).
6-115
Chapter 6 Motion Function Block
Axis3 position
Axis2 position
Axis1 position
6-116
Chapter 6 Motion Function Block
MC_GroupStop
BOOL Execute Done BOOL
UINT AxesGroup AxesGroup UINT
LREAL Deceleration Busy BOOL
LREAL Jerk Active BOOL
CommandAborted BOOL
Error BOOL
ErrorID WORD
Input-Output
UINT AxesGroup Set the group to stop immediately. (1 ~ 16: 1Group ~ 16 Group)
Input
BOOL Execute Give group immediate stop command to the relevant group in the rising Edge.
LREAL Deceleration Specify the deceleration in time of stop. [u/s2]
LREAL Jerk Specify the change rate of acceleration/deceleration. [u/s3]
Output
BOOL Done Indicate the completion state of motion function block.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Active Indicate that the current motion function block is controlling the relevant axis.
BOOL CommandAborted Indicate that the current motion function block is interrupted while it is running.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
(1) This motion function block is to give an emergency stop command to the relevant axis group.
(2) The relevant axis group moves on the route which it was following until it completely stops.
(3) When executing group immediate stop (MC_GroupStop) motion function block, motion function block which the relevant axis
group is performing is interrupted, and the axis is changed to 'GroupStopping'. When the relevant axis group is in
‘GroupStopping’ state, other motion function block cannot be given to the relevant axis until the stop is completed (until Done
output is On).
(4) CommandAborted output indicates that the current motion function block is interrupted while it was executed. Because other
motion function block cannot interrupt group immediate stop (MC_GroupStop) command while group immediate stop
(MC_GroupStop) command is being executed, CommandAborted output is On when the power of servo is cut, servo Off
command is executed, or servo connection is disconnected.
(5) If Execute input is On or the speed of the axis is not 0, the axis is in ' GroupStopping' state, and if Done output is On and
Execute input is Off, the axis is switched to ' GroupStandBy' state.
(6) If the function block is re-executed (Execute input is On) before the instruction is terminated, the changed parameters are
applied.
Deceleration, Jerk input can be updated.
6-117
Chapter 6 Motion Function Block
MC_GroupHalt
BOOL Execute Done BOOL
UINT AxesGroup AxesGroup UINT
LREAL Deceleration Busy BOOL
LREAL Jerk Active BOOL
UINT BufferMode CommandAborted BOOL
Error BOOL
ErrorID WORD
Input-Output
UINT AxesGroup Set the group to stop. (1 ~ 16: 1Group ~ 16 Group)
Input
BOOL Execute Give group stop command to the relevant group in the rising Edge.
LREAL Deceleration Specify the deceleration in time of stop. [u/s2]
LREAL Jerk Specify the change rate of acceleration/deceleration. [u/s3]
Specify the sequential operation setting of motion function block.
UINT BufferMode
(Refer to 6.1.4.BufferMode input)
Output
BOOL Done Indicate the completion state of motion function block.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Active Indicate that the current motion function block is controlling the relevant axis.
BOOL CommandAborted Indicate that the current motion function block is interrupted while it is running.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
(1) This motion function block is to give a stop command to the relevant axis.
(2) The relevant axis group moves on the route which it was following until it completely stops.
(3) The axis is in 'GroupMoving' state while this motion function block is running, and if the axis group completely stops, 'Done'
output is On and the group state is changed to 'GroupStandBy' state.
(4) If the function block is re-executed (Execute input is On) before the instruction is terminated, the changed parameters are
applied.
Only Deceleration and Jerk input can be updated
6-118
Chapter 6 Motion Function Block
MC_GroupReset
BOOL Execute Done BOOL
UINT AxesGroup AxesGroup UINT
Busy BOOL
Error BOOL
ErrorID WORD
Input-Output
UINT AxesGroup Set the group to do error reset. (1 ~ 16: 1Group ~ 16 Group)
Input
BOOL Execute Give group error reset command to the relevant group in the rising Edge.
Output
BOOL Done Indicate the completion state of motion function block.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
(1) This motion function block is to reset the error of the relevant axis group. When the relevant axis is in 'GroupErrorStop', the
execution of motion function block resets the error occurred in the current relevant axis and switches the axis group to
'GroupStandBy' state.
(2) When executing this motion function block, every error occurred in each axis in the group is reset. (This has the same effect
with when executing the axis error reset (MC_Reset) command in each axis.)
6-119
Chapter 6 Motion Function Block
MC_MoveLinearAbsolute
BOOL Execute Done BOOL
UINT AxesGroup AxesGroup UINT
ARRAY[0..3] OF LREAL Position Busy BOOL
LREAL Velocity Active BOOL
LREAL Acceleration CommandAborted BOOL
LREAL Deceleration Error BOOL
LREAL Jerk ErrorID WORD
UINT BufferMode
UINT TransitionMode
LREAL TransitionParameter
Input-Output
Set the group to perform absolute position linear interpolation operation. (1 ~ 16:
UINT AxesGroup
1Group ~ 16 Group)
Input
Give absolute position linear interpolation operation command to the relevant group
BOOL Execute
in the rising Edge.
LREAL[ ] Position Specify the target position of each axis.
LREAL Velocity Specify the maximum speed of the route. [u/s]
LREAL Acceleration Specify the maximum acceleration. [u/s2]
LREAL Deceleration Specify the maximum deceleration. [u/s2]
LREAL Jerk Specify the change rate of acceleration/deceleration. [u/s3]
Specify the sequential operation setting of motion function block.
UINT BufferMode
(Refer to 6.1.4.BufferMode input)
Specify the route change mode of group operation.
UINT TransitionMode
(Refer to to 6.1.6.TransitionMode)
Specify the parameter of the route change setting of group operation.
LREAL TransitionParameter
(Refer to to 6.1.6.TransitionMode)
Output
BOOL Done Indicate whether to reach the specified position.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Active Indicate that whether or not motion function block is controlling the group.
BOOL CommandAborted Indicate that the current motion function block is interrupted while it is running.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
(1) This motion function block is to give an absolute position linear interpolation command to the axis group specified in AxesGroup
input.
(2) When this motion function block is executed, interpolation control is performed in a linear path from the current position to the
target position of each axis, and the moving direction is decided by the starting point and the target point of each axis.
Beginning position < Target position: Forward direction operation
Beginning position > Target position: Reverse direction operation
(3) In Position input, specify the target position of each axis in the group as matrix. The values in the array and the axis in the
group correspond in the order of[①, ②, … ⑨, ⑩]. (①~⑩ are the axis ID in the axis group)
6-120
Chapter 6 Motion Function Block
(4) Specify the speed, acceleration, deceleration, and the change rate of acceleration/deceleration of interpolation route in Velocity,
Acceleration, Deceleration, and Jerk inputs respectively.
(5) Velocity is to set the interpolation speed of the axis group, and it indicates the integrated speed of each axis.
The operation speed of each configuration axis is calculated as follows.
Interpolation speed (F) = Target speed specified in the Velocity
2 2 2 2
Interpolation movement amount (S) = S1 + S2 + ... + S3 + S4
(6) Refer to chapter 8.2.6 linear interpolation control part in motion controller’s manual for more details.
(7) If the function block is re-executed (Execute input is On) before the instruction is terminated, the changed parameters are
applied. Only Velocity, Acceleration, Deceleration, Jerk, Position input can be updated.
(8) Velocity input can be set to 0 or changed.
(9) Example program
This example shows the linear interpolation to the target position (10000, 1000) when the current command position is (1000,
4000).
(a) Function block setting
6-121
Chapter 6 Motion Function Block
(Y axis)
Starting
4000 position
Goal
1000 Position
X axis
0
1000 5000 10000
Axis X velocity
Axis Y position Axis Y position
Axis Y velocity
6-122
Chapter 6 Motion Function Block
(c) XY graph
6-123
Chapter 6 Motion Function Block
MC_MoveLinearRelative
BOOL Execute Done BOOL
UINT AxesGroup AxesGroup UINT
LREAL[ ] Distance Busy BOOL
LREAL Velocity Active BOOL
LREAL Acceleration CommandAborted BOOL
LREAL Deceleration Error BOOL
LREAL Jerk ErrorID WORD
UINT BufferMode
UINT TransitionMode
LREAL TransitionParameter
Input-Output
Set the group to do relative position linear interpolation operation. (1 ~ 16: 1Group ~
UINT AxesGroup
16 Group)
Input
Give relative position linear interpolation operation command to the relevant group
BOOL Execute
in the rising Edge.
LREAL[ ] Distance Set the target distance of each axis.
LREAL Velocity Specify the maximum speed of the route. [u/s]
LREAL Acceleration Specify the maximum acceleration. [u/s2]
LREAL Deceleration Specify the maximum deceleration. [u/s2]
LREAL Jerk Specify the change rate of acceleration/deceleration. [u/s3]
Specify the sequential operation setting of motion function block.
UINT BufferMode
(Refer to 6.1.4.BufferMode input)
Specify the route change mode of group operation.
UINT TransitionMode
(Refer to 10.1.6.TransitionMode)
Specify the parameter of the route change setting of group operation.
LREAL TransitionParameter
(Refer to 10.1.6.TransitionMode)
Output
BOOL Done Indicate whether to reach the specified position.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Active Indicate that whether or not motion function block is controlling the group.
BOOL CommandAborted Indicate that the current motion function block is interrupted while it is running.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
(1) This motion function block is to give a relative position linear interpolation command to the axis group specified in AxesGroup
input.
(2) When this motion function block is executed, interpolation control performed in a linear path from the current position to the
target position of each axis, and the moving direction is decided by the sign of the target distance of each axis.
Target distance > 0: Forward direction operation
Target distance < 0: Reverse direction operation
(3) In Distance input, specify the target distance of each axis in the group as array. The specified array and the axis in the group
correspond in the order of specified axis ID [ID1 target distance, ID2 target distance, …].
6-124
Chapter 6 Motion Function Block
(4) Set the speed, acceleration, deceleration, and the change rate of acceleration/deceleration of interpolation route in Velocity,
Acceleration, Deceleration, and Jerk inputs respectively.
(5) Velocity is to set the interpolation speed of the axis group, and it indicates the integrated speed of each axis.
The operation speed of each configuration axis is calculated as follows.
Interpolation speed (F) = Target speed specified in the Velocity
2 2 2 2
Interpolation movement amount (S) = S1 + S2 + ... + S3 + S4
(6)Refer to chapter 8.2.6 linear interpolation control part in motion controller’s manual for more details.
(7) If the function block is re-executed (Execute input is On) before the instruction is terminated, the changed parameters are
applied.
Only Velocity, Acceleration, Deceleration, Jerk, Position input can be updated.
(8) Velocity input can be set to 0 or changed.
(9) Example program
This example shows the linear interpolation to the target position (10000, 10000) by moving the target distance (X-axis: 9000,
Y-axis: -3000) when the current command position is (1000, 4000).
(a) Function block setting
6-125
Chapter 6 Motion Function Block
6-126
Chapter 6 Motion Function Block
(Y axis)
Starting
4000 position
Y axis
movement value
(-3000) Linear
interpolation end
1000 position
(X axis)
0
1000 5000 10000
Axis X velocity
Axis Y position Axis X position
Axis Y velocity
6-127
Chapter 6 Motion Function Block
(c) XY graph
6-128
Chapter 6 Motion Function Block
MC_MoveCircularAbsolute
BOOL Execute Done BOOL
UINT AxesGroup AxesGroup UINT
UINT CircMode Busy BOOL
LREAL[ ] AuxPoint Active BOOL
LREAL[ ] EndPoint CommandAborted BOOL
UINT PathChoice Error BOOL
LREAL Velocity ErrorID WORD
LREAL Acceleration
LREAL Deceleration
LREAL Jerk
UINT BufferMode
UINT TransitionMode
LREAL TransitionParameter
Input-Output
Set the group to do absolute position circular interpolation operation. (1 ~ 16: 1Group
UINT AxesGroup
~ 16 Group)
Input
Give absolute position circular interpolation operation command to the relevant
BOOL Execute
group in the rising Edge.
UINT CirMode Circular interpolation method setting [0: Midpoint, 1: Central point, 2: Radius]
Specify the position of auxiliary point depending on the circular interpolation method
LREAL[ ] AuxPoint
in an absolute coordinate.
LREAL[ ] EndPoint Set the circular end point as an absolute coordinate.
Circular route selection
BOOL PathChoice
0: clockwise direction, 1: counter-clockwise direction
LREAL Velocity Specify the maximum speed of the route. [u/s]
LREAL Acceleration Specify the maximum acceleration. [u/s2]
LREAL Deceleration Specify the maximum deceleration. [u/s2]
LREAL Jerk Specify the change rate of acceleration/deceleration. [u/s3]
Specify the sequential operation setting of motion function block.
UINT BufferMode
(Refer to 6.1.4.BufferMode input)
UINT TransitionMode Unused
LREAL TransitionParameter Unused
Output
BOOL Done Indicate whether to reach the specified position.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Active Indicate that whether or not motion function block is controlling the group.
BOOL CommandAborted Indicate that the current motion function block is interrupted while it is running.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
(1) This motion function block is to give an absolute position circular interpolation command to the axis group specified in
AxesGroup input.
6-129
Chapter 6 Motion Function Block
(2) When this motion function block starts, each axis performs circular trajectory interpolation control referring to the auxiliary point
input, and the movement direction is determined by Path Choice input. If PathChoice input is set to 0, circular interpolation is
operated in a clockwise direction, and if it is set to 1, circular interpolation is operated in a counter-clockwise direction.
(3) Specify the absolute position of the auxiliary point to refer when doing circular interpolation of each axis in AuxPoint and
EndPoint inputs as array. The input arrangement and the axes of the group correspond to the designated axis IDs [ID1, ID2,
ID3, ∙∙∙ ], in that order. (The 3 LEAL type sized array should be entered in Position input as there are 3 axes which comprise
the group to give a circular interpolation operation command.)
(4) In Velocity, Acceleration, Deceleration, Jerk inputs, the acceleration, deceleration, change rate of acceleration, velocity of the
interpolation path are specified, respectively.
(5) Set the circular interpolation method in CircMode input. The circular interpolation methods corresponding to CircMode values
are as follows.
(a) Circular Interpolation Using Midpoint Specification (CircMode = 0)
This method performs circular interpolation by starting operation at the start position, passing the designated midpoint, and
reaching the target position. In the figure below, the start position corresponds to the axes group coordinate at the start of
the command, the midpoint corresponds to the coordinate input for the AuxPoint, and the target position corresponds to
the absolute coordinate input for the EndPoint.
6-130
Chapter 6 Motion Function Block
(6) Refer to chapter 8.2.7 linear interpolation control part in motion controller’s manual for more details.
(7) If the function block is re-executed (Execute input is On) before the instruction is terminated, the changed parameters are
applied.
Only, Velocity, Acceleration, Deceleration, Jerk, AuxPoint, Endpoint input can be updated.
(8) Velocity input can be set to 0 or changed.
(9) Example program
This example shows the circular interpolation to the target position (1000, 1000) by moving clock-wise after setting the center
point (2000,2000) specification method when the current command position is (1000, 1000).
(a) Function block setting
6-131
Chapter 6 Motion Function Block
Axis X position
Axis Y position
Axis X velocity
Axis Y velocity
(c) XY graph
6-132
Chapter 6 Motion Function Block
MC_MoveCircularRelative
BOOL Execute Done BOOL
UINT AxesGroup AxesGroup UINT
UINT CircMode Busy BOOL
LREAL[ ] AuxPoint Active BOOL
LREAL[ ] EndPoint CommandAborted BOOL
USINT PathChoice Error BOOL
LREAL Velocity ErrorID WORD
LREAL Acceleration
LREAL Deceleration
LREAL Jerk
UINT BufferMode
UINT TransitionMode
LREAL TransitionParameter
Input-Output
Set the group to do relative position circular interpolation operation. (1 ~ 16: 1Group
UINT AxesGroup
~ 16 Group)
Input
Give relative position circular interpolation operation command to the relevant group
BOOL Execute
in the rising Edge.
UINT CirMode Circular interpolation method setting [0: Midpoint, 1: Central point, 2: Radius]
Specify the position of auxiliary point depending on the circular interpolation method
LREAL[ ] AuxPoint
as the relative coordinate based on the starting point.
Specify the end point of circular arc as the relative coordinate based on the starting
LREAL[ ] EndPoint
point.
Circular route selection
BOOL PathChoice
0: clockwise direction, 1: counter-clockwise direction
LREAL Velocity Specify the maximum speed of the route. [u/s]
LREAL Acceleration Specify the maximum acceleration. [u/s2]
LREAL Deceleration Specify the maximum deceleration. [u/s2]
LREAL Jerk Specify the change rate of acceleration/deceleration. [u/s3]
Specify the sequential operation setting of motion function block.
UINT BufferMode
(Refer to 6.1.4.BufferMode input)
UINT TransitionMode Unused
LREAL TransitionParameter Unused
Output
BOOL Done Indicate whether to reach the specified position.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Active Indicate that whether or not motion function block is controlling the group.
BOOL CommandAborted Indicate that the current motion function block is interrupted while it is running.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
6-133
Chapter 6 Motion Function Block
(1) This motion function block issues relative position circular interpolation command on the axes group designated by AxesGroup
input.
(2) When this motion function block starts, each axis performs circular trajectory interpolation control referring to the auxiliary point
input, and the movement direction is determined by Path Choice input. If PathChoice input is set to 0, circular interpolation is
operated in a clockwise direction, and if it is set to 1, circular interpolation is operated in a counter-clockwise direction.
(3) At AuxPoint and EndPoint input, designate the arrangement of the relative position of auxiliary points to refer to for circular
interpolation of each axis. The input arrangement and the axes of the group correspond to the designated axis IDs [ID1, ID2,
ID3, ∙∙∙ ], in that order. (The 3 LEAL type sized array should be entered in Position input as there are 3 axes which comprise
the group to give a circular interpolation operation command.)
(4) In Velocity, Acceleration, Deceleration, Jerk inputs, the acceleration, deceleration, change rate of acceleration, velocity of the
interpolation path are specified, respectively.
(5) Set the circular interpolation method in CircMode input. The circular interpolation methods corresponding to CircMode values
are as follows.
(a) Circular interpolation of midpoint specifying method (BORDER, CircMode = 0) In this method, operation starts at the
current position and it does circular interpolation through the pecified position of the central point to the target position. In
the figure below, the current position corresponds to the axes group coordinate at the start of the command, the midpoint
corresponds to the coordinate input for the AuxPoint, and the target position corresponds to the relative coordinate input
for the EndPoint.
(b) Circular interpolation of central point specifying method In this method, operation starts at the current position, and it does
circular interpolation to the target position along the circular path, which has a radius of the distance to the specified central
position. In the figure below, the current position corresponds to the axes group coordinate at the start of the command,
the center point corresponds to the coordinate input for the AuxPoint, and the target position corresponds to the relative
coordinate input for the EndPoint.
6-134
Chapter 6 Motion Function Block
(6) Refer to chapter 8.2.7 linear interpolation control part in motion controller’s manual for more details.
(7) If the function block is re-executed (Execute input is On) before the instruction is terminated, the changed parameters are
applied.
Only, Velocity, Acceleration, Deceleration, Jerk, AuxPoint, Endpoint input can be updated.
(8) Velocity input can be set to 0 or changed.
(9) Example program
This example is to set the center point specification method when the current command position is (1000, 1000) (set the relative
position from the current position to the center point to set: 1000, 1000), and move clock-wise to perform circular interpolation
to the target position (set the relative position from the current position to the target position: 0, 0).
(a) Function block setting
6-135
Chapter 6 Motion Function Block
Axis X position
Axis Y position
Axis X velocity
Axis Y velocity
6-136
Chapter 6 Motion Function Block
(c) XY graph
6-137
Chapter 6 Motion Function Block
MC_GroupPower
BOOL Enable Status BOOL
UINT AxesGroup AxesGroup UINT
Vaild BOOL
Error BOOL
ErrorID WORD
Input-Output
UINT AxesGroup Set the group to do relative position circular interpolation operation. (1 ~ 16: 1Group
~ 16 Group)
Input
BOOL Enable Group servo motor of the relevant axis is servo On while input is activated.
Output
BOOL Status Indicate the power permission status of the Axis Group.
Indicate the validity of motion function block output.
BOOL Valid
(same with Status output here)
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
(1) This motion function block is to give servo On/Off command to relevant axis group.
(2) When Enable input changes from Off to On, the Servo On command is given to the relevant axis group. When it changes from
On to Off, the Servo Off command is given to it.
(3) If servo On command is executed when the axis is in 'Disable' state, the axis state is 'StandStill', and failure in servo On brings
'ErrorStop' state.
6-138
Chapter 6 Motion Function Block
LS_ReadGroupParameter
BOOL Enable Valid BOOL
UINT AxesGroup AxesGroup UINT
INT ParameterNumber Busy BOOL
Error BOOL
ErrorID WORD
Value LREAL
Input-Output
UINT AxesGroup Set the axis group to read parameters from. (1~16:1Group ~ 16Group)
Input
BOOL Enable The relevant parameters are output while the input is enabled.
INT ParameterNumber Specify the number of parameter to read.
Output
BOOL Valid Indicate whether the output of the current motion function block is valid.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Error Indicates whether an error occurs or not.
Output the number of error occurred while motion function block is
WORD ErrorID
running.
LREAL Value Output the values of the parameters.
(1) This motion function block is to output parameter of the relevant axis group.
(2) The value of the relevant parameter is continuously output in Value while Enable input is On.
(3) ParameterGroup input specifies the parameter group number to read.
If the value is set outside the range, “error 0x2120” occurs.
6-139
Chapter 6 Motion Function Block
6-140
Chapter 6 Motion Function Block
6-141
Chapter 6 Motion Function Block
LS_WriteGroupParameter
BOOL Execute Vaild BOOL
UINT AxesGroup AxesGroup UINT
INT ParameterNumber Busy BOOL
LREAL Value Error BOOL
UINT ExecutionMode ErrorID WORD
Input-Output
Set the axis group to give commands from. (1~16:1Group ~
UINT AxesGroup
16Group)
Input
At the rising edge, the corresponding parameter is reflected in the
BOOL Execute
axis group.
INT ParameterNumber Specify the number of parameter to write.
LREAL Value Specify the value of parameter to write.
UINT ExecutionMode Specify the time when parameter is written.
Output
BOOL Valid Indicate whether parameter is successfully written.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Error Indicates whether an error occurs or not.
Output the number of error occurred while motion function block is
WORD ErrorID
running.
(1) This motion function block is to write the value specified in parameter of the relevant axis group.
(2) The parameters will be written in the rising edge of the Execute input.
(3) ParameterNumber input specifies the number of the parameter to be written. The value unable to be set causes "error 0x2120”.
(4) Specify the value to write in parameter for Value input.
(5) In ExecutionMode, correct the time when parameter is written and the values below can be set. The value unable to be set
causes "error 0x2120”.
0 (mcImmediately): Change the parameter value immediately after executing function block (rising Edge in Execute input). If the
relevant axis is in running, operation can be affected.
1 (mcQueued): Changed at the same point with ‘Buffered’ in Buffermode. (6.1. 4. Refet to BufferMode)
6-142
Chapter 6 Motion Function Block
6-143
Chapter 6 Motion Function Block
6-144
Chapter 6 Motion Function Block
MC_GroupSetOverride
BOOL Enable Enabled BOOL
UINT AxesGroup AxesGroup UINT
LREAL VelFactor Busy BOOL
LREAL AccFactor Error BOOL
LREAL JerkFactor ErrorID WORD
Input-Output
Set the axis group to give commands from. (1~16:1Group ~
UINT AxesGroup
16Group)
Input
Execute override operation in the relevant axis group while input is
BOOL Enable
activated.
LREAL VelFactor Specify the override rate of the speed.
LREAL AccFactor Specify the override rate of acceleration/deceleration.
LREAL JerkFactor Specify the override ratio of the rate of change for acceleration.
Output
BOOL Enabled Indicate that the override rate was applied successfully.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Error Indicates whether an error occurs or not.
Output the number of error occurred while motion function block is
WORD ErrorID
running.
(1) This motion function block is to override the speed of the relevant axis group, acceleration, and the change rate of acceleration.
(2) Override rate which is applied to the relevant axis can be specified and changed while Enable input is On. If Enable input is
Off, override rate right before the Off is maintained.
(3) Specify the speed override ratio for the VelFactor input. If the specified value is 0.0, the relevant axis group stops but it is not
changed to 'StandStill' state.
(4) Specify acceleration/deceleration and override rate of jerk (change rate of acceleration) in AccFactor and JerkFactor input
respectively.
(5) Negative number cannot be input in each Facotr, and if it is input, "error 0x2111” occurs.
(6) Default of each override rate is 1.0, and it means 100% of the command speed of function block currently running.
(7) Override operation does not affect the serve axis of the relevant axis group.
(8) Override command cannot be used during synchronous operation.
6-145
Chapter 6 Motion Function Block
%MX1
MOVELINEARRELATIVE.Active
GROUPSETOVERRIDE.Busy
속도
velocity
위치
position
6-146
Chapter 6 Motion Function Block
MC_GroupSetPosition2
BOOL Execute Done BOOL
UINT AxesGroup AxesGroup UINT
ARRAY[0..9] OF LREAL Position Busy BOOL
BOOL Relative Active BOOL
UINT CoordSystem CommandAborted BOOL
UINT BufferMode Error BOOL
ErrorID WORD
Input-Output
UINT AxesGroup Select the group to set the current position. (1 ~ 16: 1Group ~ 16 Group)
Input
Give group current position setting command to the relevant group in the rising
BOOL Execute
Edge.
LREAL[ ] Position Specify the position.
BOOL Relative 0: Position value=Absolute position, 1:Position value=Incremental position
UINT CoordSystem Select the coordinate system type.(0:ACS 1:MCS 2:PCS)
Specify the sequential operation setting of motion function block.
UINT BufferMode
(6.1. 4. Refer to BufferMode input )
Output
BOOL Done Indicate the completion state of motion function block.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Active Indicate that the current motion function block is controlling the relevant axis.
BOOL CommandAborted Indicate that the current motion function block is interrupted while it is running.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
(1) The motion function block does not move the axis and sets the position on all axes of the relevant axis group.
(2) The new coordinates are specified as an array in the Position input.
(3) Set the corresponding coordinate system in CoordSystem input. The MC_GroupSetPosition function block moves the position
of the specified coordinates and affects the upper coordinate system. (Selecting ACS affects MCS and PCS)
(4) If the Relative input is Off, the Position input value is applied as a new position in the specified coordinate system. If the Relative
input is On, the Position input value is added to the current position of the designated coordinate system.
6-147
Chapter 6 Motion Function Block
LS_Connect
BOOL Execute Done BOOL
Busy BOOL
Error BOOL
ErrorID WORD
Input
Give communication connection command to the relevant motion controller in the
BOOL Execute
rising Edge.
Output
BOOL Done Indicate whether to complete communication connection.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
(1) This motion function block is to give a command to connect communication with servo drive or external input/output apparatus
to the motion controller.
(2) When slave devicees are normally connected, Done is On and Busy is Off.
(3) If an error occurs during the communication connection, Error is On and error number is output in ErrorID according to the
cause.
6-148
Chapter 6 Motion Function Block
LS_Disconnect
BOOL Execute Done BOOL
Busy BOOL
Error BOOL
ErrorID WORD
Input
Give communication disconnection command to the relevant motion controller in the
BOOL Execute
rising Edge.
Output
BOOL Done Indicate whether to complete communication disconnection.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
(1) This motion function block gives a command which orders the motion controller to disconnect the communication with servo
drive or external input/output apparatuses.
(2) If communication slave is disconnected, Done is On and Busy is off. If an error occurs during the execution of communication
disconnection, Error is On and error number is output in ErrorID according to the error situation.
6-149
Chapter 6 Motion Function Block
LS_ReadSDO
BOOL Execute Done BOOL
UINT Slave Slave UINT
UINT Index Busy BOOL
UINT SubIndex Error BOOL
UINT Length ErrorID WORD
Value DINT
Input-Output
UINT Slave Set the slave to be given a command. ( refer toSee 6.2.1 Setting Range by Product)
Input
BOOL Execute Give SDO reading command to the relevant slave in the rising Edge.
UINT Index Set the Index of slaver Object to be read. (0x0000~ 0x9FFF)
UINT SubIndex Set the SubIndex of slave Object to be read. (0 ~ 255)
UINT Length Set the distance of slave Object to be read by Byte. (1 ~ 4)
Output
BOOL Done Indicate that SDO is successfully read.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
DINT Value Output the value of SDO.
(1) This motion function block is to read the SDO (CoE Object) value of servo drive in the relevant axis, and reads the SDO value
of the position specified in Index and SubIndex of the axis specified by Axis input as much as the size of Length and indicates it
on Value output.
(2) Value output is eliminated to 0 when motion function block is running, and it is output as the read value when the running is
completed (Done output is On).
(3) Index input can be set as below. If the value is set outside the range, "error 0x1F12” occurs.
Setting Value Content
16#0000 ~ 16#0FFF Data Type Description
16#1000 ~ 16#1FFF Communication objects
16#2000 ~ 16#5FFF Manufacturer Specific Profile Area
16#6000 ~ 16#9FFF Standardized Device Profile Area
(4) The value between 0~255 can be entered in SubIndex, and if the value is set outside the range, "error 0x1F12” occurs.
(5) In Length, values ranging from 1 to 4 can be entered, which mean 1 to 4 bytes. If the value is set outside the range, “error
0x1F12” occurs.
6-150
Chapter 6 Motion Function Block
LS_WriteSDO
BOOL Execute Done BOOL
UINT Slave Slave UINT
UINT Index Busy BOOL
UINT SubIndex Error BOOL
UINT Length ErrorID WORD
DINT Value
Input-Output
UINT Slave Set the slave to be given a command. ( refer toSee 6.2.1 Setting Range by Product)
Input
BOOL Execute Give SDO writing command to the relevant slave in the rising Edge.
UINT Index Set the Index of slave Object to be written. (0x0000~ 0x9FFF)
UINT SubIndex Set the SubIndex of slave Object to be written. (0 ~ 255)
UINT Length Set the distance of slave Object to be written by Byte. (1 ~ 4)
DINT Value Set the value to be written in SDO.
Output
BOOL Done Indicate that SDO is successfully read.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
(1) This motion function block is to write the SDO (CoE Object) value of the relevant slave, and it writes the value entered in Value
as the size of the Length in SDO of the position specified as Index and SubIndex of the slave specified in slave input.
(2) Index input can be set as below. If the value is set outside the range, "error 0x1F12” occurs.
Setting Value Content
16#0000 ~ 16#0FFF Data Type Description
16#1000 ~ 16#1FFF Communication objects
16#2000 ~ 16#5FFF Manufacturer Specific Profile Area
16#6000 ~ 16#9FFF Standardized Device Profile Area
(3) The value between 0~255 can be entered in SubIndex, and if the value is set outside the range, "error 0x1F12” occurs.
(4) In Length, values ranging from 1 to 4 can be entered, which mean 1 to 4 bytes. If the value is set outside the range, “error
0x1F12” occurs.
6-151
Chapter 6 Motion Function Block
LS_SaveSDO
BOOL Execute Done BOOL
UINT Slave Slave UINT
Busy BOOL
Error BOOL
ErrorID WORD
Input-Output
UINT Slave Specify the Slave to be commanded (See 6.2.1 Setting Range by Product)
Input
BOOL Execute Give SDO saving command to the relevant slave in the rising Edge.
Output
BOOL Done Indicate that SDO is successfully save.
BOOL Busy Indicate that execution of the function block is not completed.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the error number that occurred while the function block is running.
(1) This motion function block is a command to save SDO of the designated slave to the memory of the slave.
6-152
Chapter 6 Motion Function Block
LS_ReadSDO2
BOOL Execute Done BOOL
UINT Slave Slave UINT
UINT Index Busy BOOL
UINT SubIndex Error BOOL
UINT Length ErrorID WORD
DINT TimeOut Value DINT
Input-Output
UINT Slave Set the slave to be given a command. ( refer toSee 2.2.1 Setting Range by Product)
Input
BOOL Execute Give SDO reading command to the relevant slave in the rising Edge.
UINT Index Set the Index of slaver Object to be read. (0x0000~ 0x9FFF)
UINT SubIndex Set the SubIndex of slave Object to be read. (0 ~ 255)
UINT Length Set the distance of slave Object to be read by Byte. (1 ~ 4)
DINT TimeOut Timeout of SDO read command (ms)
Output
BOOL Done Indicate that SDO is successfully read.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
DINT Value Output the value of SDO.
(1) This motion function block is a motion function block that reads the SDO (CoE Object) value of the corresponding slave, and
reads the SDO value at the location specified as Index and SubIndex of the slave specified as Slave input as much as the Length
size within the TimeOut setting time and displayed on the Value output. .
(2) Value output is eliminated to 0 when motion function block is running, and it is output as the read value when the running is
completed (Done output is On).
(3) Index input can be set as below. If the value is set outside the range, "error 0x1F12” occurs.
(4) The value between 0~255 can be entered in SubIndex, and if the value is set outside the range, "error 0x1F12” occurs.
(5) In Length, values ranging from 1 to 4 can be entered, which mean 1 to 4 bytes. If the value is set outside the range, “error
0x1F12” occurs.
(6) If SDO read is not performed within the time (ms) set in TimeOut, “Error 0x1F21” is generated.
6-153
Chapter 6 Motion Function Block
LS_WriteSDO2
BOOL Execute Done BOOL
UINT Slave Slave UINT
UINT Index Busy BOOL
UINT SubIndex Error BOOL
UINT Length ErrorID WORD
DINT Value
DINT TimeOut
Input-Output
UINT Slave Set the slave to be given a command. ( refer toSee 2.2.1 Setting Range by Product)
Input
BOOL Execute Give SDO writing command to the relevant slave in the rising Edge.
UINT Index Set the Index of slave Object to be written. (0x0000~ 0x9FFF)
UINT SubIndex Set the SubIndex of slave Object to be written. (0 ~ 255)
UINT Length Set the distance of slave Object to be written by Byte. (1 ~ 4)
DINT Value Set the value to be written in SDO.
DINT TimeOut Timeout of SDO Write command (ms)
Output
BOOL Done Indicate that SDO is successfully read.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
(1) This motion function block is to write the SDO (CoE Object) value of the relevant slave, and it writes the value entered in Value
as the size of the Length in SDO value of the position specified as Index and SubIndex of the slave specified in slave input.
(2) Index input can be set as below. If the value is set outside the range, "error 0x1F12” occurs.
(3) The value between 0~255 can be entered in SubIndex, and if the value is set outside the range, "error 0x1F12” occurs.
(4) In Length, values ranging from 1 to 4 can be entered, which mean 1 to 4 bytes. If the value is set outside the range, “error
0x1F12” occurs.
(5) If SDO read is not performed within the time (ms) set in TimeOut, “Error 0x1F14” is generated.
6-154
Chapter 6 Motion Function Block
LS_EncoerPreset
BOOL Execute Done BOOL
UINT Encoder Busy BOOL
LREAL Position Error BOOL
BOOL Relative ErrorID WORD
Input
BOOL Execute Specify the position of the relevant encoder in the rising Edge.
UINT Encoder Set the encoder to set the position. (1: Encoder 1, 2:Encoder 2)
LREAL Position Specify the position to set. [u]
0: Absolute coordinate position
BOOL Relative
1: Relative coordinate position
Output
BOOL Done Indicate the completion state of motion function block.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
(1) This motion function block is to set the current position of the relevant encoder.
(2) Specify the position in Position input. When executing motion function command, if Relative input is Off, the position of the
current axis is replaced with the Position input value, and if the Relative input is On, the Position input value is added to the
current position of the relevant axis.
6-155
Chapter 6 Motion Function Block
LS_Jog
BOOL Enable Enabled BOOL
UINT Axis Axis UINT
BOOL Direction Busy BOOL
BOOL Low_High Error BOOL
ErrorID WORD
Input-Output
UINT Axis Specify the axis to be commanded. ( refer toSee 6.2.1 Setting Range by Product)
Input
BOOL Enable Give jog command to the relevant axis while input is On.
BOOL Direction Set the rotation direction in jog (0:forward direction , 1:reverse direction)
Set the JOG speed in JOG operation.
BOOL Low_High
(0: Jog low speed operation, 0: Jog high speed operation)
Output
BOOL Enabled Indicate that the relevant axis is in jog.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
(1) This motion function block is to make the relevant axis perform jog operation.
(2) Jog is a manual operation function for test and is used to confirm the position address for system operation, wiring condition
check, and teaching. Jog can be used by dividing the speed into high speed and low speed.
(3) When Enable input is On (in jog), if the value set in Low/High is changed, speed change occurs without stop in jog, and if the
value set in JOG_DIR is changed, Jog is continued by changing the direction after the deceleration pause.
(4) If jog operation is stopped by another command, “Error 16#0015” occurs.
(5) Example program
This example shows jog operation under the following settings when the current command position is 0.
Axis 1: Forward/low speed, Axis 2: Forward/high speed, Axis 3: Reverse/low speed,
(a) Function block setting
6-156
Chapter 6 Motion Function Block
Axis 2 position
Axis 2 velocity
Axis 1 position
Axis 1 velocity
Axis 3 velocity
Axis 3 position
6-157
Chapter 6 Motion Function Block
LS_ReadCamData
BOOL Enable Done BOOL
UINT Axis Axis UINT
UINT CamTable ID Busy BOOL
Array [] of LREAL MasterPoint Error BOOL
Array [] of LREAL SlavePoint ErrorID WORD
Array [] of BYTE CamCurveSel StartSlope LREAL
EndSlope LREAL
CamPointNum UINT
Input-Output
UINT Axis Specify the Axis to be commanded (See 6.2.1 Setting Range by Product)
Input
BOOL Enable Read the relevant cam data while input is On.
UINT CamTableID Specify the cam table to read. ( refer toSee 6.2.1 Setting Range by Product)
LREAL[] MasterPoint MasterPoint value of the cam table is displayed on the areas of which front address
is the set device.
LREAL[] SlavePoint SlavePoint value of the cam table is displayed on the areas of which front address is
the set device.
BYTE[] CamCurveSel Cam curve type of the cam table is displayed on the areas of which front address is
the set device. (0: Linear, 1: Cubic)
Output
BOOL Vaild Indicate the validity of the function block output.
BOOL Busy Indicate that execution of the function block is not completed.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the error number that occurred while the function block is running.
LREAL StartSlope Output the StartSlope value of the relevant cam table.
LREAL EndSlope Output the EndtSlope value of the relevant cam table.
UINT CamPointNum Output the cam data point number of the relevant cam table.
(1) This function block displays the data of the cam table.
(2) While Enable input is activated, the data values of the cam table are displayed in succession.
(3) The first address of the variables to store "Main-axis Position" and "Sub-axis Position" read from the cam profile is set at the
MasterPoint and the SlavePoint. If the size of the array variable is set smaller than the number of data in the cam table, the
data of the entire cam table may not be read because the cam data is read only by the array size.
6-158
Chapter 6 Motion Function Block
LS_WriteCamData
BOOL Execute Done BOOL
UINT Axis Axis UINT
UINT CamTable ID Busy BOOL
LREAL StartSlope Error BOOL
LREAL EndSlope ErrorID WORD
UINT CamPointNum
Array[] of LREAL MasterPoint
Array[] of LREAL SlavePoint
Array[] of BYTE CamCurveSel
UINT ExecutionMode
Input-Output
UINT Axis Specify the Axis to be commanded (See 6.2.1 Setting Range by Product)
Input
BOOL Execute Give the cam data writing command in the rising Edge of the input.
UINT CamTableID Specify the ID of the cam table to write. ( refer toSee 6.2.1 Setting Range by Product)
LREAL StartSlope Specify the StartSlope value of the cam table to write.
LREAL EndSlope Specify the StartSlope value of the cam table to write.
UINT CamPointNum Specify the cam data point number of the cam table to write.
LREAL[] MasterPoint Of the cam data to write, set the leading address of the device where Master Point
value is stored.
LREAL[] SlavePoint Of the cam data to write, set the leading address of the device where Slave Point
value is stored.
BYTE[] CamCurveSel Of the cam data to write, set the leading address where cam curve type is stored. (0:
Linear, 1: Cubic)
UINT ExecutionMode Set the timing to write the cam data.
0 - Immediately applied, 1: Applied at the same point with ‘Buffered’ of Buffermode
Output
BOOL Done This represents successful cam data writing.
BOOL Busy Indicate that execution of the function block is not completed.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the error number that occurred while the function block is running.
(1) This motion function block is a command to write the data value of the cam table. Of the cam table data set by CamTableID
input, use the value of the device set at MasterPoint and Slave Point at the value set at StartSlope and EndSlope and the set
number at CamPointNum as the MasterPoint and SlavePoint values.
(2) CamTableID input can be set to between 1 and 32. Setting a value outside the above range will cause "Error 16#000B"
(3) You can enter a value below the number of settings set in the existing cam profile into CamPointNum. If the CamPointNum
value is larger than the exiting cam profile, an error 16#111C”occurs.
(4) If the size of MasterPoint / SlavePoint / CamCurveSel array is set to a value smaller than CamPointNum, an “error 16#000B”
occurs.
6-159
Chapter 6 Motion Function Block
(5) ExecutionMode input sets the setting timing. When the input is 0, setting is performed upon executing the command. When
the input is 1, setting is performed at the same time as "Buffered" at the sequential operation. If the value that cannot be set is
applied, "Error 16 # 000B" occurs.
0(mcImmediately) : Itchanges the (Upward Edge of Execute input) parameter value upon executing the function block. If
the relevant axis is in running, operation can be affected.
1(mcQueued) : It is changed at the same point of time as in "Buffered" of Buffermode. (6.1. 4. Command buffering: refer to
BufferiMode)
6-160
Chapter 6 Motion Function Block
LS_WriteCamBlockProperty
BOOL Execute Done BOOL
UINT CamBlockID Busy BOOL
UNIT NodeDataNum Error BOOL
REAL MasterVelocity ErrorID WORD
REAL MaxVelocity
REAL MaxAccel
REAL MaxJerk
Input
BOOL Execute Write cam block data at the rising edge of the input.
UINT CamBlockID Enter the setting block number. (1~100)
UINT NodeDataNum Enter the number of configured nodes.
REAL CamCycleTime Enter the time value for 1 cycle of CAM operation. (sec)
REAL MaxVelocity Enter the maximum cam operation speed value.
REAL MaxAccel Enter the maximum cam operation acceleration value.
REAL MaxJerk Enter the maximum cam operation jerk value.
Output
BOOL Done Indicate the validity of the function block output.
BOOL Busy Indicate that execution of the function block is not completed.
BOOL Active Indicates whether an error occurs or not.
WORD ErrorID Output the error number that occurred while the function block is running.
(1) The cam block function creates a cam profile by setting the cam curve, connection speed, connection acceleration, and
connection jerk. This motion function block is a command to write properties during the cam profile creation stage to perform
cam operation of the main and subordinate axes. The properties refer to the cam operation speed, the maximum speed of the
sub-axis, the maximum acceleration of the sub-axis, and the maximum jerk of the sub-axis in the figure below.
(2) Function block is the first command used among cam block related function blocks LS_WriteCamblockProperty,
LS_WriteCamblockNode, LS_GenerateCamData, LS_ReadCamblockProperty, and LS_ReadCamblockNode.
(3) You can check the settings of LS_WriteCamblockProperty through the LS_ReadCamblockProperty command. If a value
outside the set range is input to CamBlockID, Error becomes ‘1’ and ErrorID ‘0x00C1’ occurs.
6-161
Chapter 6 Motion Function Block
LS_WriteCamBlockNode
BOOL Execute Done BOOL
UINT CamBlockID Busy BOOL
UINT NodeID Error BOOL
LREAL MasterPos ErrorID WORD
LREAL SlavePos
BYTE CamCurve
BOOL EnableConVel
REAL ConectingVelocity
BOOL EnableConAccel
REAL ConectingAccel
BOOL EnableConJerk
REAL ConectingJerk
UINT PointNum
BYTE InterpolationType
Input
BOOL Execute Write cam block data at the rising edge of the input.
UINT CamBlockID Enter the setting block number. (1~100)
UINT NodeID Enter the setting node number. (0~360)
LREAL MasterPos Enter the position of the main axis of the cam block.
LREAL SlavePos Enter the position of the sub axis of the cam block.
Byte CamCurve Enter the Cam curve type of the cam block.
BOOL EnableConVel Enter whether to use the setting for the connection speed.
LREAL ConnectingVelocity Enter the connection speed of the cam block.
BOOL EnableConAccel Enter whether to use the setting for the connection acceleration.
LREAL ConnectingAccel Enter the connection acceleration of the cam block.
BOOL EnableConJerk Enter whether to use the setting for the connection jerk.
LREAL ConnectingJerk Enter the connection jerk of the cam block.
UINT PointNum Enter the number of cam points of the cam block.
Byte InterpolationType Enter the interpolation method of the cam block. (0:Linear 1:Cubic)
Output
BOOL Done Indicate the validity of the function block output.
BOOL Busy Indicate that execution of the function block is not completed.
BOOL Active Indicates whether an error occurs or not.
WORD ErrorID Output the error number that occurred while the function block is running.
(1) The cam block function creates a cam profile by setting the cam curve, connection speed, connection acceleration, and
connection jerk. This motion function block is a command to write node parameter during the cam profile creation stage to
perform cam operation of the main and subordinate axes. Node parameters refer to main axis position, subordinate axis
position, cam curve, connected speed, connected acceleration, number of points, and interpolation type in the figure below.
6-162
Chapter 6 Motion Function Block
(2) This function block is a command used after the cam block related function block LS_WriteCamblockProperty is executed.
Also, if there is no cam block, execute WriteCamBlockProperty to designate the number of nodes in the cam block.
(3) Enter the cam block number to write in CamBlockID.
(4) Enter the number of nodes in the cam block in NodeDataNum. (Ex 20)
(5) You can check the details of cam curve and interpolation type in Chapter 8, Cam Block Function.
(6) You can check the settings of LS_WriteCamblockNode through the LS_ReadCamblockNode command.
(7) If a value outside the set range is input to CamBlockID, Error becomes ‘1’ and ErrorID ‘0x00C1’ occurs.
(8) If a value outside the set range is input to Node ID, Error becomes ‘1’ and ErrorID ‘0x00C3’ occurs.
(9) If a value outside the set range is input to PointNum, Error becomes ‘1’ and ErrorID ‘0x00C4’ occurs.
6-163
Chapter 6 Motion Function Block
LS_GenerateCamData
BOOL Execute Done BOOL
UINT CamBlock ID Busy BOOL
UINT CamTableID Error BOOL
ErrorID WORD
CamPointNum UINT
Input
BOOL Execute Write cam block data at the rising edge of the input.
UINT CamBlockID Enter the setting block number. (1~100)
UINT CamTableID Specify the cam table Number to generate. (1~32)
Output
BOOL Done Indicate the validity of the function block output.
BOOL Busy Indicate that execution of the function block is not completed.
BOOL Active Indicates whether an error occurs or not.
WORD ErrorID Output the error number that occurred while the function block is running.
UINT CamPointNum Outputs the number of generated cam data.
(1) The cam block function creates a cam profile by setting the cam curve, connection speed, connection acceleration, and
connection jerk. This motion function block is the cam profile creation stage to perform cam operation of the main and
subordinate axes. This command performs the same function as export in the picture below.
(2) This motion function block is a function block that creates a camp profile from the stored cam block data.
(3) The function block is executed at the rising edge of the Execute input.
6-164
Chapter 6 Motion Function Block
LS_ReadCamBlockProperty
BOOL Execute Done BOOL
UINT CamBlockID Busy BOOL
Error BOOL
ErrorID WORD
MaxNodeDataNum UINT
NodeDataNum UINT
MasterVelocity REAL
MaxVelocity REAL
MaxAcceleration REAL
MaxJerk REAL
Input
BOOL Execute Write cam block data at the rising edge of the input.
UINT CamBlockID Input the number of cam block to read. (1~100)
Output
BOOL Done Indicate the validity of the function block output.
BOOL Busy Indicate that execution of the function block is not completed.
BOOL Active Indicates whether an error occurs or not.
WORD ErrorID Output the error number that occurred while the function block is running.
UINT NodeDataNum Output the number of configured nodes.
REAL MaxVelocity Output the maximum cam operation speed value.
REAL MaxAccel Output the maximum cam operation acceleration value.
REAL MaxJerk Output the maximum cam operation jerk value.
(1) The cam block function creates a cam profile by setting the cam curve, connection speed, connection acceleration, and
connection jerk. This command can check the content set by LS_WriteCamblockProperty. This motion function block is a
function block that reads the attribute data of the designated cam block.
(2) The function block is executed at the rising edge of the Execute input.
(3) In BlockID, enter the cam block number. A value between 1 and 100 can be entered for the BlockID value.
(4) If a value outside the set range is input to CamBlockID, Error becomes ‘1’ and ErrorID ‘0x00C1’ occurs.
(5) If a value outside the set range is input to CamBlockID, Error becomes ‘1’ and ErrorID ‘0x00C1’ occurs.
6-165
Chapter 6 Motion Function Block
LS_ReadCamBlock
BOOL Execute Done BOOL
UINT CamBlockID Busy BOOL
UINT NodeID Error BOOL
ErrorID WORD
MasterPos LREAL
SlavePos LREAL
CamCurve BYTE
EnableConVel BOOL
ConnectingVelocity LREAL
EnableConAccel BOOL
ConnectingAccel LREAL
EnableConJerk BOOL
ConnectingJerk LREAL
PointNum UINT
InterpolationType BYTE
Input
BOOL Execute Write cam block data at the rising edge of the input.
UINT CamBlockID Input the number of cam block to read. (1~100)
UINT NodeID Input the number of node to read. (1~100)
Output
BOOL Done Indicate the validity of the function block output.
BOOL Busy Indicate that execution of the function block is not completed.
BOOL Active Indicates whether an error occurs or not.
WORD ErrorID Output the error number that occurred while the function block is running.
LREAL MasterPos Output the position of the main axis set in the cam block.
LREAL SlavePos Output the position of the sub axis set in the cam block.
Byte CamCurve The cam curve type set in the cam block is output..
It outputs whether the setting for the connection speed set in the cam block is used
BOOL EnableConVel
or not.
LREAL ConnectingVelocity Outputs the connection speed set in the cam block.
It outputs whether the setting for the connection acceleration set in the cam block
BOOL EnableConAccel
is used or not.
LREAL ConnectingAccel Outputs the connection acceleration set in the cam block.
It outputs whether the setting for the connection jerk set in the cam block is used
BOOL EnableConJerk
or not.
LREAL ConnectingJerk Outputs the connection jerk set in the cam block.
UINT PointNum Enter the number of cam points of the cam block.
Byte InterpolationType Outputs the number of cam points set in the cam block.
(1) The cam block function creates a cam profile by setting the cam curve, connection speed, connection acceleration, and
connection jerk. This command can check the content set by LS_WriteCamblocNode. This motion function block is a function
block that reads the node data of the designated cam block.
(2) The function block is executed at the rising edge of the Execute input.
6-166
Chapter 6 Motion Function Block
(3) In BlockID, enter the cam block number. A value between 1 and 100 can be entered for the BlockID value.
(4) If a value outside the set range is input to CamBlockID, Error becomes ‘1’ and ErrorID ‘0x00C1’ occurs.
(5) If a value outside the set range is input to Node ID, Error becomes ‘1’ and ErrorID ‘0x00C3’ occurs.
(6) If a value outside the set range is input to CamBlockID, Error becomes ‘1’ and ErrorID ‘0x00C1’ occurs.
6-167
Chapter 6 Motion Function Block
LS_ReadEsc
BOOL Execute Done BOOL
UINT Adp Busy BOOL
UINT Ado Error BOOL
UINT Length ErrorID WORD
UINT EcatCmd Value UDINT
Wkc UINT
Input
BOOL Execute Give the ESC reading command to the slave controller in the rising Edge.
UINT Adp Set the slave controller address according to the EcatCmd.
UINT Ado Set the slave controller ESC address.
UINT Length Set the data length to read. (1 ~ 4 Byte)
UINT EcatCmd Set the EtherCAT command. (1: APRD, 4: FPRD, 7: BRD)
Output
BOOL Done This represents successful ESC reading to complete normally.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
UDINT Value Output the ESC reading value of the slave controller
UINT Wkc After the execution of the command, Working Counter value is displayed.
(1) This motion function block is a function block to read the data of the address in Ado set from the ESC (EtherCAT Slave
Controller) of the designated slave device.
(2) Value and Wkc (Working Counter) is displayed as 0 when the motion function block is executed. When the execution is
completed (Done output is on), the read data value is displayed at Value, and the Working Counter value is displayed at Wkc.
(3) Adp input specifies the EtherCAT slave device address, and the following values can be set depending on EcatCmd settings.
If EcatCmd setting is 7(BRD), Adp input value is ignored. If a value outside the range is set for Adp input, “Error 0x0F60” occurs.
EcatCmd Adp range
0x0000: The first slave connected
0xFFFF: The second slave connected
1 (APRD) 0xFFFE: The third slave connected
:
0xFFC1: The 64th slave connected
4 (FPRD) 1 ~ 64: slave 1~slave 64
7 (BRD) -
(4) In Length, values ranging from 1 to 4 can be entered, which mean 1 to 4 bytes. If the value is set outside the range, “error
0x0F61” occurs.
(5) At EcatCmd, the type of command to use when reading ESC (EtherCAT Slave Controller) is specified. The following three
commands can be used. Setting a value outside the range at EcatCmd will cause "Error 0x0F62”.
1) 1 - APRD (Auto Increment Physical Read)
This command is used when reading the slave device data following the order of physical connection before normal
6-168
Chapter 6 Motion Function Block
communication connection by the master. A slave device receiving Adp with 0 value will read data of the size designated
by Length. Adp of each slave device increases when EtherCAT frame is received. For example, if EcatCmd is 1, and Adp
is set to 0xFFFF, when executing ESC read function block, reading is not performed because the Adp at the time of
receiving EtherCAT frame from the first slave device is not 1, only increasing Adp by 1. When the second slve device
receives EtherCAT frame, reading is performed because the Adp value of the first slave value increased by 1 to 0. The
Adp setting values depending on the slave device connection order are as follows.
Slave device Setting value
The first slave connected 0
The second slave 0xFFFF
connected
: :
The 64th slave connected 0xFFC1
2) 4 - FPRD (Configured Address Physical Read)
This order is used to read the data by designating the station address of the slave device after normal communication
connection by the master. If the Station Address of the slave device set by EtherCAT master matches the transmitted Adp,
the slave device reads data of the size designated by Length in the Ado area. The Station Address of slave device set by
master can be checked in slave information dialog box when the slave is added.
6-169
Chapter 6 Motion Function Block
LS_WriteEsc
BOOL Execute Done BOOL
UINT Adp Busy BOOL
UINT Ado Error BOOL
UINT Length ErrorID WORD
UINT EcatCmd Wkc UINT
UDINT Value
Input
BOOL Execute Give the ESC writing command to the slave controller in the rising Edge.
UINT Adp Set the slave controller address according to the EcatCmd.
UINT Ado Set the slave controller ESC address.
UINT Length Set the data length to write. (1 ~ 4 Byte)
UINT EcatCmd Set the EtherCAT command. (2: APWR, 5: FPWR, 8: BWR)
UDINT Value Output the ESC writing value of the slave controller
Output
BOOL Done This represents successful ESC writing to complete normally.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
UINT Wkc After the execution of the command, Working Counter value is displayed.
(1) This motion function block writes data using the address set by Ado to ESC (EtherCAT Slave Controller) of the slave device
set by Adp.
(2) Wkc value is displayed as 0 when the motion function block is executed, and the Working Counter value is displayed when
execution is completed (Done output is on). Wkc increases by 1 through each slave device designated by EcatCmd and Adp.
(3) Adp input specifies the EtherCAT slave device address, and the following values can be set depending on EcatCmd settings.
If EcatCmd setting is 8(BWR), Adp input value is ignored. If a value outside the range is set for Adp input, “Error 0x0F70” occurs.
EcatCmd Adp range
0x0000: The first slave connected
0xFFFF: The second slave connected
2 (APWR) 0xFFFE: The third slave connected
:
0xFFC1: The 64th slave connected
5 (FPWR) 1 ~ 64: slave 1~slave 64
8 (BWR) -
(4) In Length, values ranging from 1 to 4 can be entered, which mean 1 to 4 bytes. If the value is set outside the range, “error
0x0F71” occurs.
(5) At EcatCmd, the type of command to use when reading ESC (EtherCAT Slave Controller) is specified. The following write
commands can be used. Setting a value outside the range at EcatCmd will cause "Error 0x0F72”.
1) 2- APWR( Auto Increment Physical Write)
This command is used when reading the slave device data following the order of physical connection before normal
6-170
Chapter 6 Motion Function Block
communication connection by the master. A slave device receiving Adp with 0 value will read data of the size designated
by Length. Adp of each slave device increases when EtherCAT frame is received. For example, if EcatCmd is 2, and Adp
is set to 0xFFFF, when executing ESC read function block, reading is not performed because the Adp at the time of
receiving EtherCAT frame from the first slave device is not 0, only increasing Adp by 1. When the second slave device
receives EtherCAT frame, writing is performed because the Adp value of the first slave value increased by 1 to 0. The Adp
setting values depending on the slave device connection order are as follows.
Slave device Setting value
The first slave connected 0
The second slave 0xFFFF
connected
: :
The 64th slave connected 0xFFC1
2) 5 – FPWR(Configured Address Physical Write)
This order is used to write the data by designating the station address of the slave device after normal communication
connection by the master. If the Station Address of the slave device set by EtherCAT master matches the transmitted Adp,
the slave device writes data of the size designated by Length in the Ado area. The Station Address of slave device set by
master can be checked in slave information dialog box when the slave is added.
6-171
Chapter 6 Motion Function Block
LS_CamSkip
BOOL Execute Done BOOL
UINT Slave Slave UINT
UINT SkipCount Busy BOOL
USINT SkipMode Active BOOL
CommandAborted BOOL
Error BOOL
ErrorID WORD
CoveredSkipCount UINT
Input-Output
UINT Slave Set the sub axis. ( refer toSee 6.2.1 Setting Range by Product)
Input
BOOL Execute Give cam skip command on the axis in the rising Edge.
UINT SkipCount Set the number of cam cycles to skip.
USINT SkipMode Set cam skip mode. (Reservation)
Output
BOOL Done Indicate the completion state of cam skip operation.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Active Indicate that the current axis is controlling the cam skip.
BOOL CommandAborted Indicate that the current motion function block is interrupted while it is running.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
LREAL CoveredSkipcount Output the number of cam cycle skipped.
(1) This motion function block commands Cap Skip command which skip cam operation cycles as designated for the cam
currently in operation.
(2) SkipCount determines the number of cam cycles to skip. If 0 is entered, SkipCount Error (Error 0x111E) is displayed.
(3) When Cam Skip command is issued on a sub-axis where cam operation is underway, the current cam cycle ends, and the
skip operation starts. During cam skip, the sub-axis is in stand-by at the end of the cam table.
(4) CoveredSkipCount displays the number of cam cycles skipped. The count increases with each skipped cycle, and becomes
0 when Done output is off after the function block motion is completed
(5) Done output is on when the set number of cycles are skipped after executing Cam Skip command.
6-172
Chapter 6 Motion Function Block
LS_VarCamIn
BOOL Execute InSync BOOL
UDINT VarOffset VarOffset UINT
UINT Slave Slave UINT
LREAL ContinousUpdate Busy BOOL
LREAL MasterOffset Active BOOL
LREAL SlaveOffset CommandAborted BOOL
LREAL MasterScaling Error BOOL
LREAL SlaveScaling ErrorID WORD
LREAL MasterStartDistance EndOfProfile BOOL
LREAL MasterSyncPosition
UINT StartMode
UINT MasterValueSource
UINT CamTableID
UINT BufferMode
Input-Output
Set the offset value of the M device where the variable to be used as the main axis
UDINT VarOffset
is located.
UINT Slave Set the sub axis. ( refer toSee 6.2.1 Setting Range by Product)
Input
BOOL Execute Give cam operation command to the relevant axis in the rising Edge.
Specify the update setting of input value.
BOOL ContinuousUpdate (Refer to 6.1.5.Changes in Parameters during Execution of Motion Function
Block)
LREAL MasterOffset Set the offset value of the main axis.
LREAL SlaveOffset Set the offset value of the slave cam table.
LREAL MasterScaling Specify the magnification of the main axis.
LREAL SlaveScaling Specify the magnification of the slave axis cam table.
Specify the position of the main-axis where the cam operation of the master axis
LREAL MasterStartDistance
starts.
LREAL MasterSyncPosition Specify the starting point at cam table when cam operation starts.
Set the cam operation mode.
0: Cam table is applied as an absolute value. (mcAbsolute)
UINT StartMode
1: Cam table is applied as a relative value based on the command start position.
(mcRelative)
Select the source of the main axis for cam operation.
UINT MasterValueSource 0: Synchronizes to the command position of the main axis.
1: Synchronizes to the current position of the main axis.
UINT CamTableID Specify the cam table to operate. ( refer toSee 6.2.1 Setting Range by Product)
Specify the sequential operation setting of motion function block.
UINT BufferMode
(Refer to 6.1.4.BufferMode input)
6-173
Chapter 6 Motion Function Block
Output
Indicate that cam operation is normally being fulfilled.
BOOL InSync
(Indicate that the serve axis is following the cam table.)
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Active Indicate that the current motion function block is controlling the relevant axis.
BOOL CommandAborted Indicate that the current motion function block is interrupted while it is running.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
(1) This motion function block is the function block that operates the sub-axis CAM along the main axis by setting the variable
value designated by offset as the main axis.
(2) The variable value specified as the main axis should be the LREL type. Example). When specifying the variable to be allocated
to the memory by %ML100 as the main axis value, %ML100 should be LREAL type, and the offset value specifying a variable
is UDINT type and you should input 100 to the VarOffset.
(3) Remaining settings and functions are the same as the MC_CamIn function block.
6-174
Chapter 6 Motion Function Block
LS_VarGearIn
BOOL Execute InGear BOOL
UDINT VarOffset VarOffset UINT
UINT Slave Slave UINT
BOOL ContinousUpdate Busy BOOL
INT RatioNumerator Active BOOL
UINT RatioDenominator CommandAborted BOOL
UINT MasterValueSource Error BOOL
LREAL Acceleration ErrorID WORD
LREAL Deceleration
LREAL Jerk
UINT BufferMode
Input-Output
Set the offset value of the M device where the variable to be used as the main axis
UDINT VarOffset
is located.
UINT Slave Set the sub axis. ( refer toSee 6.2.1 Setting Range by Product)
Input
BOOL Execute Give gear operation command to the relevant axis in the rising Edge.
Specify the update setting of input value.
BOOL ContinuousUpdate (Refer to 6.1.5.Changes in Parameters during Execution of Motion Function
Block)
INT RatioNumerator Specify the numerator of gear ratio. (-32768 ~ 32767)
UINT RatioDenominator Specify the denominator of gear ratio. (0 ~ 65535)
Select data of the main axis to be synchronized.
UINT MasterValueSource 0: Synchronize in the command position of the main axis.
1: Synchronize in the current position of the main axis.
LREAL Acceleration Specify the acceleration at the beginning of gear operation synchronization. [u/s2]
LREAL Deceleration Specify the deceleration at the beginning of gear operation synchronization. [u/s2]
LREAL Jerk Specify the change rate of acceleration/deceleration. [u/s3]
Specify the sequential operation setting of motion function block.
UINT BufferMode
(Refer to 6.1.4 BufferMode Input)
Output
BOOL InGear Indicate that gear operation is running by applying gear ration.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Active Indicate that the current motion function block is controlling the relevant axis.
BOOL CommandAborted Indicate that the current motion function block is interrupted while it is running.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
(1) This motion function block is the function block that drives the main axis and the sub axis in gear operation (speed
synchronization) by setting the variable value designated by offset as the main axis.
(2) The variable value specified as the main axis should be the LREL type. Example). When specifying the variable to be allocated
to the memory by %ML100 as the main axis value, %ML100 should be LREAL type, and the offset value specifying a variable
is UDINT type and you should input 100 to the VarOffset.
(3) Remaining settings and functions are the same as the MC_GearIn function block.
6-175
Chapter 6 Motion Function Block
LS_VarGearInPos
BOOL Execute InGear BOOL
UDINT VarOffset VarOffset UINT
UINT Slave Slave UINT
INT RatioNumerator Busy BOOL
UINT RatioDenominator Active BOOL
UINT MasterValueSource CommandAborted BOOL
LREAL MasterSyncPosition Error BOOL
LREAL SlaveSyncPosition ErrorID WORD
UINT SyncMode
LREAL MasterStartDistance
LREAL Acceleration
LREAL Deceleration
LREAL Jerk
UINT BufferMode
Input-Output
Set the offset value of the M device where the variable to be used as the
UDINT VarOffset
main axis is located.
UINT Slave Set the sub axis. ( refer toSee 6.2.1 Setting Range by Product)
Input
BOOL Execute Give gear operation command to the relevant axis in the rising Edge.
INT RatioNumerator Specify the numerator of gear ratio. (-32768~32767)
UINT RatioDenominator Specify the denominator of gear ratio. (0~65535)
Select the standard of the main axis value to be synchronized.
UINT MasterValueSource 0(mcSetValue): Synchronize in the target position of the main axis.
1(mcActualValue): Synchronize in the current position of the main axis.
LREAL MasterSyncPosition Specify the position of the main axis where gear operation starts.
LREAL SlaveSyncPosition Specify the position of the spindle where gear operation starts.
LREAL SyncMode Unused
LREAL MasterStartDistance Specify the distance of the main axis where synchronization starts.
Specify the maximum speed of the spindle at the beginning of
LREAL Velocity
synchronization. [u/s]
Specify the maximum acceleration of the spindle at the beginning of
LREAL Acceleration
synchronization. [u/s2]
Specify the maximum deceleration of the spindle at the beginning of
LREAL Deceleration
synchronization. [u/s2]
LREAL Jerk Unused
Specify the sequential operation setting of motion function block.
UINT BufferMode
(Refer to 6.1.4 BufferMode Input)
Output
Indicate that gear operation is normally being fulfilled as the specified gear
BOOL InSync
ratio is applied.
BOOL StartSync Indicate synchronization is starting.
6-176
Chapter 6 Motion Function Block
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Active Indicate that the current motion function block is controlling the relevant axis.
Indicate that the current motion function block is interrupted while it is
BOOL CommandAborted
running.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
(1) This motion function block is the function block that synchronizes the main axis and the servo axis according to the gear ratio
set at the specific position by setting the variable value designated by the offset as the main axis
(2) The variable value specified as the main axis should be the LREL type. Example). When specifying the variable to be allocated
to the memory by %ML100 as the main axis value, %ML100 should be LREAL type, and the offset value specifying a variable
is UDINT type and you should input 100 to the VarOffset.
(3) Remaining settings and functions are the same as the MC_GearInPos function block.
6-177
Chapter 6 Motion Function Block
LS_ReadCamTableSlavePos
BOOL Execute Done BOOL
UINT Axis Axis UINT
UINT CamTableID Busy BOOL
LREAL MasterPos SlavePos LREAL
SlaveVel LREAL
SlaveAccel LREAL
Error BOOL
ErrorID WORD
Input-Output
UINT Axis Set the command axis. ( refer toSee 6.2.1 Setting Range by Product)
Input
Give ReadCamTableSlavePos operation command to the relevant axis in the
BOOL Execute
rising Edge.
UINT CamTableID Specify the cam table to read. ( refer toSee 6.2.1 Setting Range by Product)
LREAL MasterPos Specify the position of the main axis on the CAM table.
Output
BOOL Done Indicate the completion state of ReadCamTabelSlavePos operation.
BOOL Busy Indicate that the execution of motion function block is not completed.
LREAL SlavePos It outputs the position of the slave.
LREAL SlaveVel It outputs the speed of the slave. [u/s]
LREAL SlaveAccel It outputs the acceleration of the slave. [u/s2]
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
(1) This motion function block outputs the position of the serve axis according to the position of the main axis in the specified CAM
table.
(2) Set the position value of the main axis to be read in the CAM table as the MasterPos value. Offset / gear ratio / phase correction
operation, etc. applied to the command axis are not reflected in the SlavePos output.
(3) When reading the slave position on the CAM table is completed, the ‘Done Output’ will be turned on.
6-178
Chapter 6 Motion Function Block
LS_InverterWriteVel
BOOL Execute Done BOOL
UINT Axis Axis UINT
INT TargetVel Error BOOL
ErrorID WORD
Input-Output
Specify the axis to be commanded. (See 6.2.1 Setting Range by Product,
UINT Axis
Real axis)
Input
Give InverterWriteVel operation command to the relevant axis in the rising
BOOL Execute
Edge.
INT TargetVel The inverter speed to be set (-30000 ~ 30000, unit: rpm)
Output
BOOL Done Indicate the completion state of InverterWriteVel operation.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
(1) This motion function block is the function block that sets the speed of the inverter to operate when controlling the inverter by
the axis
(2) If you set the speed in TargetVel and execute the function block, the inverter connected to the axis will operate at the
corresponding speed.
(3) The speed value set in TargetVel is in units of rpm, and can be set to the value from -30000 to 30000.
6-179
Chapter 6 Motion Function Block
LS_InverterReadVel
BOOL Enable Enabled BOOL
UINT Axis Axis UINT
Error BOOL
ErrorID WORD
ActualVel INT
Input-Output
Specify the axis to be commanded. (See 6.2.1 Setting Range by Product,
UINT Axis
Real axis)
Input
While the condition is ON, the speed of the inverter connected to the axis is
BOOL Enable
read.
Output
BOOL Enabled It indicates whether reading the inverter speed is being executed.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
INT ActualVel Speed value of the read inverter
(1) This motion function block is the function block that reads the speed of the connected inverter when controlling the inverter by
the axis.
(2) When the function block is executed, the current speed of the inverter connected to the axis is read and displayed in ActualVel.
(3) The speed value set in ActualVel is in units of rpm, and can be displayed as the value from -30000 to 30000.
6-180
Chapter 6 Motion Function Block
LS_InverterControl
BOOL Execute Done BOOL
UINT Axis Axis UINT
BOOL SwitchOn Error BOOL
BOOL VoltageEn ErrorID WORD
BOOL QuickStop
BOOL EnableOP
BOOL EnableRamp
BOOL UnlockRamp
BOOL ReferenceRamp
BOOL FaultReset
BOOL Halt
Input-Output
Specify the axis to be commanded. (See 6.2.1 Setting Range by Product,
UINT Axis
Real axis)
Input
BOOL Execute Set the inverter control word in the rising Edge.
BOOL SwitchOn Switch On
BOOL VoltageEn Voltage Enable
BOOL QuickStop Quick Stop
BOOL EnableOP Enable operation
BOOL EnableRamp Enable ramp
BOOL UnlockRamp Unlock ramp
BOOL ReferenceRamp Reference ramp
BOOL FaultReset Fault Reset
BOOL Halt Halt
Output
BOOL Done It indicates whether or not the inverter control word setting is done normally.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
(1) This motion function block is the function block that sets the control word of the connected inverter when controlling the inverter
by the axis.
(2) In order to operate the inverter, the control word must be set to enable operation.
(3) Please refer to the following.
Command bit used in Enable Operation
Bit Value Description
0 Holding previous operation status
4 ( Enable Ramp)
1 Inverter operation by command bit
0 Holding of output frequency
5 (Unlock Ramp)
1 Operatin to target freqency
0 Input target frequency as 0
6 ( Reference Ramp)
1 Input target frequency as settting value
8 (Halt) X Unused
6-181
Chapter 6 Motion Function Block
Change the inverter status according to the bit setting of the control word
6-182
Chapter 6 Motion Function Block
LS_InverterStatus1
BOOL Enable Enabled BOOL
UINT Axis Axis UINT
Error BOOL
ErrorID WORD
RdySwitchOn BOOL
SwitchedOn BOOL
OpEn BOOL
VoltageEn BOOL
SwOnDisable BOOL
Input-Output
Specify the axis to be commanded. (See 6.2.1 Setting Range by Product,
UINT Axis
Real axis)
Input
BOOL Enable Read the “Status 1” of the inverter while the input is enabled.
Output
BOOL Enabled It indicates the state of reading the “Status 1” of the inverter.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the error number that occurred while the function block is running.
BOOL RdySwitchOn Ready to Switch On
BOOL SwitchedOn Switched On
BOOL OpEn Operation Enabled
BOOL VoltageEn Voltage Enabled
BOOL SwOnDisable Switch On Disable
(1) This motion function block is the function block that reads and displays the "Status 1" of the connected inverter when controlling
the inverter by the axis.
(2) RdySwitchOn, SwitchedOn, OpEn, VoltageEn, SwOnDisable are respectively the lower bit values of the Status Word among
the inverter PDO Data.
RdySwitchOn Bit 0
SwitchedOn Bit 1
OpEn Bit 2
VoltageEn Bit 4
SwOnDisable Bit 6
6-183
Chapter 6 Motion Function Block
LS_InverterStatus2
BOOL Enable Enabled BOOL
UINT Axis Axis UINT
Error BOOL
ErrorID WORD
Fault BOOL
QuickStop BOOL
Warning BOOL
Remote BOOL
TargetReach BOOL
LimitActive BOOL
Input-Output
Specify the axis to be commanded. (See 6.2.1 Setting Range by Product,
UINT Axis
Real axis)
Input
BOOL Enable Read the “Status 2” of the inverter while the input is enabled.
Output
BOOL Enabled It indicates the state of reading the “Status 2” of the inverter.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the error number that occurred while the function block is running.
BOOL Fault Fault(trip)
BOOL QuickStop Quick stop
BOOL Warning Warning
BOOL Remote Remote
BOOL TargetReach Target Reached
BOOL Limit Active Internal Limit active
(1) This motion function block is the function block that reads and displays the "Status 2" of the connected inverter when controlling
the inverter by the axis.
(2) Fault, QuickStop, Warning, Remote, TagetReach, LimiActive are respectively the lower bit values of the Status Word among
the inverter PDO Data.
Fault Bit 3
QuickStop Bit 5
Warning Bit 7
Remote Bit 9
TargetReach Bit10
LimitActive Bit11
6-184
Chapter 6 Motion Function Block
LS_SyncMoveVelocity
BOOL Execute InVelocity BOOL
UINT Axis Axis UINT
LREAL Velocity Busy BOOL
BOOL CmdPosMode Active BOOL
UINT BufferMode CommandAborted BOOL
Error BOOL
ErrorID WORD
Input-Output
Specify the axis to be commanded. ( refer toSee 6.2.1 Setting Range by
UINT Axis
Product)
Input
BOOL Execute In the rising Edge, it performs speed control operation through the CSV
mode.
LREAL Velocity Setting the operation speed.
BOOL CmdPosMode 0: Apply the current position to the command position.
UINT BufferMode Specify the sequential operation setting of motion function block.
(0: Aborting, 1: Buffered)
(Refer to 6.1.4.BufferMode input)
Output
BOOL Done Indicate the state of motion function block completion.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Active Indicate that the current motion function block is controlling the relevant axis.
BOOL CommandAborted Indicate that the current motion function block is interrupted while it is
running.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the error number that occurred while the function block is running.
(1) This motion function block is the function block that allows speed control using the CSV (Cyclic Synchronous Velocity) mode
of CiA402 profile on the set axis.
(2) In order to stop the specified speed operation, you can make a stop command or execute another motion function block.
(3) Velocity input specifies the speed to operate. Positive sign (+ or No sign) of the operation speed value leads to forward direction,
and negative (-) sign leads to reverse direction.
(4) CmdPosMode is used to set the update methods of the current position at the time of command. Only the initial value of 0 is
available and the current position of the command is updated using the feedback current position.
(5) The output InVelocity is turned on when the axis reaches the specified speed, and it is turned off when the specified speed
operation is stopped.
(6) When this Motion Function Block is running, the axis status is 'Continuous Motion'.
6-185
Chapter 6 Motion Function Block
LS_ReadCamTableMasterPos
BOOL Execute Done BOOL
UINT Axis Axis UINT
UINT CamTableID Busy BOOL
LREAL MasterStartPos MasterPos LREAL
LREAL MasterEndPos Error BOOL
LREAL SlavePos ErrorID WORD
LREAL Scale
Input-Output
UINT Axis Set the command axis. ( refer toSee 6.2.1 Setting Range by Product)
Input
Give cam table master position reading command to the relevant axis in the rising
BOOL Execute
Edge.
UINT CamTableID Specify the cam table to read. (1~32)
LREAL MasterStartPos Start position to read position of cam main axis
LREAL MasterEndPos End position to read position of cam main axis
LREAL SlavePos Position of cam serve axis
LREAL Scale Accuracy of main axis position reading
Output
BOOL Done Indicate that the cam table main axis reading is successfully completed.
BOOL Busy Indicate that the execution of motion function block is not completed.
LREAL MasterPos It outputs the position of the slave.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
(1) This motion function block outputs the position of the main axis corresponding to the position of the serve axis set in SlavePos,
among the values between MasterStartPos and MasterEndPos in the specified cam table.
6-186
Chapter 6 Motion Function Block
Slave
Scale
SlavePos
Master
MasterStartPos MasterPos MasterEndPos
(2) Set the position of serve axis to read in the cam table as SlavePos value. Offset/Gear ratio/Phase correction operation applied
to the command axis is not reflected in the MasterPos output.
(3) When the cam table master position reading operation is completed, the Done output turns on.
(4) The ‘Scale’, which is the accuracy value of the cam table master position reading, can’t input 0. If the ‘Scale’ is 0, an error (error
number: 0x0B) occurs. If the ‘Scale’ value is large, an error may occur between the magnified MasterPos value and the actual
spindle position. Also, if the ‘Scale’ value is small, the execution time of the function block may become long.
(5) If the position of the main axis corresponding to the position of the serve axis set in SlavePos does not exist among the values
between MasterStartPos and MasterEndPos, Error is On and "0x1124" occurs in ErrorID.
(6) The value of MasterEndPos must be greater than the value of MasterStartPos. If the MasterEndPos value is less than or equal
to MasterStartPos, Error is On and "0x0B" occurs in ErrorID.
6-187
Chapter 6 Motion Function Block
LS_OnOffCam
BOOL Execute InSync BOOL
UINT Master Master UINT
UINT Slave Slave UINT
BOOL CamOnOff Busy BOOL
BOOL SkipOnCam Active BOOL
BOOL SkipRunCam CommandAborted BOOL
UINT MasterValueSource Error BOOL
UINT OnCam_ID ErrorID WORD
UINT RunCam_ID EndOfProfile BOOL
UINT OffCam_ID CamState UINT
UINT StartMode
LREAL StartModeParam
Input-Output
UINT Master Set main axis ( refer toSee 6.2.1 Setting Range by Product)
Set the sub axis. (See 6.2.1 Setting Range by Product), Available to set variables
UINT Slave
only
Input
BOOL Execute Give the OnOff cam operation command to the relevant axis on the rising Edge.
Set whether the Cam operation is On or Off.
BOOL CamOnOff 1: Complete OnCam and switch to RunCam.
0: Complete OffCam in RunCam and switch the cam to the stop status
Exclude OnCam from OnOff cam operation and carry out RunCam->OffCam in
BOOL SkipOnCam
order.
Exclude RunCam from OnOff cam operation and carry out OnCam->OffCam in
BOOL SkipRunCam
order.
Select the source of the main axis for cam operation.
UINT MasterValueSource 0: Synchronizes to the command position of the main axis.
1: Synchronizes to the current position of the main axis.
Specify the cam table to operate in the OnCam state.
UINT OnCam_ID
( refer toSee 6.2.1 Setting Range by Product)
Specify the cam table to operate in the RunCam state.
UINT RunCam_ID
( refer toSee 6.2.1 Setting Range by Product)
Specify the cam table to operate in the OffCam state.
UINT OffCam_ID
( refer toSee 6.2.1 Setting Range by Product)
Select the method to start the cam operation.
0: Start when CamOnOff is set to 1.
1: Start when CamOnOff is set to 1 and the main axis reaches the position set in
UINT StartMode StartModeParam.
2: Start when CamOnOff is set to 1 and the main axis moves the distance set in
StartModeParam.
3: Use the profile generated with LS_CrossSealCamGen.
LREAL StartModeParam Set the parameter according to the method for starting the cam operation.
6-188
Chapter 6 Motion Function Block
Output
BOOL InSync Indicates that cam operation has entered the RunCam state.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Active Indicate whether the current motion function block is controlling the relevant axis.
BOOL CommandAborted Indicate that the current motion function block is interrupted by other command.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
BOOL EndOfProfile Indicates the end of the current cam operation.
0: Stop status
1:OnCam operating
UINT CamState
2:RunCam operating
3:OffCam operating
(1) This motion function block uses three cam tables to carry out the cam operation that is switched to Stop state->OnCam-
>RunCam or RunCam->OffCam->Stop state depending on the CamOnOff input.
MasterAxis
SlaveAxis
Execute
CamOnOff
InSync
EndOfProfile
CamState Stop On Run Off Stop On Off Stop
(2) The cam operation runs under a state where Execute is the rising Edge. The cam operation does not stop even if Execute
is changed to Off during the operation. To stop the OnOffCam operation, you must give the MC_CamOut command or run
another motion function block.
(3) If StartMode is set to 0, OnCam runs immediately when 1 is input in CamOnOff. If StartMode is set to 1, OnCam does not run
immediately when 1 is input in CamOnOff. But OnCam runs when the position of the main axis passes by the position set in
StartModeParam. If StartMode is set to 2, OnCam runs when 1 is input in CamOnOff and then the main axis moves the
distance set in StartModeParam.
(4) If you are using a cam generated with the LS_CrossSealCamGen function block, set StartMode to 3. If StartMode is set to 3
and the length of OnCam_ID is 270, the same operation is conducted as if StartMode is set to 1 and StartModeParam is 270.
If OnCam_ID is 180, the same operation is conducted as if StartMode is set to 1 and StartModeParam is set to 0.
(5) The EndOfProfile signal outputs On when passing the end of a profile during operation of each OnCam/OffCam/RunCam cam
profile.
(6) If the CamOnOff signal is Off, the operation is performed to switch to RunCam->OffCam->Stop state. If the CamOnOff signal
is switched from Off to On in the RunCam state, the RunCam state is maintained if OffCam is not yet executed. In a state
6-189
Chapter 6 Motion Function Block
where OffCam is executed, the state switches to the OnCam->RunCam state again after switching to the OffCam->Stop state.
(When turning off CamOnOff in RunCam, the operation must be maintained until the EndOfProfile signal is generated.)
SlaveAxis
CamOnOff
EndOfProfile
CamState Run Off Stop On Run Off
(7) If the SkipOnCam signal is On, RunCam is executed instantly without OnCam. If CamOnOff turns off after executing RunCam,
perform the operation to switch to RunCam->OffCam->Stop state. In an operation where the SkipOnCam signal is On, the
operation is executed from the middle of RunCam.
(8) If the SkipRunnCam signal is On, OffCam is executed without RunCam being executed after OnCam is executed. If CamOnOff
is On at this time, the operation repeats in the order of OnCam->OffCam->Stop->OnCam->OffCam->Stop.
(9) To stop the OnOffCam operation completely, use the halt (MC_Halt) or immediate stop (MC_Stop) motion function block.
(10) The CamState value is output as Stop(0) / OnCam(1) / RunCam(2) / OffCam(3) depending on the state of cam operation.
(11) Once the cam operation set in RunCam_ID is executed, InSync output turns On.
(12) MasterValueSource selects the source of the main axis to be synchronized. If set to 0, the serve axis performs cam operations
based on the command position of the main axis calculated in the motion controller, and if set to 1, the serve axis performs
cam operations based on the current position received via communication from the servo drive of the main axis.
(13) RunCam_ID sets the cam profile to execute during the operation of OnOffCam. The cam profile to execute during operation
of OnOffCam is set to RunCam_ID. Before executing RunCam in the Stop state, the cam profile to run is set to OnCam_ID.
OffCam_ID sets the cam profile to execute before RunCam reaches the Stop state. The setting range for each ID is 1-32, and
an input value outside of the range causes a "0x1115" error in the motion function block.
(14) Any changes made to the MasterValueSource/OnCam_ID/RunCam_ID/OffCam_ID value during operation are not reflected.
(15) The value of the major axis can be changed during OnCam/RunCam/OffCam operation.(V1.50 or higher)
(16) The corresponding axis is in a "SynchronizedMotion” state when this motion function block is running.
(17) For more information, see Chapter 8.6 RotaryKnife Operation under Chapter 8 Motion Control Function.
6-190
Chapter 6 Motion Function Block
LS_RotaryKnifeCamGen
BOOL Execute Done BOOL
UINT Axis Axis UINT
UINT CamTableID Busy BOOL
LREAL PartLength Error BOOL
LREAL Circumference
ErrorID WORD
LREAL CuttingStart
LREAL CuttingEnd
LREAL CuttingSpdRatio
UINT CamType
UINT CamCurve
UINT CamPointNum
Input-Output
UINT Axis Specify the axis to be commanded (See 6.2.1 Setting Range
by Product)
Input
BOOL Execute Performs cam profile generation in the rising Edge.
UINT CamTableID Set the cam table ID where the profile is stored.
( refer toSee 6.2.1 Setting Range by Product)
LREAL PartLength Set the length of the object to cut by the RotaryKnife.
LREAL Circumference Set the circumference of the RotaryKnife.
LREAL CuttingStart Set the position for the RotaryKnife to start cutting.
LREAL CutingEnd Set the position for the RotaryKnife to end cutting.
LREAL CuttingSpdRatio Adjust the synchronization speed by a percentage while the
RotaryKnife is cutting. (If 100 is entered, the cutting speed is
synchronized 1:1 with the main axis.)
UINT CamType Set the type of the cam profile to generate.
(0:ALL 1:RampIn 2:Running 3:RampOut)
(4:sALL 5:sRampIn 6:Running 7:sRampOut)
UINT CamCurve Set the cam curve type used in cam profile generation.
(0:Linear 1:Cubic)
UINT CamPointNum Set the number of cam points used for the cam profile.
Output
BOOL Done Indicates that the cam profile is generated successfully.
BOOL Busy Indicates that the execution of the motion function block is not
completed.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Outputs the error ID occurred while the motion function block
is running.
(1) This motion function block generates the cam profile which performs the RotaryKnife action.
6-191
Chapter 6 Motion Function Block
(2) Use the cam profile generated through LS_RotaryKnifeCamGen in the LS_OnOffCam function block.
(3) On the PartLength input, enter the length of the object to perform cutting using the RotaryKnife.
(4) On the Circumference input, enter the circumference of the RotaryKnife.
Circumference
PartLength PartLength
(5) On the CuttingStart input, enter the starting position for the RotaryKnife to start cutting. On the CuttingStart input, enter the
ending position for the RotaryKnife to end cutting. The speed of the conveyor and the RotaryKnife are synchronized between
CuttingStart and CuttingEnd. (If you want a cutting region of 10 when the Circumference is 360, set CuttingStart to 175 and
CuttingEnd to 185.)
(6) On the generated cam profile, the movement amount of the main axis is 360Degree in ratio to PartLength. This means that
you must set the gear ratio of the motor and the machine in the parameter so that 1 rotation of the main axis equals PartLength.
(7) On the generated cam profile, the movement amount of the serve axis is 360Degree in ratio to the Circumference. This means
that you must set the gear ratio of the motor and the machine in the parameter so that 1 rotation of the serve axis equals the
Circumference.
(8) For CuttingStart, you cannot enter a value that is less than 1/8 of the Circumference or greater than CuttingEnd. A "0x1172"
error occurs if there is an error in the CuttingStart value.
(9) For CuttingEnd, you cannot enter a value that is greater than 7/8 of the Circumference or smaller than CuttingEnd. A "0x1172"
error occurs if there is an error in the CuttingEnd value. To set the cutting region to the minimum, set CuttingEnd and
CuttingStart as equal values.
(10) On the CamType, enter the type of cam profile to generate. Available values are 1: RampIn 2:Running 3:RampOut 5:sRampIn
6:Running 7:sRampOut. If you enter 0, RampIn/Running/RampOut will be generated at once. The Running type generates a
cam profile which performs repeated cutting actions. The RampIn type generates a profile that includes the stop state to the
action of the Running cam profile performing the cutting action. The RampOut type generates a profile to switch RotaryKnife
from a running state to a stop state. A "0x1176" error occurs if the CamType value is outside of the range.
PartLength
MasterAxis
Circumference
RampIn
SlaveAxis
RampOut
0
6-192
Chapter 6 Motion Function Block
(11) The sRampIn and sRampOut types generate a shortened cam profile of RampIn and RampOut respectively. When operating
using sRampIn and sRampOut and you want to main axis to reach the 1/2Circumference position of the serve axis, the main
axis must start at the 1/2 position of PartLength.
PartLength
MasterAxis
Circumference
sRampIn
SlaveAxis
sRampOut
0
(12) On the CuttingSpdRatio input, set the speed ratio for the cutting region. If CuttingSpdRatio is set to 100, a cam profile is
generated which operates by synchronizing 1:1 with the speed of the main axis in the cutting region. As the CuttingSpdRatio
value is higher, the faster the synchronization speed on the cutting region. The setting range of CuttingSpdRatio is 50-200 and
a "0x1174" error occurs if there is an error in the CuttingSpdRatio value.
(13) On the CamCurve, enter the curve of the cam profile to generate. If you enter 0: Linear, a cam profile is generated using linear
interpolation. Once you select linear interpolation, you must specify the number of cam profile points to generate by setting
CamPointNum. Take care when setting the number of points as too little can lead to a shock due to the acceleration or
deceleration of cam operation and too many can lead to an overload in the program due to the amount of computing resources
for saving cam profiles. If you enter 1: Cubic, a cam profile is generated that uses cubic interpolation. A "0x1176" error occurs
if the CamCurve value is outside of the range.
(14) The minimum number of cam points that can be set in CamPointNum is 10, and the maximum number of cam points is 1024.
Error 0x1177 occurs when CamPointNum has an error.
6-193
Chapter 6 Motion Function Block
LS_CrossSealCamGen
BOOL Execute Done BOOL
UINT Axis Axis UINT
UINT CamTableID Busy BOOL
LREAL PartLength Error BOOL
LREAL Circumference
ErrorID WORD
LREAL SealStart
LREAL SealEnd
LREAL SealSpdRatio
UINT CamType
UINT CamCurve
UINT CamPointNum
Input-Output
UINT Axis Specify the axis to be commanded (See 6.2.1 Setting Range
by Product)
Input
BOOL Execute Performs cam profile generation in the rising Edge.
UINT CamTableID Set the cam table ID to store the cam profile.
( refer toSee 6.2.1 Setting Range by Product)
LREAL PartLength Set length of the object sealed by the cross sealer.
LREAL Circumference Set circumference of the cross sealer.
LREAL SealStart Set the position for the cross sealer to start sealing.
LREAL SealEnd Set the position for the cross sealer to end sealing.
LREAL SealSpdRatio Adjust the synchronization speed in percentage while the
cross sealer is sealing. (If 100 is entered, the sealing speed is
synchronized 1:1 with the main axis.)
UINT CamType Set the type of the cam profile to generate.
(0:ALL 1:RampIn 2:Running 3:RampOut)
(4:sALL 5:sRampIn 6:Running 7:sRampOut)
UINT CamCurve Set the cam curve type used in cam profile generation.
(0:Linear 1:Cubic)
UINT CamPointNum Set the number of cam points used for the cam profile.
Output
BOOL Done Indicates that the cam profile is generated successfully.
BOOL Busy Indicates that the execution of the motion function block is not
completed.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Outputs the error ID occurred while the motion function block
is running.
(1) This motion function block generates the cam profile which performs the cross sealer action. Use the cam profile generated
through LS_CrossSealCamGen in the LS_OnOffCam function block.
(2) On the PartLength input, enter the length of the object to perform sealing using the cross sealer.
6-194
Chapter 6 Motion Function Block
Circumference
PartLength
(5) On the SealStart input, enter the starting position for the cross sealer to start sealing. On the sealEnd input, enter the position
where the cross sealer completes the sealing. The speed of conveyor and the cross sealer are synchronized between
SealStart and SealEnd. If you want a sealing region of 10 when the Circumference is 360, set SealStart to 175 and SealEnd
to 185.
(6) On the generated cam profile, the movement amount of the main axis is 360 in ratio to PartLength. This means that you must
set the gear ratio of the motor and the machine in the parameter so that when the main axis moves 360, the real distance
equals PartLength.
(7) On the generated cam profile, the movement amount of the serve axis is 360 in ratio to Circumference. This means that you
must set the gear ratio of the motor and the machine in the parameter so that when the serve axis moves 360, the real distance
equals Circumference.
(8) For SealStart, you cannot enter a value that is less than 1/8 of the Circumference or greater than SealEnd. A "0x1172" error
occurs if there is an error in the SealStart value.
(9) For SealEnd, you cannot enter a value that is greater than 7/8 of the Circumference or smaller than SealEnd. A "0x1172" error
occurs if there is an error in the SealEnd value. To set the sealing region to the minimum, set SealEnd and SealStart as equal
values.
(10) On the CamType, enter the type of cam profile to generate. Available values are 1: RampIn 2: Running 3:RampOut 5:sRampIn
6:Running 7:sRampOut. If you enter 0, RampIn/Running/RampOut will be generated at once. The Running type generates
a cam profile which performs repeated sealing actions. The RampIn type generates a profile that includes the stop state to the
action of the Running cam profile performing the sealing action. The RampOut type generates a profile to switch the cross
sealer from a running state to a stop state. A "0x1176" error occurs if the CamType value is outside of the range.
360
270
MasterAxis 180
360
RampIn
SlaveAxis
180
RampOut
0
6-195
Chapter 6 Motion Function Block
(11) The cam profile generated in the LS_CrossSealCamGen function is similar to the cam profile generated in the
LS_RotaryCutCamGen. For the RampIn profile, the operation starts when the main axis is at 270 and not at 0. The profile also
starts to perform sealing when the main axis is at 180 degrees.
(12) The sRampIn and sRampOut types generate a shortened cam profile of RampIn and RampOut respectively. When operating
using sRampIn and sRampOut, the cam operation starts when the main axis is at 0.
360
270
MasterAxis 180
360
sRampIn
SlaveAxis
180
sRampOut
0
(13) On the SealSpdRatio input, set the speed ratio for the sealing region. If SealSpdRatio is set to 100, a cam profile is generated
which operates by synchronizing 1:1 with the speed of the main axis in the sealing section. The higher the SealSpdRatio value,
the faster the synchronization speed in the cutting region. The setting range of SealSpdRatio is 50-200 and a "0x1174" error
occurs if there is an error in the SealSpdRatio value.
(14) On the CamCurve, enter the curve of the cam profile to generate. 0: Enter linear, a cam profile is generated using linear
interpolation. Once you select linear interpolation, you must specify the number of cam profile points to generate by setting
CamPointNum. Take care when setting the number of points as too little can lead to a shock due to the acceleration or
deceleration of cam operation and too many can lead to an overload in the program due to the amount of computing resources
for saving cam profiles. 1: Enter cubic, a cam profile is generated that uses cubic interpolation. A "0x1176" error occurs if the
CamCurve value is outside of the range.
(15) The minimum number of cam points that can be set in CamPointNum is 10, and the maximum number of cam points is 1024.
Error 0x1177 occurs when CamPointNum has an error.
6-196
Chapter 6 Motion Function Block
LS_OnOffCamEx
BOOL Execute InSync BOOL
UINT Master Master UINT
UINT Slave Slave UINT
BOOL CamOnOff Busy BOOL
BOOL SkipOnCam Active BOOL
BOOL SkipRunCam CommandAborted BOOL
UINT MasterValueSource Error BOOL
UINT OnCam_ID ErrorID WORD
UINT RunCam_ID EndOfProfile BOOL
UINT OffCam_ID CamState UINT
LREAL MasterOffset
LREAL SlaveOffset
LREAL MasterScaling
LREAL SlaveScaling
UINT StartMode
LREAL StartModeParam
Input-Output
UINT Master Set main axis (See 6.2.1 Setting Range by Product), Available to set variables only
Set the sub axis. (See 6.2.1 Setting Range by Product), Available to set variables
UINT Slave
only
Input
BOOL Execute Give the OnOff cam operation command to the relevant axis on the rising Edge.
Set whether the Cam operation is On or Off.
BOOL CamOnOff 1: Complete OnCam and switch to RunCam.
0: Complete OffCam in RunCam and switch the cam to the stop status
Exclude OnCam from OnOff cam operation and carry out RunCam->OffCam in
BOOL SkipOnCam
order.
Exclude RunCam from OnOff cam operation and carry out OnCam->OffCam in
BOOL SkipRunCam
order.
Select the source of the main axis for cam operation.
UINT MasterValueSource 0: Synchronizes to the command position of the main axis.
1: Synchronizes to the current position of the main axis.
UINT OnCam_ID Specify the cam table to operate in the OnCam state.
UINT RunCam_ID Specify the cam table to operate in the RunCam state.
UINT OffCam_ID Specify the cam table to operate in the OffCam state.
LREAL MasterOffset Set the offset value of the main axis.
LREAL SlaveOffset Set the offset value of the serve axis.
LREAL MasterScaling Specify the magnification of the main axis.
LREAL SlaveScaling Specify the magnification of the serve axis.
Select the method to start the cam operation.
0: Start when CamOnOff is set to 1.
1: Start when CamOnOff is set to 1 and the main axis reaches the position set in
UINT StartMode StartModeParam.
2: Start when CamOnOff is set to 1 and the main axis moves the distance set in
StartModeParam.
3: Use the profile generated with LS_CrossSealCamGen.
LREAL StartModeParam Set the parameter according to the method for starting the cam operation.
6-197
Chapter 6 Motion Function Block
Output
BOOL InSync Indicates that cam operation has entered the RunCam state.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Active Indicate whether the current motion function block is controlling the relevant axis.
BOOL CommandAborted Indicate that the current motion function block is interrupted by other command.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
BOOL EndOfProfile Indicates the end of the current cam operation.
0: Stop status
1:OnCam operating
UINT CamState
2:RunCam operating
3:OffCam operating
(1) This motion function block uses three cam tables to carry out the cam operation that is switched to stop state->OnCam-
>RunCam or RunCam->OffCam->Stop state depending on the CamOnOff input.
MasterAxis
SlaveAxis
Execute
CamOnOff
InSync
EndOfProfile
CamState Stop On Run Off Stop On Off Stop
(2) The cam operation runs under a state where Execute is the rising Edge. The cam operation does not stop even if Execute
is changed to Off during the operation. To stop the OnOffCam operation, you must give the MC_CamOut command or run
another motion function block.
(3) Set the offset of the cam table to be applied in MasterOffset and SlaveOffset. MasterOffset determines the offset from the
master axis start point, and Slaveoffset determines the offset from the slave axis start point. Refer to the Figure below.
6-198
Chapter 6 Motion Function Block
Before After
applying applying
Serve axis
Position
After
applying
Serve axis
Position
Before
applying
SlaveOffset
(4) Set the magnification of cam data to be applied in MasterScaling and SlaveScaling. MasterScaling determines the scale rate
of the main-axis data, and SlaveScaling determines the scale rate of the sub-axis data. Refer to the Figure below.
After applying
SlaveScaling = 2.0 SlaveScaling
SlaveScaling = 1.0
After applying
MasterScaling
(5) If StartMode is set to 0, OnCam runs immediately when 1 is input in CamOnOff. If StartMode is set to 1, OnCam does not run
immediately when 1 is input in CamOnOff. But OnCam runs when the position of the main axis passes by the position set in
StartModeParam. If StartMode is set to 2, OnCam runs when 1 is input in CamOnOff and then the main axis moves the
distance set in StartModeParam.
(6) If you are using a cam generated with the LS_CrossSealCamGen function block, set StartMode to 3. If StartMode is set to 3
and the length of OnCam_ID is 270, the same operation is conducted as if StartMode is set to 1 and StartModeParam is 270.
If OnCam_ID is 180, the same operation is conducted as if StartMode is set to 1 and StartModeParam is set to 0.
(7) When MasterOffset/SlaveOffset is set, if 1 is input in CamOnOff, operation starts at the OnOffCam start position set in
StartMode and StartModeParam. The OnOffCam operation is conducted when reaching the OnOffCam start position. If
MasterOffset/SlaveOffset is set, StartMode is set to 0 and the OnOffCam operation is conducted, impact can occur when
starting operation.
6-199
Chapter 6 Motion Function Block
OnOffCam
StartPosition
SlaveOffset
MasterOffset
Execute
CamOnOff
InSync
EndOfProfile
CamState Stop On Run
(8) The EndOfProfile signal outputs On when passing the end of a profile during operation of each OnCam/OffCam/RunCam cam
profile.
(9) If the CamOnOff signal is Off, the operation is performed to switch to RunCam->OffCam->Stop state. If the CamOnOff signal
is switched from Off to On in the RunCam state, the RunCam state is maintained if OffCam is not yet executed. In a state
where OffCam is executed, the state switches to the OnCam->RunCam state again after switching to the OffCam->Stop state.
(When turning off CamOnOff in RunCam, the operation must be maintained until the EndOfProfile signal is generated.)
SlaveAxis
CamOnOff
EndOfProfile
CamState Run Off Stop On Run Off
(10) If the SkipOnCam signal is On, RunCam is executed instantly without OnCam. If CamOnOff turns off after executing RunCam,
perform the operation to switch to RunCam->OffCam->Stop state. In an operation where the SkipOnCam signal is On, the
operation is executed from the middle of RunCam.
(11) If the SkipRunnCam signal is On, OffCam is executed without RunCam being executed after OnCam is executed. If CamOnOff
is On at this time, the operation repeats in the order of OnCam->OffCam->Stop->OnCam->OffCam->Stop.
(12) To stop the OnOffCam operation completely, use the halt (MC_Halt) or immediate stop (MC_Stop) motion function block.
(13) The CamState value is output as Stop(0) / OnCam(1) / RunCam(2) / OffCam(3) depending on the state of cam operation.
(14) Once the cam operation set in RunCam_ID is executed, InSync output turns On.
(15) MasterValueSource selects the source of the main axis to be synchronized. If set to 0, the serve axis performs cam
operations based on the command position of the main axis calculated in the motion controller, and if set to 1, the serve axis
performs cam operations based on the current position received via communication from the servo drive of the main axis.
(16) RunCam_ID sets the cam profile to execute during the operation of OnOffCam. The cam profile to execute during operation
of OnOffCam is set to RunCam_ID. Before executing RunCam in the Stop state, the cam profile to run is set to OnCam_ID.
OffCam_ID sets the cam profile to execute before RunCam reaches the Stop state. The setting range for each ID is 1-32, and
an input value outside of the range causes a "0x1115" error in the motion function block.
(17) Any changes made to the MasterValueSource/OnCam_ID/RunCam_ID/OffCam_ID value during operation are not reflected.
(18) The value of the major axis can be changed during OnCam/RunCam/OffCam operation.(V1.5 or higher)
(19) The corresponding axis is in a "SynchronizedMotion” state when this motion function block is running.
(20) For more information, see Chapter 8.6 RotaryKnife Operation under Chapter 8 Motion Control Function.
6-200
Chapter 6 Motion Function Block
LS_MasterPLoopControlOn
BOOL Execute InControl BOOL
UINT Axis Axis UINT
LREAL P_Gain Busy BOOL
LREAL I_Gain Active BOOL
LREAL VelFF_Gain CommandAborted BOOL
LREAL CtrlLimit Error BOOL
ErrorID WORD
Input-Output
UINT Axis Set the command axis. ( refer to See 6.2.1 Setting Range by Product)
Input
Execute master position loop control command to the relevant axis in the rising
BOOL Execute
Edge.
LREAL P_Gain Set the master position loop control proportional gain. (1/ 1000 Unit)
LREAL I_Gain Set the master position loop control integral gain. (1/ 1000 Unit)
LREAL VelFF_Gain Set the master position loop control speed FeedForward gain. (1/ 1000 Unit)
LREAL CtrlLimit Set the master position loop control output limit value.
Output
BOOL InControl Indicates that the master position loop control is operating normally.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Active Indicate that machine information setting of the current axis is running.
BOOL CommandAborted Indicate that the current motion function block is interrupted while it is running.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
(1) This motion function block is used to execute the ‘position loop control’ in the servo drive connected as a slave in the CPU of
the standalone motion controller (XMC).
(2) When the command is executed, the execution mode of the servo drive input to the axis is changed to CSV mode, and the
difference (position error) between the command position and the current position of the axis is input to the PI-FF controller
operated by the master.
(3) The target speed (0x60FF) object must be added to the RxPDO List, and the CSV operation mode must be supported in the
servo drive.
(4) It can be executed on any axis that can be commanded, and after execution, the axis can be driven with an existing motion
command.
(5) It can be executed only when the axis is not in operation. If it is executed while the axis is operating, an error “0x1230” occurs.
When the gain tuning of the controller is required, it is applied when the gain is modified while the instruction is being executed.
Gain correction is possible even when the axis is running.
(6) Only positive numbers can be input for the master position loop control output limit specified in CtrlLimit, and the input value acts
as the output upper limit, and the value obtained by multiplying the input value by -1 acts as the output lower limit.
(7) If both the master position loop control output limit and integral gain items are not 0, Anti Wind-up operates for the controller
integral operation.
(8) If the gain of the master position loop control is not appropriate, the system may become unstable.
6-201
Chapter 6 Motion Function Block
(9) If necessary, the drive's speed controller gain should be tuned. Please refer to the user manual of the drive.
(10) If homing start is executed while master position loop control is in operation, error “0x10B8” occurs. When homing start is required,
cancel the master position loop control and execute homing start.
6-202
Chapter 6 Motion Function Block
LS_MasterPLoopControlOff
BOOL Execute Done BOOL
UINT Axis Axis UINT
Busy BOOL
Error BOOL
ErrorID WORD
Input-Output
UINT Axis Set the command axis. ( refer toSee 6.2.1 Setting Range by Product)
Input
Execute master position loop control release command to the relevant axis in the
BOOL Execute
rising Edge.
Output
BOOL Done Indicates that master position loop control release has been completed successfully.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
(1) This motion function block is used to release the position loop control being executed by the CPU of the standalone motion
controller (XMC).
(2) If the release command is executed on the axis where the master position loop control is running, the InControl status of the
function block where the command was executed is turned off, the CommanAborted output is turned on, and the master
position loop control is released.
(3) If the release command is executed on the axis that does not execute the master position loop control, the Done output turns on
without any action.
(4) Release command can only be executed when the axis is not in operation.
6-203
Chapter 6 Motion Function Block
LS_CrossCoupledControlOn
BOOL Execute InControl BOOL
UINT Axis Axis UINT
UINT PairAxis PairAxis UINT
LREAL P_Gain Busy BOOL
BOOL SlaveMode Active BOOL
CommandAborted BOOL
Error BOOL
ErrorID WORD
Input-Output
UINT Axis Set the command axis. ( refer toSee 6.2.1 Setting Range by Product)
UINT PairAxis Set the connection axis. ( refer toSee 6.2.1 Setting Range by Product)
Input
BOOL Execute Execute Cross- coupled control command to the relevant axis in the rising Edge.
LREAL P_Gain Set the master position loop control proportional gain. (1/ 1000 Unit)
BOOL SlaveMode Select the slave operation mode. (Unused)
Output
BOOL Done Indicates that the Cross-coupled control operating normally.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Active Indicate that machine information setting of the current axis is running.
BOOL CommandAborted Indicate that the current motion function block is interrupted while it is running.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
(1) This motion function block is used to execute cross-coupled control between two axes under ‘position loop control’.
(2) You need to set the Axis and PairAxis different axes where the master position loop controller is running. If you input the same
value to Axis and PairAxis and execute it, an error “0x1235” occurs in the function block,If the master position loop controller
inputs and executes an axis that is not being executed, an error “0x1236” occurs in the function block.
(3) One cross-coupled control function block can be executed. If the command is re-executed while it is not released, the error
“0x1238” occurs in the function block if it is input differently from the Axis and PairAxis set in the previously executed Cross-
coupled control function block and executed.
(4) It can be executed only when the axis is not in operation. If it is executed while the axis is operating, an error “0x1234” occurs.
When the gain tuning of the controller is required, it is applied when the gain is modified while the instruction is being executed.
Gain correction is possible even when the axis is running.
(5) Since the cross-coupled control function reduces the difference in position error (position command value – current position
value) that occurs in each axis and the pair axis, the difference between the position command value and the current position
value of one axis is caused by an obstacle or an external load. When this occurs, control output is generated as much as the
position error of the same size on the other axis. During this process, the accumulated overload of the servo drive may increase
and a continuous overload alarm may occur. To avoid this phenomenon, it is necessary to set the maximum torque or torque
limit value smaller than the overload detection load factor so that the drive does not become a continuous overload condition.
When adjusting overload-related parameters, the drive may be damaged, so pay special attention to safety.
(6) If the gain of cross-coupled control is not appropriate, the system may become unstable.
6-204
Chapter 6 Motion Function Block
LS_CrossCoupledControlOff
BOOL Execute Done BOOL
UINT Axis Axis UINT
UINT PairAxis PairAxis UINT
Busy BOOL
Error BOOL
ErrorID WORD
Input-Output
UINT Axis Set the command axis. ( refer toSee 6.2.1 Setting Range by Product)
UINT PairAxis Set the connection axis. ( refer toSee 6.2.1 Setting Range by Product)
Input
Execute Cross- coupled control release command to the relevant axis in the rising
BOOL Execute
Edge.
Output
BOOL Done Indicates that Cross-coupled control release has been completed successfully.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
(7) This motion function block is used to release the Cross-coupled control being executed by the CPU of the standalone motion
controller (XMC).
(8) If a release command is executed on two axes where cross-coupled control is running, cross-coupled control is released, the
InControl status of the function block where the command was executed is turned off, and the CommandAborted output is
turned on.
(9) If the release command is executed on an axis that is not under cross-coupled control, an error “0x1238” occurs in the function
block.
(10) It can be executed only when the axis is not in operation. If it is executed while the axis is operating, an error “0x1234” occurs.
6-205
Chapter 6 Motion Function Block
LS_VarGearInEx
BOOL Execute InGear BOOL
UDINT VarOffset VarOffset UINT
UINT Slave Slave UINT
BOOL ContinousUpdate Busy BOOL
DINT RatioNumerator Active BOOL
UDINT RatioDenominator CommandAborted BOOL
UINT MasterValueSource Error BOOL
LREAL Acceleration ErrorID WORD
LREAL Deceleration
LREAL Jerk
UINT BufferMode
Input-Output
Set the offset value of the M device where the variable to be used as the main axis
UDINT VarOffset
is located.
UINT Slave Set the sub axis. ( refer toSee 6.2.1 Setting Range by Product)
Input
BOOL Execute Give gear operation command to the relevant axis in the rising Edge.
Specify the update setting of input value.
BOOL ContinuousUpdate (Refer to 6.1.5.Changes in Parameters during Execution of Motion Function
Block)
DINT RatioNumerator Specify the numerator of gear ratio. (-2147483648 ~ 2147483647)
UDINT RatioDenominator Specify the denominator of gear ratio. (0 ~ 4294967295)
Select data of the main axis to be synchronized.
UINT MasterValueSource 0: Synchronize in the command position of the main axis.
1: Synchronize in the current position of the main axis.
LREAL Acceleration Specify the acceleration at the beginning of gear operation synchronization. [u/s2]
LREAL Deceleration Specify the deceleration at the beginning of gear operation synchronization. [u/s2]
LREAL Jerk Specify the change rate of acceleration/deceleration. [u/s3]
Specify the sequential operation setting of motion function block.
UINT BufferMode
(Refer to 6.1.4.BufferMode input)
Output
BOOL InGear Indicate that gear operation is running by applying gear ration.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Active Indicate that the current motion function block is controlling the relevant axis.
BOOL CommandAborted Indicate that the current motion function block is interrupted while it is running.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
(1) In this motion function block, RatioNumerator input and RatioDenominator input are expanded to DINT and UDINT respectively.
(2) The rest of the settings and functions are the same as those of the LS_VarGearIn function block. Please refer to the description
of the LS_VarGearIn function block.
6-206
Chapter 6 Motion Function Block
LS_VarGearInPosEx
BOOL Execute InSync BOOL
UDINT VarOffset VarOffset UINT
UINT Slave Slave UINT
DINT RatioNumerator Busy BOOL
UDINT RatioDenominator Active BOOL
UINT MasterValueSource CommandAborted BOOL
LREAL MasterSyncPosition Error BOOL
LREAL SlaveSyncPosition ErrorID WORD
UINT SyncMode
LREAL MasterStartDistance
LREAL Acceleration
LREAL Deceleration
LREAL Jerk
UINT BufferMode
Input-Output
Set the offset value of the M device where the variable to be used as the
UDINT VarOffset
main axis is located.
UINT Slave Set the sub axis. ( refer toSee 6.2.1 Setting Range by Product)
Input
BOOL Execute Give gear operation command to the relevant axis in the rising Edge.
DINT RatioNumerator Specify the numerator of gear ratio. (-2147483648 ~ 2147483647)
UDINT RatioDenominator Specify the denominator of gear ratio. (0 ~ 4294967295)
Select the standard of the main axis value to be synchronized.
UINT MasterValueSource 0(mcSetValue): Synchronize in the target position of the main axis.
1(mcActualValue): Synchronize in the current position of the main axis.
LREAL MasterSyncPosition Specify the position of the main axis where gear operation starts.
LREAL SlaveSyncPosition Specify the position of the spindle where gear operation starts.
LREAL SyncMode Unused
LREAL MasterStartDistance Specify the distance of the main axis where synchronization starts.
Specify the maximum speed of the spindle at the beginning of
LREAL Velocity
synchronization. [u/s]
Specify the maximum acceleration of the spindle at the beginning of
LREAL Acceleration
synchronization. [u/s2]
Specify the maximum deceleration of the spindle at the beginning of
LREAL Deceleration
synchronization. [u/s2]
LREAL Jerk Unused
Specify the sequential operation setting of motion function block.
UINT BufferMode
(Refer to 6.1.4.BufferMode input)
Output
Indicate that gear operation is normally being fulfilled as the specified gear
BOOL InSync
ratio is applied.
BOOL StartSync Indicate synchronization is starting.
BOOL Busy Indicate that the execution of motion function block is not completed.
6-207
Chapter 6 Motion Function Block
BOOL Active Indicate that the current motion function block is controlling the relevant axis.
Indicate that the current motion function block is interrupted while it is
BOOL CommandAborted
running.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
(1) In this motion function block, RatioNumerator input and RatioDenominator input are expanded to DINT and UDINT
respectively.
(2) The rest of the settings and functions are the same as those of the LS_VarGearInPos function block. Please refer to the
description of the LS_VarGearInPos function block.
6-208
Chapter 6 Motion Function Block
MC_SetKinTransform
BOOL Execute Done BOOL
UINT AxesGroup AxesGroup UINT
UINT KinType Busy BOOL
UINT KinExtParam Active BOOL
ARRAY[0..11] OF LREAL[ ] KinParam CommandAborted BOOL
LREAL ToolOffsetX Error BOOL
LREAL ToolOffsetY ErrorID WORD
UINT ToolOffsetZ
Input-Output
UINT AxesGroup Set the axes group to set the machine information. (1 ~ 16: 1Group ~ 16 Group)
Input
BOOL Execute Give the machine information setting command on the axis in the rising Edge.
Set the machine type.
UINT KinType (1:XYZ, 2:Delta3, 3:Delta3R, 4:LinearDelta3,�5:LinearDelta3R, 6:T-Gantry, 7:T-
GantryR )
UINT KinExtParam Unused
LREAL[] KinParam Set the machine information.
LREAL ToolOffsetX Set the X axis offset of at the end of the machine.
LREAL ToolOffsetY Set the Y axis offset of at the end of the machine.
LREAL ToolOffsetZ Set the Z axis offset of at the end of the machine.
Output
BOOL Done Indicate the machine information setting is successfully completed.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Active Indicate that machine information setting of the current axis is running.
BOOL CommandAborted Indicate that the current motion function block is interrupted while it is running.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
(1) This motion function block sets the ACS and MCS conversion based on the machine model defined in advance at AxesGroup.
(2) The same setting can be applied to the XG5000 group parameter settings.
6-209
Chapter 6 Motion Function Block
(3) The KinType input is used to set the type of the device. You can set the device as shown below.
1) 0: none
2) 1: XYZ
3) 2: Delta3
4) 3: Delta3R
5) 4: LinearDelta3
6) 5: LinearDelta3R
7) 6: T-Gantry
8) 7: T-GantryR
(4) KinParam input is used to set the device information. (It is not set for XYZ type.)
(5) ToolOffsetX / ToolOffsetY / ToolOffsedZ are the functions to set the offset at the end point of the device. In order to cope with the
case where a separate device is connected to the end of the TCP of the robot, the tool offset function is provided separately from
the device information.
Z mcs
X mcs
Axis2
Axis1
Y mcs
Axis3
ToolOffsetZ
ToolOffsetX
ToolOffsetY TCP
(6) When using Delta3, the device setting information is as follows. For more information, refer to 8.4.4 Machine information setting.
6-210
Chapter 6 Motion Function Block
Parameter Description
Rf
KinParam[0] Lf:Link length of the fixed frame(mm)
KinParam[1] Lm: Link length of the moving frame(mm)
KinParam[2] Rf: Length from the center of the fixed frame to the
link of the fixed frame (mm)
KinParam[3] Rm: Length from the center of the moving frame
to the link of the moving frame (mm)
Rm
6-211
Chapter 6 Motion Function Block
MC_SetCartesianTransform
BOOL Execute Done BOOL
UINT AxesGroup AxesGroup UINT
LREAL TransX Busy BOOL
LREAL TransY Active BOOL
LREAL TransZ CommandAborted BOOL
LREAL RotAngleA Error BOOL
LREAL RotAngleB ErrorID WORD
LREAL RotAngleC
Input-Output
UINT AxesGroup Set the group to set the PCS. (1 ~ 16: 1Group ~ 16 Group)
Input
BOOL Execute Give the PCS setting command on the axes group in the rising Edge.
LREAL TransX Movement from MCS to X Axis(mm)
LREAL TransY Movement from MCS to Y Axis(mm)
LREAL TransZ Movement from MCS to Z Axis(mm)
LREAL RotAngleA X Axis rotation amount (degree) (reserved)
LREAL RotAngleB Y Axis rotation amount (degree) (reserved)
LREAL RotAngleC Z Axis rotation amount (Degree)
Output
BOOL Done Indicate the PCS setting is successfully completed.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Active Indicate that machine information setting of the current axis is running.
BOOL CommandAborted Indicate that the current motion function block is interrupted while it is running.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
(1) This motion function block sets the perpendicular coordinate conversion between MCS and PCS at AxesGroup.
(2) Axis group setting can be performed in the same way at XG5000 axis group parameter setting.
6-212
Chapter 6 Motion Function Block
(3) TransX/TransY/TransZ is the move distance from MCS origin to PCS origin. RotA/RotB/RotC is the rotation value of PCS, RotA
is the value that rotates PCS on the X-axis of PCS, RotB is the value that rotates PCS on the Y-axis of PCS, RotC is the value
that rotates PCS on the Z-axis of PCS. The rotation of PCS must be done the order of RotC, RotB, RotA. Refer to chapter 8.4.3
PCS setting in motion controller’s manual for more details.
Z mcs
Z pcs
Y mcs Y pcs
TransZ
X pcs
TransX
TransY
X mcs
Zpcs=Z`pcs Z`pcs
Z``pcs
RotC Z``pcs Z```pcs
Y```pcs
Y`pcs RotB
Y`pcs=Y``pcs Y``pcs
Ypcs
RotA
X`pcs X`pcs
X``pcs X```pcs=X``pcs
6-213
Chapter 6 Motion Function Block
LS_SetWorkspace
BOOL Execute Done BOOL
UINT AxesGroup AxesGroup UINT
UINT WorkspaceType Busy BOOL
BOOL WorkspaceError Active BOOL
ARRAY[0..7] OF LREAL[ ] WorksapceParam CommandAborted BOOL
Error BOOL
ErrorID WORD
Input-Output
UINT AxesGroup Set the axes group to set the workspace. (1 ~ 16: 1Group ~ 16 Group)
Input
BOOL Execute Give the work space setting command on the axes group in the rising Edge.
Set the work space type
UINT WorkspaceType
(0:Rectangle 1:Cylinder 2:Delta3 3:Sector)
Set whether an error occurs or not when a coordinate system operation exceeds
BOOL WorkspaceError
the work space.
LREAL[] WorkspaceParam Set the parameter of the work space.
Output
BOOL Done Indicate the PCS setting is successfully completed.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Active Indicate that machine information setting of the current axis is running.
BOOL CommandAborted Indicate that the current motion function block is interrupted while it is running.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
(1) This motion function block sets the work space based on the coordinate system at the axes group designated by AxesGroup
input.
(2) The same setting can be applied to the XG5000 group parameter settings.
(3) WorkspaceType can be selected from 4 types (0: Rectangle 1: Cylinder 2: Delta3 3: Sector).
(4) WorkspaceError input determines whether an error occurs when a coordinate system operation exceeds the work space.
6-214
Chapter 6 Motion Function Block
(5) WorkspaceParam input sets the parameters depending on the work space type.
(6) The parameter setting of work space is explained as follows. Refer to chapter 8.4.5 Workspace setting in motion controller’s
manual for more details.
1) Rectangle
Parameter Value
WorkspaceParam[0] X max(mm)
Y Axis
WorkspaceParam[1] X min(mm)
WorkspaceParam[2] Y max(mm)
WorkspaceParam[3] Y min(mm)
WorkspaceParam[4] Z max(mm)
Ymax
X Axis
2) Cylinder
Parameter Value
WorkspaceParam[0] Radius(mm)
Z Axis Radius WorkspaceParam[1] Z max(mm)
WorkspaceParam[2] Z min(mm)
Zmax
Zmin
X Axis
3) Delta
Z Axis
Parameter Value
YAxis WorkspaceParam[0] Zu(mm)
WorkspaceParam[1] Hcy(mm)
WorkspaceParam[2] Hco(mm)
WorkspaceParam[3] Rcy(mm)
Zu
WorkspaceParam[4] Rco(mm)
Rcy
WorkspaceParam[5] -
Hco Hcy
Rco
6-215
Chapter 6 Motion Function Block
4) Sector
Parameter Value
WorkspaceParam[0] L end (mm)
Y Axis
WorkspaceParam[1] L start(mm)
WorkspaceParam[2] Z max(mm)
WorkspaceParam[3] Z min(mm)
WorkspaceParam[4] EndAngle(degree)
WorkspaceParam[5] StartAngle(degree)
EndAngle
StartAngle
X Axis
6-216
Chapter 6 Motion Function Block
(LS_MoveLinearAbsolute)
LS_MoveLinearAbsolute
BOOL Execute Done BOOL
UINT AxesGroup AxesGroup UINT
UINT CoordSystem Busy BOOL
ARRAY[0..5] OF LREAL[ ] Position Active BOOL
LREAL Velocity CommandAborted BOOL
LREAL Acceleration Error BOOL
LREAL Deceleration ErrorID WORD
LREAL Jerk
UINT BufferMode
UINT TransitionMode
LREAL TransitionParameter
Input-Output
Set the axes group to set the absolute position time linear interpolation.
UINT AxesGroup
(1 ~ 16: 1Group ~ 16 Group)
Input
BOOL Execute Give the linear interpolation command on the axes group in the rising Edge.
UINT CoordSystem Set the coordinate system type (1:MCS 2:PCS)
LREAL[] Position Enter the target position of the end point of the machine.
LREAL Velocity Specify the maximum speed. [u/s]
LREAL Acceleration Specify the maximum acceleration. [u/s2]
LREAL Deceleration Specify the maximum deceleration. [u/s2]
LREAL Jerk Specify the change rate of acceleration/deceleration. [u/s3]
Specify the sequential operation setting of motion function block.
UINT BufferMode
(Refer to 6.1.4.BufferMode input)
Specify the route change mode of group operation.
UINT TransitionMode
(Refer to 6.1.6.TransitionMode)
Specify the parameter of the route change setting of group operation.
LREAL TransitionParameter
(Refer to 6.1.6.TransitionMode)
Output
Indicates that the coordinate system absolute position linear interpolation operation
BOOL Done
has been successfully completed.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Active Indicate that machine information setting of the current axis is running.
BOOL CommandAborted Indicate that the current motion function block is interrupted while it is running.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
(1) This motion function block issues absolute position linear interpolation command based on coordinate system on the axes
group designated by AxesGroup input
(2) When this motion function block is executed, interpolation control is performed in a linear trajectory from the machine end point
6-217
Chapter 6 Motion Function Block
sqrt((𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡 𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝 − 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝)2 + (𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡 𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝 − 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝) 2 + (𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡 𝑝𝑝𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜 − 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝)2 ),
= MAX � �
angular distance conversion constant value ∗ sqrt((𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡 𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝 − 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝)2 + (𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡 𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝 − 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝)2 + (𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡 𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑡𝑡𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖 − 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝)2 )
(5) If the function block is re-executed (Execute input is On) before the instruction is terminated, the changed parameters are
applied.
(6) Only Velocity, Acceleration, Deceleration, Jerk, Position input can be updated.
(7) Velocity input can be set to 0 or changed.
(8) Example program
This example shows the linear interpolation to the target position of MCS (100, 200,0) when the current command position is
0,0,0 of MCS coordinate system.
(a) Function block setting
Target
목표위치
positionsitio
6-218
Chapter 6 Motion Function Block
%MX1
MC_MoveLinearAbsolute.Done
MC_MoveLinearAbsolute.Busy
MC_MoveLinearAbsolute.Active
AG01_CMD_VEL
AG01_MTCP_Px
AG01_MTCP_Py
6-219
Chapter 6 Motion Function Block
(LS_MoveLinearRelative)
LS_MoveLinearRelative
BOOL Execute Done BOOL
UINT AxesGroup AxesGroup UINT
UINT CoordSystem Busy BOOL
ARRAY[0..5] OF LREAL[ ] Distance Active BOOL
LREAL Velocity CommandAborted BOOL
LREAL Acceleration Error BOOL
LREAL Deceleration ErrorID WORD
LREAL Jerk
UINT BufferMode
UINT TransitionMode
LREAL TransitionParameter
Input-Output
Set the axes group to set the Incremental position linear interpolation.
UINT AxesGroup
(1 ~ 16: 1Group ~ 16 Group)
Input
Give the incremental position linear interpolation command on the axes group in
BOOL Execute
the rising Edge.
UINT CoordSystem Set the coordinate system type (1:MCS 2:PCS)
LREAL[] Distance Enter the movement distance of the end point of the machine.
LREAL Velocity Specify the maximum speed. [u/s]
LREAL Acceleration Specify the maximum acceleration. [u/s2]
LREAL Deceleration Specify the maximum deceleration. [u/s2]
LREAL Jerk Specify the change rate of acceleration/deceleration. [u/s3]
Specify the sequential operation setting of motion function block.
UINT BufferMode
(Refer to 6.1.4.BufferMode input)
Specify the route change mode of group operation.
UINT TransitionMode
Reference
Specify the parameter of the route change setting of group operation.
LREAL TransitionParameter
(Refer to 6.1.6.TransitionMode)
Output
Indicates that the coordinate system incremental position linear interpolation
BOOL Done
operation has been successfully completed.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Active Indicate that machine information setting of the current axis is running.
BOOL CommandAborted Indicate that the current motion function block is interrupted while it is running.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
(1) This motion function block issues Incremental position linear interpolation command based on coordinate system on the axes
group designated by AxesGroup input
6-220
Chapter 6 Motion Function Block
(2) When this motion function block is executed, interpolation control is performed in a linear trajectory from the machine end point
of each axes group to the target position.
(3) Specify the speed, acceleration, deceleration, and the change rate of acceleration/deceleration of interpolation operation in
Velocity, Acceleration, Deceleration, and Jerk inputs respectively.
(4) Velocity is to set the maximum speed of interpolation operation, and the standard travel distance for interpolation operation is
the combined distance of the target position (Position [0]~Position[2]) and the angle value (Position[3]~Position[5]) The larger
value of the product of the composite distance of and the angular distance conversion constant of the axis group parameter is
used as the standard travel distance. If the position value of the target position is the same as the position value of the current
position and the angular distance conversion constant value of the axis group parameter is 0, the reference travel distance
value of the coordinate system operation is used as the combined distance value of the angle value of the target position.
Travel distance
sqrt((𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡 𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝 − 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝)2 + (𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡 𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝 − 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝)2 + (𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡 𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝 − 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝) 2 ),
= MAX � �
angular distance conversion constant value ∗ sqrt((𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡 𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝 − 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝)2 + (𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡 𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝 − 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝)2 + (𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡 𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝 − 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝)2 )
(5) If the function block is re-executed (Execute input is On) before the instruction is terminated, the changed parameters are
applied.
(6) Only Distance, Velocity, Acceleration, Deceleration, Jerk, Distance input can be updated.
(7) Velocity input can be set to 0 or changed.
6-221
Chapter 6 Motion Function Block
6.7.6 Time Linear Interpolation Operation for Absolute Position of Coordinate System
(LS_MoveLinearTimeAbsolute)
LS_MoveLinearTimeAbsolute
BOOL Execute Done BOOL
UINT AxesGroup AxesGroup UINT
UINT CoordSystem Busy BOOL
ARRAY[0..5] OF LREAL[ ] Position Active BOOL
UINT TrajType CommandAborted BOOL
LREAL TrajTime Error BOOL
UINT BufferMode ErrorID WORD
UINT TransitionMode
LREAL TransitionParameter
Input-Output
Set the axes group to set the absolute position time linear interpolation.
UINT AxesGroup
(1 ~ 16: 1Group ~ 16 Group)
Input
BOOL Execute Give the time linear interpolation command on the axes group in the rising Edge.
UINT CoordSystem Set the coordinate system type (1:MCS 2:PCS)
LREAL[] Position Enter the target position of the end point of the machine.
UINT TrajType Enter the operation acc/dec type.(0:Trapezoid 1:Sine1 2:Sine2)
LREAL TrajTime Set the time taken to reach the target position.(msec)
Specify the sequential operation setting of motion function block.
UINT BufferMode
(Refer to 6.1.4.BufferMode input)
Specify the route change mode of group operation.
UINT TransitionMode
(Refer to 6.1.6.TransitionMode)
Specify the parameter of the route change setting of group operation.
LREAL TransitionParameter
(Refer to 6.1.6.TransitionMode)
Output
BOOL Done Indicate the PCS setting is successfully completed.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Active Indicate that machine information setting of the current axis is running.
BOOL CommandAborted Indicate that the current motion function block is interrupted while it is running.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
(1) This motion function block issues absolute position/time linear interpolation command based on coordinate system on the axes
group designated by AxesGroup input
(2) When this motion function block is executed, interpolation control is performed in a linear trajectory from the machine end point
of each axes group to the target position.
(3) TrajType input sets the type of velocity, acceleration, deceleration of interpolation trajectory. The type can be selected from three
6-222
Chapter 6 Motion Function Block
types: Trapezoid/Sine1/Sine2.
(4) TrajTime sets the time taken to reach the target position.
(5) Please refer to 8. 4. 6 Coordinate System Absolute Position/Time Linear Interpolation Control for further details.
(6) Example program
This example shows the linear interpolation to the target position of MCS (100, 200,-380) when the current command position
is 0,0,-380 of MCS coordinate system.
(a) Function block setting
Target
목표위치
positionsitio
MC_MoveLinearTimeAbsolute.Done
MC_MoveLinearTimeAbsolute.Busy
MC_MoveLinearTimeAbsolute.Active
6-223
Chapter 6 Motion Function Block
6.7.7 Time Linear Interpolation Operation for Incremental Position of Coordinate System
(LS_MoveLinearTimeRelative)
LS_MoveLinearTimeRelative
BOOL Execute Done BOOL
UINT AxesGroup AxesGroup UINT
UINT CoordSystem Busy BOOL
ARRAY[0..5] OF LREAL[ ] Position Active BOOL
UINT TrajType CommandAborted BOOL
LREAL TrajTime Error BOOL
UINT BufferMode ErrorID WORD
UINT TransitionMode
LREAL TransitionParameter
Input-Output
Set the axes group to set the Incremental position time linear interpolation.
UINT AxesGroup
(1 ~ 16: 1Group ~ 16 Group)
Input
BOOL Execute Give the time linear interpolation command on the axes group in the rising Edge.
UINT CoordSystem Set the coordinate system type (1:MCS 2:PCS)
LREAL[] Position Enter the target position of the end point of the machine.
UINT TrajType Enter the operation acc/dec type.(0:Trapezoid 1:Sine1 2:Sine2)
LREAL TrajTime Set the time taken to reach the target position.(msec)
Specify the sequential operation setting of motion function block.
UINT BufferMode
(Refer to 6.1.4.BufferMode input)
Specify the route change mode of group operation.
UINT TransitionMode
Refer to (6.1.6.TransitionMode)
Specify the parameter of the route change setting of group operation.
LREAL TransitionParameter
Refer to(6.1.6.TransitionMode)
Output
BOOL Done Indicate the PCS setting is successfully completed.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Active Indicate that machine information setting of the current axis is running.
BOOL CommandAborted Indicate that the current motion function block is interrupted while it is running.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
(1) This motion function block issues relative position/time linear interpolation command based on coordinate system on the axes
group designated by AxesGroup input
(2) When this motion function block is executed, interpolation control is performed in a linear trajectory from the machine end point
of each axes group to the target position.
(3) TrajType input sets the type of velocity, acceleration, deceleration of interpolation trajectory. The type can be selected from three
types: Trapezoid/Sine1/Sine2.
6-224
Chapter 6 Motion Function Block
(4) TrajTime sets the time taken to reach the target position.
(5) Please refer to 8. 4. 7 Coordinate System Relative Position/Time Linear Interpolation Control for further details.
6-225
Chapter 6 Motion Function Block
(MC_MoveCircularAbsolute2D)
MC_MoveCircularAbsolute2D
BOOL Execute Done BOOL
UINT AxesGroup AxesGroup UINT
UINT CircMode Busy BOOL
LREAL[ ] AuxPoint Active BOOL
LREAL[ ] EndPoint CommandAborted BOOL
UINT PathChoice Error BOOL
LREAL Velocity ErrorID WORD
LREAL Acceleration
LREAL Deceleration
LREAL Jerk
UINT CoordSystem
UINT BufferMode
UINT TransitionMode
LREAL TransitionParameter
Input-Output
Set the group to do absolute position circular interpolation operation. (1 ~ 16: 1Group
UINT AxesGroup
~ 16 Group)
Input
Give absolute position circular interpolation operation command to the relevant
BOOL Execute
group in the rising Edge.
UINT CircMode Circular interpolation method setting [0: Midpoint, 1: Center point, 2: Radius]
Specify the position of auxiliary point depending on the circular interpolation method
LREAL[ ] AuxPoint
in an absolute coordinate.
LREAL[ ] EndPoint Set the circular end point as an absolute coordinate.
Circular route selection
BOOL PathChoice
0: clockwise direction, 1: counter-clockwise direction
LREAL Velocity Specify the maximum speed of the route. [u/s]
LREAL Acceleration Specify the maximum acceleration. [u/s2]
LREAL Deceleration Specify the maximum deceleration. [u/s2]
LREAL Jerk Specify the change rate of acceleration/deceleration. [u/s3]
UINT CoordSystem Set the coordinate system type (1:MCS 2:PCS)
Specify the sequential operation setting of motion function block.
UINT BufferMode
(Refer to 6.1.4.BufferMode input)
UINT TransitionMode Unused
LREAL TransitionParameter Unused
Output
BOOL Done Indicate whether to reach the specified position.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Active Indicate that whether or not motion function block is controlling the group.
BOOL CommandAborted Indicate that the current motion function block is interrupted while it is running.
BOOL Error Indicates whether an error occurs or not.
6-226
Chapter 6 Motion Function Block
WORD ErrorID Output the number of error occurred while motion function block is running.
(1) This motion function block issues absolute position circular interpolation command based on coordinate system on the axis
group designated by AxesGroup input.
(2) When this motion function block starts, each axis performs circular trajectory interpolation control referring to the auxiliary point
input, and the movement direction is determined by Path Choice input. If PathChoice input is set to 0, circular interpolation is
operated in a clockwise direction, and if it is set to 1, circular interpolation is operated in a counter-clockwise direction.
(3) Specify the absolute position of the auxiliary point to refer when doing circular interpolation of each axis in AuxPoint and
EndPoint inputs as array. The input corresponds in the order of X, Y, Z, unlike MC_MoveCircularAbsolute.
(4) In Velocity, Acceleration, Deceleration, Jerk inputs, the acceleration, deceleration, change rate of acceleration, velocity of the
interpolation path are specified, respectively.
(5) Set the circular interpolation method in CircMode input. The circular interpolation methods corresponding to CircMode values
are as follows.
(a) Circular Interpolation Using Midpoint Specification (CircMode = 0)
This method performs circular interpolation by starting operation at the start position, passing the designated midpoint, and
reaching the target position. In the figure below, the start position corresponds to the axes group coordinate at the start of
the command, the midpoint corresponds to the coordinate input for the AuxPoint, and the target position corresponds to
the absolute coordinate input for the EndPoint.
Y
axis
StartPoint
EndPoint
AuxPoint
X axis
(b) Circular Interpolation Using Center Point Specification (CircMode = 1)
This method performs circular interpolation to the target position by starting operation at the current position, and following
a circular trajectory of which diameter corresponds to the distance to the designated center point. In the figure below, the
current position corresponds to the axes group coordinate at the start of the command, the center point corresponds to
the coordinate input for the AuxPoint, and the target position corresponds to the absolute coordinate input for the EndPoint.
6-227
Chapter 6 Motion Function Block
Y
axis
AuxPoint
EndPoint
CurrentPoint
X axis
Y
axis
Radius EndPoint
(AuxPoint)
CurrentPoint
X axis
(6) Refer to chapter 8.4.7 circular interpolation control in motion controller’s manual for more details.
(7) If the function block is re-executed (Execute input is On) before the instruction is terminated, the changed parameters are
applied.
Only, Velocity, Acceleration, Deceleration, Jerk, AuxPoint, Endpoint input can be updated.
(8) Velocity input can be set to 0 or changed.
(9) Example program
This example is to set the center point at (0, 75, -580) when the current command position is MCS (0,150,-580), and perform
circular interpolation to the target position MCS(0,0,-580) by moving in a clockwise direction.
(a) Function block setting
6-228
Chapter 6 Motion Function Block
Center
point
Target
position
MC_MoveCircularAbsolute2D.Done
MC_MoveCircularAbsolute2D.Busy
MC_MoveCircularAbsolute2D.Active
6-229
Chapter 6 Motion Function Block
(MC_MoveCircularRelative2D)
MC_MoveCircularRelative2D
BOOL Execute Done BOOL
UINT AxesGroup AxesGroup UINT
UINT CircMode Busy BOOL
LREAL[ ] AuxPoint Active BOOL
LREAL[ ] EndPoint CommandAborted BOOL
UINT PathChoice Error BOOL
LREAL Velocity ErrorID WORD
LREAL Acceleration
LREAL Deceleration
LREAL Jerk
UINT CoordSystem
UINT BufferMode
UINT TransitionMode
LREAL TransitionParameter
Input-Output
Set the group to do relative position circular interpolation operation. (1 ~ 16: 1Group
UINT AxesGroup
~ 16 Group)
Input
Give relative position circular interpolation operation command to the relevant group
BOOL Execute
in the rising Edge.
UINT CircMode Circular interpolation method setting [0: Midpoint, 1: Central point, 2: Radius]
Specify the position of auxiliary point depending on the circular interpolation method
LREAL[ ] AuxPoint
as the relative coordinate based on the starting point.
Specify the end point of circular arc as the relative coordinate based on the starting
LREAL[ ] EndPoint
point.
Circular route selection
BOOL PathChoice
0: clockwise direction, 1: counter-clockwise direction
LREAL Velocity Specify the maximum speed of the route. [u/s]
LREAL Acceleration Specify the maximum acceleration. [u/s2]
LREAL Deceleration Specify the maximum deceleration. [u/s2]
LREAL Jerk Specify the change rate of acceleration/deceleration. [u/s3]
UINT CoordSystem Set the coordinate system type (1:MCS 2:PCS)
Specify the sequential operation setting of motion function block.
UINT BufferMode
(Refer to 6.1.4.BufferMode input)
UINT TransitionMode Unused
LREAL TransitionParameter Unused
Output
BOOL Done Indicate whether to reach the specified position.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Active Indicate that whether or not motion function block is controlling the group.
BOOL CommandAborted Indicate that the current motion function block is interrupted while it is running.
6-230
Chapter 6 Motion Function Block
This motion function block issues relative position circular interpolation command on the axes group designated by AxesGroup
input.
(1) When this motion function block starts, each axis performs circular trajectory interpolation control referring to the auxiliary point
input, and the movement direction is determined by Path Choice input. If PathChoice input is set to 0, circular interpolation is
operated in a clockwise direction, and if it is set to 1, circular interpolation is operated in a counter-clockwise direction.
(2) At AuxPoint and EndPoint input, designate the arrangement of the relative position of auxiliary points to refer to for circular
interpolation of each axis. The input arrangement and the axes of the group correspond to the designated axis IDs [ID1, ID2,
ID3, ∙∙∙ ], in that order. (The 3 LEAL type sized array should be entered in Position input as there are 3 axes which comprise
the group to give a circular interpolation operation command.)
(3) In Velocity, Acceleration, Deceleration, Jerk inputs, the acceleration, deceleration, change rate of acceleration, velocity of the
interpolation path are specified, respectively.
(4) Set the circular interpolation method in CircMode input. The circular interpolation methods corresponding to CircMode values
are as follows.
(a) Circular interpolation of midpoint specifying method (BORDER, CircMode = 0) in this method, operation starts at the
current position and it does circular interpolation through the pecified position of the central point to the target position. In
the figure below, the current position corresponds to the axes group coordinate at the start of the command, the midpoint
corresponds to the coordinate input for the AuxPoint, and the target position corresponds to the relative coordinate input
for the EndPoint.
Y
axis
StartPoint
EndPoint
AuxPoint
X axis
(b) Circular interpolation of central point specifying method in this method, operation starts at the current position, and it does
circular interpolation to the target position along the circular path, which has a radius of the distance to the specified central
position. In the figure below, the current position corresponds to the axes group coordinate at the start of the command,
the center point corresponds to the coordinate input for the AuxPoint, and the target position corresponds to the relative
coordinate input for the EndPoint.
6-231
Chapter 6 Motion Function Block
Y
axis
AuxPoint
EndPoint
Start Point
X axis
Y
axis
Radius
(AuxPoint)
EndPoint
StartPoint
X axis
(5) Refer to chapter 8.4.7 circular interpolation control in motion controller’s manual for more details.
(6) If the function block is re-executed (Execute input is On) before the instruction is terminated, the changed parameters are
applied.
Only, Velocity, Acceleration, Deceleration, Jerk, AuxPoint, Endpoint input can be updated.
(7) Velocity input can be set to 0 or changed.
(8) Example program
This example is to set the center point specification method when the current command position is (1000, 1000) (set the relative
position from the current position to the center point to set: 1000, 1000), and move clock-wise to perform circular interpolation
to the target position (set the relative position from the current position to the target position: 0, 0).
(d) Function block setting
6-232
Chapter 6 Motion Function Block
Center point
End point
MC_MoveCircularRelative2D.Done
MC_MoveCircularRelative2D.Busy
MC_MoveCircularRelative2D.Active
6-233
Chapter 6 Motion Function Block
MC_TrackConveyorBelt
BOOL Execute Done BOOL
UINT AxesGroup AxesGroup UINT
UINT ConveyorAxis Busy BOOL
ARRAY[0..5] OF LREAL[ ] ConveyorOrigin Active BOOL
ARRAY[0..5] OF LREAL[ ] ObjectPosition Error BOOL
UINT CoordSystem ErrorID WORD
UINT BufferMode
Input-Output
Set the group to perform Conveyor Belt Synchronization.
UINT AxesGroup
(1 ~ 16: 1Group ~ 16 Group)
Input
Give the conveyor belt synchronized setting command on the axes group in the
BOOL Execute
rising Edge.
UINT ConveyorAxis Set the conveyor axis.(1 ~ 32 : Axis 1~Axis 32)
LREAL[] ConveyorOrigin Enter the position from the MCS home position to the conveyor origin point.
LREAL[] ObjectPosition Input the conveyor home position to the object to work on.
UINT CoordSystem Set the coordinate system type.( 2:PCS)
Specify the sequential operation setting of motion function block.
UINT BufferMode
(Refer to 6.1.4.BufferMode input)
Output
BOOL Done Indicate the PCS setting is successfully completed.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Active Indicate that machine information setting of the current axis is running.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
(1) This motion function block sets conveyor belt synchronized operation for the axes group designated by AxesGroup input.
(2) This motion function block is not directly involved in operation. When this function block is executed, the coordinate system
operation using the PCS coordinate system is synchronized to the designated conveyor belt axis.
(3) ConveyorAxis can be set to between 1 and 32. An axis belonging to the axes group set as AxesGroup cannot be designated.
(4) The operation parameter of the axis designated as ConveyorAxis must be in mm/inch.
(5) Infinite running repeat must be set for the operation parameter of the axis designated as ConveyorAxis
(6) Synchronized conveyor operation is terminated by performing coordinate system operation using the PCS coordinate system or
performing PCS setting with MC_SetCartesianTransform function block.
(7) Refer to chapter 8.4.9 synchronized conveyor operation in motion controller’s manual for more details
6-234
Chapter 6 Motion Function Block
MC_TrackRotaryTable
BOOL Execute Done BOOL
UINT AxesGroup AxesGroup UINT
UINT RotaryAxis Busy BOOL
ARRAY[0..5] OF LREAL[ ] RotaryOrigin Active BOOL
ARRAY[0..5] OF LREAL[ ] ObjectPosition Error BOOL
UINT CoordSystem ErrorID WORD
UINT BufferMode
Input-Output
Set the group to perform Rotary table synchronization.
UINT AxesGroup
(1 ~ 16: 1Group ~ 16 Group)
Input
Give the conveyor belt synchronized setting command on the axes group in the
BOOL Execute
rising Edge.
UINT RotaryAxis Set the rotary table axis.(1 ~ 32 : Axis 1~Axis 32)
LREAL[] RotaryOrigin Enter the position from the MCS home position to the rotary table origin point.
LREAL[] ObjectPosition Input the rotary table home position to the object to work on.
UINT CoordSystem Set the coordinate system type.( 2:PCS)
Specify the sequential operation setting of motion function block.
UINT BufferMode
(Refer to 6.1.4.BufferMode input)
Output
BOOL Done Indicate the PCS setting is successfully completed.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Active Indicate that machine information setting of the current axis is running.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
(1) This motion function block sets rotary table synchronized operation for the axes group designated by AxesGroup input.
(2) This motion function block is not directly involved in operation. When this function block is executed, the coordinate system
operation using the PCS coordinate system is synchronized to the designated conveyor belt axis.
(3) RotaryAxis can be set to between axis 1 and axis 32 belonging to the axes group set as AxesGroup cannot be designated.
(4) The operation parameter of the axis designated as RotaryAxis must be in mm/inch.
(5) Infinite running repeat must be set for the operation parameter of the axis designated as RotaryAxis
(6) Synchronized rotary table operation is terminated by performing coordinate system operation using the PCS coordinate system
or performing PCS setting with MC_SetCartesianTransform function block.
(7) Refer to chapter 8.4.10 synchronized rotary table operation in motion controller’s manual for more details
6-235
Chapter 6 Motion Function Block
LS_RobotJog
BOOL Enable Enabled BOOL
UINT AxesGroup AxesGroup UINT
BOOL Low_High Busy BOOL
BOOL Pos_X Error BOOL
BOOL Neg_X ErrorID WORD
BOOL Pos_Y
BOOL Neg_Y
BOOL Pos_Z
BOOL Neg_Z
BOOL Pos_A
BOOL Neg_A
BOOL Pos_B
BOOL Neg_B
BOOL Pos_C
BOOL Neg_C
Input-Output
UINT AxesGroup Specify the axis group to be commanded. (1 ~ 16: 1Group ~ 16 Group)
Input
BOOL Enable While the input is ON, the JOG operation command is sent to the relevant axis group.
Set the JOG speed in JOG operation.
BOOL Low_High
(0: Jog low speed operation, 0: Jog high speed operation)
BOOL Pos_X Set the linear operation direction at direction in jog (X axis + direction)
BOOL Neg_X Set the linear operation direction at direction in jog (X axis- direction)
BOOL Pos_Y Set the linear operation direction at direction in jog (Y axis + direction)
BOOL Neg_Y Set the linear operation direction at direction in jog (Y axis - direction)
BOOL Pos_Z Set the linear operation direction at direction in jog (Z axis + direction)
BOOL Neg_Z Set the linear operation direction at direction in jog (Z axis - direction)
Set the rotary operation direction at JOG operation. (X-axis counterclockwise
BOOL Pos_A
rotation)
BOOL Neg_A Set the rotary operation direction at JOG operation. (X-axis clockwise rotation)
Set the rotary operation direction at JOG operation. (Y-axis counterclockwise
BOOL Pos_B
rotation)
BOOL Neg_B Set the rotary operation direction at JOG operation. (Y-axis clockwise rotation)
Set the rotary operation direction at JOG operation. (Z -axis counterclockwise
BOOL Pos_C
rotation)
BOOL Neg_C Set the rotary operation direction at JOG operation. (Z -axis clockwise rotation)
Output
BOOL Enabled It indicates that the axis group is in the process of JOG operation.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
6-236
Chapter 6 Motion Function Block
(1) This motion function block executes the JOG operation of the coordinate system for the corresponding axis group.
(2) Jog is a manual operation function for test and is used to confirm the position address for system operation, wiring condition
check, and teaching. Jog can be used by dividing the speed into high speed and low speed.
(3) It can be respectively applied to both high speed and low speed. If you change the value set in Low / High when the Enable
input is On (JOG operation status), the speed will change without stopping JOG operation.
(4) If both the forward (Pox_) / reverse (Neg_) inputs are set for the same axis, the axis will stop.
6-237
Chapter 6 Motion Function Block
LS_SetMovePath
BOOL Execute Done BOOL
UINT AxesGroup AxesGroup UINT
ARRAY[] OF BYTE PathData PathData ARRAY[] OF BYTE
UINT Step Busy BOOL
UINT CommandType Active BOOL
UINT Mode Error BOOL
UINT CoordSystem ErrorID WORD
ARRAY[0..5] OF LREAL[ ] Positon
LREAL Velocity
LREAL Acceleration
LREAL Deceleration
LREAL Jerk
UINT BufferMode
UINT TransitionMode
LREAL TransitionParameter
Input-Output
Set the group to set the path operation data.
UINT AxesGroup
(1 ~ 16: 1Group ~ 16 Group)
BYTE[] PathData Set the location where the path data is stored.
Input
In the rising Edge, it sends the command for setting the path operation data to the
BOOL Execute
corresponding axis group.
Enter the step number of the path data.
UINT Step
(The step number is affected by the size of the data set in PathData.)
Select the type of path operation.
0: none
1: Linear interpolation operation for the absolute position of the coordinate system,
UINT CommandType 2: Linear interpolation operation for the relative position of the coordinate system
3: Circular interpolation operation for the absolute position of the coordinate
system, 4: Circular interpolation operation for the relative position of the coordinate
system
Select the method and path for circular interpolation operation of the coordinate
system
UINT Mode
0/1/2: Clockwise, Midpoint/Central point/Radius
3/4/5: counter-clockwise Midpoint/Central point/Radius
UINT CoordSystem Set the coordinate system type (1:MCS 2:PCS)
Enter the target position of the end point of the machine.
In the circular interpolation, the circular interpolation end point should be set in
Position [0] Position [1] Position [2].
LREAL[] Position
In the circular interpolation, the Central point/Waypoint should be set in Position [3]
Position [4] Position [5].
In the circular interpolation, the Radius should be in Position [3].
LREAL Velocity Specify the maximum speed of the route. [u/s]
LREAL Acceleration Specify the maximum acceleration. [u/s2]
6-238
Chapter 6 Motion Function Block
Output
BOOL Done Indicate that the path data setting is completed successfully.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Active Indicate that machine information setting of the current axis is running.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
(1) This motion function block is the function block that sets the path data for the axis group specified in the AxesGroup input.
(2) The step value can be set from 0, and the size of one step is 96 Bytes.
(3) The path data is saved in the area of data set in PathData. The variable set in PathData should be set to 96 times or more of
the number of the steps to use.
(4) The CommandType value selects the operation method for the path operation. If the CommandType value is set to 0, it is
considered that the data for the corresponding step is not set during path operation.
(5) The Mode value sets the direction of the circular interpolation when performing the circular interpolation operation.
(6) The value of BufferMode should be set to 1(Buffered).
(7) Set position[] value to the TCP target position. Depending on the robot type, some Position variable areas may not be applied.
Data input in the unapplied areas is not reflected in coordinate system operation.
Variable Meaning Unit
Position[0] X axis position mm
Position[1] Y axis position mm
Position[2] Z axis position mm
Position[3] X axis rotation amoun degree
t
Position[4] Y axis rotation amoun degree
t
Position[5] Z axis rotation amount degree
(8) For more details, refer to Section 8.4.10, "Path Operation of the Coordinate System ".
6-239
Chapter 6 Motion Function Block
LS_ResetMovePath
BOOL Execute Done BOOL
UINT AxesGroup AxesGroup UINT
ARRAY[] OF BYTE PathData Busy BOOL
UINT Step Active BOOL
Error BOOL
ErrorID WORD
Input-Output
Set the group to delete the path operation data.
UINT AxesGroup
(1 ~ 16: 1Group ~ 16 Group)
Input
In the rising Edge, the command for deleting the path operation data is sent to the
BOOL Execute
corresponding axis group.
BYTE[] PathData Set the location where the path data is stored.
Enter the step number of the path data.
UINT Step
(The step number is affected by the size of the data set in PathData.)
Output
BOOL Done Indicate the deleting the path data is done successfully.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Active Indicate that machine information setting of the current axis is running.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
(1) This motion function block is the function block to delete the path data of the axis group specified in the AxesGroup input.
(2) The step value can be set from 0, and the size of one step is 96 Bytes.
(3) The path data is saved in the area of data set in PathData. The variable set in PathData should be set to 96 times or more of
the number of the steps to use.
(4) For more details, refer to Section 8.4.10, "Path Operation of the Coordinate System ".
6-240
Chapter 6 Motion Function Block
LS_GetMovePath
BOOL Execute Done BOOL
UINT AxesGroup AxesGroup UINT
ARRAY[] OF BYTE PathData Busy BOOL
UINT Step Active BOOL
Error BOOL
ErrorID WORD
CommandType UINT
Mode UINT
CoordSystem UINT
Positon ARRAY[0..6] OF LREAL[ ]
Velocity LREAL
Acceleration LREAL
Deceleration LREAL
Jerk LREAL
BufferMode UINT
TransitionMode UINT
TransitionParameter LREAL
Input-Output
Set the group to set the path operation data.
UINT AxesGroup
(1 ~ 16: 1Group ~ 16 Group)
Input
In the rising Edge, it sends the command for setting the path operation data to the
BOOL Execute
corresponding axis group.
BYTE[] PathData Set the location where the path data is stored.
Enter the step number of the path data.
UINT Step
(The step number is affected by the size of the data set in PathData.)
Output
BOOL Done Indicate that the path data setting is completed successfully.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Active Indicate that machine information setting of the current axis is running.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
Output the type of path operation.
0: none
1: Linear interpolation operation for the absolute position of the coordinate system,
UINT CommandType
2: Linear interpolation operation for the relative position of the coordinate system
3: Circular interpolation operation for the absolute position of the coordinate system,
4: Circular interpolation operation for the relative position of the coordinate system
UINT Mode Output the operation mode.
UINT CoordSystem Output the coordinate system type.(1:MCS 2:PCS)
LREAL[] Position Output the target position.
LREAL Velocity Output the maximum speed of the path. [u/s]
6-241
Chapter 6 Motion Function Block
(1) This motion function block is the function block to read the path data to the axis group specified in AxesGroup input.
(2) The step value can be set from 0, and the size of one step is 96 Bytes.
(3) The path data is saved in the area of data set in PathData. The variable set in PathData should be set to 96 times or more of
the number of the steps to use.
(4) For more details, refer to Section 8.4.10, "Path Operation of the Coordinate System ".
6-242
Chapter 6 Motion Function Block
LS_RunMovePath
BOOL Execute Done BOOL
UINT AxesGroup AxesGroup UINT
ARRAY[] OF BYTE PathData Busy BOOL
UINT StartStep Active BOOL
UINT EndStep CommandAborted BOOL
Error BOOL
ErrorID WORD
CurStep UINT
Input-Output
UINT AxesGroup Set the group to run the path operation data. (1 ~ 16: 1Group ~ 16 Group)
Input
In the rising Edge, it sends the command for setting the path operation data to the
BOOL Execute
corresponding axis group.
BYTE[] PathData Set the location where the path data is stored.
Enter the start step number of the path data.
UINT StartStep
(The step number is affected by the size of the data set in PathData.)
Enter the end step number of the path data.
UINT EndStep
(The step number is affected by the size of the data set in PathData.)
Output
BOOL Done Indicate that the path data setting is completed successfully.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Active Indicate that machine information setting of the current axis is running.
BOOL CommandAborted Indicate that the current motion function block is interrupted while it is running.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
UINT CurStep Output the currently running step number.
(1) This motion function block is the function block to execute the path operation for the axis group specified in the AxesGroup
input.
(2) The step value can be set from 0, and the size of one step is 96 Bytes.
(3) The path data is saved in the area of data set in PathData. The variable set in PathData should be set to 96 times or more of
the number of the steps to use.
(4) The difference between StartStep and EndStep cannot be set to 100 or more. (Up to 100 step operations can be executed at
one time.)
(5) If the CommandType of path data is 0 during the path operation, the operation is terminated even if EndStep is not reached.
(6) If the path operation is executed, the current step number in operation is output to the CurStep.
(7) For more details, refer to Section 8.4.10, "Path Operation of the Coordinate System ".
6-243
Chapter 6 Motion Function Block
(MC_MoveCircularAbsolute3D)
MC_MoveCircularAbsolute3D
BOOL Execute Done BOOL
UINT AxesGroup AxesGroup UINT
UINT CircMode Busy BOOL
LREAL[ ] AuxPoint Active BOOL
LREAL[ ] EndPoint CommandAborted BOOL
UINT PathChoice Error BOOL
LREAL Velocity ErrorID WORD
LREAL Acceleration
LREAL Deceleration
LREAL Jerk
UINT CoordSystem
UINT BufferMode
UINT TransitionMode
LREAL TransitionParameter
Input-Output
Set the group to do absolute position circular interpolation operation. (1 ~ 16: 1Group
UINT AxesGroup
~ 16 Group)
Input
Give absolute position circular interpolation operation command to the relevant
BOOL Execute
group in the rising Edge.
UINT CircMode Circular interpolation method setting [0: Midpoint, 1: Central point, 2: Radius]
Specify the position of auxiliary point depending on the circular interpolation method
LREAL[ ] AuxPoint
in an absolute coordinate.
LREAL[ ] EndPoint Set the circular end point as an absolute coordinate.
BOOL PathChoice Circular route selection(0: clockwise direction, 1: counter-clockwise direction)
LREAL Velocity Specify the maximum speed of the route. [u/s]
LREAL Acceleration Specify the maximum acceleration. [u/s2]
LREAL Deceleration Specify the maximum deceleration. [u/s2]
LREAL Jerk Specify the change rate of acceleration/deceleration. [u/s3]
UINT CoordSystem Set the coordinate system type (1:MCS 2:PCS)
Specify the sequential operation setting of motion function block.
UINT BufferMode
(Refer to 6.1.4.BufferMode input)
UINT TransitionMode Unused
LREAL TransitionParameter Unused
Output
BOOL Done Indicate whether to reach the specified position.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Active Indicate that whether or not motion function block is controlling the group.
BOOL CommandAborted Indicate that the current motion function block is interrupted while it is running.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the number of error occurred while motion function block is running.
6-244
Chapter 6 Motion Function Block
(10) This motion function block issues absolute position 3D circular interpolation command based on coordinate system on the axis
group designated by AxesGroup input.
(11) Unlike MC_MoveCircularAbsolute2D function block that performs circular interpolation on the XY plane,
MC_MoveCircularAbsolute3D function block performs circular interpolation on 3D coordinates according to AuxPoint and
EndPoint.
(12) When this motion function block starts, each axis performs circular trajectory interpolation control referring to the auxiliary point
input, and the movement direction is determined by Path Choice input. If PathChoice input is set to 0, circular interpolation is
operated in a clockwise direction, and if it is set to 1, circular interpolation is operated in a counter-clockwise direction.
(13) In Velocity, Acceleration, Deceleration, Jerk inputs, the acceleration, deceleration, change rate of acceleration, velocity of the
interpolation path are specified, respectively.
(14) Set the circular interpolation method in CircMode input. The circular interpolation methods corresponding to CircMode values
are as follows.
(a) Circular interpolation of midpoint specifying method (BORDER, CircMode = 0) in this method, operation starts at command
executing current position and it does circular interpolation through the specified position of the central point to the target
position. In the figure below, the start position corresponds to the coordinate system position at the start of the command,
the midpoint corresponds to the coordinate input for the AuxPoint, and the target position corresponds to the absolute
coordinate input for the EndPoint.
Axis
Y
Start
point
EndPoint
AuxPoint
Axis X
(b) Circular Interpolation Using Center Point Specification (CircMode = 1)
This method performs circular interpolation to the target position by starting operation at the current position executed
command, and following a circular trajectory of which diameter corresponds to the distance to the designated center point.
In the figure below, the current position corresponds to the axes group coordinate at the start of the command, the center
point corresponds to the coordinate input for the AuxPoint, and the target position corresponds to the absolute coordinate
input for the EndPoint. In the center point method, the start position, center point position, and target position cannot be
located on the same straight line.
Axis
Y
Start
position
AuxPoint
EndPoint
Axis X
6-245
Chapter 6 Motion Function Block
Axis Y
Start
position
EndPoint
AuxPoint
Axis X
(15) Refer to chapter 8.4.11 3D circular interpolation control in motion controller’s manual for more details.
(16) If the function block is re-executed (Execute input is On) before the instruction is terminated, the changed parameters are
applied.
Only, Velocity, Acceleration, Deceleration, Jerk, AuxPoint, Endpoint input can be updated.
(17) Velocity input can be set to 0 or changed.
(18) Example program
This example is to set the center point at (0, 75, -580) when the current command position is MCS (0,150,-580), and perform
circular interpolation to the target position MCS(0,0,-580) by moving in a clockwise direction.
6-246
Chapter 6 Motion Function Block
CenterPoint
EndPoint
MC_MoveCircularAbsolute2D.Done
MC_MoveCircularAbsolute2D.Busy
MC_MoveCircularAbsolute2D.Active
6-247
Chapter 6 Motion Function Block
(MC_MoveCircularRelative3D)
MC_MoveCircularRelative3D
BOOL Execute Done BOOL
UINT AxesGroup AxesGroup UINT
UINT CircMode Busy BOOL
LREAL[ ] AuxPoint Active BOOL
LREAL[ ] EndPoint CommandAborted BOOL
UINT PathChoice Error BOOL
LREAL Velocity ErrorID WORD
LREAL Acceleration
LREAL Deceleration
LREAL Jerk
UINT CoordSystem
UINT BufferMode
UINT TransitionMode
LREAL TransitionParameter
Input-Output
Set the group to do relative position circular interpolation operation. (1 ~ 16: 1Group
UINT AxesGroup
~ 16 Group)
Input
Give relative position circular interpolation operation command to the relevant group
BOOL Execute
in the rising Edge.
UINT CircMode Circular interpolation method setting [0: Midpoint, 1: Central point, 2: Radius]
Specify the position of auxiliary point depending on the circular interpolation method
LREAL[ ] AuxPoint
as the relative coordinate based on the starting point.
Specify the end point of circular arc as the relative coordinate based on the starting
LREAL[ ] EndPoint
point.
Circular route selection
BOOL PathChoice
0: clockwise direction, 1: counter-clockwise direction
LREAL Velocity Specify the maximum speed of the route. [u/s]
LREAL Acceleration Specify the maximum acceleration. [u/s2]
LREAL Deceleration Specify the maximum deceleration. [u/s2]
LREAL Jerk Specify the change rate of acceleration/deceleration. [u/s3]
UINT CoordSystem Set the coordinate system type (1:MCS 2:PCS)
Specify the sequential operation setting of motion function block.
UINT BufferMode
(Refer to 6.1.4.BufferMode input)
UINT TransitionMode Unused
LREAL TransitionParameter Unused
Output
BOOL Done Indicate whether to reach the specified position.
BOOL Busy Indicate that the execution of motion function block is not completed.
BOOL Active Indicate that whether or not motion function block is controlling the group.
BOOL CommandAborted Indicate that the current motion function block is interrupted while it is running.
6-248
Chapter 6 Motion Function Block
Axis Y
Start
point
EndPoint
AuxPoint
Axis X
(e) Circular interpolation of central point specifying method in this method, operation starts at the current position, and it does
circular interpolation to the target position along the circular path, which has a radius of the distance to the specified central
position. In the figure below, the current position corresponds to the axes group coordinate at the start of the command,
the center point corresponds to the coordinate input for the AuxPoint, and the target position corresponds to the relative
coordinate input for the EndPoint.
6-249
Chapter 6 Motion Function Block
Axis Y
AuxPoint
EndPoint
Start
point
Axis X
Axis Y
AuxPoint
EndPoint
Start
point
Axis X
(14) Refer to chapter 8.4.11 3D circular interpolation control in motion controller’s manual for more details.
(15) If the function block is re-executed (Execute input is On) before the instruction is terminated, the changed parameters are
applied.
Only, Velocity, Acceleration, Deceleration, Jerk, AuxPoint, Endpoint input can be updated.
(16) Velocity input can be set to 0 or changed.
(17) Example program
This example is to set the center point specification method when the current command position is (1000, 1000) (set the relative
position from the current position to the center point to set: 1000, 1000), and move clock-wise to perform circular interpolation
to the target position (set the relative position from the current position to the target position: 0, 0).
6-250
Chapter 6 Motion Function Block
Center point
End point
MC_MoveCircularRelative2D.Done
MC_MoveCircularRelative2D.Busy
MC_MoveCircularRelative2D.Active
6-251
Chapter 6 Motion Function Block
NC_LoadProgram
BOOL Execute Done BOOL
UINT NcChannel NcChannel UINT
STRING ProgramName Busy BOOL
UINT LoadMode Error BOOL
ErrorID WORD
Input-Output
UINT NcChannel Set the NC channel to make the command.
Input
BOOL Execute Set programs to run in the rising Edge.
STRING ProgramName Set the name of the program to be executed.
UINT LoadMode Unused (Only‘0’is settable.)
Output
BOOL Done Indicate the state of motion function block completion.
BOOL Busy Indicate that execution of the function block is not completed.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the error number that occurred while the function block is running.
(1) This motion function block is the function block to specify the NC program to be executed when NC control is performed.
(2) When the program to be operated by the channel set in NC channel is set to ProgramName and the function block is executed,
the program is designated as the one to be executed.
6-252
Chapter 6 Motion Function Block
NC_BlockControl
BOOL Enable Enabled BOOL
UINT NcChannel NcChannel UINT
BOOL SingleBlock Busy BOOL
BOOL OptionalStop Error BOOL
ErrorID WORD
Input-Output
UINT NcChannel Set the NC channel to make the command.
Input
BOOL Enable While the input is enabled, the corresponding channel becomes the status
of Single Block or Optional Stop.
BOOL SingleBlock Set the Single Block operation signal.
BOOL OptionalStop Set the Optional Stop operation signal.
Output
BOOL Enabled Indicate the state of Block Control completion.
BOOL Busy Indicate that execution of the function block is not completed.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the error number that occurred while the function block is running.
(1) This motion function block determines the method to execute the program under the NC control.
(2) If SingleBlock is set to '1', NC_CycleStart executes one block at a time and stops after execution. If SingleBlock becomes '1'
during the automatic operation and NC_BlockControl function block is executed, it will be stopped after terminating the currently
executing block.
(3) If OptionalStop is set to '1', and M01 is commanded during the program, it will wait until NC_CycleStart function block is
executed again.
(4) When both SingleBlock and OptionalStop are set to '1', SingleBlock setting is applied.
6-253
Chapter 6 Motion Function Block
NC_Reset
BOOL Execute Done BOOL
UINT NcChannel NcChannel UINT
Busy BOOL
Error BOOL
ErrorID WORD
Input-Output
UINT NcChannel Set the NC channel to make the command.
Input
BOOL Execute In the rising Edge, the NC is reset.
Output
BOOL Done Indicate the state of motion function block completion.
BOOL Busy Indicate that execution of the function block is not completed.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the error number that occurred while the function block is running.
(1) This motion function block is to make the NC reset state under the NC control.
(2) If NC_Reset is executed during the automatic operation, it stops the automatic operation and changes into the reset state.
(3) The Reset state is as follows.
Item Status
Setting Data Offset Value Hold
Parameter Hold
Various Data Program in Memory Hold
Contents in the buffer storage MDI: hold
Cancel the rest
Display of Sequence Number Hold
One shot G code Cancel
Modal G code Hold
F Hold
S, T, M Hold
K (Number of repeats) Cancel
Work coordinate value Hold
Action in operation Movement Cancel
Dwell Cancel
Issuance of M, S, T code Cancel
Tool Length compensation MDI: hold
Parameter the rest
Cutter compensation MDI: hold
Cancel the rest
Storing called subprogram number MDI: hold
Cancel the rest
6-254
Chapter 6 Motion Function Block
Item Status
Output Signal CNC Alarm signal AL Extinguish if there is no
cause for the alarm
Reference position return completion Hold
LED Cancel(Emergency
Stop)
S, T, B Code Hold
M Code Cancel
M, S, T strobe signal Cancel
Spindle revolution signal(S analog signal) Hold
CNC ready signal MA Hold
Servo ready signal SA ON
Cycle Start LED Cancel
Feed hold LED Cancel
6-255
Chapter 6 Motion Function Block
NC_Emergency
BOOL Enable Status BOOL
UINT NcChannel NcChannel UINT
Valid BOOL
Busy BOOL
Error BOOL
ErrorID WORD
Input-Output
UINT NcChannel Set the NC channel to make the command.
Input
BOOL Enable The emergency stop is executed while the input is '1'.
Output
BOOL Status Indicate the status of the emergency stop.
BOOL Valid Indicate the validity of the function block output. (Same as the Status output)
BOOL Busy Indicate that execution of the function block is not completed.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the error number that occurred while the function block is running.
(1) This motion function block is to execute the emergency stop on the corresponding NC channel under the NC control.
(2) If the emergency stop is executed, the current operation must be stopped immediately.
6-256
Chapter 6 Motion Function Block
NC_CycleStart
BOOL Execute Done BOOL
UINT NcChannel NcChannel UINT
Busy BOOL
Error BOOL
ErrorID WORD
Input-Output
UINT NcChannel Set the NC channel to make the command.
Input
BOOL Execute Start the automatic operation in the rising Edge.
Output
BOOL Done Indicate the state of motion function block completion.
BOOL Busy Indicate that execution of the function block is not completed.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the error number that occurred while the function block is running.
(1) This motion function block is to execute the automatic operation on the corresponding NC channel under the NC control.
(2) The program set in NC_LoadProgram is automatically operated.
(3) When the automatic operation is stopped due to M00, M01 (Optional Stop) and single block, the automatic operation is
restarted.
6-257
Chapter 6 Motion Function Block
NC_FeedHold
BOOL Enable Status BOOL
UINT NcChannel NcChannel UINT
Valid BOOL
Error BOOL
ErrorID WORD
Input-Output
UINT NcChannel Set the NC channel to make the command.
Input
BOOL Enable The NC channel will be in Feed Hold status while the input is enabled.
Output
BOOL Status Indicate the Feed Hold status.
BOOL Valid Indicate the validity of the function block output.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the error number that occurred while the function block is running.
(1) This motion function block is to make the Feed Hold command to the corresponding NC channel under the NC control.
(2) If the NC_FeedHold is executed during the automatic operation, the automatic operation is stopped.
(3) If the NC_CycleStart is performed during the execution of the NC_FeedHold command, the NC_CycleStart command is
ignored.
6-258
Chapter 6 Motion Function Block
NC_Home
BOOL Execute Done BOOL
UINT NcChannel NcChannel UINT
UINT NcAxis Busy BOOL
UINT ReferenceNum Active BOOL
Error BOOL
ErrorID WORD
Input-Output
UINT NcChannel Set the NC channel to make the command.
Input
BOOL Execute Start the automatic operation in the rising Edge.
UINT NcAxis Set the channel axis. (1~10: X=1, Y=2, … B=8, C=9, S=10)
UINT ReferenceNum Select the origin type. 1~4: first origin ~ fourth origin
Output
BOOL Done Indicate the state of motion function block completion.
BOOL Busy Indicate that execution of the function block is not completed.
BOOL Active Indicate that the current Function Block is controlling the axis.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the error number that occurred while the function block is running.
(1) This motion function block performs homing to the corresponding NC channel under the NC control.
(2) Homing to the 1st origin, 2nd origin, 3rd origin, and 4th origin is executed according to the values set in ReferenceNum. The
origin coordinates can be set for each axis parameters of NC parameters in XG5000.
6-259
Chapter 6 Motion Function Block
NC_RapidTraverseOverride
BOOL Enable Enabled BOOL
UINT NcChannel NcChannel UINT
LREAL VelFactor Busy BOOL
LREAL AccFactor Error BOOL
LREAL JerkFactor ErrorID WORD
Input-Output
UINT NcChannel Set the NC channel to make the command.
Input
BOOL Enable Execute the Rapid Traverse Override operation on the channel while the
input is enabled.
LREAL VelFactor Specify the override rate of the speed. (1.0=100%)
LREAL AccFactor Specify the override rate of acceleration/deceleration.
LREAL JerkFactor Specify the override ratio of the rate of change for acceleration.
Output
BOOL Enabled Indicate that the override rate was applied successfully.
BOOL Busy Indicate that execution of the function block is not completed.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the error number that occurred while the function block is running.
(1) This motion function block makes the Rapid Traverse Override command for the corresponding NC channel under the NC
control.
(2) Specify the speed override ratio for the VelFactor input. If the specified value is 0.0, the axis stops.
(3) The default value of each factor is 1.0, which means 100% of the command speed of the currently executing function block.
(4) Specify the acceleration / deceleration for the AccFactor input and the override rate of the jerk (rate of change of acceleration)
for the JerkFactor input, respectively.
(5) Negative numbers cannot be entered into each factor.
6-260
Chapter 6 Motion Function Block
NC_CuttingFeedOverride
BOOL Enable Enabled BOOL
UINT NcChannel NcChannel UINT
LREAL VelFactor Busy BOOL
LREAL AccFactor Error BOOL
LREAL JerkFactor ErrorID WORD
Input-Output
UINT NcChannel Set the NC channel to make the command.
Input
BOOL Enable Execute the Cutting Feed Override operation on the channel while the input
is enabled.
LREAL VelFactor Specify the override rate of the speed. (1.0=100%)
LREAL AccFactor Specify the override rate of acceleration/deceleration.
LREAL JerkFactor Specify the override ratio of the rate of change for acceleration.
Output
BOOL Enabled Indicate that the override rate was applied successfully.
BOOL Busy Indicate that execution of the function block is not completed.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the error number that occurred while the function block is running.
(1) This motion function block makes the Cutting Feed Override command for the corresponding NC channel under the NC control.
(2) Specify the speed override ratio for the VelFactor input. If the specified value is 0.0, the axis stops.
(3) The default value of each factor is 1.0, which means 100% of the command speed of the currently executing function block.
(4) Specify the acceleration / deceleration for the AccFactor input and the override rate of the jerk (rate of change of acceleration)
for the JerkFactor input, respectively.
(5) Negative numbers cannot be entered into each factor.
6-261
Chapter 6 Motion Function Block
NC_SpindleOverride
BOOL Enable Enabled BOOL
UINT NcChannel NcChannel UINT
LREAL VelFactor Busy BOOL
LREAL AccFactor Error BOOL
LREAL JerkFactor ErrorID WORD
Input-Output
UINT NcChannel Set the NC channel to make the command.
Input
BOOL Enable Execute the Spindle Override operation on the channel while the input is
enabled.
LREAL VelFactor Specify the override rate of the speed. (1.0=100%)
LREAL AccFactor Specify the override rate of acceleration/deceleration.
LREAL JerkFactor Specify the override ratio of the rate of change for acceleration.
Output
BOOL Enabled Indicate that the override rate was applied successfully.
BOOL Busy Indicate that execution of the function block is not completed.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the error number that occurred while the function block is running.
(1) This motion function block makes the Spindle Override command for the corresponding NC channel under the NC control.
(2) Specify the speed override ratio for the VelFactor input. If the specified value is 0.0, the axis stops.
(3) The default value of each factor is 1.0, which means 100% of the command speed of the currently executing function block.
(4) Specify the acceleration / deceleration for the AccFactor input and the override rate of the jerk (rate of change of acceleration)
for the JerkFactor input, respectively.
(5) Negative numbers cannot be entered into each factor.
6-262
Chapter 6 Motion Function Block
NC_McodeComplete
BOOL Execute Done BOOL
UINT NcChannel NcChannel UINT
Busy BOOL
Error BOOL
ErrorID WORD
Input-Output
UINT NcChannel Set the NC channel to make the command.
Input
BOOL Execute Set the completion of the M Code operation on the corresponding the
channel.
Output
BOOL Done Indicate the state of motion function block completion.
BOOL Busy Indicate that execution of the function block is not completed.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the error number that occurred while the function block is running.
(1) This motion function block makes the completion command of the M Code operation for the corresponding NC channel under
the NC control.
(2) It is the command to check the M code on the corresponding channel and set that the M code operation is completed.
6-263
Chapter 6 Motion Function Block
NC_ScodeComplete
BOOL Execute Done BOOL
UINT NcChannel NcChannel UINT
Busy BOOL
Error BOOL
ErrorID WORD
Input-Output
UINT NcChannel Set the NC channel to make the command.
Input
BOOL Execute Set the completion of the S Code operation on the corresponding the
channel.
Output
BOOL Done Indicate the state of motion function block completion.
BOOL Busy Indicate that execution of the function block is not completed.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the error number that occurred while the function block is running.
(1) This motion function block makes the completion command of the S Code operation for the corresponding NC channel under
the NC control.
(2) It is the command to check the S code on the corresponding channel and set that the S code operation is completed.
6-264
Chapter 6 Motion Function Block
NC_ScodeComplete
BOOL Execute Done BOOL
UINT NcChannel NcChannel UINT
Busy BOOL
Error BOOL
ErrorID WORD
Input-Output
UINT NcChannel Set the NC channel to make the command.
Input
BOOL Execute Set the completion of the T Code operation on the corresponding the
channel.
Output
BOOL Done Indicate the state of motion function block completion.
BOOL Busy Indicate that execution of the function block is not completed.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the error number that occurred while the function block is running.
(1) This motion function block makes the completion command of the T Code operation for the corresponding NC channel under
the NC control.
(2) It is the command to check the T code on the corresponding channel and set that the T code operation is completed.
6-265
Chapter 6 Motion Function Block
NC_ReadParameter
BOOL Enable Valid BOOL
UINT NcChannel NcChannel UINT
UINT NcAxis Busy BOOL
INT ParameterGroup Error BOOL
INT ParameterNumber ErrorID WORD
Value LREAL
Input-Output
UINT NcChannel Set the NC channel to make the command.
Input
BOOL Enable The relevant parameters are output while the input is enabled.
UINT NcAxis Set the channel axis. (1~10: X=1, Y=2, … B=8, C=9, S=10)
If it is set to 0, ‘Read Channel Parameters’ will be executed.
INT ParameterGroup Specify the group of the parameters to read.
INT ParameterNumber Specify the group number of the parameters to read.
Output
BOOL Vaild Indicate the validity of the function block output.
BOOL Busy Indicate that execution of the function block is not completed.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the error number that occurred while the function block is running.
LREAL Value Output the values of the parameters.
(1) This motion function block is to read and output the parameters of the channel and channel / axis of the corresponding channel.
(2) While the Enable input is active, the values of the relevant parameters are output continuously.
(3) ParameterGroup input specifies the parameter group number to read.
(4) ParameterNumber input specifies the number in the group of the parameters to be read.
(5) The group number and the number in the group of each parameter are as follows.
Parameter Group No. Item Description
1. Channel 1. Standard 1 Target machining quantity Set the target machining quantity.
Parameter settings (0 ~ 2,147,483,647)
It is possible to write NC parameters during NC
channel automatic operation.
2 Target machining quantity at M99 Set the target machining quantity for repeated
repeated machining machining with M99. If the set value matches the
current machining quantity, the cycle automatically
stops.(0 ~ 2,147,483,647)
It is possible to write NC parameters during NC
channel automatic operation.
3 Check of decimal point Set whether to check decimal point of the NC
program.
0: Decimal point check
(Mm if there is a decimal point, um if there is no
decimal point)
1: No decimal point check (mm)
4 Keep workpiece coordinate Set whether to keep the workpiece coordinate
system system when resetting.
0:Hold
1: Do not hold
6-266
Chapter 6 Motion Function Block
6-267
Chapter 6 Motion Function Block
6-268
Chapter 6 Motion Function Block
6-269
Chapter 6 Motion Function Block
6-270
Chapter 6 Motion Function Block
Tool
center
path
6-271
Chapter 6 Motion Function Block
6-272
Chapter 6 Motion Function Block
6-273
Chapter 6 Motion Function Block
(0~255, integer)
…… ……
29 Macro program Assign the M code number to call the macro program (9020.nc ~ (9020.nc
call M code ~ 9029.nc) with the M code.
(9029.nc) 0, 30 of the input values are ignored.
(0~255, integer)
9 T code call Enter the number of the macro program (9000.nc ~ 9009.nc) to be called
macro program when the T code is commanded.
number (9000~9009, integer)
It is possible to write NC parameters during NC channel automatic
operation.
13. 1 +Measurement Set the measurement reference distance from the automatic tool offset to
Automatic reference the contact surface in the +traversing direction of X.
tool offsets distance X for
Machine home +X
automatic tool Off X +Z
offset 0 reference Tool
Off Z
-X +X Xt
-X traversing direction
contact surface
-Z traversing direction
contact surface
-Z
Zt
+Z
6-274
Chapter 6 Motion Function Block
Decceleration
Start position
err err
r
6-275
Chapter 6 Motion Function Block
6-276
Chapter 6 Motion Function Block
6-277
Chapter 6 Motion Function Block
Notes
Note 1) Available to use it on O/S V1.30 or greater of a single motion controller
6-278
Chapter 6 Motion Function Block
NC_WriteParameter
BOOL Execute Done BOOL
UINT NcChannel NcChannel UINT
UINT NcAxis Busy BOOL
INT ParameterGroup Error BOOL
INT ParameterNumber ErrorID WORD
LREAL Value
UINT ExecutionMode
Input-Output
UINT NcChannel Set the NC channel to make the command.
Input
BOOL Execute The NC parameter is written in the rising Edge of the input.
UINT NcAxis Set the channel axis. (1~10: X=1, Y=2, … B=8, C=9, S=10)
When set to 0, ‘Write Channel Parameters’ is executed.
INT ParameterGroup Specify the group of the parameter to be written.
INT ParameterNumber Specify the number in the group of the parameter to be written.
LREAL Value Specify the value of parameter to write.
UINT ExecutionMode Rsvd.
Output
BOOL Vaild Indicate the validity of the function block output.
BOOL Busy Indicate that execution of the function block is not completed.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the error number that occurred while the function block is running.
(1) This motion function block is the function block that writes the values specified in the parameters of the NC channel and
channels/axes.
(2) The parameters will be written in the rising edge of the Execute input.
(3) ParameterGroup input specifies the group number of the parameter to be written.
(4) ParameterNumber input specifies the number in the group of the parameter to be written. If the value that cannot be set is
applied, "Error 16 # 000B" occurs.
(5) In the Value input, specify the value to be written in the parameter.
(6) For the group number and the number in the group of each parameter, refer to 6.8.14 Reading NC parameters.
(7) Some items of all parameters can be written when automatic operation is performed, that is, NC_CycleStart is performed and
automatic operation is in progress. For this, refer to 6.8.14 Reading NC Parameter as well.
6-279
Chapter 6 Motion Function Block
NC_RetraceMove
BOOL Enable Enabled BOOL
UINT NcChannel NcChannel UINT
Busy BOOL
Error BOOL
ErrorID WORD
Input-Output
UINT NcChannel Specify the NC channel to make commands
(1 ~ 4 : Channel 1 ~ Channel 4)
Input
BOOL Enable Execute the reverse operation command on the relevant channel while
the input is enabled.
Output
BOOL Enabled Indicate that the function block is successfully applied.
BOOL Busy Indicate that execution of the function block is not completed.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the error number that occurred while the function block is running.
(1) This motion function block is the function block that makes the reverse operation command on the relevant NC channel.
(2) While the Enable input is active, execute operation in the reverse direction.
(3) The reverse operation is possible only for G00, G01, G02 and G03 blocks.
(4) To use the function block, the NC channel parameter setting must set the 'reverse driving buffer size'.
6-280
Chapter 6 Motion Function Block
NC_BlockSkip
BOOL Enable Enabled BOOL
UINT NcChannel NcChannel UINT
BOOL Skip1 Busy BOOL
BOOL Skip2 Error BOOL
BOOL Skip3 ErrorID WORD
BOOL Skip4
Input-Output
UINT NcChannel Specify the NC channel to make commands
(1 ~ 4 : Channel 1 ~ Channel 4)
Input
BOOL Enable While an input is enabled, execute the block skip operation set in the
relevant channel.
BOOL Skip1 Set block skip 1. (G31/G31.1/G37/G37.1)
BOOL Skip2 Set block skip 2. (G31.2/G37.2)
BOOL Skip3 Set block skip 3. (G31.3/G37.3)
BOOL Skip4 Set block skip 4. (G31.4/G37.4)
Output
BOOL Enabled Indicate that the function block is successfully applied.
BOOL Busy Indicate that execution of the function block is not completed.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the error number that occurred while the function block is running.
(1) This motion function block is the function block that the relevant NC channel gives commands such as block skip or automatic
measurement of tool length.
(2) While the Enable input is active, skip blocks such as Skip1 (G31/G31.1), Skip2 (G31.2), Skip3 (G31.3) and Skip4 (G31.4).
(3) When the Enable input is active, if there are commands such as G31/G31.1 (Skip1), G31.2 (Skip2), G31.3 (Skip3) and G31.4
(Skip4), skip the block that is currently performed and then, the next block is performed. If there are M/S/T codes, the relevant
code is performed and then, the next block is performed.
(4) When the Enable input is active, if there are commands such as G37/G37.1 (Skip1), G37.2 (Skip2), G37.3 (Skip3) and G37.4
(Skip4), perform the automatic measurement of tool length command in the block that is currently performed.
(5) If the function block is executed, the skipped position can be known as the current position of machine is saved in flags for
each NC channel/axis.
6-281
Chapter 6 Motion Function Block
NC_DryRun
BOOL Enable Enabled BOOL
UINT NcChannel NcChannel UINT
BOOL AuxFuncLock Busy BOOL
Error BOOL
ErrorID WORD
Input-Output
UINT NcChannel Specify the NC channel to make commands
(1 ~ 4 : Channel 1 ~ Channel 4)
Input
BOOL Enable The relevant parameters are output while the input is enabled.
BOOL AuxFuncLock If an input is active, ignore an auxiliary function code (M/S/T).
Output
BOOL Enabled Indicate that the function block is performed.
BOOL Busy Indicate that execution of the function block is not completed.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the error number that occurred while the function block is running.
(1) This motion function block is the function block that conducts a dry run on the relevant NC channel.
(2) While the Enable input is active, conduct a dry run.
(3) When conducting a dry run, conduct 0: Dry running speed operation and 1: High transfer speed operation according to the set
parameter in G00.
(4) If the AuxFuncLock input is active, strobe signals of auxiliary function codes (M/S/T) excluding M00, M01, M02, M30, M98 and
M99 are not output.
6-282
Chapter 6 Motion Function Block
NC_ToolMode
BOOL Execute Done BOOL
UINT NcChannel NcChannel UINT
UINT ToolMode Busy BOOL
Error BOOL
ErrorID WORD
Input-Output
UINT NcChannel Specify the NC channel to make commands
(1 ~ 4 : Channel 1 ~ Channel 4)
Input
BOOL Execute Give the tool retract or recover operation command to the rising Edge of
input.
UINT ToolMode Give the tool retract (1) or recover (2) operation command.
Output
BOOL Done Indicate that the function block is successfully applied.
BOOL Busy Indicate that execution of the function block is not completed.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the error number that occurred while the function block is running.
(1) This motion function block is the function block that the relevant NC channel gives commands, such as tool retract or recover
operation commands, to the relevant channel.
(2) Give the tool retract or recover operation command to ToolMode in the rising Edge of the Execute input.
(3) When conducting the tool retract operation, the retract operation should be conducted by the JOG operation. While the
retract operation is conducted by the JOG operation, a position at the time that an operation axis changes is remembered up
to 10 times.
(4) When conducting the tool retract operation, the JOG operation must be written not to select more than 2 axes
simultaneously.
(5) When conducting the tool recover operation, the tool should be recovered at the remembered position.
6-283
Chapter 6 Motion Function Block
NC_ReadToolMode
BOOL Enable Enabled BOOL
UINT NcChannel NcChannel UINT
Busy BOOL
ToolMode UINT
Error BOOL
ErrorID WORD
Input-Output
UINT NcChannel Specify the NC channel to make commands
(1 ~ 4 : Channel 1 ~ Channel 4)
Input
BOOL Enable While an input is active, confirm a status during tool retract/recover.
Output
BOOL Enabled Indicate that the function block is performed.
BOOL Busy Indicate that execution of the function block is not completed.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the error number that occurred while the function block is running.
UINT ToolMode Indicate whether a status is tool retract (1) or tool recover (2).
(1) This motion function block is the function block that the relevant NC channel gives the command to confirm whether a status
is tool retract or tool recover to the relevant channel.
(2) While the Enable input is active, the ToolMode output helps you to understand whether a status is tool retract (1) or tool recover
(2).
(3) When the status is tool retract, more than 2 axes should not be operated.
6-284
Chapter 6 Motion Function Block
NC_MirrorImage
BOOL Enable Enabled BOOL
UINT NcChannel NcChannel UINT
BOOL NcAxisX Busy BOOL
BOOL NcAxisY Active BOOL
BOOL NcAxisZ Error BOOL
ErrorID WORD
Input-Output
UINT NcChannel Specify the NC channel to make commands
(1 ~ 4 : Channel 1 ~ Channel 4)
Input
BOOL Enable While an input is enabled, execute the reverse operation on the specified
axis in the relevant channel.
BOOL NcAxisX Give the reverse operation signal to the X-axis.
BOOL NcAxisY Give the reverse operation signal to the Y-axis.
BOOL NcAxisZ Give the reverse operation signal to the Z-axis.
Output
BOOL Enabled Indicate that the function block is performed.
BOOL Busy Indicate that execution of the function block is not completed.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the error number that occurred while the function block is running.
(1) This motion function block is the function block that conducts the operation to reverse the transfer position on NC axes (X, Y
and Z) in the relevant channel.
(2) While the Enable input is active, conduct an operation by reversing the transfer position on the set axis.
(3) Conduct the reverse operation only for G00, G01, G02, G03, G31.x and G37.x among G codes.
(4) If NC_MirrorImage function block is executed during automatic operation start, error “0x3362” occurs, When it is necessary to
execute a function block during automatic operation startup, it can be executed after executing the NC_BlockControl function
block in SingleBlock operation mode.
6-285
Chapter 6 Motion Function Block
NC_SpindleControl
BOOL Enable Enabled BOOL
UINT NcChannel NcChannel UINT
BOOL TgtVelReached Busy BOOL
BOOL ZeroVelReached Error BOOL
BOOL SS_Control ErrorID WORD
Input-Output
UINT NcChannel Specify the NC channel to make commands
(1 ~ 4 : Channel 1 ~ Channel 4)
Input
BOOL Enable While an input is enabled, conduct the specified operation on the main
spindle in the relevant channel.
BOOL TgtVelReached Convey whether the main spindle reaches the target speed to the NC
function module.
0: The target speed is not reached
1: The target speed is reached
BOOL ZeroVelReached Convey whether the main spindle reaches the zero speed to the NC
function module.
0: The zero speed is not reached
1: The zero speed is reached
BOOL SS_Control Start the SS control mode of the main spindle. (future support)
0: Start SS controls
1: End SS controls
Output
BOOL Enabled Indicate that the function block is performed.
BOOL Busy Indicate that execution of the function block is not completed.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the error number that occurred while the function block is running.
(1) This motion function block performs the user’s specified operations for the main spindle on the NC channel specified by the
function block if the spindle control is conducted on NC.
(2) When the spindle axis of the channel is not enabled to be automatically operated on the NC function module, the error ‘0x36D0’
occurs.
(3) When the axis specified as the main spindle of the channel is not ready for operation, the error ‘0x36D1’ occurs.
(4) For more information about automatic operation on the NC function module, see ‘9.5.1 How to Operate Spindle Axes’.
6-286
Chapter 6 Motion Function Block
NC_BlockOptionalSkip
BOOL Execute Done BOOL
UINT NcChannel NcChannel UINT
UINT SkipNum Busy BOOL
Error BOOL
ErrorID WORD
Input-Output
UINT NcChannel Specify the NC channel to make commands
(1 ~ 4 : Channel 1 ~ Channel 4)
Input
BOOL Execute Give the skip signal to SkipNum in the rising Edge of input.
UINT SkipNum Specify a signal to do a block skip (1 ~ 9)
(1: /or/1, 2: /2, 3: /3, 4: /4, 5: /5, 6: /6, 7: /7, 8: /8, 9: /9)
Abort the skip function if it is set to 0 and executed.
Output
BOOL Done Indicate that the function block is successfully applied.
BOOL Busy Indicate that execution of the function block is not completed.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the error number that occurred while the function block is running.
(1) This motion function block is the function block that gives the optional skip command to the NC channel.
(2) Skip the block that “/n” is used in front of the block of NC programs according to SkipNum input values in the rising edge of the
Execute input. For example, if SkipNum is 3, skip the block that /3 is written in front of it. After skipping the block that is currently
conducted, the next block is conducted. If there are M/S/T codes, the relevant code is implemented and the next block is
executed.
(3) When setting 0 to SkipNum and executing commands, the skip function is aborted.
(4) When setting values other than 0~9 to SkipNum, the error “0x36A0” occurs.
6-287
Chapter 6 Motion Function Block
NC_ManualToolComp
BOOL Execute Done BOOL
UINT NcChannel NcChannel UINT
UINT NcAxis Busy BOOL
BOOL JOG_MPG Error BOOL
ErrorID WORD
BOOL Direction
CompValue LREAL
BOOL Low_High
BOOL Pinput
BOOL NInput
Input-Output
UINT NcChannel Specify the NC channel to make commands
(1 ~ 4 : Channel 1 ~ Channel 4)
UINT NcAxis Set the channel axis. (1~3: X=1, Y=2, Z=3)
Input
BOOL Execute Give the compensation amount input mode setting command in the
rising Edge of input.
BOOL JOG_MPG Choose operation methods (0: JOG, 1: MPG)
BOOL Direction The direction in JOG operation
(0: Forward direction, 1: Reverse direction)
BOOL Low_High The speed in JOG operation (0: Low speed, 1: High speed)
BOOL PInput The input signal measured in forward direction
BOOL NInput- The input signal measured in reverse direction
Output
BOOL Done Indicate that the function block is successfully applied.
BOOL Busy Indicate that execution of the function block is not completed.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the error number that occurred while the function block is running.
LREAL CompValue Output the calculated compensation amount.
(1) This motion function block is the function block that gives the manual measurement of the tool compensation amount
command to the axis set to NcAxis in the relevant NC channel.
(2) Give the manual measurement of the tool compensation amount command in the rising Edge of the Execute input.
(3) If a command is conducted, start the operation selected in JOG_MPG. If the signal selected in PInput or NInput becomes 1,
stop the operation and calculate a compensation amount by using the relevant position value.
(4) The compensation amount is calculated by the following formula:
Compensation amount = Position of an axis when PInput/NInput is On - Measured reference position
(5) The measured reference position is selected from “+ measured reference distance X of automatic tool offsets” to “- measured
reference distance Z of automatic tool offsets” of channel parameters according to an axis. For example, if NcAxis is selected
as Y and NInput is On, the value set in “- measured reference distance Y of automatic tool offsets” becomes the measured
reference position.
(6) The calculated compensation amount is output to CompValue and Done becomes 1.
(7) If PInput and NInput are On simultaneously, the amount is recognized with PInput.
(8) If setting axes other than X~Z to NcAxis and executing function blocks, the error “0x36B0” occurs.
6-288
Chapter 6 Motion Function Block
NC_ChgSpindleGear
BOOL Execute Done BOOL
UINT NcChannel NcChannel UINT
LREAL ChangeVelocity Busy BOOL
BOOL GearChangeCmpl Error BOOL
ErrorID WORD
LREAL MaxVelocity
UINT GearOfMotor GearChangeEnable BOOL
UINT GearOfMachine
LREAL Backlash
LREAL P_Gain
LREAL FF_Gain
LREAL Analog10Vrpm
Input-Output
UINT NcChannel Specify the NC channel to make commands
(1 ~ 4 : Channel 1 ~ Channel 4)
Input
BOOL Execute Give the spindle gear conversion command in the rising Edge of input.
LREAL ChangeVelocity Set the speed value to change
BOOL GearChangeCmpl The signal that gear changes have been completed. Each setting value
of Operand is set as the relevant parameter after turning On
LREAL MaxVelocity The maximum setting value for velocity parameters
UINT GearOfMotor The gear ratio parameter of a motor
UINT GearOfMachine The gear ratio parameter of machine
LREAL Backlash Backlash value
LREAL P_Gain P gain setting value
LREAL FF_Gain Setting value for the Feed Forward gain
LREAL Analog10Vrpm Disabled
Output
BOOL Done Indicate that the function block is successfully applied.
BOOL Busy Indicate that execution of the function block is not completed.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the error number that occurred while the function block is running.
BOOL GearChangeEnable Indicate whether to change gears
(1) This motion function block is the function block that gives the spindle gear change command to the relevant NC channel.
(2) The spindle gear change command is given in the rising Edge of the Execute input.
(3) If the command is executed, change the current spindle speed into the value set in ChangeVelocity that can change gears.
(4) If the speed of the spindle axis is changed to less than the value set in ChangeVelocity and the GearChangeEnable output
turns On, users run sequence programs to change gears and enter On in GearChangeCmpl when gear change is completed.
(5) If the GearChangeCmpl turns On, users set values of the following items set in the function block in parameters and run the
spindle with the changed settings.
Speed limit values (MaxVelocity)
6-289
Chapter 6 Motion Function Block
6-290
Chapter 6 Motion Function Block
NC_ExportProgram
BOOL Execute Done BOOL
STRING SrcProgramName Busy BOOL
STRING DstProgramName Error BOOL
BOOL OverWrite ErrorID WORD
Input
BOOL Execute Save the program to the SD card on the rising edge.
STRING SrcProgramName Set the program name stored in PLC. Combination of English and numbers
STRING DstProgramName Set the program name to be saved on the SD card. Combination of English
and numbers
BOOL OverWrite 0: Overwrite Protection, 1: Overwrite Permission
Output
BOOL Done Indicate the state of motion function block completion.
BOOL Busy Indicate that execution of the function block is not completed.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the error number that occurred while the function block is running.
(1) This motion function block is a function block that saves the NC program stored in the PLC to the SD card.
(2) After setting the ProgramName to be read from PLC and the ProgramName to be saved to the SD card and executing the
function block, the corresponding program is saved to the SD card. (Save Path: XMC-Exxx\MACxxxxxxxxxxxx\Inst)
(3) If a file with the same name as DstProgramName exists on the SD card, the following processing is performed according to
the OverWrite setting value.
OverWrite Operation
0 It does not overwrite the file and occurs an error.
1 Overwrites the file.
6-291
Chapter 6 Motion Function Block
NC_ImportProgram
BOOL Execute Done BOOL
STRING SrcProgramName Busy BOOL
STRING DstProgramName Error BOOL
BOOL OverWrite ErrorID WORD
Input
BOOL Execute At the rising edge, the program stored in the SD card is saved in the PLC.
STRING SrcProgramName Set the program name stored in SD. Combination of English and numbers
STRING DstProgramName Set the program name to be saved on the SD. Combination of English and
numbers
BOOL OverWrite 0: Overwrite Protection, 1: Overwrite Permission
Output
BOOL Done Indicate the state of motion function block completion.
BOOL Busy Indicate that execution of the function block is not completed.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the error number that occurred while the function block is running.
(1) This motion function block is a function block that saves the NC program stored in the SD card to the PLC.
(2) The NC program file must be saved in the corresponding path of the SD card. (Save Path: XMC-Exxx\MACxxxxxxxxxxxx\Inst)
(3) After setting the ProgramName to be read from SD and the ProgramName to be saved to the PLC and executing the function
block, the corresponding program is saved to the PLC.
(4) If a file with the same name as DstProgramName exists on the PLC, the following processing is performed according to the
OverWrite setting value.
OverWrite Operation
0 It does not overwrite the file and occurs an error.
1 Overwrites the file.
6-292
Chapter 6 Motion Function Block
LS_ForwardKin
BOOL Enable Valid BOOL
UINT AxesGroup AxesGroup UINT
ARRAY[0..5]OF LREAL[] AxisPosition Busy BOOL
UINT CoordSystem Error BOOL
ErrorID WORD
Position ARRAY[0..5]OF LREAL[]
WorkspaceStatus BOOL
Input-Output
Set the group to perform the forward kinematic function
UINT AxesGroup
(1~16: 1group~16group)
Input
BOOL Enable While the input is active, a forward kinematic operation is
performed on the designated axis group.
LREAL[] AxisPosition Enter the position of each axis of the axis group.
UINT CoordSystem Select the coordinate system type.(1:MCS 2:PCS)
Output
BOOL Valid Indicate the validity of function block output.
BOOL Busy It indicates that the function block is being executed.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the error number that occurred while the function
block is running.
LREAL[] Position It indicates the position of the instrument end point calculated
by the selected coordinate system type.
BOOL WorkspaceStatus Indicates whether a working radius error has occurred.
(1) This motion function block converts the position (ACS) of each axis input in AxesGroup into the selected MCS/PCS coordinate
system and outputs it as Position.
(2) When a workspace error is detected, the WorkspaceStatus value is output as ‘1’.
(3) This function block does not perform direct operation.
6-293
Chapter 6 Motion Function Block
LS_InverseKin
BOOL Enable Valid BOOL
UINT AxesGroup AxesGroup UINT
ARRAY[0..5]OF LREAL[] Position Busy BOOL
UINT CoordSystem Error BOOL
ErrorID WORD
AxisPosition ARRAY[0..9]OF LREAL[]
WorkspaceStatus BOOL
Input-Output
Set the group to perform the inverse kinematic function
UINT AxesGroup
(1~16: 1group~16group)
Input
BOOL Enable While the input is active, a inverse kinematic operation is
performed on the designated axis group.
LREAL[] Position Enter the target position of the end point of the machine.
UINT CoordSystem Select the coordinate system type.(1:MCS 2:PCS)
Output
BOOL Done Indicates that the execution of the motion function block is
completed.
BOOL Busy Indicate that execution of the function block is not completed.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the error number that occurred while the function
block is running.
LREAL[] AxisPosition It indicates the position of each axis to reach the target
position of the end point of the machine.
BOOL WorkspaceStatus Indicates whether a working radius error has occurred.
(1) This motion function block converts the MCS/PCS coordinate system selected in AxesGroup into ACS and outputs it as
AxisPosition.
(2) When a workspace error is detected, the WorkspaceStatus value is output as ‘1’.
(3) This function block does not perform direct operation.
6-294
Chapter 6 Motion Function Block
FILE_OPEN
BOOL REQ DONE BOOL
Input
BOOL REQ Set programs to run in the rising Edge.
STRING FileName Set file names to specify
UINT Mode File open mode.
Output
BOOL Done Indicate the state of motion function block completion.
BOOL Busy Indicate that execution of the function block is not completed.
DWORD FileID ID of the file that is opened.
USINT STAT Output the error number that occurred while the function block is running.
(1) Opens the file specified by ‘FileName’ on the SD memory card (FileName is a combination of letters and numbers).
(2) When executing ‘open’, an operation changes according to the setting value of the mode.
Mode Operation
0 Open a file to read and write. If there is no file, create a new file. If files with the same name exist, delete
the contents of the files and create new ones.
1 Open a file to read and continuously write. If there is no file, create a new file. If files with the same
name exist, perform continuous writing from the end of the files when writing.
2 Open a file as read-only.
(3) Read a file from the beginning upon FILE_READ after FILE_OPEN. However, as reading a file from the last part when
performing FILE_READ after FILE_WRITE, perform Read after moving a position to FILE_SEEK.
(4) The ID of a file opened when a file is normally opened is output as ‘FileID’.
(5) ‘FileID’ is used when FILE_WRITE, FILE_READ, FILE_SEEK and FILE_CLOSE commands are executed.
(6) When FILE_OPEN is normally performed, STAT = 0. And when an error occurs, STAT information is as follows:
(7) The maximum number of FILE_OPEN is 50. (Including data log files)
STAT Error status
0 Normal
1 Failed to access SD memory cards
2 File is already openfile is already open
3 If it is mode 2 and there is no file in the Inst folder.
If SD card is not installed.
4 If you have more than 50 files open
5 If the Mode is a value other than 0~2
(8) The file with FILE_OPEN must be closed by executing the FILE_CLOSE command after using it.
(9) If the PLC mode is changed, the status that a file is opened continues. Therefore, execute the FILE_OPEN command again
after closing the file.
6-295
Chapter 6 Motion Function Block
■ Program Example
(1) LD
- FileName = ‘ABC’, Mode = 0
FILE_OPEN
%MX0
EN ENO
STAT STAT
(a) If the execution condition (%MX0) is On, the FILE_OPEN function is executed.
(b) If SD cards are normally installed, open a file that is able to read and write with FileName = ‘ABC’. If files with the same
name as ABC exists, delete the contents of the files and a new file is opened.
(c) According to the status of SD cards or files, STAT displays an error. If normal operation, 0 is output.
(2) ST
INST_FILE_OPEN (REQ:=%MX0, FileName:='ABC', Mode:=0, DONE=>DONE, BUSY=>BUSY, FileID=>FileID, stat=>stat);
6-296
Chapter 6 Motion Function Block
FILE_CLOSE
BOOL REQ DONE BOOL
DWORD FileID BUSY BOOL
STAT USINT
Input
BOOL REQ Set programs to run in the rising Edge.
DWORD FileID ID of the file that is opened.
Output
BOOL Done Indicate the state of motion function block completion.
BOOL Busy Indicate that execution of the function block is not completed.
USINT STAT Output the error number that occurred while the function block is running.
■ Program Example
(1) LD
FILE_CLOSE
%MX0
EN ENO
STAT STAT
(a) The output value, FileID must be entered after FILE_OPEN is normally executed.
(b) If the execution condition (%MX0) is On, the FILE_CLOSE function is executed.
(c) According to the status of SD cards or files, STAT displays an error. If normal operation, 0 is output.
(2) ST
INST_FILE_CLOSE (REQ:=%MX0, FileID:=FileID, DONE=>DONE, BUSY=>BUSY, stat=>stat);
6-297
Chapter 6 Motion Function Block
FILE_WRITE
BOOL REQ DONE BOOL
Input
BOOL REQ Set programs to run in the rising Edge.
DWORD FileID ID of the file that is opened.
ANY_PTR WriteAddr Address of data to write
UINT Size Number of data to write
Output
BOOL Done Indicate the state of motion function block completion.
BOOL Busy Indicate that execution of the function block is not completed.
UINT WrittenSize Number of data that writing is completed.
USINT STAT Output the error number that occurred while the function block is running.
6-298
Chapter 6 Motion Function Block
■ Program Example
(1) LD
FILE_WRITE
%MX0
EN ENO
(a) The output value, FileID must be entered after FILE_OPEN is normally executed.
(b) If the execution condition (%MX0) is On, the FILE_WRITE function is executed.
(c) WriteAddr is able to be set as an array type or a data type.
(d) When setting it as an array type, data in an array range can be written into SD cards. For example, if setting it as 10 DWORD
arrays, 10 array values can be written with [0] ~ [9] using the Size.
(e) If setting it as a data type, only the relevant value is written into SD cards. The Size value is not valid.
(f) Upon normal execution, WriteSize displays the data size that is actually write.
(g) According to the status of SD cards or files, STAT displays an error. If normal operation, 0 is output.
※ WriteAddr Array Type Examples
- WriteAddr: ARRAY[0..9] OF DWORD
FILE_WRITE
%MX0
EN ENO
(a) If the execution condition (%MX0) is On, the FILE_WRITE function is executed.
(b) As WriteAddr is an array type and the Size is 10, write [0] ~ [9] data of WriteAddr.
(c) As writing 10 DWORD data, WrittenSize displays 40 and STAT outputs 0 after writing is completed.
※ WriteAddr Array Type Examples
- WriteAddr: %MD100
FILE_WRITE
%MX0
EN ENO
(a) If the execution condition (%MX0) is On, the FILE_WRITE function is executed.
(b) As the Size is 10 but WriteAddr is a data type, write the set value of %MD100.
(c) As they are DWORD data, WrittenSize displays 4 and STAT outputs 0.
(2) ST
INST_FILE_WRITE (REQ:=%MX0, FileID:=FileID, WriteAddr:=WriteAddr, Size:=Size, DONE=>DONE, BUSY=>BUSY,
WrittenSize=>WrittenSize, stat=>stat)
6-299
Chapter 6 Motion Function Block
FILE_READ
BOOL REQ DONE BOOL
Input
BOOL REQ Set programs to run in the rising Edge.
DWORD FileID ID of the file that is opened.
ANY_NUM ReadAddr The address starting with data to read.
UINT Size Number of data to read.
Output
BOOL Done Indicate the state of motion function block completion.
BOOL Busy Indicate that execution of the function block is not completed.
UINT ReadSize Number of data that reading is completed.
USINT STAT Output the error number that occurred while the function block is running.
(11) If a file pointer points to the end of a file, ‘STAT = 3’ is output as there is no data to read.
6-300
Chapter 6 Motion Function Block
■ Program Example
(1) LD
FILE_READ
%MX0
EN ENO
(a) The output value, FileID must be entered after FILE_OPEN is normally executed.
(b) If the execution condition (%MX0) is On, the FILE_READ function is executed.
(c) ReadAddr is able to be set as an array type or a data type.
(d) When setting it as an Array type, data of the file saved in SD cards can be read as many as Sizes in the set array. For
example, if ReadAddr is set as 10 DWORD arrays, read data saved in SD cards in array as many as Sizes. If setting it as
a data type, read it only with the relevant data value.
(e) The Size value is not valid. Upon normal execution, ReadSize displays the data size that is actually read.
(f) According to the status of SD cards or files, STAT displays an error. If normal operation, 0 is output.
(2) ST
INST_FILE_READ (REQ:=%MX0, FileID:=FileID, ReadAddr:=ReadAddr, Size:=Size, DONE=>DONE, BUSY=>BUSY,
ReadSize=>ReadSize, stat=>stat);
6-301
Chapter 6 Motion Function Block
FILE_SEEK
BOOL REQ DONE BOOL
Input
BOOL REQ Set programs to run in the rising Edge.
DWORD FileID ID of the file that is opened.
DINT Offset A position from Origin to Offset
Byte Origin A reference position.
Output
BOOL Done Indicate the state of motion function block completion.
BOOL Busy Indicate that execution of the function block is not completed.
DWORD Result Output the changed position.
USINT STAT Output the error number that occurred while the function block is running.
(1) Specify position to access in the file opened with ‘FileID’ in SD memory cards.
(2) A reference position is set as 3 modes as follows:
Origin Origin position
value
0 Front of file
1 The current position of a file pointer
2 End of file
(3) Move the position of a file pointer by adding the setting value of a reference position to the Offset value.
(4) If operation, BUSY = 1. Upon completion, BUSY = 0 and DONE = 1.
(5) Upon normal completion, RESULT displays the moved position and STAT = 0. And when an error occurs, STAT information
is as follows:
STAT Error status
0 Normal
1 Failed to access SD memory cards
2 The status that files with FileID are not opened
3 If the value of a position to move is less than the value of
origin
6-302
Chapter 6 Motion Function Block
■ Program Example
(1) LD
FILE_SEEK
%MX0
EN ENO
(a) The output value, FileID must be entered after FILE_OPEN is normally executed.
(b) If the execution condition (%MX0) is On, the FILE_SEEK function is executed.
(c) Move a file pointer by adding the Offset value to the setting of origin. For example, if you want to move to the beginning of
a file, set it as Offset = 0 and Origin = 0. If you move to the position of 20 bytes, you can set it as Offset = 20 and Origin = 0.
(d) Upon normal execution, RESULT displays the current file pointer.
(e) According to the status of SD cards or files, STAT displays an error. If normal operation, 0 is output.
FILE_SEEK
%MX0
EN ENO
(a) If the execution condition (%MX0) is On, the FILE_SEEK function is executed.
(b) After moving to the beginning point of a file as Origin = 0, move to the position where Offset = 50 is added.
(c) RESULT displays the moved 50 bytes.
(d) It applies to the case that moves from the end of a file.
FILE_SEEK
%MX0
EN ENO
(2) ST
INST_FILE_SEEK(REQ:=%MX0, FileID:=FileID, Offset:=Offset, Origin:=Origin, DONE=>DONE, BUSY=>BUSY,
RESULT=>RESULT, stat=>stat);
6-303
Chapter 6 Motion Function Block
SOCKET_TCPLISTEN
Input
BOOL Execute Action on rising edge
USINT ListenCH Socket service channel input to wait for external connection(1~16)
UINT LocalPort Specifies own port number(1~65535)
UINT MaxConnection Maximum number of external connections(1~15)
Output
BOOL Done Function block completion status
BOOL Busy During execution of function block
BOOL Error Whether an error occurred
UINT ErrorID ID in case of error - in normal operation: 0
(1) Function
(a) Listen operation of the socket service channel (ListenCH) set to the local TCP port number (LocalPort) is performed.
(b) Create external connection queue as many as MaxConnection.
(c) After the command ends normally (‘DONE’ value is TRUE), multiple client connections are allowed through the
SOCKET_TCPACCEPT command.
(d) Refer to the example program "14.4 SOCKET SERVICE".
(e) Refer to the detailed operation specification “Command operation timing chart”.
Tip
Close the service channel initialized with this command using the SOCKET_CLOSE command.
The maximum number of socket service channels is 16.
When the connection with the client is completed and the same LocalPort is reused after CLOSE, the use of the corresponding
port may be temporarily restricted. Refer to INVALID_ADDRESS_OR_PORT of occurrence error
6-304
Chapter 6 Motion Function Block
※ Errors occurring outside the list Refer to “SOCKET SERVICE Common Error”
6-305
Chapter 6 Motion Function Block
Input
BOOL Execute Action on rising edge
Input the listening service channel assigned through
USINT ListenCH
SOCKET_TCPLISTEN(1~16)
USINT AcceptCH Input socket service channel to accept connection with client(1~16)
UINT TIMEOUT Time-out
Output
BOOL Done Function block completion status
BOOL Busy During execution of function block
BOOL Error Whether an error occurred
UINT ErrorID ID in case of error - in normal operation: 0
ARRAY[4] Client-side IP with established connection(0~255)
AcceptedIP
OF USINT
UINT AcceptedPort Client-side Port with established connection(1~65535)
(1) Function
(a) Through SOCKET_TCPLISTEN, it accepts the connection of an external connection (Client) that comes into the service
channel (TCP Server) in the Listening status(Same function as Accept function)
(b) Refer to the example program “14.4 SOCKET SERVICE”.
(c) Refer to the detailed operation specification “Command operation timing chart”.
Tip
Before executing the corresponding command, it is necessary to set the server through SOCKET_TCPLISTEN.
Close the service channel initialized with this command using the SOCKET_CLOSE command.
The maximum number of socket service channels is 16.
6-306
Chapter 6 Motion Function Block
※ Errors occurring outside the list Refer to “SOCKET SERVICE Common Error”
6-307
Chapter 6 Motion Function Block
Input
BOOL Execute Action on rising edge
USINT ConnectCH Enter the socket service channel to use for Connect(1~16)
Connect with the specified port number.
UINT LocalPort However, if it is 0, an empty TCP port other than the well-known port is
automatically assigned.(1~65535)
Timeout time(*)
UINT Timeout 0: no timeout
1~65535 : input value * 1sec Waiting
ARRAY[4]
TargetIP Destination IP to connect(0~255)
OF USINT
UDINT TargetPort Destination Port to connect(1~65535)
Output
BOOL Done Function block completion status
BOOL Busy During execution of function block
BOOL Error Whether an error occurred
UINT ErrorID ID in case of error - in normal operation: 0
Local port number finally assigned after connection is
UINT LocalPortOut
established(1~65535)
(1) Function
(a) Attempts to connect with the destination side address ‘TargetIP’ and ‘TargetPort’. (Same function as connect function)
(b) Operation that appears differently for each product and when commands are executed
When running after entering an unreachable IP to TargetIP
- XGI-CPUZ: Error On, Occurred ErrorID 16
- XMC: After maintaining Busy status as much as the value entered in Timeout, Error On,occured ErrorID 4(Wait
indefinitely when Timeout is 0)
When executing after inputting the IP of the FEnet module that operates as a client to the TargetIP
- XGI-CPUZ: Error On, Occurred ErrorID 18
- XMC: Error On, Occurred ErrorID 10.
(c) Refer to the example program “14.4 SOCKET SERVICE”.
(d) Refer to the detailed operation specification “Command operation timing chart”.
6-308
Chapter 6 Motion Function Block
Tip
Close the service channel initialized with this command using the SOCKET_CLOSE command.
The maximum number of socket service channels is 16.
After the connection with the server and CLOSE, when reusing the same LocalPort, the use of the corresponding port may
be temporarily restricted. Refer to INVALID_ADDRESS_OR_PORT of occurrence error
It is recommended to set the automatic port assignment unless it is absolutely necessary to specify the LocalPort. (LocalPort
input value 0)
※ Errors occurring outside the list Refer to “SOCKET SERVICE Common Error”
6-309
Chapter 6 Motion Function Block
Input
BOOL Execute Action on rising edge
USINT Channel Socket service channel(TCP)(1~16)
Time-out
UINT Timeout 0: no timeout
1~65535 : input value * 1sec Waiting
Save Size
UINT Size
Data size to read from RECVDATA(0~1400)
ANY_PTR Data Data receive buffer(address)
Output
BOOL Done Function block completion status
BOOL Busy During execution of function block
BOOL Error Whether an error occurred
UINT ErrorID ID in case of error - in normal operation: 0
UINT RecvSize Receive data size(0~1400)
(1) Function
(a) The received data of the socket service channel set in ‘Channel’ is saved in ‘Data’. The size of data to be saved is
designated as ‘Size’.
(b) The actual received data size is output in ‘RecvSize’
(c) If there is no data received, it waits for the received data for the time set in the timeout (Timeout).
(d) Refer to the example program “14.4 SOCKET SERVICE”.
(e) Refer to the detailed operation specification “Command operation timing chart”.
Tip
If data is not received and the socket is closed with the SOC_CLOSE command, it will be terminated abnormally even if the
timeout is less than the timeout period.
Using a socket service channel initialized for TCP purposes
The total size of the data entered in Data must be greater than or equal to the value entered in Size.
After TCP connection and disconnection of the destination side, when the command is operated
- XGI-CPUZ: Error On, ErrorID 11 occurs when executing after reading all the contents of the receive queue After
re-execution, Done On occurs
- XMC: After maintaining Busy status as much as the value entered in Timeout, Error On, occured ErrorID 4(Wait
indefinitely when Timeout is 0)
After TCP connection, enter a value of 0 in Size and execute
6-310
Chapter 6 Motion Function Block
※ Errors occurring outside the list Refer to “SOCKET SERVICE Common Error”
6-311
Chapter 6 Motion Function Block
Input
BOOL Execute Action on rising edge
USINT Channel Socket service channel(TCP)(1~16)
ANY_PTR Data Send data buffer(address)
UINT Size Send data size(0~1400)
Output
BOOL Done Function block completion status
BOOL Busy During execution of function block
BOOL Error Whether an error occurred
UINT ErrorID ID in case of error - in normal operation: 0
(1) Function
(a) Data is transmitted through the socket service channel set as 'Channel'. The size of data to be sending is designated as
‘Size’.
(b) Refer to the example program “14.4 SOCKET SERVICE”.
(c) Refer to the detailed operation specification “Command operation timing chart”.
Tip
Using a socket service channel initialized for TCP purposes
The total size of the data entered in Data must be greater than or equal to the value entered in Size.
6-312
Chapter 6 Motion Function Block
※ Errors occurring outside the list Refer to “SOCKET SERVICE Common Error”
6-313
Chapter 6 Motion Function Block
Input
BOOL Execute Action on rising edge
USINT UdpCH Socket service channel to use with UDP
UINT LocalPort Local UDP port number(1~65535)
Output
BOOL Done Function block completion status
BOOL Busy During execution of function block
BOOL Error Whether an error occurred
UINT ErrorID ID in case of error - in normal operation: 0
(1) Function
(a) Opens the socket service channel ‘UdpCH’ designated by the local UDP port number ‘LocalPort’. (Socket function
Socket(), executing Bind()).
(b) Refer to the example program “14.4 SOCKET SERVICE”.
(d) Refer to the detailed operation specification “Command operation timing chart”.
Tip
Close the socket service channel opened with this command using the SOCKET_CLOSE command.
The maximum number of socket service channels is 16.
If the port specified by LocalPort is already in use or used for TCP purposes, the use of the port may be temporarily restricted.
Refer to INVALID_ADDRESS_OR_PORT of occurrence error.
6-314
Chapter 6 Motion Function Block
- System check
- When the local port designated port
executes a command immediately
after TCP connection and
disconnection, the error may last up
to 60 seconds for a certain period of
time to initialize the port used for the
INVALID_ADDRESS_OR_ Input IP, PORT value abnormal,
12 existing connection, and retry the
PORT unavailable status
command operation through
exception handling.
- Check whether a port that is already
in use is specified
- Local Port normal input value, check
the range
※ Errors occurring outside the list Refer to “SOCKET SERVICE Common Error”
6-315
Chapter 6 Motion Function Block
Input
BOOL Execute Action on rising edge
USINT Channel Socket service channel(UDP)(1~16)
0: no timeout
UINT Timeout
1~65535 : input value * 1sec
Save Size(0~1400)
UINT Size
Data size to read from receive buffer
ANY_PTR Data Received data
Output
BOOL Done Function block completion status
BOOL Busy During execution of function block
BOOL Error Whether an error occurred
UINT ErrorID ID in case of error - in normal operation: 0
Receive data size(0~1400)
UINT RecvSize
Data size received in RecvData
ARRAY[4]
SenderIP Send side IP address(0~255)
OF USINT
UINT SenderPort Send side port number(1~65535)
(1) Function
(a) The received data of the socket service channel set in ‘Channel’ is saved in ‘Data’. The size of data to be saved is
designated as ‘Size’.
(b) The actual received data size is output in ‘RecvSize’
(c) The IP and Port numbers of the send are stored in ‘SenderIP’ and ‘SenderPort’, respectively.
(d) If there is no data received, it waits for the received data for the time set in the timeout (Timeout).
(e) Refer to the example program “14.4 SOCKET SERVICE”.
(f) Refer to the detailed operation specification “Command operation timing chart”.
6-316
Chapter 6 Motion Function Block
Tip
If data is not received and the socket is closed with the SOCKET_CLOSE command, it will be terminated abnormally even if
the timeout is less than the timeout period.
Using a socket service channel initialized for UDP purposes
The total size of the data entered in Data must be greater than or equal to the value entered in Size.
※ Errors occurring outside the list Refer to “SOCKET SERVICE Common Error”
6-317
Chapter 6 Motion Function Block
Input
BOOL Execute Action on rising edge
USINT Channel Socket service channel(UDP)(1~16)
UINT ReceiverPort Receive side port number(1~65535)
ARRAY[4] OF ReceiverIP
Receive side IP address(0~255)
USINT
ANY_PTR Data Send data
UINT Size Send data size(0~1400)
Output
BOOL Done Function block completion status
BOOL Busy During execution of function block
BOOL Error Whether an error occurred
UINT ErrorID ID in case of error - in normal operation: 0
(1) Function
(a) Data is transmitted through the socket service channel set as 'Channel'. The size of data to be sending is designated as
‘Size’.
(b) The receiving node is designated as ‘ReceiverIP’ and ‘ReceiverPort’.
(c) Refer to the example program “14.4 SOCKET SERVICE”.
(d) Refer to the detailed operation specification “Command operation timing chart”.
Tip
Using a socket service channel initialized for UDP purposes
The total size of the data entered in Data must be greater than or equal to the value entered in Size.
6-318
Chapter 6 Motion Function Block
SOCKET_CH_NOT_INITIA Control attempts through Check whether the input socket channel is
7
LIZE uninitialized channels initialized
Command operation retry through
SOCKET_SERVICE_PRO Common errors that occur during exception handling
10
CEDURE service processing Review input values
System check
Attempts to process a command
on a socket that has already been
11 SOCKET_CLOSED Check normal connection status
closed, or a connection that has
been aborted by the peer.
CONNECTION_TIMEDOU
13 Connection time out occurred Check connection status of destination side
T
Check host device status
15 HOST_DOWN Host device error Check for abnormalities in cables and
connection paths
Check host device status
16 HOST_UNREACH Host connection disable Check for abnormalities in cables and
connection paths
Check Connection denied status of destination
18 CONNECTION_REFUSED Connection denied
side
※ Errors occurring outside the list Refer to “SOCKET SERVICE Common Error”
6-319
Chapter 6 Motion Function Block
Input
BOOL Execute Action on rising edge
USINT Channel Socket service channel(1~16)
Socket service information read mode setting
USINT Mode 0: Channel type
1: Receive buffer remaining data size
Output
BOOL Done Function block completion status
BOOL Busy During execution of function block
BOOL Error Whether an error occurred
UINT ErrorID ID in case of error - in normal operation: 0
Details according to Mode setting
Mode: 0
0: SocketUndefined
1: SocketEstablishing
2: SocketForTcpClient
DINT Info
3: SocketForTcpServer
4: SocketForTcpServerPeer
5 : SocketForUdp
Mode: 1
Receive buffer remaining data size
(1) Function
(a) Acquire detailed information according to the mode of the socket service channel set as ‘Channel’.
(b) Refer to the example program “14.4 SOCKET SERVICE”.
(c) Refer to the detailed operation specification “Command operation timing chart”.
Tip
Used after initialization of socket service channel.
6-320
Chapter 6 Motion Function Block
Input
BOOL Execute Action on rising edge
USINT Channel Socket service channel(1~16)
Output
BOOL Done Function block completion status
BOOL Busy During execution of function block
BOOL Error Whether an error occurred
UINT ErrorID ID in case of error - in normal operation: 0
(1) Function
(a) Initializes the receive buffer of the socket service channel set as ‘Channel’.
(b) Initializes the remaining receive buffer at the time of command call.
(d) Refer to the example program “14.4 SOCKET SERVICE”.
(e) Refer to the detailed operation specification “Command operation timing chart”.
Tip
Used after initialization of socket service channel.
6-321
Chapter 6 Motion Function Block
Input
BOOL Execute Action on rising edge
USINT Channel Socket service channel(1~16)
Output
BOOL Done Function block completion status
BOOL Busy During execution of function block
BOOL Error Whether an error occurred
UINT ErrorID ID in case of error - in normal operation: 0
(1) Function
(a) Close the socket service channel set as ‘Channel’.
(b) Refer to the example program “14.4 SOCKET SERVICE”.
(c) Refer to the detailed operation specification “Command operation timing chart”.
Tip
Used after initialization of socket service channel.
6-322
Chapter 6 Motion Function Block
Input
BOOL EN Function execution when 1
Output
BOOL ENO Output 1 when executed without error
ARRAY[4] OF WORD IP Local Ethernet IP address
ARRAY[4] OF WORD SUBNET Local Ethernet subnet mask
ARRAY[4] OF WORD GATEWAY Local Ethernet subnet mask
ARRAY[6] OF WORD MAC Local Ethernet Mac address
(1) Function
(a) The L_NET_IP command allows you to read the IP address, subnet mask, and gateway information of the local
Ethernet.
(b) After executing the command, the IP address of the local Ethernet is displayed as follows.
Local Ethernet Information Set
IP ADDRESS: 192.168.0.100
Subnet: 255.255.255.0
Gateway: 192.168.0.1
MAC ADDRESS: 00-16-EA-50-AB-CD
Display Information
L_NET_INFO(IP=>(*ARRAY[0..3]_OF_WORD*),SUBNET=>(*ARRAY[0..3]_OF_WORD*),
ST
GATEWAY=>(*ARRAY[0..3]_OF_WORD*), MAC=>(*ARRAY[0..5]_OF_WORD*))
6-323
Chapter 6 Motion Function Block
Input
BOOL REQ Function block execution request
ARRAY[4] OF WORD IP Local ethernet IP address to set
ARRAY[4] OF WORD SUBNET Local ethernet subnet mask to set
ARRAY[4] OF WORD GATEWAY Local ethernet gateway to set
Output
BOOL DONE Maintain 1 after initial operation
USINT STAT Complete and ERR information
(1) Function
(a) The SET_IP command allows you to set the IP address, subnet mask, and gateway of the local Ethernet.
(c) When setting the IP address, subnet mask, and gateway, you need to set the IP address, subnet mask, and gateway
as shown below.
IP Address
Subnet Mask
Gateway
6-324
Chapter 6 Motion Function Block
If the local Ethernet parameter is abnormal or the command is duplicated, the following error may occur
11 Above user setting value User set IP / SUBNET / GATEWAY setting value is not valid
12 Above the default setting (Local Ethernet parameters have never been downloaded or parameter
6-325
Chapter 6 Motion Function Block
Function Block
PID
BOOL Enable ENO BOOL
LREAL SV STAT WORD
LREAL PV MV LREAL
LREAL K_p
LREAL T_i
LREAL T_d
LREAL MV_dmax
LREAL MV_max
LREAL MV_min
LREAL PV_dmax
LREAL AWD
LREAL D_on_ERR
Input
BOOL Enable Execute the fuction block
LREAL SV Set value (SV)
LREAL PV Present value (PV)
LREAL K_p P constant (K_p)
LREAL T_i I constant (T_i)[sec]
LREAL T_d D constant (T_d)[sec]
LREAL MV_dmax MV variation limit
LREAL MV_max MV maximum limit
LREAL MV_min MV minimum limit
LREAL PV_dmax PV variation limit
BOOL AWD Anti Wind-up prohibit (0: operation, 1: prohibit)
BOOL D_on_ERR DSelect Differential Calculation Source (0:PV, 1:ERR)
Output
BOOL ENO Display that PID calculation is executing normally.
WORD STAT PID status alarm
LREAL MV Manupulate value (MV)
(1) The function block receives the set value (SV) and the present value (PV) of control object, executes PID calculation to output
Manupulated value.
(2) The set value input is current status of control object. The status is expressed as a number, you should convert to PV and input
according to system gain. For example, in a system where PV is sensed as 5000 when the temperature is 50℃, SV is set to
5000 when controlling as the temperature to 50℃.
6-326
Chapter 6 Motion Function Block
(3) The present value input is an the indicator of the current status of control object, in general, the input from the sensor saved in
the device of CPU through an input devices such as A/D conversion module, and the value must be transfered and inputed as
the PV input.
(4) The K_p input set the proportional constant of the current PID calculation. K_p is multipled by P,I,D(proportional,integral,
differential) term of the PID control, if K_p is increase, proportion, differential effect are increase and the integral effect is
decrease. In particular, if K_p input is 0, PID control is not operation.
(5) The T_i input set the integral time constant of the relevant loops. T_i is divided by I (integral) term of the PID control, if T_i is
increase, the integral effect is decrease. In particular, if T_i input is 0, I control is not operation.
(6) The T_d input sets the differential time constant of the relevant loops. T_d is multiplied by the D (differential) term of the PID
control, if T_d is increase, the differential effect is increases. If T_d input is 0, D control is not operation.
(7) The PV_max input limits PV variation of the loop. In actuall control, the PV does not always reflect exact status of the system.
The unwanted signal such as malfunction of sense, noise or disturbance can be mixed and reflected in PV. The PV change
abruptly and casues a large change in PID output. To prevent this situation, when the PV changes more than setting value in
_PID[B]_[L]dPV_max, at first it prevent change more than setting value. On the other hand, when PV_dmax set in too small,
change of the system is slowly reflected and the convergence time takes longer, set to meet the system features. In particular,
when the setting value set to “0”, the PV variation limit function does not operate.
(8) The MV_max input limits MV variation of the loop. Prevent overload and block the syatem error by limit maximum value of
controller output transferring to output devices. Also transferring the unwanted value like overflow is prevented.
(9) The MV_min input limits MV minimum value of the loop. Prevent the syatem error previously by limit mimimum value of
controller output transferring to output devices. Also transferring the unwanted value like overflow is prevented.
(10) D_on_ER input sets the D calculation source of the PID loop to ERR. D calculation is calculated with ERR or PV, when
calculating D calculation using ERR, the D response is abruptly changed by the user, so excessive input can be applied to to
driver instantly. To prevent this, the method using PV in D calculation is applied and the default value is also set to execute D
calculation using PV. If using ERR without this algorism, this bit is turned On. If the bit is off, the PID executes D calculates with
the PV value, if it is on,it executes D calculation with EER value.
(11) The AWD input is the input to activate or deactivate the Anti Wind-up function. If the input turns on, the Anti Wind-up function
is disabled.
(12) Each bits of STAT output displays the status or abnormal status of the PID controller. Each bit is on only at the moment the
opearion occurs and returns to off when the operation is canceled. Lower 8 bits of STAT display each error status of the loops,
and the upper 8 bits display control status of the loops. The assignment of each bits are as follows.
6-327
Chapter 6 Motion Function Block
Bit Status
0 Alarm when skipping operation because T_s setting is too small.
2 Alarm that the PV variation is limited.
3 Alarm that the MV variation is limited.
4 Alarm that the MV maximum is limited.
5 Alarm that the MV minimum is limited.
8 Alarm that PID calculation is in operation.
15 Alarm that the Anti Wind-up is in operation during PID operation.
6-328
Chapter 6 Motion Function Block
Input
BOOL REQ Execute the function block
BOOL QS Input emergency stop
LREAL VEL Set the target speed [u/s].
LREAL ACC Set acceleration [u/s2].
LREAL DCC Set deceleration [u/s2].
LREAL QCC Set emergency stop deceleration [u/s2].
Output
BOOL DONE Function block completion status
BOOL QACC Display whether accelerating.
BOOL QDCC Display whether decelerating.
BOOL QZSP Display whether zero speed of current speed.
BOOL QEQU Display whether the target speed matches the current speed.
LREAL CV Display the current speed.
LREAL DVDT Display current acceleration / deceleration.
(1) The function block outputs the speed value reached by applying constant acceleration/deceleration to input speed to reach.
VEL CV
T im e T im e
A c c e le ra tio n D e c e le ra tio n
(2) REQ input is using ACC/DCC/QCC value of function block in rising edge and ACC/DCC/QCC value does not change during
6-329
Chapter 6 Motion Function Block
operation.
(4) If QS value is “1” decelerate (rapid deceleration) as deceleration speed set in QCC. If QS value changes to “0” release
deceleration and acelerate/decelerate as inputted target speed.
(5) If the speed of stop status is “0” accelerate to the direction of inputted target speed and decelerate reverse direction. If the stop
operation is operation at 0 speed, the direction of acceleration/deceleration is changed.
6-330
Chapter 6 Motion Function Block
Input
BOOL REQ Execute the function block
BOOL QS Input emergency stop
LREAL VEL Set the target speed [u/s].
LREAL ACC Set acceleration [u/s2].
LREAL DCC Set deceleration [u/s2].
LREAL QCC Set emergency stop deceleration [u/s2].
LREAL JERK Set acceleration/deceleration change rate. [u/s3]
Output
BOOL DONE Function block completion status
BOOL QACC Display whether accelerating.
BOOL QDCC Display whether decelerating.
BOOL QZSP Display whether zero speed of current speed.
BOOL QEQU Display whether the target speed matches the current speed.
LREAL CV Display the current speed.
LREAL DVDT Display current acceleration / deceleration.
BOOL DONE Display completion status of function block.
(1) The function block outputs the speed value reached by appling acceleration/deceleration with JERK up to the input speed.
6-331
Chapter 6 Motion Function Block
(2) REQ input is using ACC/DCC/QCC value of function block in rising edge and ACC/DCC/QCC value does not change during
operation.
(4) If changing the target speed before reaching target speed, the overshoot or undershoot can be occurred.
(5) If QS value is “1” decelerate (rapid deceleration) as deceleration speed set in QCC. If QS value changes to “0” release
deceleration and acelerate/decelerate as inputted target speed.
6-332
Chapter 7 Program
Chapter 7 Program
Configuration of program
The motion controller's initialization, main and periodic task programs are executed based on the cycle. Each task has a fixed cycle and
is set by the user in the default parameters. There are two configurable cycles: main task cycle and periodic task cycle. The initialization
task adopts the cycle of the main task.
Classification Content
• The initialization task program is the first task program executed after the motion controller
completes its own initialization required for operation when power is applied. It runs until the
INIT_DONE command is executed.
• When the initialization program is executed, only the initialization program is executed and the
main task program and the periodic task program do not run until the INIT_DONE command
Initializing task program
is executed.
• Even while the initialization task program runs, I / O Refresh and other functions are executed
normally.
• The initialization task program is used to program various operations required for initial setting
of the motion controller.
• This program is executed at intervals of the main task’s cycle set in the motion controller.
• The main task’s cycle can be set in the "Main Task Cycle" of the basic parameters, and you
can select one among 500 μs, 1 ms, 2 ms, or 4 ms.
Main task program
• When the run time of the main task program exceeds the set main task cycle, the cycle warning
occurs. If the main task program is not completed during detecting the cycle error, the cycle
error occurs.
• The program is executed every periodic task cycle set in the motion controller.
• The periodic task cycle can be set in the "Periodic Task Cycle" of the basic parameters and
Periodic task program must be set to a multiple of the configured main task cycle.
• The periodic task program runs in the spare time after the motion controller executes the main
task program every main task cycle and then, it runs repeatedly every periodic task cycle.
For more details on the execution of the main task program and periodic task program, refer to "4.3 Motion control task".
7-1
Chapter 7 Program
7-2
Chapter 7 Program
(2) Create the necessary initialization program. Make sure to write the INIT_DONE command in the initialization task program.
(When the operating condition of the INIT_DONE is executed, the initialization task is terminated and the scan
program will run.)
7-3
Chapter 7 Program
If the main task is not completed for one cycle, just measure the time from the start of the main task cycle to the time when the
main task is completed as shown below.
Perform
Waiting Program Waiting Program
periodic task
Performance time of periodic task
Periodic task period
7-4
Chapter 7 Program
(2) Using the flag: The scan time is stored in the system flag (F) area below.
7-5
Chapter 7 Program
In the program of motion control modules, each axis, status of axis group and operating status of the motion control module can be
checked with the flag.
Most of the program examples of chapter 7 is created using flags that indicate axis and status of axis group.
Flags that indicate the status information can be used directly in the program.
For more information on the types and functions of flags, refer to “Appendix 1. Flag list”.
7-6
Chapter 7 Program
(2) 1 Scan on
(3) 1Axis//2Axis
ready on
(1) The above examples assume situation in which two axes of 1-axis and 2-axis are connected to the motion control module.
Assume the axis is connected to an EtherCAT slave and this slave is a servo drive.
(2) In case 1-axis and 2-axis are not connected when the motion control module enters the RUN, start the connection of EtherCAT
communication between motion control module and servo drive using motion function block for communication connection
(LS_CONNECT).
(3) If the connection of EtherCAT communication between motion control modules and servo drives is normally performed, servo
On/Off (MC_Power) command is issued to each axis by getting “SVON” contact to be On.
(4) In case there is no error in servo drive of the connected 1-axis and 2-axis, the servo is normally On, and it is ready to operate 1-
axis and 2-axis.
7-7
Chapter 7 Program
7-8
Chapter 7 Program
7-9
Chapter 7 Program
7-10
Chapter 7 Program
7-11
Chapter 7 Program
7-12
Chapter 7 Program
7-13
Chapter 7 Program
7-14
Chapter 7 Program
7-15
Chapter 7 Program
7-16
Chapter 7 Program
7-17
Chapter 7 Program
7-18
Chapter 7 Program
7-19
Chapter 7 Program
(6) Velocity override command input variables (7) Current position change
- Command axis command output variables
- Velocity override ratio - Execution completed
- Acceleration override ratio - function block in execution
- Jerk override ratio - Error occurrence state
- Error number
(5) 1Axis current position change /
2Axis velocity override command
7-20
Chapter 7 Program
7-21
Chapter 7 Program
Parameter Read
7-22
Chapter 7 Program
7-23
Chapter 7 Program
7-24
Chapter 7 Program
7-25
Chapter 7 Program
Parameter write
7-26
Chapter 7 Program
7-27
Chapter 7 Program
7-28
Chapter 7 Program
7-29
Chapter 7 Program
7-30
Chapter 7 Program
7-31
Chapter 7 Program
7-32
Chapter 7 Program
Serve axis speed = Main axis speed x (Synchronization ratio numerator/Synchronization denominator)
- Main axis data selection: It selects whether the data of main axis is set to command speed or current speed.
In case command speed is set, synchronization is achieved based on the speed of main axis calculated in motion control
module. In case current speed is set, synchronization is achieved by using speed data of main axis servo drive transmitted
through the communication.
- Acceleration, deceleration, jerk: Each value is set in synchronous operation.
- Buffer mode: It sets the point of time when motion function block is executed. That is, it sets whether to execute immediately or
execute after the completion of commands which are currently being performed. For more details, refer to “6.1.4 Buffer Mode
input”.
(7) Synchronous operation command output variable
: It is a variable to store output values generated when electronic gear operation (MC_GearIn) motion function block is executed.
- Synchronous operation: When serve axis is normally synchronized in main axis after the execution of motion function block, it
is On.
- Function Block in execution: When motion function block is executed, it is On, and the execution is completed, It becomes Off.
- Error occurrence state: In case error occurs while the motion function block is being executed, it is On.
- Error number: In case error occurs, the number that corresponds to error is generated.
- For details on the output of motion function block, refer to “Edge motion commands” of “6.1.3 Basic I/O Variable”.
7-33
Chapter 7 Program
7-34
Chapter 7 Program
7-35
Chapter 7 Program
7-36
Chapter 7 Program
7-37
Chapter 7 Program
1. Group Configuration
2. Servo On
7-38
Chapter 7 Program
3. Group Enable
4. Group Homing
7-39
Chapter 7 Program
5. Linear Interpolation
7-40
Chapter 7 Program
6. Group Disable
7. Ungroup
7-41
Chapter 7 Program
8. Timing diagram
7-42
Chapter 7 Program
7-43
Chapter 7 Program
Motion controller has the input of 8 points and output of 16 points internal, and it can expand input and output points using external
EtherCAT input/output modules. EtherCAT input and EtherCAT output modules possible to be mounted on the outside can be expanded
up to 64 stations and up to 1,024 points.
7-44
Chapter8 Motion Control function
In case the position control function of motion controller is used, the origin must be determined first to execute commands based
on the absolute coordinate position. The position value of absolute coordinates is the distance based on the predetermined origin(0
position). The origin determination means setting the origin of the machine for position control using absolute coordinates.
8-1
Chapter8 Motion Control function
(f) In case homing is not normally completed after the execution of homing command
In case of the origin indetermination status as above, the origin determination should be executed for absolute coordinate
position control operation.
8.1.2 Homing
(4) Operation
Before performing the homing, parameters related to the homing of servo drive must be set in each axis. Before performing
the homing, parameters related to the homing of servo drive must be set in each axis. When the origin position is determined
by homing, the origin detection signal is not recognized during the motion control operation.
The contact performed at the time of homing is entered through connector of servo drive (EtherCAT CoE support servo drive).
Typical wiring is as follows.
For the performance of homing, a method suitable for the system of users for homing operation mode (EtherCAT CoE support
drives: Refer to instruction manual for the relevant drive) should be selected.
In motion control module, actual operation after starting homing is performed in servo drive, and homing method to support
complies with servo drive. Before setting the homing, homing-related parameters are to be set in servo parameters of the axis.
8-2
Chapter8 Motion Control function
Operation
Name Description
condition
MC_Home Perform homing Edge
MC_Home
BOOL Execute Done BOOL
UINT Axis Axis UINT
LREAL Position Busy BOOL
UINT BufferMode Active BOOL
CommandAborted BOOL
Error BOOL
ErrorID WORD
Operation
Name Description
condition
MC_GroupHome Perform group homing Edge
MC_GroupHome
BOOL Execute Done BOOL
UINT AxesGroup AxesGroup UINT
LREAL[ ] Position Busy BOOL
UINT BufferMode Active BOOL
CommandAborted BOOL
Error BOOL
ErrorID WORD
Operation
Name Description
condition
MC_Home Perform group homing Edge
LS_Home
BOOL Execute Done BOOL
UINT Axis Axis UINT
LREAL Position Busy BOOL
SINT HomingMethod Active BOOL
LREAL SwitchSearchSpeed CommandAborted BOOL
LREAL ZeroSearchSpeed Error BOOL
LREAL HomingAcc ErrorID WORD
LREAL HomeOffset
UINT DoneBehavior
UINT BufferMode
8-3
Chapter8 Motion Control function
8-4
Chapter8 Motion Control function
1, 2 Supported
Methods (3) and (4) change the direction when the Home switch is On. After the home switch is On,
the point where the first index pulse meets during operation becomes the origin position.
3
Unavailabl
3, 4
e
4
Index pulse
Home switch
8-5
Chapter8 Motion Control function
L7NH
Value Description Supported
or not
Methods (5) and (6) change the direction when the Home switch is off. After the home switch is Off, the
point where the first index pulse meets during operation becomes the origin position.
5 Unavailabl
5, 6
e
6
Index pulse
Home switch
Through (7) to (10) methods, the origin position is determined by the Home switch and POT switch.
(7) Upper figure: If POT switch is Off, operation is made at switch search velocity, and the initial
movement direction becomes reverse direction CCW. If the Home switch is On, change of direction
is made. Afterwards, the location that meets the first index pulse during operation in forward direction
CW becomes the Home position, and operation is made at Zero search velocity.
(7) Middle figure: If POT switch is Off, and the Home switch is On, operation is made at switch search
velocity, and the initial movement direction becomes forward direction CW. If the Home switch is Off,
the speed is changed to Zero search velocity. Afterwards, the location that meets the index pulse first
7~10 during operation in forward direction CW becomes the Home position. Supported
(7) Below figure: If POT switch is Off, and the Home switch is On, operation is made at switch search
velocity, and the initial movement direction becomes forward direction CCW. If POT switch is On,
change of direction is made. When the Home switch is changed from On to Off, operation is made
at Zero search velocity, and the location where that meets index pulse first during continuous
operation in forward direction CW becomes the Home position.
(8) to (10) methods have the same positioning concept in homing with the above (7) method except
for the initial operational direction and motions according to the Home switch polarity. Refer to the
figure below.
8-6
Chapter8 Motion Control function
L7NH
Value Description Supported
or not
Through (11) to (14) methods, the origin position is determined by the Home switch and NOT switch.
(11) Upper figure: If NOT switch is Off, operation is made at switch search velocity, and the initial
movement direction becomes reverse direction CW. If the Home switch is On, change of direction
is made. Afterwards, the location that meets the first index pulse during operation in forward direction
CCW becomes the Home position, and operation is made at Zero search velocity.
(11) Middle figure: If NOT switch is Off, and the Home switch is On, operation is made at switch search
velocity, and the initial movement direction becomes forward direction CCW. If the Home switch is
Off, the speed is changed to Zero search velocity. Afterwards, the location that meets the index pulse
11~14 first during operation in forward direction CCW becomes the Home position. Supported
(11) Below figure: If NOT switch is Off, and the Home switch is On, operation is made at switch search
velocity, and the initial movement direction becomes forward direction CW. If NOT switch is On,
change of direction is made. When the Home switch is changed from On to Off, operation is made
at Zero search velocity, and the location where that meets index pulse first during continuous
operation in forward direction CCW becomes the Home position.
(11) to (14) methods have the same positioning concept in homing with the above (11) method except
for the initial operational direction and motions according to the Home switch polarity. Refer to the figure
below.
8-7
Chapter8 Motion Control function
L7NH
Value Description Supported
or not
14 12
13 11
14 11
13 12
13 11
14 12
Index pulse
Home switch
Methods (17) change the direction when the NOT switch is On. The position where the NOT switch is
turned off during operation after being turned on becomes the origin position.
Unavailabl
17
17 e
Negative limit switch
(NOT)
Methods (18) change the direction when the POT switch is On. The position where the POT switch is
turned off during operation after being turned on becomes the origin position.
Unavailabl
18
18 e
8-8
Chapter8 Motion Control function
L7NH
Value Description Supported
or not
The Home position is determined as method (3),(4), but index pulse is not used. In addition, the point
where the Home switch is On/Off becomes the Home position.
19
Unavailabl
19, 20 19
20 e
20
Home switch
The Home position is determined as method (5),(6), but index pulse is not used. In addition, the point
where the Home switch is On/Off becomes the Home position.
21
21
Unavailabl
21, 22
e
22
22
Home switch
8-9
Chapter8 Motion Control function
L7NH
Value Description Supported
or not
The Home position is determined as method (7)~(10), but index pulse is not used. In addition, the point
where the Home switch is On/Off becomes the Home position.
26
24 25
23 (24)
23 , 23 26 Available,
24 , 25, 24 25 others
26 Unavailabl
23 e
24 25
26
Home switch
The Home position is determined as method (11)~(14), but index pulse is not used. In addition, the
point where the Home switch is On/Off becomes the Home position.
30 28
29 27
30 27 (28)
27 , 29 28 Available,
28 , 29, others
30 29 27 Unavailabl
30 28 e
Home switch
8-10
Chapter8 Motion Control function
L7NH
Value Description Supported
or not
The location that meets index pulse first during movement in the reverse direction CCW/forward
direction CW becomes the Home position.
33, 34 Supported
Supported
-1 L7NH
dedicated
The home position is determined as in the method (-1), but the initial movement direction is CCW, and Supported
-2 it collides with a positive stopper. L7NH
dedicated
8-11
Chapter8 Motion Control function
L7NH
Value Description Supported
or not
The first movement direction is CW direction, and it operates at the switch search speed. If it hits a
reverse stopper (Negative Stopper), it waits according to the torque limit value (0x2409) when Supported
-3 returning to the origin using the stopper and the time set value (0x240A) when returning to the origin L7NH
using the stopper, and then the return to the origin is completed. dedicated
The home position is determined as in the method (-3), but the initial movement direction is CCW, and Supported
-4 it collides with a positive stopper. L7NH
dedicated
The first movement direction is CW direction, and it operates at the switch search speed. When the
home switch is On, the home position return is completed after decelerating to a stop. It returns to
the origin using only the home switch, and if it meets the limit switch during homing, it decelerates
and stops after a homing error occurs.
Reverse direction (CW) Forward direction (CCW)
Supported
-5 L7NH
dedicated
The home position is determined as in the method of (-5), but the initial movement direction is CW. Supported
-6 L7NH
dedicated
Note) ▬ : Speed during search for switch (0x6099:01), → : Speed during search for zero (0x6099:02)
8-12
Chapter8 Motion Control function
8-13
Chapter8 Motion Control function
Motion control modules execute control through programs set in motion control program. Kinds of motion control operations
include speed position control, speed velocity control, speed torque control, interpolation control, switching control between
position/velocity, switching control between position/torque, and switching control between velocity/torque.
[Example] The absolute position operation is executed with the following settings.
- Infinite running repetition position: 100.0
- Current position : 40.0
- Goal Position : 120.0
- Command position after the absolute position operation = 120.0 – (100.0 x 1) = 20.0
8-14
Chapter8 Motion Control function
2) 1-Forward direction
Positioning is executed toward the absolute position of forward direction. In case the target position is set with
the range that exceeds infinite running repetition position, error (error code: 0x1081) occurs.
[Example] The absolute position operation is executed with the following settings.
- Infinite running repetition position: 100.0
- Current position : 60.0
- Goal Position : 40.0
8-15
Chapter8 Motion Control function
[Example] The absolute position operation is executed with the following settings.
- Infinite running repetition position: 360.0
- Current position : 45.0
- Goal Position : 270.0
- Since the movement distance is 225.0°in case of the operation in forward direction, and 135.0°in
case of the operation in reverse direction, operation is made in reverse direction, the shortest
distance direction.
4) 3-Reverse direction
Positioning is executed toward the absolute position of reverse direction. In case the target position is set with
the range that exceeds infinite running repetition position, error (error code: 0x1081) occurs.
[Example] The absolute position operation is executed with the following settings.
- Infinite running repetition position: 100.0
- Current position : 15.0
- Goal Position : 70.0
5) 4-Current direction
Positioning is executed depending on the current operating direction.
In case the current operating direction is forward, operation is made in the same way as in Direction=‘1-forward
direction’ setting.
8-16
Chapter8 Motion Control function
In case the current operating direction is reverse, operation is made in the same way as in Direction=‘3 reverse
direction’ setting.
(d) In case operation parameter 「Infinite running repetition」setting is ‘0: disable’, operating direction is determined
as follows.
- Starting position < target position: Positioning operation in forward direction
- Starting position > target position: Positioning operation in reverse direction
[Example] Executes Absolute coordinate, single-axis position control with the following setting
■ Starting Position: 1000
Goal Position: 8000
The moving amount to forward direction is 7000 (7000=8000-1000).
0 1000 8000
8-17
Chapter8 Motion Control function
Starting position
Reverse Forward
[ Example ] Executes Absolute coordinate, single-axis position control with the following setting
■ Starting Position: 5000
Goal Position: -7000
It goes to reverse direction and stops at the –2000.
-2000 0 5000
MC_MoveRelative
BOOL Execute Done BOOL
UINT Axis Axis UINT
BOOL ContinuousUpdate Busy BOOL
LREAL Distance Active BOOL
LREAL Velocity CommandAborted BOOL
LREAL Acceleration Error BOOL
LREAL Deceleration ErrorID WORD
LREAL Jerk
UINT BufferMode
8-18
Chapter8 Motion Control function
MC_MoveVelocity
BOOL Execute InVelocity BOOL
UINT Axis Axis UINT
BOOL ContinuousUpdate Busy BOOL
LREAL Velocity Active BOOL
LREAL Acceleration CommandAborted BOOL
LREAL Deceleration Error BOOL
LREAL Jerk ErrorID WORD
UINT Direction
UINT BufferMode
8-19
Chapter8 Motion Control function
8-20
Chapter8 Motion Control function
MC_TorqueControl
BOOL Execute InTorque BOOL
UINT Axis Axis UINT
BOOL ContinousUpdate Busy BOOL
LREAL Torque Active BOOL
LREAL TorqueRamp CommandAborted BOOL
LREAL Velocity Error BOOL
LREAL Acceleration ErrorID WORD
LREAL Deceleration
LREAL Jerk
UINT Direction
UINT BufferMode
8-21
Chapter8 Motion Control function
8-22
Chapter8 Motion Control function
8-23
Chapter8 Motion Control function
Operation
Name Description
condition
Specified velocity operation after
MC_ MoveContinuousRelative Edge
Relative position operation
MC_MoveContinousRelative
BOOL Execute InEndVelocity BOOL
UINT Axis Axis UINT
BOOL ContinousUpdate Busy BOOL
LREAL Distance Active BOOL
LREAL EndVelocity CommandAborted BOOL
LREAL Velocity Error BOOL
LREAL Acceleration ErrorID WORD
LREAL Deceleration
LREAL Jerk
UINT BufferMode
8-24
Chapter8 Motion Control function
8-25
Chapter8 Motion Control function
conducting halt (MC_Halt) during operation with velocity control, performing operation stop with immediate stop (MC_Stop)
motion function block or executing other motion function block.
Execute
First Done
CommandAborted
Test
Second
CommandAborted
3000
Velocity
2000
Position
0
Time
8-26
Chapter8 Motion Control function
MC_AddAxisToGroup
BOOL Execute Done BOOL
UINT AxesGroup AxesGroup UINT
UINT Axis Axis UINT
UINT IdentInGroup Busy BOOL
Error BOOL
ErrorID WORD
MC_RemoveAxisFromGroup
BOOL Execute Done BOOL
UINT AxesGroup AxesGroup UINT
UINT IdentInGroup Busy BOOL
Error BOOL
ErrorID WORD
8-27
Chapter8 Motion Control function
MC_UngroupAllAxes
BOOL Execute Done BOOL
UINT AxesGroup AxesGroup UINT
Busy BOOL
Error BOOL
ErrorID WORD
MC_GroupEnable
BOOL Execute Done BOOL
UINT AxesGroup AxesGroup UINT
Busy BOOL
Error BOOL
ErrorID WORD
MC_GroupDisable
BOOL Execute Done BOOL
UINT AxesGroup AxesGroup UINT
Busy BOOL
Error BOOL
ErrorID WORD
8-28
Chapter8 Motion Control function
(1) Linear interpolation control with absolute coordinates ( 「 Absolute positioning linear interpolation
operation(MC_MoveLinearAbsolute)」)
(a) Executes linear interpolation from starting position to the target position designated on positioning data. Positionin
g control is carried out based on the position specified from homing.
(b) The direction of movement depends on the starting position and the target position for each axis.
▪ Starting position < Goal position: Positioning operation in forward direction
▪ Starting position > Goal position Positioning operation in reverse direction
Y Forward
Y2
Y1
Action by linear interpolation
X Reverse X Forward
Moving amount
of X axis
Y Reverse X1 X2
(c) To stop the current interpolation control, use MC_GroupHalt or MC_GroupStop motion function block.
(d) The speed value set in absolute position liner interpolation operation (MC_MoveLinearAbsolute) motion function
block means synthesis rate of axes that make up the axis group.
The operation speed of each configuration axis is calculated as follows.
Interpolatinspeed (F ) = Operationspeedsetinpositiondata
2 2
Interpolatingmovingamount (S ) = S1 + S 2 + ... + S102
Sub − axis1movingamount (S 2 )
Axis 2 speed (V 2 ) = Interpolatingspeed (F ) ×
Interpolatingmovingamount (S )
8-29
Chapter8 Motion Control function
(f) Restrictions
Linear interpolation by absolute coordinate system cannot be executed in the following cases.
• In case there is an axis which is in the origin indetermination state among configuration axes (error code: 0x2090)
• In case the operation speed of configuration axis exceeds the speed limit of each axis (error code: 0x2091)
• In case there is an axis in infinite running repetition operation among configuration axes (error code: 0x2094)
8-30
Chapter8 Motion Control function
8-31
Chapter8 Motion Control function
(2) Linear interpolation control with relative coordinates ( 「 Relative positioning interpolation operation
(MC_MoveLinearRelative)」)
(a) Linear interpolation is executed from starting position to movement direction targeted by each axis and position t
hat includes movement direction. Positioning control is on basis of the current stop position.
(b) Moving direction depends on the sign of the goal position (Moving amount)
▪ When the sign of movement distance is positive (+ or no sign): Positioning operation in forward direction (starting position
increase direction)
▪ When the sign of movement distance is negative ( - ):Positioning operation in reverse direction (starting position decrease
direction)
Y Forward
Y2
Y1
Action by linear interpolation
X Reverse X Forward
Moving amount
of X axis
Y Reverse X1 X2
(c) To stop the current interpolation control, use MC_GroupHalt or MC_GroupStop motion function block.
(d) The speed value set in relative position liner interpolation operation (MC_MoveLinearRelative) motion function blo
ck means interpolation speed.
The operation speed of each configuration axis is calculated as follows.
8-32
Chapter8 Motion Control function
(e) Restrictions
Linear interpolation by relative coordinate system cannot be executed in the flowing cases.
• In case there is an axis in infinite running repetition operation among configuration axes (error code: 0x2094)
• In case the operation speed of configuration axis exceeds the speed limit of each axis (error code: 0x2091)
8-33
Chapter8 Motion Control function
(d) Restrictions
Circular interpolation control using mid-point specification method cannot be performed in case of the following errors.
• In case there is an axis which is in the origin undetermined state among configuration axes at the time of absolute
coordinate circular interpolation operation (error code: 0x20A0)
• In case the midpoint specified as auxiliary point is the same as the starting position or target position (error code:
0x20A4)
• In case starting position is the same as the target position (error code: 0x20A5)
• In case the calculated radius of the arc exceeds 2147483647pls (error code: 0x20A6)
• In case start position, auxiliary point position and target position are in a straight line (error code: 0x20A7)
• In case there is an axis in infinite running repetition operation among configuration axes (error code: 0x20A8)
• In case the number of configuration axes in the axis group is four (error code: 0x20A9)
• In case axis group configuration settings are not set in order (error code: 0x20AA)
8-34
Chapter8 Motion Control function
8-35
Chapter8 Motion Control function
(c) If target position is same with start position, can progress circular interpolation. And the circle radius is distance
from midpoint to starting position (=target position)
8-36
Chapter8 Motion Control function
(d) Restrictions
Circular interpolation control using center point specification method cannot be performed in case of the following errors.
• In case there is an axis which is in the origin undetermined state among configuration axes at the time of absolute
coordinate circular interpolation operation (error code: 0x20A0)
• In case the midpoint specified as auxiliary point is the same as the starting position or target position (error code:
0x20A4)
• In case the calculated radius of the arc exceeds 2147483647pls (error code: 0x20A6)
• In case start position, auxiliary point position and target position are in a straight line (error code: 0x20A7)
• In case there is an axis in infinite running repetition operation among configuration axes (error code: 0x20A8)
• In case the number of configuration axes in the axis group is four (error code: 0x20A9)
• In case axis group configuration settings are not set in order (error code: 0x20AA)
(e) Operating Pattern
- Start position:(0.0, 0.0)
- Target position:(0.0, 0.0)
- Auxiliary position:(1000.0, 1000.0)
- CircMode: Center Point(1)
- PathChoice: CW(0)
8-37
Chapter8 Motion Control function
Sub-axis Sub-axis
Forward Forward
「CW, Arc>=180°」
Circular interpolation action
Radius Radius
Goal position
Goal
position
(b) In circular interpolation of radius specification method, the target position cannot be set the same as starting po
sition.
(c) Movement direction and the size of the arc is determined by the sign of auxiliary point and directions (CW, CC
W) set in “PathChoice” of absolute position circular interpolation operation (MC_MoveCircularAbsolute) or relative po
sition interpolation operation (MC_MoveCircularRelative) motion function block
(d) Restrictions
Circular interpolation control by radius specification method cannot be performed in case of the following errors.
• In case there is an axis which is in the origin undetermined state among configuration axes at the time of absolute
coordinate circular interpolation operation (error code: 0x20A0)
• In case starting position is the same as the target position (error code: 0x20A5)
• In case the calculated radius of the arc exceeds 2147483647pls (error code: 0x20A6)
• In case start position, auxiliary point position and target position are in a straight line (error code: 0x20A7)
• In case there is an axis in infinite running repetition operation among configuration axes (error code: 0x20A8)
• In case the number of configuration axes in the axis group is four (error code: 0x20A9)
• In case axis group configuration settings are not set in order (error code: 0x20AA)
8-38
Chapter8 Motion Control function
Sub-axis
Reverse
MC_MoveCircularAbsolute
BOOL Execute Done BOOL
UINT AxesGroup AxesGroup UINT
UINT CircMode Busy BOOL
LREAL[ ] AuxPoint Active BOOL
LREAL[ ] EndPoint CommandAborted BOOL
UINT PathChoice Error BOOL
LREAL Velocity ErrorID WORD
LREAL Acceleration
LREAL Deceleration
LREAL Jerk
UINT BufferMode
UINT TransitionMode
LREAL TransitionParameter
8-39
Chapter8 Motion Control function
MC_MoveCircularRelative
BOOL Execute Done BOOL
UINT AxesGroup AxesGroup UINT
UINT CircMode Busy BOOL
LREAL[ ] AuxPoint Active BOOL
LREAL[ ] EndPoint CommandAborted BOOL
USINT PathChoice Error BOOL
LREAL Velocity ErrorID WORD
LREAL Acceleration
LREAL Deceleration
LREAL Jerk
UINT BufferMode
UINT TransitionMode
LREAL TransitionParameter
Center
Starting position
X (x1, y1, z1)
Circular interpolation part
(d) Restrictions
The restrictions of helical interpolation are the same as those of circular interpolation according to the set circular
interpolation modes.
8-40
Chapter8 Motion Control function
400
300
Goal position
(400, 1200,350)
Center point
(400, 800, 0) Linear interpolation part
400
600
700
Starting position Helical interpolation action
( 650, 400,0)
Circular interpolation part
X
8-41
Chapter8 Motion Control function
8-42
Chapter8 Motion Control function
8-43
Chapter8 Motion Control function
8-44
Chapter8 Motion Control function
(1) ‘BufferMode’
(a) Aborting
It aborts the motion that is currently running, and executes a new motion immediately.
(b) Buffered
It executes the next command after completing motion operation that is being currently executed.
‘TransitionMode’ is not reflected.
(c) Blending
There is no stop between the two operations since the current motion is mixed with the next motion. The velocity may
vary depending on blending modes (BlendingLow, BendingPrevious, BlendingNext, BlendingHigh).
8-45
Chapter8 Motion Control function
(2) ‘TransitionMode’
(a) TMNone
Motion trajectory is not changed, and curve is not inserted between the two operations.
In case buffer mode is Blending in this setting, Buffered mode is operated.
Motions according to the buffer mode are the same as the above Aborting and Buffered.
(b) TMCornerDistance
Ther curve can be inserted by specifying the distance of two motion block corners. The conversion velocity is specified
by the BufferMode.
8-46
Chapter8 Motion Control function
MC_GearIn
BOOL Execute InGear BOOL
UINT Master Master UINT
UINT Slave Slave UINT
BOOL ContinousUpdate Busy BOOL
INT RatioNumerator Active BOOL
UINT RatioDenominator CommandAborted BOOL
UINT MasterValueSource Error BOOL
LREAL Acceleration ErrorID WORD
LREAL Deceleration
LREAL Jerk
UINT BufferMode
8-47
Chapter8 Motion Control function
LS_VarGearIn
BOOL Execute InGear BOOL
UDINT VarOffset VarOffset UINT
UINT Slave Slave UINT
BOOL ContinousUpdate Busy BOOL
INT RatioNumerator Active BOOL
UINT RatioDenominator CommandAborted BOOL
UINT MasterValueSource Error BOOL
LREAL Acceleration ErrorID WORD
LREAL Deceleration
LREAL Jerk
UINT BufferMode
MC_GearOut
BOOL Execute Done BOOL
UINT Slave Slave UINT
Busy BOOL
Error BOOL
ErrorID WORD
8-48
Chapter8 Motion Control function
8-49
Chapter8 Motion Control function
8-50
Chapter8 Motion Control function
MC_GearInPos
BOOL Execute InSync BOOL
UDINT Master Master UINT
UINT Slave Slave UINT
INT RatioNumerator StartSync BOOL
UINT RatioDenominator Busy BOOL
UINT MasterValueSource Active BOOL
LREAL MasterSyncPosition CommandAborted BOOL
LREAL SlaveSyncPosition Error BOOL
UINT SyncMode ErrorID WORD
LREAL MasterStartDistance
LREAL Velocity
LREAL Acceleration
LREAL Deceleration
LREAL Jerk
UINT BufferMode
LS_VarGearInPos
BOOL Execute InGear BOOL
UDINT VarOffset VarOffset UINT
UINT Slave Slave UINT
INT RatioNumerator Busy BOOL
UINT RatioDenominator Active BOOL
UINT MasterValueSource CommandAborted BOOL
LREAL MasterSyncPosition Error BOOL
LREAL SlaveSyncPosition ErrorID WORD
UINT SyncMode
LREAL MasterStartDistance
LREAL Acceleration
LREAL Deceleration
LREAL Jerk
UINT BufferMode
8-51
Chapter8 Motion Control function
MC_GearInPosEx
BOOL Execute InSync BOOL
UDINT Master Master UINT
UINT Slave Slave UINT
DINT RatioNumerator StartSync BOOL
UDINT RatioDenominator Busy BOOL
UINT MasterValueSource Active BOOL
LREAL MasterSyncPosition CommandAborted BOOL
LREAL SlaveSyncPosition Error BOOL
UINT SyncMode ErrorID WORD
LREAL MasterStartDistance
LREAL Velocity
LREAL Acceleration
LREAL Deceleration
LREAL Jerk
UINT BufferMode
LS_VarGearInPosEx
BOOL Execute InSync BOOL
UDINT VarOffset VarOffset UINT
UINT Slave Slave UINT
DINT RatioNumerator StartSync BOOL
UDINT RatioDenominator Busy BOOL
UINT MasterValueSource Active BOOL
LREAL MasterSyncPosition CommandAborted BOOL
LREAL SlaveSyncPosition Error BOOL
UINT SyncMode ErrorID WORD
LREAL MasterStartDistance
LREAL Velocity
LREAL Acceleration
LREAL Deceleration
LREAL Jerk
UINT BufferMode
8-52
Chapter8 Motion Control function
CAM data
캠 데이터
서보
모터
(c) A total of 32 cam profiles can be generated, each of which can be applied to each axis regardless of their order.
(d) Each cam profile can consist of up to 32,768 cam data. (The number of cam data can be set variably for each cam profile,
and a total of 32,768 data can be set in 32 cam profiles.)
(e) To halt cam operation, MC_CamOut command should be issued on the sub-axis, or another motion function block should
be operated (in case of Aborting).
(f) Cam operation command’s secondary data
Item Content
Master Set main axis (1~36: axis, 1001~1002: encoder),
MasterStartDistance Specify the position of the main-axis where the cam operation of the master axis starts.
MasterSyncPosition Specify the starting point at cam table when cam operation starts.
Set the cam operation mode.
0: Cam table is applied as an absolute value. (mcAbsolute)
StartMode
1: Cam table is applied as a relative value based on the command start position.
(mcRelative)
Select the source of the main axis for cam operation.
MasterValueSource 0: Synchronizes to the command position of the main axis.
1: Synchronizes to the current position of the main axis.
CamTableID Specify the cam table to operate.
(ㄱ) Set the offset of the cam table to be applied in MasterOffset and SlaveOffset. MasterOffset determines the offset from the
master axis start point, and Slaveoffset determines the offset from the slave axis start point. Refer to the Figure below.
8-53
Chapter8 Motion Control function
Using offset may change the start position for cam operation, causing an abrupt operation. In such a case,
MasterSyncPosition, MasterStartDistance should be used.
Before After
applying applying
Serve axis
Position
After
applying
Serve axis
Position
Before
applying
SlaveOffset
(ㄴ) Set the magnification of cam data to be applied in MasterScaling and SlaveScaling. MasterScaling determines the scale
rate of the main-axis data, and SlaveScaling determines the scale rate of the sub-axis data. Refer to the Figure below.
After applying
SlaveScaling = 2.0 SlaveScaling
SlaveScaling = 1.0
After applying
MasterScaling
8-54
Chapter8 Motion Control function
MasterSyncPosition specifies the position of the master axis within the table where the synchronization of actual cam
operation is completed, and MasterStartDistancespecifies the relative position of the master axis where the synchronization
starts. Synchronization starts at a position as far away as MasterStartDistance from MasterSyncPosition. If unable to start
synchronized operation at Cycle 1 as shown below (if the distance from the start position to the synchronized operation
start position is shorter than MasterStartDistance), synchronized operation starts at Cycle 2.
Serve axis
Position
SlaveOffset
Serve axis
Position
SlaveOffset
Actual synchronization position can vary depending on MasterScaling and SlaveScaling because
MasterSyncPosition is a value based on the inside of cam table, but MasterOffset and MasterStartDistance value
remain unaffected.
8-55
Chapter8 Motion Control function
(ㄷ) Once cam operation starts normally, InSync output is On, and EndOfProfile output is 1 scan On every time one cam table
operation is completed.
Main axis
Position
MasterSyncPosition
MasterStartDistance
Synchronization
section Synchronized operation section Time
Serve axis
Position
Time
InSync
EndOfProfile
1 Scan
(ㄹ) Cam operation mode is set in StartMode. The setting range is either 0 or 1. If the input value exceeds the setting range,
an error occurs. If it is set to 0, the cam table start position is set to the main-axis position of 0. If it is set to 1, the cam
table start position is set to the current position of the main-axis.
(ㅁ) MasterValueSource selects the source of the main axis to be synchronized. If set to 0, the serve axis performs cam
operations based on the command position of the main axis calculated in the motion controller, and if set to 1, the serve
axis performs cam operations based on the current position received via communication from the servo drive of the main
axis.
(ㅂ) CamTableID sets the number of cam table to be applied to cam operation. The setting range is from 1 to 32. If the input
value exceeds the setting range, an error "0x1115" occurs at the motion function block.
8-56
Chapter8 Motion Control function
(g) The items required when creating a cam profile are as follows.
Item Content
Start inclination If the interpolation type for the first or the last section is set to ‘Cubic’,
set the start inclination and the end inclination for the Cubic
End inclination operation.
8-57
Chapter8 Motion Control function
MC_CamIn
BOOL Execute InSync BOOL
UINT Master Master UINT
UINT Slave Slave UINT
LREAL ContinousUpdate Busy BOOL
LREAL MasterOffset Active BOOL
LREAL SlaveOffset CommandAborted BOOL
LREAL MasterScaling Error BOOL
LREAL SlaveScaling ErrorID WORD
LREAL MasterStartDistance EndOfProfile BOOL
LREAL MasterSyncPosition
UINT StartMode
UINT MasterValueSource
UINT CamTableID
UINT BufferMode
LS_VarCamIn
BOOL Execute InSync BOOL
UDINT VarOffset VarOffset UINT
UINT Slave Slave UINT
LREAL ContinousUpdate Busy BOOL
LREAL MasterOffset Active BOOL
LREAL SlaveOffset CommandAborted BOOL
LREAL MasterScaling Error BOOL
LREAL SlaveScaling ErrorID WORD
LREAL MasterStartDistance EndOfProfile BOOL
LREAL MasterSyncPosition
UINT StartMode
UINT MasterValueSource
UINT CamTableID
UINT BufferMode
8-58
Chapter8 Motion Control function
Slave position
Master position
FB1 EndOfProfile
Execute
Active
Done
FB2
3
CoveredSkipCount 2
1
(e) If Cam Skip command is re-executed during cam skip motion, or cam skip motion is aborted by another Cam Skip
command, the SkimCount of the latter Cam Skip command applies, and a new cam skip motion starts from the beginning.
In such a case, the number of cycles skipped at the time of re-execution is included in the cycles skipped after the re-
execution. Therefore, the CoveredSkipCount value is 1 point larger than the SkipCount set by the user.
(f) Relevant motion function block
Name Description Operation
condition
LS_CamSkip Skip CAM Edge
LS_CamSkip
BOOL Execute Done BOOL
UINT Slave Slave UINT
UINT SkipCount Busy BOOL
USINT SkipMode Active BOOL
CommandAborted BOOL
Error BOOL
ErrorID WORD
CoveredSkipCount UINT
8-59
Chapter8 Motion Control function
8-60
Chapter8 Motion Control function
If the command position value increases, it is judged as the forward operation of the master axis. If the command position
value decreases, it is judged as the reverse operation of the master axis.
(ㄴ) 1: Synchronization with the forward direction of the master axis
If the current position value increases, it is judged as the forward operation of the master axis.
If the current position value decreases, it is judged as the reverse operation of the master axis.
※ If the master axis is an ‘encoder’ or a synchronization control command specifying variables, the operation according to the
MasterValueSource input value is identical as there is no separation between the current position and separate command
positions. In other words, if the encoder position or variable value increases irrespective of the MasterValueSource value,
it is judged as forward operation.
8-61
Chapter8 Motion Control function
Position of the
master axis
Amount of forward
movement of the
master axis
Reference position of the
master axis when starting Amount of reverse
synchronized operation movement of the
master axis
Time
Position of the
slave axis
Synchronization with
both directions of the Time
master axis
Position of the
slave axis
Amount of
Synchronization forward movement of the
direction of the master slave axis
axis
Time
Position of the
slave axis
Time
Synchronization reverse
direction of the master Amount of
axis movement of the
slave axis
MC_GearIn
(Gear ratio 1:1)
8-62
Chapter8 Motion Control function
Item
Module O/S XG5000
Product name
XMC-E32A
XMC-E16A
V1.40 V4.28
XMC-E08A
XMC-E32C
8-63
Chapter8 Motion Control function
8-64
Chapter8 Motion Control function
8-65
Chapter8 Motion Control function
MC_HaltSuperImposed
BOOL Execute Done BOOL
UINT Axis Axis UINT
LREAL Deceleration Busy BOOL
LREAL Jerk Active BOOL
CommandAborted BOOL
Error BOOL
ErrorID WORD
8-66
Chapter8 Motion Control function
(3) Restrictions
In the following cases, SuperImposed operation cannot be performed due to errors.
(a) SuperImposed command is executed during velocity control or torque control operation (Error Code: 0x1082)
(b) MC_HaltSuperImposed command is executed when SuperImposed operation is not being performed (Error Code:
0x1083)
(4) Operation Timing
FB_Sup1
Go_Sup MC_MoveSuperimposed
Execute Done
··· Axis Axis
FB_Move1
··· ContinuousUpdate Busy
Go_Rel MC_MoveRelative 1000 Distance Active
Execute Done 100 VelocityDiff CommandAborted
··· Axis Axis 50 Acceleration Error
··· ContinuousUpdate Busy 50 Deceleration ErrorID
5000 Distance Active 1000 Jerk CoveredDistance
300 Velocity CommandAborted
100 Acceleration Error
100 Deceleration ErrorID
1000 Jerk
··· BufferMode
FB_Move1
Go_Rel
Time
Done
FB_Sup1 Time
Go_Sup
Time
Done
Time
Motion operation
VelocityDiff
Velocity 400
300
Distance
0
Time
Position 7000
5000
0
Time
8-67
Chapter8 Motion Control function
(3) Restrictions
Phase compensation control can not be executed in the case below.
(a) Sub-axis is not performing synchronization control operation (Error Code: 0x1130)
(b) The designated main-axis is the main-axis of the actual synchronized operation (Error Code: 0x1131)
(c) PhaseShift is outside the pulse unit position expression range (INT) (Error Code: 0x1132)
(d) Velocity setting is less than0, or exceeds the velocity limit for the main-axis (Error Code: 0x1133)
(e) Acceleration setting is less than 0 (Error Code: 0x1014)
(f) Deceleration setting is less than 0 (Error Code: 0x1015)
(g) Jerk setting is less than 0 (Error Code: 0x1016)
8-68
Chapter8 Motion Control function
Phase corretion
Master axis amount
Master ax is ref erenced from the slave axis
position
MC_Phasing.Ex ecute
MC_Phasing.Active
MC_Phasing.Done
8-69
Chapter8 Motion Control function
8-70
Chapter8 Motion Control function
Network
Motion Position Speed Speed Torque Current
communicati
command Position commnad command Speed command Torque command
profile on Motor
controller command controller Current
generator sensing
Speed
feedback Different
Position Position Encoder
iator
feedback feedback
Speed Speed
Motion Position Position command Mot Position
command error1 P-I 1
command
feedback1
profile 1' Servo drive1 or
controller1
generator
CrossCoupled
controller
Speed
Speed
command Mot Position
P-I 2 command2
feedback2
' Servo drive2 or
Position controller2
error 2
Motion controller
LS_MasterPLoopControlOn
BOOL Execute InControl BOOL
UINT Axis Axis UINT
LREAL P_Gain Busy BOOL
LREAL I_Gain Active BOOL
LREAL VelFF_Gain CommandAborted BOOL
LREAL CtrlLimit Error BOOL
ErrorID WORD
8-71
Chapter8 Motion Control function
LS_CrossCoupledControlOff
BOOL Execute Done BOOL
UINT Axis Axis UINT
UINT PairAxis PairAxis UINT
Busy BOOL
Error BOOL
ErrorID WORD
8-72
Chapter8 Motion Control function
(5) Restrictions
In the following cases, an error occurs and master position loop control/cross-coupled control cannot be executed.
(a) When executing or releasing master position loop control while the axis is in operation (Error code: 0x1230)
(b) When the driver to execute master position loop control does not support CSV operation mode (Error code: 0x1
160)
(c) If there is no target speed (0x60FF) object in RxPDO of the axis to execute master position loop control (Error
code: 0x1161)
(d) When the P gain input value of the master position loop control function block is negative (error code: 0x1231)
(e) When the I gain input value of the master position loop control function block is negative (error code: 0x1232)
(f) When the control output limit value of the master position loop control function block is negative (error code: 0x1
233)
(g) When executing or releaseing Cross-coupled control while the axis is in operation (Error code: 0x1234)
(h) When the same axis is set in Axis and PairAxis of Cross-coupled control function block (Error code: 0x1235)
(i) In case master position loop control is not being executed for Axis and PairAxis set in Cross-coupled control func
tion block (Error code: 0x1236)
(j) When the P gain input value of cross-coupled control function block is negative (error code: 0x1237)
(k) When a command is executed on an axis for which cross-coupled control is not being executed (Error code: 0x
1238)
(l) When homing start is executed during master position loop control (Error code: 0x10B8)
8-73
Chapter8 Motion Control function
MC_MoveRelative
E Execute Done D
Ax1 Axis Axis
C ContinuousUpdate Busy
S Distance Active
V Velocity CommandAborted
··· Acceleration Error
··· Deceleration ErrorID
··· Jerk
··· BufferMode
Speed
200
100
Distance S = 2000
50
Time
Execute E
ContinuousUpdate C
Veloticy V
(Command 100 200 50
speed)
Done D
8-74
Chapter8 Motion Control function
(b) In case ContinuousUpdate input is On in Edge operation motion function block, the input at the time when Execute input
is On (rising Edge) is applied to the motion function block if Execute input is On, That is the motion function block makes
a motion to reflect the change if the input is changed while ContinuousUpdate input is On. However, changes in input are
no longer reflected after the operation of the motion function block is completed or stopped (Busy output disabled).
MC_MoveRelative
E Execute Done D
Ax1 Axis Axis
C ContinuousUpdate Busy
S Distance Active
V Velocity CommandAborted
··· Acceleration Error
··· Deceleration ErrorID
··· Jerk
··· BufferMode
Speed
200
100
Distance S = 2000
50
Time
Execute E
ContinuousUpdate C
Veloticy V
(Command 100 200 50
speed)
Done D
(c) In case of the level operation motion function block, input variables at the time when Enable input is On (rising Edge) are
applied to operate, and input variables can be changed continuously while Enable input is On.
8-75
Chapter8 Motion Control function
E Execute Done D
Ax1 Axis Axis
C ContinuousUpdate Busy
S Position Active
V Velocity CommandAborted
··· Acceleration Error
··· Deceleration ErrorID
··· Jerk
··· Direction
··· BufferMode
Speed
Veloticy V
(Command
speed)
Time
Position Changed target
position
1500
Initial target
position
1000
Time
Execute E
ContinuousUpdate C
Position S
(Target 1000 1500
position)
Done D
8-76
Chapter8 Motion Control function
8-77
Chapter8 Motion Control function
MC_MoveVelocity MC_SetOverride
E Execute InVelocity En Enable Enabled
Ax1 Axis Axis Ax1 Axis Axis
C ContinuousUpdate Busy F VelFactor Busy
V Velocity Active ··· AccFactor Error
··· Acceleration CommandAborted ··· JerkFactor ErrorID
Speed
200
Velocity
V =100
50
Time
Execute E
ContinuousUpdate C
Enable En
8-78
Chapter8 Motion Control function
LS_EncoerPreset
BOOL Execute Done BOOL
UINT Encoder Busy BOOL
LREAL Position Error BOOL
BOOL Relative ErrorID WORD
8-79
Chapter8 Motion Control function
(b) The instant ‘infinite running repetition’ parameter among expansion parameters of operating parameters is set to Allow, the
current position is automatically changed to value within the infinite running repletion position in case it is the value other
than the range of infinite running repletion position.
[Example 1] In case the current position is -32100, and infinite running repetition position 10000
When infinite running repetition “1: Allow” is set, the current position becomes 7900.
[Example 2] In case the current position is 15000, and infinite running repetition position 10000
When infinite running repetition “1: Allow” is set, the current position becomes 5000.
(c) Infinite running repetition setting of driving axis can be made by using software package or axis parameter change function.
(d) Related parameter setting
Initial
Item Content Setting range
value
Set repeated position range value in case of
Infinite running repeat Long real (LREAL) positive
being used as infinite running repetition 360 pls
position number
mode
Set whether to allow infinite running repetition 0: disable
Infinite running repeat 0: disable
operation function. 1:Enable
8-80
Chapter8 Motion Control function
8-81
Chapter8 Motion Control function
(e) Software high/low limit are don’t detect in the following cases.
• If the soft upper limit and lower limit values are set as the maximum and minimum values based on a pulse position
a) If ‘Position Control Range Expansion’ = ‘0: Disable’
- Soft upper limit: 2147483647, Soft lower limit: -2147483648
b) If ‘Position Control Range Expansion’ = ‘1: Enable’
- Soft upper limit: 140737488355327, Soft lower limit: -140737488355328
If ‘Position Control Range Expansion’ is set to ‘1: Enabled’ and soft upper/lower limits are 2147483647 and -
2147483648, the existing initial values, soft upper/lower limits are checked by these values.
• If the soft upper and lower limits are set to the same value (soft upper limit = soft lower limit)
• In case of the operation with speed control when expansion parameter “S/W limits during speed control” is set to ” 0: Don’t
detect”.
8-82
Chapter8 Motion Control function
•
(f) Related parameter setting
Item Content Setting range Initial value
S/W upper
2147483647 pls
limit Set the range of software limit function Long real(LREAL)
S/W low limit -2147483648 pls
(c) Whether to set abnormality to a warning or an alarm in case of the occurrence of tracking error can be set in Tracking Error
Level of expansion parameter.
The operations according to the set values are as follows.
- ‘0: warning’
When an error occurs in tracking error, the 「Over deviation warning (_AXxx_DEV_WARN)」flag is On, and
warning error of tracking error (error code: 0x101D)) occurs. The axis continues to operate without stopping.
- ‘1: alarm’
When an error occurs in tracking error, the 「Over deviation alarm (_AXxx_DEV_ERR)」flag is On, and the
alarm error of tracking error (error code: 0x101C) occurs. The axis makes a sudden stop at 「Sudden stop
deceleration」.
(d) In the following situations, the error in tracking error is not examined.
In case the「Tracking error over-range value」is 0
In case of the operation in homing or torque control
(e) Related parameter setting
Initial
Item Content Setting range
value
Tracking error over- Set the value to detect more than position 0 or Long real (LREAL)
0
range value deviation. positive number
0: warning 0:
Tracking error level Set the error level more than deviation.
1: alarm warning
8-83
Chapter8 Motion Control function
8-84
Chapter8 Motion Control function
(e) To use the latch (touch probe) function, the following objects must be included in the PDO setting of the slave parameter.
Trigger input RxPDO TxPDO
0x60B9:0 Touch probe Status
Touch probe 1
0x60B8:0 Touch probe function 0x60BA:0 touch probe 1 forward direction
rising edge
position values
0x60B9:0 Touch probe Status
Touch probe 2
0x60B8:0 Touch probe function 0x60BC:0 touch probe 2 forward direction
rising edge
position values
0x60B9:0 Touch probe Status
Touch probe 1
0x60B8:0 Touch probe function 0x60BB:0 touch probe 1 reverse direction
falling edge
position values
0x60B9:0 Touch probe Status
Touch probe 2
0x60B8:0 Touch probe function 0x60BD:0 touch probe 2 reverse direction
falling edge
position values
0x60B9:0 Touch probe Status
Touch probe 1
0x60B8:0 Touch probe function 0x60BA:0 touch probe 1 forward direction
index pulse
position values
0x60B9:0 Touch probe Status
Touch probe 2
0x60B8:0 Touch probe function 0x60BC:0 touch probe 2 forward direction
index pulse
position values
In case there are not above objects, an error (error code: 0x10E0) occurs when latch (touch probe) command is used.
(f) Operation Timing
< When TriggerInput is set to touch probe rising edge (0 to 1) or encoder index pulse (4 to 5)>
8-85
Chapter8 Motion Control function
Trigger
Occur Event
Trigger 발생
Event
End point of
허용영역 끝위치
Permissible range
E t
Starting
허용영역 point 시작위치 of
Permissible range
E t
Don’t기록되지
위치 record position
않음 Record
위치 기록됨position 시간 Time
MC_TouchProbe
BOOL Execute Done BOOL
UINT Axis Axis UINT
UINT TriggerInput TriggerInput UINT
BOOL WindowOnly Busy BOOL
LREAL FirstPosition CommandAborted BOOL
LREAL LastPosition Error BOOL
ErrorID WORD
RecordedPosition LREAL
MC_TouchProbeEx
BOOL Execute Done BOOL
UINT Axis Axis UINT
UINT TriggerInput TriggerInput UINT
UINT TriggerMode Busy BOOL
BOOL WindowOnly CommandAborted BOOL
LREAL FirstPosition Error BOOL
LREAL LastPosition ErrorID WORD
RecordedPosition LREAL
8-86
Chapter8 Motion Control function
8-87
Chapter8 Motion Control function
MC_ReadParameter
BOOL Enable Vaild BOOL
UINT Axis Axis UINT
INT ParameterNumber Busy BOOL
Error BOOL
ErrorID WORD
Value LREAL
8-88
Chapter8 Motion Control function
LS_ReadCamData
BOOL Enable Done BOOL
UINT Axis Axis UINT
UINT CamTable ID Busy BOOL
Array [] of LREAL MasterPoint Error BOOL
Array [] of LREAL SlavePoint ErrorID WORD
Array [] of BYTE CamCurveSel StartSlope LREAL
EndSlope LREAL
CamPointNum UINT
LS_WriteCamData
BOOL Execute Done BOOL
UINT Axis Axis UINT
UINT CamTable ID Busy BOOL
LREAL StartSlope Error BOOL
LREAL EndSlope ErrorID WORD
UINT CamPointNum
Array[] of LREAL MasterPoint
Array[] of LREAL SlavePoint
Array[] of BYTE CamCurveSel
UINT ExecutionMode
8-89
Chapter8 Motion Control function
(d) The value between 0~255 can be entered in SubIndex, and if the value is set outside the range, "error 0x1F12” occurs.
(e) In Length, values ranging from 1 to 4 can be entered, which mean 1 to 4 bytes. If the value is set outside the range, “error
0x1F12” occurs.
(f) The parameter values changed by SDO write function are not automatically stored to the ROM of the slave device. In
order to store the changed parameters to the servo drive EEPROM, please use SDO Save command.
(g) Relevant motion function block
(ㄱ) Read from SDO
Name Description Operation
condition
LS_ReadSDO Read from SDO level
LS_ReadSDO
BOOL Execute Done BOOL
UINT Slave Slave UINT
UINT Index Busy BOOL
UINT SubIndex Error BOOL
UINT Length ErrorID WORD
Value DINT
LS_WriteSDO
BOOL Execute Done BOOL
UINT Slave Slave UINT
UINT Index Busy BOOL
UINT SubIndex Error BOOL
UINT Length ErrorID WORD
DINT Value
UINT ExecutionMode
8-90
Chapter8 Motion Control function
8-91
Chapter8 Motion Control function
8-92
Chapter8 Motion Control function
(f) Wkc stands for Working Counter. If data is successfully read at the designated slave device, it increases by 1. If EcatCmd
is 7(BRD), it increases by 1 due to all slaves that performed normal read operation.
(g) After the execution of ESC read command, if normal data read operation is executed from the designated slave device,
Done output is on.
(h) ESC read command and ESC write command cannot be simultaneously executed. If they are executed at the same time,
the command of the program last executed is executed, and an error (0x1021) occurs in the preceding command.
(i) Relevant motion function block
Name Description Operation
condition
LS_ReadEsc Read from ESC Edge
LS_ReadEsc
BOOL Execute Done BOOL
UINT Adp Busy BOOL
UINT Ado Error BOOL
UINT Length ErrorID WORD
UINT EcatCmd Value UDINT
Wkc UINT
(j) In the following cases, ESC reading cannot be performed due to errors, properly.
(ㄱ) No slave device is connected to module (Error Code: 0x0F09)
(ㄴ) Adp setting value is outside the range (Error Code: 0x0F60)
(ㄷ) Length setting value is outside the range (Error Code: 0x0F61)
(ㄹ) EcatCmd setting value is outside the range (Error Code: 0x0F62)
(ㅁ) No response to ESC read command (Error Code: 0x0F63)
8-93
Chapter8 Motion Control function
if EcatCmd is 2, and Adp is set to 0xFFFF, when executing ESC read function block, reading is not performed
because the Adp at the time of receiving EtherCAT frame from the first slave device is not 0, only increasing Adp
by 1. When the second slave device receives EtherCAT frame, writing is performed because the Adp value of the
first slave value increased by 1 to 0. The Adp setting values depending on the slave device connection order are
as follows.
Slave device Setting value
The first slave connected 0
The second slave 0xFFFF
connected
: :
The 64th slave connected 0xFFC1
(ㄴ) 5 – FPWR(Configured Address Physical Write)
This order is used to write the data by designating the station address of the slave device after normal
communication connection by the master. If the Station Address of the slave device set by EtherCAT master
matches the transmitted Adp, the slave device writes data of the size designated by Length in the Ado area. The
Station Address of slave device set by master can be checked in slave information dialog box when the slave is
added.
0x0020 ~ 0x0021
Write Protection
0x0030 ~ 0x0031
8-94
Chapter8 Motion Control function
0x0120 (AL Control) register can be written after the connection of normal communication, not the execution of
connection/disconnection command.
(i) ESC read command and ESC write command cannot be simultaneously executed. If they are executed at the same time,
the command of the program last executed is executed, and an error (0x1021) occurs in the preceding command.
(j) Relevant motion function block
Name Description Operation
condition
LS_WriteEsc Write to ESC Edge
LS_WriteEsc
BOOL Execute Done BOOL
UINT Adp Busy BOOL
UINT Ado Error BOOL
UINT Length ErrorID WORD
UINT EcatCmd Wkc UINT
UDINT Value
(k) In the following cases, ESC writing cannot be performed due to errors, properly
(ㄱ) No slave device is connected to module (Error Code: 0x0F09)
(ㄴ) Adp setting value is outside the range (Error Code: 0x0F70)
(ㄷ) Length setting value is outside the range (Error Code: 0x0F71)
(ㄹ) EcatCmd setting value is outside the range (Error Code: 0x0F72)
(ㅁ) No response to ESC read command (Error Code: 0x0F73)
(ㅂ) Ado setting value is not correct (Error Code: 0x0F74)
8-95
Chapter8 Motion Control function
Cable
Tx data
Rx data
Port multiplier
Open
Port multiplier of up to 1 can be used. In case of using a port multiplier, it occupies an IO slave number. Therefore, a caution is required
when using since the use of the port multiplier reduces the number of IO slaves available.
(a) Redundancy is configured with GX-JC03 port multiplier and 2 L7NH slaves.
(b) The operation of the EC_LINE_FAIL flag according to the condition is as follows.
_EC_LINE_FAIL[0] : port multiplier
_EC_LINE_FAIL[1] : slave 2
_EC_LINE_FAIL[2] : slave 3
8-96
Chapter8 Motion Control function
- When only X3 is disconnected, _EC_LINE_FAIL[0] of the port multiplier is ON and other LineFail flags are not ON
because port A among general slaves (Slave 2, Slave 3) is not disconnected.
- When only X2 is disconnected, _EC_LINE_FAIL[0] of the port multiplier is ON and _EC_LINE_FAIL[1] is ON because
port A of slave No. 2 is ON.
- If both X2 and X3 are disconnected, _EC_LINE_FAIL[0] of the port multiplier is turned on, and _EC_LINE_FAIL[1],
_EC_LINE_FAIL[2] are turned on because all the port status information of the slave cannot be read.
8-97
Chapter8 Motion Control function
8-98
Chapter8 Motion Control function
If a signal is input into the built-in input channel 1, the position value is latched in the rising edge and saved as the encoder 1
input position latch value.
If a signal is input into the built-in input channel 2, the position value is latched in the rising edge and saved as the encoder 2
input position latch value.
500
0
1500 Encoder1 input position
1500
latch(%KL5)
Latch value 1000 Encoder2 input position
1000
Latch(%KL6)
500
500
0
0
8-99
Chapter8 Motion Control function
8-100
Chapter8 Motion Control function
Item
Module O/S XG5000
Product name
XMC-E32A
XMC-E16A
V1.70 -
XMC-E08A
XMC-E32C
8-101
Chapter8 Motion Control function
(b) If you select the General Information tab, you can set the node switch operation mode. Node switch operation mode can
be set to 3 modes: 0: Connection order check/1: No connection order check/2: Node switch use.
8-102
Chapter8 Motion Control function
of the slave with the station number that matches the value set in the node switch. The slaves moved by the node switch
setting must use the same slave.
(c) 2: node switch not use: This is an operation mode that does not use node switches.
XMC
(a) When the node switch operation mode is ‘0: check connect order’, as the node switch setting is different from the
connection order of EtherCAT parameter, 0xF0E error occurs and EtherCAT connection fails.
(b)When the node switch operation mode is ‘1: No check connect order’, as the station number is set by the node switch
regardless of the connection order, the first slave is connected as slave 4, the second slave is slave 3, the third slave is slave
2, and the fourth slave is connected as slave 1.
XMC
(b) When the node switch operation mode is ‘2: No node switch use’,as node switch is not used, as set in EtherCAT
parameter, the first slave is connected as slave 1, the second slave is slave 2, the third slave is slave 3, and the fourth
slave is connected as slave 4.
XMC
8-103
Chapter8 Motion Control function
Y mcs
X mcs
8-104
Chapter8 Motion Control function
8.4.2 ACS/MCS/PCS/TCP
ACS: Axes Coordinate System (ACS) represents the actual movement of the physical motors.
MCS: Machine Coordinate System (MCS) is related with machines (robots). It is the fixed home position of the mechanical
system represented as the Cartesian coordinate system.
PCS: Product Coordinate System based on MCS represents the position of products being moved or rotated. PCS is linked
to the products through a program, and a user can be changed.
TCP (Tool Center Point) is the center or end point of the tool as a position to which a machine (robot) is moved by the command.
In case of operation using MCS or PCS, the target position is represented by TCP. TCP consists of 6 RotC data: Px,Py,Pz,
representing movement along XYZ axes; RotA representing rotation along X axis; RotB representing rotation along Y axis; and
RotC representing rotation along Z axis.
8-105
Chapter8 Motion Control function
Z mcs
Z pcs
Y mcs Y pcs
TransZ
X pcs
TransX
TransY
X mcs
Zpcs=Z`pcs Z`pcs
Z``pcs
RotC Z``pcs Z```pcs
Y```pcs
Y`pcs RotB
Y`pcs=Y``pcs Y``pcs
Ypcs
RotA
X`pcs X`pcs
X``pcs X```pcs=X``pcs
MC_SetCartesianTransform
BOOL Execute Done BOOL
UINT AxesGroup AxesGroup UINT
LREAL TransX Busy BOOL
LREAL TransY Active BOOL
LREAL TransZ CommandAborted BOOL
LREAL RotAngleA Error BOOL
LREAL RotAngleB ErrorID WORD
LREAL RotAngleC
8-106
Chapter8 Motion Control function
(b) Delta3
MCS of the Delta robot
In case of a Delta robot, the center of Fixed Frame is defined as MCS. The relationship between each axis connected to Delta
and MCS are as shown below.
Y mcs
Axis3
Z mcs
Y mcs
Axis2
X mcs
Axis3 Axis2
X mcs
Axis1
Axis1
TCP
Reverse
0
Forwar
d
8-107
Chapter8 Motion Control function
(c) LinearDelta3
X mcs
Axis3
Axis1
Axis1
TCP
Fixed frame
Forward direction
8-108
Chapter8 Motion Control function
(d) T-Gantry
CW(-) CW(-)
CCW(+) CCW(+)
Axis1 Axis2
Zmcs
TCP Xmcs
8-109
Chapter8 Motion Control function
(b) Delta3/Delta3R
Parameter Description
KinParam[0] Lf:Link length of the fixed frame(mm)
Rf
KinParam[1] Lm: Link length of the moving frame(mm)
KinParam[2] Rf: Length from the center of the fixed frame to the
link of the fixed frame(mm)
KinParam[3] Rm: Length from the center of the moving frame
to the link of the moving frame(mm)
Rm
(c) LinearDelta3/LinearDelta3R
Parameter Description
KinParam[0] Lm: Link length of the moving frame(mm)
RfTop KinParam[1] Hf:Fixed frame height (mm)
KinParam[2] RfTop: Radius of top fixed frame(mm)
KinParam[3] RfBottom: Radius of bottom fixed frame(mm)
hf
RfBottom
KinParam[4] Rm: Length from the center of the moving frame
to the link of the moving frame(mm)
Rm
(d) T-Gantry
The T-Gantry robot does not need the parameter setting of a separate mechanism.
8-110
Chapter8 Motion Control function
Axis1
Y mcs
Axis3
ToolOffsetZ
ToolOffsetX
ToolOffsetY TCP
Number of Unit
Machine type
axis Axis 1 Axis 2 Axis 3 Axis 4
XYZ Axis 3 mm mm mm -
Delta3 Axis 3 degree degree degree -
Delta3R Axis 4 degree degree degree degree
LinearDelta3 Axis 3 mm mm mm -
LinearDelta3R Axis 4 mm mm mm degree
MC_SetKinTransform
BOOL Execute Done BOOL
UINT AxesGroup AxesGroup UINT
UINT KinType Busy BOOL
UINT KinExtParam Active BOOL
ARRAY[0..11] OF LREAL[ ] KinParam CommandAborted BOOL
LREAL ToolOffsetX Error BOOL
LREAL ToolOffsetY ErrorID WORD
UINT ToolOffsetZ
8-111
Chapter8 Motion Control function
LS_SetWorkspace
BOOL Execute Done BOOL
UINT AxesGroup AxesGroup UINT
UINT WorkspaceType Busy BOOL
BOOL WorkspaceError Active BOOL
ARRAY[0..7] OF LREAL[ ] WorksapceParam CommandAborted BOOL
Error BOOL
ErrorID WORD
Rectangle
Parameter Value
WorkspaceParam[0] X max(mm)
Y Axis
WorkspaceParam[1] X min(mm)
WorkspaceParam[2] Y max(mm)
WorkspaceParam[3] Y min(mm)
WorkspaceParam[4] Z max(mm)
Ymax
X Axis
8-112
Chapter8 Motion Control function
Cylinder
Parameter Value
WorkspaceParam[0] Radius(mm)
Z Axis Radius WorkspaceParam[1] Z max(mm)
WorkspaceParam[2] Z min(mm)
Zmax
Zmin
X Axis
Delta
Z Axis
Parameter Value
YAxis WorkspaceParam[0] Zu(mm)
WorkspaceParam[1] Hcy(mm)
WorkspaceParam[2] Hco(mm)
WorkspaceParam[3] Rcy(mm)
Zu
WorkspaceParam[4] Rco(mm)
Rcy
WorkspaceParam[5] -
Hco Hcy
Rco
Sector
Parameter Value
WorkspaceParam[0] L end (mm)
Y Axis WorkspaceParam[1] L start(mm)
WorkspaceParam[2] Z max(mm)
WorkspaceParam[3] Z min(mm)
WorkspaceParam[4] EndAngle(degree)
WorkspaceParam[5] StartAngle(degree)
EndAngle
StartAngle
X Axis
8-113
Chapter8 Motion Control function
8.4.6 Time Linear Interpolation Operation for Absolute Position of Coordinate System
Use the related axes set in the axes group to perform interpolation control by moving the TCP from the current position to the
target position in the set time in a linear trajectory.
(1) Executes linear interpolation from starting position to the target position designated on positioning data. Positioning
control is carried out based on the position specified from homing.
(2) Set Position[ ] to define the TCP target position.
Variable Meaning Unit
Position[0] X axis position mm
Position[1] Y axis position mm
Position[2] Z axis position mm
Position[3] X axis rotation amount degree
Position[4] Yaxis rotation amount degree
Position[5] Zaxis rotation amount degree
(3) Depending on the robot type, some Position variable areas may not be applied. Data input in the unapplied areas
is not reflected in coordinate system operation.
Variable Robot type
XYZ Delta3
Position[0] Apply Apply
Position[1] Apply Apply
Position[2] Apply Apply
Position[3] Disabled Disabled
Position[4] Disabled Disabled
Position[5] Disabled Disabled
(4) Perform linear interpolation to reach the target TCP in the time set in TrajTime.
(5) TrajType input determines the type of acceleration/deceleration for reaching the interpolation trajectory. Three
types of 0: Trapezoid/Sine1/Sine2are available.
Trapezoid
Operation profile of basic trapezoidal linear acceleration/deceleration
Sine1
The velocity profile of this operation type consists of sine curves. It is suitable for low-load high-velocity operation, and
reduces impact on the motor caused by load changes.
8-114
Chapter8 Motion Control function
(6) When CoordSystem input is set to 1, the robot operates using the Position values as MCS coordinates. When it
is set to 2, the robot operates using the Position values as PCS coordinate system.
(7) To stop the current interpolation control, use MC_GroupHalt or MC_GroupStop motion function block.
(8) Relevant motion function block
Name Description Operation condition
MC_MoveLinearTimeAbsolute Coordinate system absolute Edge
position time linear interpolation
operation
LS_MoveLinearTimeAbsolute
BOOL Execute Done BOOL
UINT AxesGroup AxesGroup UINT
UINT CoordSystem Busy BOOL
ARRAY[0..5] OF LREAL[ ] Position Active BOOL
UINT TrajType Error BOOL
LREAL TrajTime ErrorID WORD
UINT BufferMode
UINT TransitionMode
LREAL TransitionParameter
8-115
Chapter8 Motion Control function
(9) Restrictions
Coordinate system absolute position time linear interpolation control cannot be performed in case of the following errors
• CoordSystem input is set to a value other than 1 or 2 (Error Code: 0x20BC)
• The operation parameter unit of the component axes is not compatible with the coordinate system type (Error Code:
0x2063)
• In case there is an axis which is in the origin indetermination state among configuration axes (error code: 0x20B0)
• In case the operation speed of configuration axis exceeds the speed limit of each axis (error code: 0x20B9)
• In case there is an axis in infinite running repetition operation among configuration axes (error code: 0x20BA)
Y Axis
Start point
400
100
Target point
0 X Axis
100 500 1000
Interpolation velocity
0 Time(msec)
1000 3000 4000
Execute
Busy
Active
Done
8-116
Chapter8 Motion Control function
Y axis
Middle point
Target point
St art point
Center point
X axis
(d) Restrictions
Circular interpolation control using mid-point specification method cannot be performed in case of the following errors.
• During absolute coordinate circular interpolation, home position has not been determined in one or more of the
component axes (Error Code: 0x20A0)
• In case the midpoint specified as auxiliary point is the same as the starting position or target position (error code:
0x20A4)
• In case starting position is the same as the target position (error code: 0x20A5)
• In case start position, auxiliary point position and target position are in a straight line (error code: 0x20A7)
• In case there is an axis in infinite running repetition operation among configuration axes (error code: 0x20A8)
8-117
Chapter8 Motion Control function
Y axis
Operation by the
circular interpolation
Middle point
(20, 60)
Target point
60 (100, 60)
Center point
St art point
(0, 0)
X axis
0 20 100
Y axis
Y axis
Operation by the circular Target point
interpolation
Target point
Operation by the
circular interpolation
Start point
Center point Radius Center point
of the circle of the circle
Start point
Radius
X axis X axis
Origin Origin
8-118
Chapter8 Motion Control function
(c) If target position is same with start position, can progress circular interpolation. And the circle radius is distance
from midpoint to starting position (=target position)
Center point
of the circle
X axis
Origin
(d) Restrictions
Circular interpolation control using center point specification method cannot be performed in case of the following errors.
• During absolute coordinate circular interpolation, home position has not been determined in one or more of the
component axes (Error Code: 0x20A0)
• In case the midpoint specified as auxiliary point is the same as the starting position or target position (error code:
0x20A4)
• In case start position, auxiliary point position and target position are in a straight line (error code: 0x20A7)
• In case there is an axis in infinite running repetition operation among configuration axes (error code: 0x20A8)
(e) Operating Pattern
- Start position:(0.0, 0.0, 0.0)
- Target position:(0.0, 0.0, 0.0)
- Auxiliary position:(100.0, 100.0, 0.0)
- CircMode: Center Point(1)
- PathChoice: CW(0)
Y axis
Center point(100,100)
100
X axis
0 100
8-119
Chapter8 Motion Control function
Y axis Y axis
「CW, Arc>=180°」
Circular interpolat ion
operat ion
(b) In circular interpolation of radius specification method, the target position cannot be set the same as starting po
sition.
(c) The movement direction and the size of the arc are determined by the signs of the auxiliary point and the dire
ction set in the absolute position coordinate system circular interpolation operation (MC_MoveCircularAbsolute2D), th
e relative position coordinate system circular interpolation operation (MC_MoveCircularRelative2D), or “PathChoice”
of the motion function block.
(d) Restrictions
Circular interpolation control by radius specification method cannot be performed in case of the following errors.
• During absolute coordinate circular interpolation, home position has not been determined in one or more of the
component axes (Error Code: 0x20A0)
• In case starting position is the same as the target position (error code: 0x20A5)
• In case start position, auxiliary point position and target position are in a straight line (error code: 0x20A7)
• In case there is an axis in infinite running repetition operation among configuration axes (error code: 0x20A8)
8-120
Chapter8 Motion Control function
「CW, Arc<180° 」
Y axis Circular interpolat ion
operat ion
MC_MoveCircularAbsolute2D
BOOL Execute Done BOOL
UINT AxesGroup AxesGroup UINT
UINT CircMode Busy BOOL
LREAL[ ] AuxPoint Active BOOL
LREAL[ ] EndPoint CommandAborted BOOL
UINT PathChoice Error BOOL
LREAL Velocity ErrorID WORD
LREAL Acceleration
LREAL Deceleration
LREAL Jerk
UINT CoordSystem
UINT BufferMode
UINT TransitionMode
LREAL TransitionParameter
8-121
Chapter8 Motion Control function
MC_MoveCircularRelative2D
BOOL Execute Done BOOL
UINT AxesGroup AxesGroup UINT
UINT CircMode Busy BOOL
LREAL[ ] AuxPoint Active BOOL
LREAL[ ] EndPoint CommandAborted BOOL
UINT PathChoice Error BOOL
LREAL Velocity ErrorID WORD
LREAL Acceleration
LREAL Deceleration
LREAL Jerk
UINT CoordSystem
UINT BufferMode
UINT TransitionMode
LREAL TransitionParameter
(b) To perform helical interpolation, set the target position for linear interpolation at Pz of ‘EndPoint’.
Z axis
Linear interpolation
line
Y axis
Center point
St art point
X axis (x1, y1, z1) Circular interpolat ion
line
(c) Restrictions
The restrictions of helical interpolation are the same as those of circular interpolation according to the set circular
interpolation modes.
8-122
Chapter8 Motion Control function
Z axis
40
30
Target point
(40,120,35)
10 40 80 120
0 Y axis
60
70
Start point Circular interpolation
(65,40,0) Circular operation
Xaxis interpolation line
8-123
Chapter8 Motion Control function
Z mcs
Z mcs
X mcs
X mcs
Y mcs
Y mcs
ConveyorOrgin
Yconveyor
ObjectPosition
Xconveyor
ConveyorAxis
MC_TrackConveyorBelt
BOOL Execute Done BOOL
UINT AxesGroup AxesGroup UINT
UINT ConveyorAxis Busy BOOL
ARRAY[0..5] OF LREAL[ ] ConveyorOrigin Active BOOL
ARRAY[0..5] OF LREAL[ ] ObjectPosition Error BOOL
UINT CoordSystem ErrorID WORD
UINT BufferMode
8-124
Chapter8 Motion Control function
MC_SetCartesianTransform
BOOL Execute Done BOOL
UINT AxesGroup AxesGroup UINT
LREAL TransX Busy BOOL
LREAL TransY Active BOOL
LREAL TransZ CommandAborted BOOL
LREAL RotAngleA Error BOOL
LREAL RotAngleB ErrorID WORD
LREAL RotAngleC
The conveyor belt synchronization function begins with setting conveyor synchronization using MC_TrackConveyorBelt
function block. For MC_TrackConveyorBelt function block, enter conveyor axis value at the ConveyorAxis input. Enter the
position from the origin of the robot to the conveyor belt in ConveyorOrigin. Input the position of the work piece from the origin
of the conveyor into ObjectPosition. Once MC_TrackConveyorBelt function block setting is complete,
LS_MoveLinearTimeAbsolute function block where the subsequently applied CoordSystem input is set to PCS is operated in
sync with the conveyor. Synchronized conveyor operation performs an operation of drawing a triangle on a product. After
synchronized conveyor belt operation is completed, execute LS_MoveLinearTimeAbsolute function block where the
CoordSystem is set to MCS to return to the previous status where the conveyor work is not yet performed.
X mcs
Y mcs
Yconveyor
InitTCP(-240,0,-380) Trans[objectp osition] Rot[objectp osition]
Trans[conveyororigin]
Xconveyor
Rot[Con veyorOrgin]
ConveyorAxis
8-125
Chapter8 Motion Control function
(4) Restrictions
Conveyor belt synchronization cannot be set in the case of the following errors.
• Value other than 2 is set in CoordSystem and performed (Error Code: 0x20BC)
• Axis set in ConveyorAxis is not connected (Error Code: 0x20C3)
• The unit of operation parameter of the axis set in ConveyorAxis is not mm/inch(Error Code: 0x20C2)
• Axis set in ConveyorAxis is not set as the infinite running repeat operation (Error Code: 0x20C6)
• Axis set in ConveyorAxis is the component axis in the applicable axis group (Error Code: 0x20C1)
• In case there is an axis which is in the origin indetermination state among configuration axes (error code: 0x20B0)
• In case there is an axis in infinite running repetition operation among configuration axes (error code: 0x20BA)
• Target position not reachable by coordinate system operation (Error code: 0x20C7)
(If 0x20C7 error occurs, jog operation, MCS coordinate system operation, and axis operation can be performed to resume
operation after leaving the error position.)
8-126
Chapter8 Motion Control function
Zpcs
X mcs
Zrotary
X pcs
ObjectPosition
RotaryOrgin Xrotary
MC_TrackRotaryTable
BOOL Execute Done BOOL
UINT AxesGroup AxesGroup UINT
UINT RotaryAxis Busy BOOL
ARRAY[0..5] OF LREAL[ ] RotaryOrigin Active BOOL
ARRAY[0..5] OF LREAL[ ] ObjectPosition Error BOOL
UINT CoordSystem ErrorID WORD
UINT BufferMode
8-127
Chapter8 Motion Control function
MC_SetCartesianTransform
BOOL Execute Done BOOL
UINT AxesGroup AxesGroup UINT
LREAL TransX Busy BOOL
LREAL TransY Active BOOL
LREAL TransZ CommandAborted BOOL
LREAL RotAngleA Error BOOL
LREAL RotAngleB ErrorID WORD
LREAL RotAngleC
The rotary table synchronization function begins with setting rotary synchronization using MC_TrackRotaryTable function block.
For MC_TrackRotaryTable function block, enter rotary axis value at the RotaryAxis input, enter the rotary table center position
from the robot's origin point at the RotaryOrigin. Enter the position of the product origin point from the rotary table center point
at the ObjectPosition input. Once MC_TrackRotaryTable function block setting is complete, LS_MoveLinearTimeAbsolute
function block where the subsequently applied CoordSystem input is set to PCS is operated in sync with the rotary.
Synchronized rotary operation performs to track the object with moving to Z positive direction and Z negative direction. After
synchronized rotary table operation is completed, execute LS_MoveLinearTimeAbsolute function block where the
CoordSystem is set to MCS to return to the previous status where the rotary work is not yet performed.
LS_MoveLinearTimeAbsolute LS_MoveLinearTimeAbsolute
Execute Done Execute Done
1 AxesGroup AxesGroup 1 AxesGroup AxesGroup
PCS CoordSystem Busy MCS CoordSystem Busy
0,0,-30,0,0,0 Position Active 0,0,-380,0,0,0 Position Active
1 TrajType Error 1 TrajType Error
3000 TrajTime ErrorID 3000 TrajTime ErrorID
Buffered BufferMode Buffered BufferMode
0 TransitionMode 0 TransitionMode
0 TransitionParameter 0 TransitionParameter
8-128
Chapter8 Motion Control function
(4) Restrictions
Rotary table synchronization cannot be set in the case of the following errors.
• Value other than 2 is set in CoordSystem and performed (Error Code: 0x20BC)
• Axis set in RotaryAxis is not connected (Error Code: 0x20C3)
• The unit of operation parameter of the axis set in RotaryAxis is not degree(Error Code: 0x20C2)
• Axis set in RotaryAxis is not set as the infinite running repeat operation (Error Code: 0x20C6)
• Axis set in RotaryAxis is the component axis in the applicable axis group (Error Code: 0x20C1)
• In case there is an axis which is in the origin indetermination state among configuration axes (error code: 0x20B0)
• In case there is an axis in infinite running repetition operation among configuration axes (error code: 0x20BA)
• Target position not reachable by coordinate system operation (Error code: 0x20C7)
(If 0x20C7 error occurs, jog operation, MCS coordinate system operation, and axis operation can be performed to resume
operation after leaving the error position.)
8-129
Chapter8 Motion Control function
LS_SetMovePath
BOOL Execute Done BOOL
UINT AxesGroup AxesGroup UINT
ARRAY[] OF BYTE PathData PathData ARRAY[] OF BYTE
UINT Step Busy BOOL
UINT CommandType Active BOOL
UINT Mode Error BOOL
UINT CoordSystem ErrorID WORD
ARRAY[0..5] OF LREAL[ ] Positon
LREAL Velocity
LREAL Acceleration
LREAL Deceleration
LREAL Jerk
UINT BufferMode
UINT TransitionMode
LREAL TransitionParameter
8-130
Chapter8 Motion Control function
LS_ResetMovePath
BOOL Execute Done BOOL
UINT AxesGroup AxesGroup UINT
ARRAY[] OF BYTE PathData Busy BOOL
UINT Step Active BOOL
Error BOOL
ErrorID WORD
LS_GetMovePath
BOOL Execute Done BOOL
UINT AxesGroup AxesGroup UINT
ARRAY[] OF BYTE PathData Busy BOOL
UINT Step Active BOOL
Error BOOL
ErrorID WORD
CommandType UINT
Mode UINT
CoordSystem UINT
Positon ARRAY[0..6] OF LREAL[ ]
Velocity LREAL
Acceleration LREAL
Deceleration LREAL
Jerk LREAL
BufferMode UINT
TransitionMode UINT
TransitionParameter LREAL
LS_RunMovePath
BOOL Execute Done BOOL
UINT AxesGroup AxesGroup UINT
ARRAY[] OF BYTE PathData Busy BOOL
UINT StartStep Active BOOL
UINT EndStep CommandAborted BOOL
Error BOOL
ErrorID WORD
CurStep UINT
8-131
Chapter8 Motion Control function
P3
P1
P2
To combine the operations so that the two operations are continuous, the operation that started from the current
position (P1) at the first target position (P2) and went to the target position 1 (P2) stops at an infinite deceleration
speed and starts at the target position 1 (P2). Then, the operation to the target position 2 (P3) starts the operation with
infinite acceleration. In this way, at the position where the two operations are combined, the system is impacted as it
is operated with infinite acceleration/deceleration to maintain the combined speed of the interpolation operation.
P3 P3
P1 P1
P2 P2
When the angle difference between the two operations is small, the magnitude of the shock generated is small, and
the damping of the system itself may seem insignificant.
If a large impact is expected due to the large difference in angle between the two operations, if the interpolation
operation blending angle limit function is used, even if the interpolation operation blending is set for the two operations,
deceleration stops at the expected impact point (P2) and then accelerates operation.
Speed
P2
Time
P1 P3
Speed
Time
P1 P2 P3
8-132
Chapter8 Motion Control function
The unit of the allowable angle is ° (degrees, deg) and can be set from 2° to 178°.
If the angle of the two operations is greater than the set allowable angle and the TransitionMode is set to “TMNone”,
it stops at the target point of the first operation and continues the next operation,TMCornerDistance”, the operation
continues after stopping at the start and end points of the arc, respectively.
Interpolation operation blending angle limit function works in group operation and coordinate system operation.
However, when the coordinate system 3D circular interpolation command is combined, the interpolation operation
blending angle limit function does not work.
LS_WriteGroupParameter
BOOL Execute Done BOOL
UINT AxesGroup AxesGroup UINT
INT ParameterNumber Busy BOOL
LREAL Value Error BOOL
UINT ExecutionMode ErrorID WORD
8-133
Chapter8 Motion Control function
Y Axis
Midpoint
Start position
Target position
X Axis
(d) Restrictions
Circular interpolation control using mid-point specification method cannot be performed in case of the following errors.
• During absolute coordinate circular interpolation, home position has not been determined in one or more of the
component axes (Error Code: 0x20A0)
• In case the midpoint specified as auxiliary point is the same as the starting position or target position (error code:
0x20A4)
• In case starting position is the same as the target position (error code: 0x20A5)
• In case start position, auxiliary point position and target position are in a straight line (error code: 0x20A7)
• In case there is an axis in infinite running repetition operation among configuration axes (error code: 0x20A8)
8-134
Chapter8 Motion Control function
Y axis
Midpoint position
(60, 60,0)
Midpoint position
(60, 42.42641,42.42641)
Start position
Target position
(0, 0,0)
(120, 0,0)
X axis
Start 0
20 100
position Target position
(0, 0,0) (120, 0,0)
X axis
0 20 100
Z axis
Y axis
Start position
Target position
(0, 0,0)
(120, 0,0)
X axis
0
20 100
60
Z axis Midpoint position
(60, 0, 60)
8-135
Chapter8 Motion Control function
Y axis Y axis
Target
Operation by circular interpolation position
Target position
Operation by circular
interpolation
Start
position
Center point diameter Center of
of circle circular
Start
diameter position
X axis
X axis
Homing Homing
(d) Restrictions
Circular interpolation control using center point specification method cannot be performed in case of the following errors.
• During absolute coordinate circular interpolation, home position has not been determined in one or more of the
component axes (Error Code: 0x20A0)
• In case the midpoint specified as auxiliary point is the same as the starting position or target position (error code:
0x20A4)
• In case start position, auxiliary point position and target position are in a straight line (error code: 0x20A7)
• In case there is an axis in infinite running repetition operation among configuration axes (error code: 0x20A8)
8-136
Chapter8 Motion Control function
Auxiliary Auxiliary
position(100,100,0) position(100,100,0)
100 100
X axis
X axis
0 0 100
100 150 150
Auxiliary Auxiliary
position(100, 0, 100) position(100, 0, 100)
100 100
Target position(150, 0,
0) X axis
X axis
0 100 0 100
150 150
8-137
Chapter8 Motion Control function
Y axis
Start
position
Target
position
(EndPoint)
Diameter
(AuxPoint)
X axis
(d) The movement direction and the size of the arc are determined by the direction set in the absolute position c
oordinate system circular interpolation operation (MC_MoveCircularAbsolute3D), the relative position coordinate s
ystem circular interpolation operation (MC_MoveCircularRelative3D), or “PathChoice” of the motion function bloc
k.
(e) Restrictions
Circular interpolation control by radius specification method cannot be performed in case of the following errors.
• During absolute coordinate circular interpolation, home position has not been determined in one or more of the
component axes (Error Code: 0x20A0)
• In case starting position is the same as the target position (error code: 0x20A5)
• In case there is an axis in infinite running repetition operation among configuration axes (error code: 0x20A8)
8-138
Chapter8 Motion Control function
Y axis
Auxiliary
position
(60, 60,0) Auxiliary position
(60, 42.42641,42.42641)
Start
position Target position
(0, 0,0) (120, 0,0)
X axis
0
Start 20 100
position Target position
(0, 0,0) (120, 0,0)
X axis
0 20 100
Z axis
Y axis
(60, 60,0)
Start
position Target position
(0, 0,0) (120, 0,0)
X axis
0 20 100
Start
position Target position
(0, 0,0) (120, 0,0)
X axis
0
20 100
Auxiliary position
(60, 0,60)
Z axis
8-139
Chapter8 Motion Control function
MC_MoveCircularAbsolute3D
BOOL Execute Done BOOL
UINT AxesGroup AxesGroup UINT
UINT CircMode Busy BOOL
LREAL[ ] AuxPoint Active BOOL
LREAL[ ] EndPoint CommandAborted BOOL
UINT PathChoice Error BOOL
LREAL Velocity ErrorID WORD
LREAL Acceleration
LREAL Deceleration
LREAL Jerk
UINT CoordSystem
UINT BufferMode
UINT TransitionMode
LREAL TransitionParameter
MC_MoveCircularRelative3D
BOOL Execute Done BOOL
UINT AxesGroup AxesGroup UINT
UINT CircMode Busy BOOL
LREAL[ ] AuxPoint Active BOOL
LREAL[ ] EndPoint CommandAborted BOOL
UINT PathChoice Error BOOL
LREAL Velocity ErrorID WORD
LREAL Acceleration
LREAL Deceleration
LREAL Jerk
UINT CoordSystem
UINT BufferMode
UINT TransitionMode
LREAL TransitionParameter
8-140
Chapter8 Motion Control function
Speed
P2
P3 Time
P1 P3
Speed
P1 P2
P2 Time
P1 P3
MC_WriteParameter
BOOL Execute Done BOOL
UINT Axis Axis UINT
INT ParameterNumber Busy BOOL
LREAL Value Error BOOL
UINT ExecutionMode ErrorID WORD
8-141
Chapter8 Motion Control function
P1 P4
P2 P3
P3
Speed
P2
Time
P1 P4
Speed
P2 P3
Time
P1 P4
LS_WriteGroupParameter
BOOL Execute Done BOOL
UINT AxesGroup AxesGroup UINT
INT ParameterNumber Busy BOOL
LREAL Value Error BOOL
UINT ExecutionMode ErrorID WORD
8-142
Chapter8 Motion Control function
LS_WriteGroupParameter
BOOL Execute Done BOOL
UINT AxesGroup AxesGroup UINT
INT ParameterNumber Busy BOOL
LREAL Value Error BOOL
UINT ExecutionMode ErrorID WORD
8-143
Chapter8 Motion Control function
Bootstrap
Pre-Operational
(optional)
Safe-Operational
Operational
8-144
Chapter8 Motion Control function
1) Please refer to the salve instruction manual. Change OpMode to Boot and click the Download button in the FoE to start
the download.
2) Select the file you want to download from the open dialog box.
8-145
Chapter8 Motion Control function
8-146
Chapter8 Motion Control function
However, up to 100 cam profiles can be created in the cam table extended update standard.
8-147
Chapter8 Motion Control function
In the case of commands, up to 32 cam table IDs can be entered for LS_WriteCamData/LS_GenerateCamData. However,
in the new standard, up to 100 can be entered.
8-148
Chapter8 Motion Control function
In the case of commands, LS_WriteCamData/LS_GenerateCamData can input up to 32,768 cam points. However, in the
new standard, up to 65,536 can be entered.
8-149
Chapter8 Motion Control function
Additionally, regardless of the number of cam profiles, if the cam table ID value is 32 or less, the previous standard is applied,
and if it is 33 or more, it is applied as the expanded standard. For example, if only one cam table ID value of 50 is written in
XG5000 of extended standard, cam information written in XMC cannot be read in XG5000 of previous standard.
8-150
Chapter8 Motion Control function
8.6.4 Cam data extension function compatibility check (SD memory card/XG5000/ XMC)
How to use the SD memory card is described in detail in Chapter 12 SD Additional Functions. Please refer to Chapter 12 for how
to use it. Even in the case of SD memory cards, the range of use of the import/export function varies according to the applied
standards of XG5000 and XMC.
When trying to save the contents of XMC controller or XG5000 to SD card, the contents are as follows.
If the number of created cam profiles exceeds the last cam table ID value of 32 in the extended standard, that is, from 33, the
backup is made so that only XG5000 of the extended standard can be read.
If you try to open the backed-up cam profile data with a cam table ID value of 33 or higher in XG5000 of the previous standard,
it will fail and an alarm window will appear as shown in the figure below.
Conversely, in case of backing up the contents of which cam profile values of which the number of cam profiles are less than
or equal to 32 in the previous standard and extended standard, it is possible to open both in XG5000 of the previous/extended
standard.
Taken together, the number of cases is:
case 1. Write a cam profile whose number of cam profiles is less than or equal to 32 in the XG5000 of the previous standard
-> Download to the XMC controller of the previous/extended standard -> Attempt to back up to the memory card -> Can be
opened in the XG5000 of the previous/extended standard
case 2. Write a cam profile whose number of cam profiles is less than or equal to 32 in the XG5000 of the expansion standard
-> Download to the XMC controller of the previous/extended standard -> Attempt to back up to the memory card -> Can be
opened in the XG5000 of the previous/extended standard
case 3. Write a cam profile whose number of cam profiles is more than 33 in the XG5000 of the expansion standard ->
Download to the XMC controller of the extended standard -> Attempt to back up to the memory card -> Can be opened in the
XG5000 of the extended standard
case 4. Write a cam profile whose number of cam profiles is more than 33 in the XG5000 of the previous standard -> Download
to the XMC controller of the extended standard -> Attempt to back up to the memory card -> Can not be opened in the XG5000
of the extended standard
case 5. Write a cam profile whose number of cam profiles is less than or equal to 32 in the XG5000 of the previous standard
-> Download to the XMC controller of the previous/extended standard -> Attempt to back up XG5000 contents to memory
card -> Can be opened in the XG5000 of the previous/extended standard
case 6. Write a cam profile whose number of cam profiles is less than or equal to 32 in the XG5000 of the expansion standard
-> Download to the XMC controller of the previous/extended standard -> Attempt to back up XG5000 contents to memory
card -> Can be opened in the XG5000 of the previous/extended standard
case 7. Write a cam profile whose number of cam profiles is more than 33 in the XG5000 of the expansion standard ->
Download to the XMC controller of the previous/extended standard -> Attempt to back up XG5000 contents to memory card
-> Can be opened in the XG5000 of the extended standard
case 8. Write a cam profile whose number of cam profiles is more than 33 in the XG5000 of the expansion standard ->
Download to the XMC controller of the previous/extended standard -> Attempt to back up XG5000 contents to memory card
-> Can not be opened in the XG5000 of the extended standard
Additionally, regardless of the number of cam profiles, if the cam table ID value is 32 or less, the previous standard is applied,
and if it is 33 or more, it is applied as the expanded standard. For example, if only one cam table ID value is set to 50, the SD
card is recognized as an extended standard and operates in the manner described in the above case.
8-151
Chapter8 Motion Control function
2) CamBlock-Property
Cam operation speed: Input the operation speed of the main axis of the cam block. The entered speed value is used to
calculate the maximum speed/maximum acceleration/maximum jerk of the sub axis.
Maximum speed of sub axis: Enter the maximum speed of sub axis. The maximum speed value of the sub axis is used to
check whether the maximum speed value is exceeded when setting the cam block and does not affect the creation of the
8-152
Chapter8 Motion Control function
camp profile.
Maximum speed of sub axis: Enter the maximum speed of sub axis. The maximum acceleration of the sub axis is used to
check whether the maximum acceleration is exceeded when setting the cam block and does not affect the creation of the
camp profile.
Maximum jerk of sub axis: enter the maximum jerk of sub axis. The jerk value of the sub axis is used to check whether the jerk
value is exceeded when setting the cam block and does not affect the creation of the camp profile.
3) CamBlock Node Data
Cam block data is composed of each node data. One node data consists of main axis position/sub axis position/cam
curve/connection speed/connection acceleration/connection jerk/number of points/interpolation type. Up to 360 nodes can be
added to the cam block.
Main axis position: Set the main axis position of the camp profile to be created.
Main axis position: Set the main axis position of the camp profile to be created.
Sub axis position: Set the sub axis position of the camp profile to be created.
(Linear/ModifiedSine/ModifiedTrepezoid/…/5thCurve/7thCurve)
Connection speed: Set the speed of the end of the current node. To set the connection speed, the cam curve of the current
node or the next node must be set to a cam curve that can set the connection speed, and a check box must be set when
setting.
Connection Acceleration: Set the last acceleration of the current node. To set the connection acceleration, the cam curve of
the current node or the next node must be set to a cam curve that can set the acceleration speed, and a check box must be
set when setting.
Connection jerk: Set the last jerk of the current node. To set the connection jerk, the cam curve of the current node or the next
node must be set to a cam curve that can set the connection jerk, and a check box must be set when setting.
Number of points: Set how many cam points to create the current node when creating a cam profile for cam blocks.
Interpolation type: Set the interpolation type of the camp profile. (Linear/Qubic)
8-153
Chapter8 Motion Control function
4) Cam curve
There are a total of 12 types of cam curves that can be set in the cam block function. The characteristics of each cam curve
are as follows.
CamCurve Characteristic curve
0:StraightLine
1:ModifiedSine
2:ModifiedTrapezoid
al
8-154
Chapter8 Motion Control function
3:DoubleHarmonic
4:TripleHarmonic
5: THMTG1-3
8-155
Chapter8 Motion Control function
6: THMTF1-3
7: THMTF1-3-5
8: TH0J0A
8-156
Chapter8 Motion Control function
9: 3rd curve
8-157
Chapter8 Motion Control function
If you click the button on the cam block screen, one last node is added.
If you click the button on the cam block screen, one node is added at the selected position.
If you select node data and click the button, the selected node data is deleted.
If you select node data and click the button, the total node data is deleted.
6) Export camp file
In order to perform CAM operation with CAM block data, you must first create a CAM profile from CAM block. The procedure
for exporting camblock to camp file is as follows.
8-158
Chapter8 Motion Control function
1
(3) Cam profile export
Select the camp profile file to be created as Camblock and click the Export button.
8-159
Chapter8 Motion Control function
8-160
Chapter 9 NC Control Function
Chapter 9 describes how the motion controller user creates the motion program of the G-code format.
The motion controller can program motions through a kind of scripting language called the G code. Chapter 9 describes the basic
terms and conceptual explanations for the G code programming, and explains how to configure the program. It also describes the
command scripts such as G, M, and F supported by the motion controller.
9.1 NC Commands
9.1.1 NC Command Definition
The motion control is used by the user to move the machine from any position to the desired position at the specified speed or to
control the input / output. At this time, the axis that moves the machine will operate in various ways depending on each control
environment. It is the motion control program that is used to control the movement of various axes, and in the motion controller,
when the G code is used among the control information constituting the motion control program this is called the NC command.
Reserved
Meaning
character
Character set
( Start comment
) End comment
[ Left parenthesis
] Right parenthesis
+,-,*,/ Arithmetic
A(AND), O(OR) Comparison operation
= Assignment operator
0~9 Numeric data
; Block end
# Variable
Address character
X X axis of the XYZ rectangular coordinate system (Primary Axis)
Y Y axis of the XYZ rectangular coordinate system (Secondary Axis)
Z Z axis of the XYZ rectangular coordinate system (Third Axis)
A In the XYZ rectangular coordinate system, the rotation axis parallel to the X axis.
(When it is set to the rotation axis in the parameters setting)
B In the XYZ rectangular coordinate system, the rotation axis parallel to the Y axis.
(When it is set to the rotation axis in the parameters setting)
C In the XYZ rectangular coordinate system, the rotation axis parallel to the Z axis.
(When it is set to the rotation axis in the parameters setting)
U 1st additional linear axis (rotation axis, when it is set to the rotation axis in the parameters
setting)
9-1
Chapter 9 NC Control Function
Reserved
Meaning
character
V 2nd additional linear axis (rotation axis, when it is set to the rotation axis in the
parameters setting)
W 3rd additional linear axis (rotation axis, when it is set to the rotation axis in the
parameters setting)
S Used to specify the speed of revolution or to make the position command for the spindle
axis
G Preparatory Functions
F Feed rate
M Miscellaneous Functions
S Specify the rotation speed
I Rotational center coordinate value for X-axis circular interpolation
J Rotational center coordinate value for Y-axis circular interpolation
K Rotational center coordinate value for Z-axis circular interpolation
N Statement Number (Sequence Number)
O Used for the same purpose as N
P Used to represent the optional data of Preparatory Functions and Miscellaneous
Functions.
Q Secondary option data representation. Drill’s cutting depth and so on.
R Circle radius
T Tool functions
L Repetition number
H Tool length offset number
Other character
IF Conditional branch operation
GOTO Branch jump
WHILE, DO Loop iteration declaration
END End loop
%, ;, ( ) Comments
/ Optional Block Skip
LE,GE,EQ,LT,GT,NE Compare instructions
SIN, COS, TAN,
ATAN, SQRT, ABS,
Mathematical function
ROUND, AND, OR,
FIX, FUP
9-2
Chapter 9 NC Control Function
9-3
Chapter 9 NC Control Function
Machine
coordinate
system
9-4
Chapter 9 NC Control Function
Cutting
operation2
Cutting
operation1
[Speed profiles]
The speed profile of the cutting feed operation can be changed by setting acceleration/ cutting feed deceleration/cutting
feed jerk values in the cutting feed setting of the NC channel parameter.
9-5
Chapter 9 NC Control Function
Cutting
operation 2
Cutting
operation 1
[Speed profiles]
1) The form of acceleration and deceleration in the acceleration/deceleration after interpolation mode
The speed profile of acceleration and deceleration zones can be set by setting the form of acceleration and deceleration of
the cutting feed in the cutting feed setting of the NC channel parameter. 0: Line-type 1: S-type, Two types can be set.
Speed
Speed
Line-type S-type
9-6
Chapter 9 NC Control Function
9-7
Chapter 9 NC Control Function
4) Angle mode
If the angle of the specified block is less than the allowed angle, the next block starts to traverse after the speed in a corner is
decelerated up to the setting value of the deceleration speed. In the result, you can get a sharp corner according the setting
value of the deceleration speed.
9-8
Chapter 9 NC Control Function
9.2.1 NC Program
The NC program is a file consisting of the commands with control information about the axis. NC program can be added to 'Motion
data - NC program' in XG5000. The NC program is used in the form of ‘program name.extension’ when saving the NC program as a
file, and the file name extension of the NC program used is ‘nc’. The NC program is divided into two types, "main program" and "sub
program", depending on the nature of the file.
The name of the "main program" can be assigned by a user with any name. For example, such as "main.nc" or "main control .nc",
any name can be applied in English or Korean. The "subprogram" can be named using the four-digit numbers. (Eg: 1234) The
"subprogram" can be disabled as needed, and the nested call is allowed up to 9 levels.
9-9
Chapter 9 NC Control Function
Program
Block
Block
Block
Program direction
Block
Block
..
.
Block
The blocks of the NC program are normally input as shown in the table above. Unless there is a particularly limited notation in
the same block, the order of each motion command does not matter. However, it is executed in the order of command, and for
the Modal command, it continues to run until another NC command is made.
At the head of each block, there is a Statement Number which contains the motion control’s sequence information. The
Statement Number is often referred in the GOTO and CALL instructions, and does not have to be used unless it is necessary.
The Statement Number can also be written alone in a block.
The command information depends on the preparatory commands (G / M codes and instructions) used earlier. Although you
do not use the command information, no error will occur. However, even if you need the command information, the preparatory
commands that do not use the command information will be ignored.
The auxiliary commands (G / M codes and instructions) are used with the preparatory commands to further refine the
operating information of the preparatory commands.
9-10
Chapter 9 NC Control Function
……
Step 1 call Step 2 call Step 3 call Step 4 call Step 9 call
9-11
Chapter 9 NC Control Function
M98 P_ Q_ R_ L_
M99 P_
In addition to M98, you can call the reserved sub program using the macro program calling M code set in NC channel
parameter. This method can be used only in the main program, and when used in the subprogram, it operates with the general
M code.
If there is no program to call, or if the syntax or argument is wrong, an error occurs. For alarms occurred, please refer to
Appendix 2‘Error Information & Solutions'.
M99 P_ L_
9-12
Chapter 9 NC Control Function
9.2.3 Data
(1) Data type used in the NC program
The NC program uses the numerical data for each axis command, feed rate command, DWELL command, macro variables,
etc. When each operator is applied, the constant is used directly in the program.
At this time, the range of data type that can be used for the NC program of motion controller is as follows. If the wrong data
range is applied, an alarm will occur. For the location of the alarm information, etc., please refer to Appendix 2, Errors
Information & Solutions'.
Available range of the integer
-2,147,483,648 ~ 2,147,483,647
(2) Unit
For the numbers used for the NC program, the system of units applied changes depending on whether or not to enter a
decimal point ("."). This depends on how the decimal point check item is set among the NC channel parameters of the motion
controller.
If the parameter is set to "0: Check", the value changes internally, as shown in the following example.
X100 100 um = 100 / 1000.0 = 0.1mm
X100, 100.0 mm = 100 / 1.0 = 100.0 mm
ex)
X10.4 10.4 mm = 10.4 / 1.0 = 10.4 mm
X104 104 um = 104 / 1000.0 = 0.104 mm
The unit conversion specified above is effective only when it is entered directly into the axis’s coordinate information.
If the decimal point check parameter is set to "0: Check", the system of units used for the G04 (TIME) command is as follows.
G04 X1 1 msec = 1 / 1000.0 = 0.001 sec
G04 X1.0 1.0 sec = 1 / 1.0 = 1 sec
9-13
Chapter 9 NC Control Function
(2) Restrictions
If the user-written NC program is downloaded while the motion controller's operation mode is RUN, there are the following
restrictions depending on the operating conditions.
1) When the NC channel is in automatic operation
- After the NC operation currently in automatic operation is completed, it is changed to the downloaded NC program.
That is, even if the program currently in automatic operation is changed, the changed program does not operate
9-14
Chapter 9 NC Control Function
immediately. The point in time when the downloaded NC program is applied during run is always after the
automatic operation of the NC channel is finished.
- If the NC program currently being operated is repeated infinitely with the M99 command in the last block of the
program, automatic operation cannot be ended in the normal way,automatic operation is stopped with the
NC_Reset command or the motion controller is changed to 'stop' mode and automatic operation is stopped and
then changed to the downloaded program.
- If the number of repetitions is specified in the NM99 command, automatic operation stops after repeating the
number of repetitions and then the downloaded program is changed.
2) If the NC_LoadProgram command is executed during internal write processing after downloading the NC program
- 0x3605 error occurs.
- Error contents: the program designation command cannot be executed while writing the downloaded NC program
during run.
3) If the NC_CycleStart command is executed during internal write processing after downloading the NC program
- 0x350F error occurs.
- Error contents: the automatic operation start command cannot be executed while writing the downloaded NC
program during run.
Notes
NC program download function during run is supported from the next version onwards.
1. XG5000 - V4.29
2. XMC OS - V1.50
9-15
Chapter 9 NC Control Function
9.3 NC Commands
The NC command is basically described based on the three types of data: the type of motion to be moved, the target position and
the target speed. The basic formats of the position command and speed command are as follows.
X_ Y_ Z_ A_ B_ C_ U_ V_ W_ S_
The position command of the axis, "X_ Y_ Z_ ... "is mainly used to specify the position on the coordinate of the point where
each axis should be finally moved at the time of interpolation or traverse command.
The position of the coordinate you want to move should be specified behind “X, Y, Z, … S”. The number of axes specified with
the G code is limited to 10. The motion controller can control up to 32 axes by motion control but the maximum number of axes
by the NC program is 10 axes and more axes can be controlled by the axis command of the motion control program.
In the case of the absolute command, specify the coordinate value (coordinate value of the end point of feed) of the feed
target point. If it is the relative command, specify the increment value from the current position to the feed target point.
When you specify the position of the coordinate you want to move, the operating mode of the command differs depending on
whether to use the value that includes "." or not ".". Please refer to the position formula in "9.2.3 System of units of data (2) "
G90
G00 X100. Y100, Z100, U100, % Rapid Traverse, X-axis 100, Y-axis 100, Z-axis 100, U-axis 100
G01 X150. Y200
U300,
Z325,
M02
I_ J_ K_
The position command of axis, "I_ J_ K_" is used to command the position of each origin point on the coordinate to the
individual axis when commanding the central point of the arc for circular interpolation.
You can specify the location of the central point of the arc behind "I_ J_ K_".
"I_ J_ K_" must specify the increment value from the current position to the origin.
9-16
Chapter 9 NC Control Function
When you specify the position of the coordinate, the operating mode of the command depends on whether to use the value
that includes "." or not ".". Please refer to the position formula in "9.2.3 System of units of data (2) "
G90
G02 X100. Y100, I50, J50, % clockwise circular interpolation, X-axis 100, Y-axis 100, Central point(X50, Y50)
M02
The above program shows the traverse target point, X-axis 100, Y-axis 100 and the coordinate of the origin direct the
clockwise circular interpolation with X-axis 50, Y-axis 50.
The speed command is valid for the interpolation command only and has no effect on the rapid traverse command.
F_
: F Speed command
The speed command specifies the operating speed of the interpolation command.
The speed command can be instructed with each interpolation command or instructed independently.
Since the speed command is the modal command, once it is instructed, it is valid for the operations of the interpolation
command until another speed command is made.
In the case of the speed command for linear interpolation, the operating speed is calculated in the same manner as the
speed formula of "9.2.3 System of units of data (2)".
In the case of circular interpolation command, the speed command is calculated as linear velocity in tangential direction.
G90
F5000
G02 X100. Y100, I50, J50, % Clockwise circular interpolation speed: 5000
G01 X400. Y250, Z300, F3500 % Linear interpolation,speed: 3500
M02
9-17
Chapter 9 NC Control Function
9-18
Chapter 9 NC Control Function
9-19
Chapter 9 NC Control Function
9-20
Chapter 9 NC Control Function
Classification Meaning
One-shot G code G code instruction that is valid only in the block to which the G code is commanded
instruction
Modal G code command G code instruction that is valid until it is released by another command from the block
to which the G code is commanded
Modal command
G01 X10. F100
Y100,
Z300,
G00, X100
The G01 is a modal command as shown in the above program so the G01 command will be executed until the G00
command is made since the G01 is commanded even if G01 command is not separately specified.
Y Y
Current position Current position
X X
As shown in the left figure above, the Rapid Traverse (G00) transfers the specified axis quickly from the X, Y point of the
coordinate given by the command information or the current position to the position incremented by the command
information. Under the G00 command, the feed rate moves according to the G00 feed rate set for each axis.
G00 is traversed independently for each axis. Since the axis with short travel distance first reaches the target point, the
shape of the travel section is not a straight line as above.
9-21
Chapter 9 NC Control Function
The Rapid Traverse command is a modal command so once it is instructed, it is valid for the axis traversing command
until another traverse command is made.
G90
G00 X100 Y100
Z100
The above program is the example set to absolute command using G90. After that, it rapidly traverses the X and Y axis
to (100,100) points and then, traverses the Z axis to 100 points again.
NC
Group and parameter name
Parameter
NC
channel/axis
Parameter
Y
Current position
Target position
9-22
Chapter 9 NC Control Function
The linear interpolation (G01) is the function that simultaneously traverses each axis in a straight line to the commanded
position at the speed set by the F command in order to perform the desired machining (eg. cutting) as shown in the figure
above.
In the case of the incremental command (G91), it moves to the position incremented by the command information in a
straight line from the current axis position.
Since the G01 command is a modal command, once it is instructed, it continues to be valid for the axis feed command
until another feed command is made. The feed speed command can be instructed with the "F" code. There are two feed
methods; feed per revolution and feed per minute. Normally, the feed per minute is applied.
D= √(Dx^2+Dy^2+ Dz^2)
X axis’s feed rate Fx=Dx/D ×F
Y axis’s feed rate Fy=Dy/D ×F
Z axis’s feed rate Fz=Dz/D ×F
The feed rate of each axis differs depending on the distance of each axis as shown in the above formula.
G90
G01 X50 Y35 F3000 % Interpolation feed control, target position to traverse(X=50, Y=35), speed 3000
G91
X100 Y55 % Interpolation feed control
The above program shows the example that executes the interpolation feed control at the speed 3000 to the points of
the X axis 50 and the Y axis 35 under the absolute command and then, executes the interpolation feed control to the
points incremented by 100 from the X axis and 55 from the Y axis under the incremental command.
“X100. Y55.", as mentioned above, the G01 and F code are modal commands so they operate under interpolation feed
control without a separate command.
The circular interpolation (G02 / G03) is the command to execute the rotary feed at the speed specified by "F" based on
the commanded or calculated central point to the target position to traverse. In the circular interpolation command, the
speed means the linear velocity in tangential direction.
9-23
Chapter 9 NC Control Function
For the circular interpolation command, you should select the plant to execute circular interpolation before the command.
The NC program has the command for specifying each plane; G17 is defined as XY plane, G18 as ZX plane, and G19
as YZ plane as shown below. If you enter the command information beyond the selected plane, an error will occur.
G02/MCW
G03/MCC
G03(MCC) G03(MCC)
X Z
The circular interpolation can be executed by setting the central point of an arc as the command information or by
setting the circular radius as the command information. In order to execute the circular interpolation, one of the above two
methods must applied for commanding.
When applying the Reference Point Method using I, J, and K and the Radius Method using the "R" code
simultaneously between the circular interpolation commands, I, J, and K commands will be ignored and then, the circular
interpolation will be executed under the radius command using “R”.
When instructing the circular interpolation with specifying the central point, the central point command information (I, J,
K) of the circular interpolation command is always the position incremented from the start position to the central point
regardless of the absolute / incremental command (G90 / G91). The central point command information, I, J, and K
correspond to X, Y, and Z, respectively. If the value of I, J, K command information is "0", it can be omitted.
When the current position and the target position to traverse are the same, the circular interpolation with specifying the
central point can command a 360-degree perfect circle.
The circular interpolation with specifying the R (radius) does not designate the central point to determine the arc
section, but only the R(radius) which forms the arc from the current position to the target position to traverse.
When executing the circular interpolation using the R (radius) designation method, the central point of the arc can have
two shapes. At this time, the motion controller performs the circular interpolation by selecting the central point with the
shortest arc to the target point to traverse as shown below.
9-24
Chapter 9 NC Control Function
Unlike the circular interpolation with specifying the central point, the circular interpolation with the R (radius) designation
cannot command a 360-degree perfect circle.
During the circular interpolation, if the start and end radii of the arc are different, an alarm occurs. If it is within the error
radius, it traverses to the original trajectory and then reaches the final position with a straight line.
9-25
Chapter 9 NC Control Function
G90
G00 X0 Y0 Z0
% XY plane
G90
G17
G02 X50 Y50 I50 F100 % Clockwise circular interpolation, Central point(X=X+50, Y=0), speed
100
G03 X0 Y0 R50 % Counter clockwise circular interpolation, R(Radius)=50
G91 % relative coordinate
G03 X100 Y100 J100 % Counter clockwise circular interpolation, Central point(X=0,
Y=Y+100)
G02 X-100 Y-100 R100 % Clockwise circular interpolation, R(Radius)=100
% ZX plane
G90
G18
G02 Z50 X50 K50 F200 % Clockwise circular interpolation, Central point(X=X+0, Z=Z+50),
speed 200
G03 Z0 X0 R50 % Counter clockwise circular interpolation, R(Radius)=50
9-26
Chapter 9 NC Control Function
G91
G03 Z100 X100. I100 % Counter clockwise circular interpolation, Central point(X=X+100,
Z=Z+0)
G02 Z-100 X-100 R100 % Clockwise circular interpolation, R(Radius)=100,
% Target position to traverse(X=X-100, Z=Z-100)
% YZ plane
G90
G19
G02 Y50 Z50 J50 F300 % Clockwise circular interpolation, Central point(Y=Y+50, Z=Z+0),
speed 300
G03 Y0 Z0 R50 % Counter clockwise circular interpolation, R(Radius)=50
G91
G03 Y100 Z100 K100 % Counter clockwise circular interpolation, Central point(Y=Y+0,
Z=Z+100)
G02 Y-100 Z-100 R100 % Clockwise circular interpolation, R(Radius)=100
% Perfect circle
G17
G02 I50 % Clockwise circular interpolation(360-degree perfect circle), Central point(X=X+50, Y=Y+0)
G03 J50 % Counter clockwise circular interpolation(360-degree perfect circle), Central
point(X=X+50, Y=Y+0)
G02 I50 J50 % Clockwise circular interpolation(360-degree perfect circle), Central point(X=X+50,
Y=Y+50)
% I ignore R apply
G02 X-100 I30 R50
NC
Group and parameter name
Parameter
NC
Channel
Parameter
9-27
Chapter 9 NC Control Function
4) Helical interpolation(G02/G03)
The helical interpolation instructs another axis whose plane is not specified in the circular interpolation command, and
the axis is synchronized in a straight line and traverses with the progress of the circular interpolation. That is, when XY
plane G17 is commanded, the Z axis can be transferred.
G90
G00 X0 Y0 Z0
% XY plane
G90
G17
G02 X50 Y50 I50 Z10 F100 % Clockwise circular interpolation, Central point(X=X+50, Y=0), Z position 10,
speed 100
G03 X0 Y0 Z 20 R50 % counter clockwise circular interpolation, R(Radius)=50, Z position 20
9-28
Chapter 9 NC Control Function
5) Dwell function
The DWELL command (G04) is the command to stop for the time specified following "X" or "P" and then, execute the
next block.
X’s unit is sec, P’s unit is in msec.
G90
G00 X0. Y0, Z0,
G01 X100. Y100, F1500
G04 P100 % Dwell time : 100 msec
G00 X500. Y500,
G04 X1 % Dwell time : 1 sec
G91
G01 X100. Y100, F1500
NC
Group and parameter name
Parameter
NC
Channel
Parameter
9-29
Chapter 9 NC Control Function
6) Exact Stop(G09)
G09
In normal feed / cutting operations, the corner section decelerates the current block and accelerates the next block
because it is affected by physical inertia when accelerating or decelerating the axis traverse. That is why ‘Rounding’
occurs. This function performs the ‘Inposition Check’ and proceeds to the next block as shown below to put the
commanded block in the instructed position of feed / cutting exactly.
Y
200 Inposition Check
100
G90
G00 X0. Y0, Z0
G09 G01 X100. Y100, F5000 % Linear feeding through the Exact Stop
X200, Y250, % linear feeding
G10
The above program is the example of using the Exact Stop (G09) command for linear feeding. The G09 command in
the above program is a one-shot command so "X200. Y250." command is not affected by the G09 command.
9-30
Chapter 9 NC Control Function
This command is used in the diameter of a tool, the compensation value of tool length and reference position offset of the
coordinate system, and can be input by program. It can be used if the real-time compensation value changes.
NC
Group and parameter name
Parameter
NC
Channel
Parameter
9-31
Chapter 9 NC Control Function
G15
G16 X_ Y_
A polar coordinate command is used if the current coordinate system works with the polar coordinate system, not the
right-angle coordinate system. You can work by entering pivot, angle and radius.
90°
P(x,y)=P(r,θ)
180° 0°
270°
If the polar coordinate system is used, the circular interpolation plane appears differently. For this part, see the circular
interpolation plane (G17). The reference position is set the same with the reference position of the right-angle coordinate
system. If it is an incremental command, the current position becomes the reference position of the polar coordinate.
9-32
Chapter 9 NC Control Function
G02/MCW
G03/MCC
G03(MCC) G03(MCC)
X Z
The parameters related to the command to select planes for circular interpolation are as follows.
NC
Group and parameter name
Parameter
NC
Channel
Parameter
9-33
Chapter 9 NC Control Function
G20
G21
This command sets whether the position unit to be input is inch or meter. Even if this command is executed, the system
of units including a position displayed on screen or an internal offset keeps the system of units set by parameters.
The command to shift this system of units should be used at the beginning of a program. When shifting to other system
of units in the middle of a single program, unstable results can be caused. If the whole part of a plan is different from
parameter units, use the command at the beginning of the program.
NC
Group and parameter name
Parameter
NC
Channel
Parameter
This command sets the Soft Limit of the coordinate system. You can input the lower limit coordinate (X, Y, Z) and upper
limit coordinate (I, J, K) of each stroke. If it is out of this range, the error will be displayed. Then, in a manual mode, it can
be entered into the working area or be driven after turning off the stroke check function. This is a modal command so it
continues to be valid once it is commanded.
For A, B, C, U, V, W, S axes other than X, Y and Z axes, it should be set by the parameters. At this time, the parameter,
‘Whether to use G22 No Travelling Area’ should be set to 0 to use the G22 command.
This command does not operate on a single axis, and works normally only when values are entered in two or more
axes (plane or space).
9-34
Chapter 9 NC Control Function
NC
Group and parameter name
Parameter
NC
Channel
Parameter
9-35
Chapter 9 NC Control Function
Through this command, it traverses to the specified X, Y, Z coordinate. When the current position is the origin after the
traverse is done, homing is completed. If it is not the origin, the alarm occurs. When this command is instructed, the
compensations of tool diameter and tool length are canceled.
Workpiece coordinate
G90
G27 X-50. Y0.
Alarm G90
G27 X-50. Y-70.
70
50
X
It is the command to automatically return the axis to the machine reference point. When the G28 command is
encountered during the program execution, each axis is moved to the machine origin at the rapid traverse rate. At this
time, it stops by the commanded position of each axis on the way.
Y
200 Waypoint
Current point
100
Machine origin
9-36
Chapter 9 NC Control Function
G90
G01 X100. Y100, Z100 F552. % Linear interpolation, target position to traverse(X=100, Y=100),
speed 552
G28 X40. Y55. Z32. % Auto-homing, waypoint(X=40, Y=55, Z=32)
G91 G01 X50. Y50. F550.
The above program is the example of moving the position of axes transferred to X, Y, Z axes linearly to the machine
origin by using the G28 auto-homing command.
This command is used when the traverse is done after the auto-homing(G28), 2nd, 3rd, 4th homing(G30) is instructed.
It traverses rapidly (G00) to the returning coordinate via the waypoint that was used for homing. If the homing command
has not been previously executed, the machine origin becomes the midpoint and it traverses to the returning coordinate.
In this command, tool diameter compensation and tool length compensation are not applied. All the axes that have been
commanded at the time of origin return have been traversed before the midpoint has been traversed, and only the
coordinates that have been commanded at return coordinate are traversed thereafter.
Y Y
70 70
X 50
X
50
9-37
Chapter 9 NC Control Function
This command automatically returns each commanded axis to the preconfigured 2nd, 3rd, 4th origin. If the G30
instruction is encountered during the program execution, each axis is moved to the specified 2nd or 3rd or 4th origin at
the rapid traverse rate. At this time, it stops by the commanded position of each axis on the way.
Y
200 Waypoint
Current point
100
The 2nd, 3rd, 4th origin coordinate of each axis should be specified separately in the NC channel / axis parameters.
Through the P2, P3, and P4 commands, for the 2nd and 3rd homing to be instructed currently, you can specify which
origin is selected between the 2nd, 3rd origin. "P2" refers to the 2nd origin and "P3" refers to the 3rd origin.
The incremental commands are available for axis positioning.
NC
Group and parameter name
Parameter
NC
Channel/Axis
Parameter
9-38
Chapter 9 NC Control Function
The method of command and the type of axis feed are applied the same as those for linear interpolation (G01). Once
the SKIP signal is input with the NC_BLOCKSKIP command, feed is stopped and it is progressed in the next block. This
function is used for measuring a size of work-piece or for knowing a particular location during machining. At this time, the
location of the machine at the point that it is stopped is saved in the flags by axis. For more information of the relevant
flags, see “Appendix 1 Flag Alarm”.
De facto transfer
External signal pathTransfer path
input in case external
signal is absent
External signal
input
9-39
Chapter 9 NC Control Function
17) Automatic tool length measurement (G37 / G37.1 / G37.2 / G37.3 / G37.4)
It is used when tool measuring equipment is installed on a particular position of the machine. It automatically measures
the compensation value of a tool and compensates. A tool moves to a measuring location during which it slows down
and moves until a signal to reach the measuring location displays from measuring equipment. It calculates a new tool
compensation value (tool length compensation value) from the difference between the actually nominated position and
the position where the auto tool measure signal happens.
Tool
Start Position
Rapid
Traverse
Deceleration
Positions
Measurement
Speed
Measurement
Position
9-40
Chapter 9 NC Control Function
Measurement
Rapid Slow Position
Traverse Traverse
Start Position
When a measurement signal is detected in an (c),(d) area other than the section, a tool measurement alarm occurs.
If no measuring signal is detected until out of (d) range, a tool measurement alarm occurs.
Parameter items related to automatic tool length measurement are as follows.
NC
Group and parameter name
Parameter
NC
Channel
parameter
9-41
Chapter 9 NC Control Function
Compensation value = Current compensation value + (Location where measuring signal becomes ON –
18)
19)Nominated measuring point)
{G39} X_ Y_ / I_ J_
The corner off circular interpolation with the tool radius of the corner as the radius is carried out by the next command
specified in the state of G01, G02 or G03. If specifying X and Y, the new vector that moves to the left (G41) or the right
(G42) from a starting point of a right angle with X and Y is created. A tool moves according to a circular arc from the end
of an old vector to the end of a new vector. X, Y and Z are displayed by the absolute value or the incremental value
corresponding to G90 or G91. And I, J and K are always displayed by the incremental value at the end point.
G41
New vector
신벡터
Program path
프로그램된 경로
G42
신벡터
New vector
Program path
프로그램된 경로
9-42
Chapter 9 NC Control Function
The command of G39 can be given only during the offset mode (the state that G41 or G42 are commanded previously).
Left and right rotation of a circular arc is decided by whether it is (G41) or (G42). This command carries out circular
interpolation if there is the G function (G00/G01/G02/G03/G33).
{G40} [G00/G01] X_ Y_ Z_ A_ B_ C_ U_ V_ W_ S_
The G40 command is to cancel the tool diameter compensation. When G40 is commanded in the mode of G00 and
G01, the mode will change from Enable Tool Diameter Compensation to Disable Tool Diameter Compensation. The
offset in the G40 mode is always 0, and the center path of the tool matches the programmed path. The program should
always be terminated in the G40 mode. If it ends in the G41 / G42 mode, the program will be terminated at a distance
offset by the compensation amount. In addition, it is not possible to cancel the tool diameter compensation in the circular
interpolation (G02, G03).
G40 X_ Y_
9-43
Chapter 9 NC Control Function
9-44
Chapter 9 NC Control Function
9-45
Chapter 9 NC Control Function
9-46
Chapter 9 NC Control Function
9-47
Chapter 9 NC Control Function
9-48
Chapter 9 NC Control Function
Y axis
X axis [Unit:
N1 G91 G17 G00 G41 X20. Y20, D08 (D08 tool offset number)
N2 G01 Z-25. F100 (The radius value of the tool is entered in the corresponding
number)
N3 Y40. F250
N4 G39 X40. Y20, (Circular arc compensation path)
N5 X40 Y20.
N6 G39 X40. (Circular arc compensation path)
N7 G02 X40. Y-40, R40.0
N8 X-20. Y-20. R20
N9 G01 X-60.
N10 G00 Z25.
N11 G40 X-20. Y-20,
N12 M30
9-49
Chapter 9 NC Control Function
Tool diameter
compensation
NC
Channel
Parameter
* The parameter related to the tool diameter compensation amount is "tool diameter compensation
amount 1 ~ tool diameter compensation amount 128".
G43 Z_ H_
G49 Z_
If the offset data that is designated by H code is added to the coordinate values of the terminal of the motion command
for the Z axis that is programmed by Absolute Command or Incremental Command, G43 is added so the coordinate
value becomes the terminal. A length value can have +, -.
If the motion command of Z is omitted, the length offset is applied in the + direction for G43 and the - direction for G44
in the next block that has the command of Z.
When measuring the tool length first, use the following method
(1) Place the workpiece with a wide top surface on a table.
(2) Bring the end of the reference tool into contact with the plane of the workpiece.
(3) Compensate the Z-axis value.
(4) Replace with the tool to be measured and bring the tip of the tool into contact with the plane.
9-50
Chapter 9 NC Control Function
(5) The Z-axis value of the relative coordinate system in that state is stored in the memory as the tool compensation
amount.
With the above settings, the correction amount is set to a - value for a short tool and a + value for a long tool with
respect to the reference tool. Therefore, tool length compensation can always be specified only with the G43 during the
program.
G43, G44 and G49 are a modal code, which are effective until another code appears. Therefore, the program makes
commands G43/G44 right after tool replacement. After finishing the tool work, if commanding G49 before tool
replacement, tool length compensation is canceled.
The parameters related to the tool length compensation are shown below.
NC
Group and parameter name
Parameter
NC
Channel
Parameter
* The parameter related to the tool length compensation amount is "tool length compensation amount
1 ~ length compensation amount 128".
9-51
Chapter 9 NC Control Function
During machining the distance between tools can be increased or decreased as much as the tool diameter rather than
the width of the work-piece. The tool position compensation function (G45~G48) is the function to increase and decrease
the distance to go as much as the tool diameter. The G codes are not modal commands. Therefore, they are valid only
for the commanded block. However, the increased or decreased compensation value is continuously valid for the
commanded axis. To avoid confusion about H code when designating the compensation value, D code is used. The
compensation number is a modal command so that it is continuously valid until another value (compensation number) is
commanded or reset. Therefore, it is not needed to command each block.
The compensation number, 0, means that the compensation value is always 0. Increase and decrease are conducted
toward the move command. In the case of the absolute command, it increases and decreases toward the commanded
position.
G45 G46
Internal Internal
arithmetic arithmetic
processing processing
Movement Movement
amount amount
G47 G48
Internal Internal
arithmetic arithmetic
processing processing
Movement Movement
amount amount
± =
Program command value Compensation amount Movement amount after compensation
Generally the compensation value sets tool radius or tool length with the value of an amount. If the compensation value
is set by a negative value, increase and decrease is conducted the other way. It is like setting G45 and G46, G47 and
G48 conversely.
9-52
Chapter 9 NC Control Function
For circular arc interpolation, only 1/4 circle and 3/4 circle can be done. In other words, move toward the circular arc that
radius is increased or decreased as much as the compensation value and the center of circular arc is the same. Half or
perfect circle repeatedly commands 1/4 and 3/4 circles.
Programmed path Tool nose center path
N107
N112 N111
N106
20R
N110 N104
N113 10R N108 N105
30
N109
N114 N103
40
10R
N115
N101 N102
N116
40
N100
30 10 30 30 40 10
Start point
9-53
Chapter 9 NC Control Function
Scaling function is to reduce or enlarge the size of the programmed shape and then, to program. It can be applied
variously by designating the whole magnifications or different magnifications of each axis. The tool offset data is excluded
from the subject for scaling.
G50
G51 X_ Y_ Z_ P_
For the motion command after this command, scaling is performed by magnification of P that is designated based on the
center of scaling. The scaling mode can be canceled by G50.
The plane selection of circular interpolation can be independently used and should be used with the same block as a
circular interpolation command.
G50
G51 X_ Y_ Z_ I_ J_ K_
9-54
Chapter 9 NC Control Function
N01 G92 X0 Y0 Z0
N02 G90 G51 X-100. Y-100, P0.5
N03 G00 G43 Z-200. H02
N04 G41 X-50. Y-50, D01
N05 G01 Z-250. F1000
N06 Y-150. F200
N07 X-150
N08 G02 Y-50. J50,
N09 G01 X-50.
N10 G00 G49 Z0
N11 G40 G50 X0 Y0
N12 M02
9-55
Chapter 9 NC Control Function
G50
G51 X_ Y_ Z_ I-_ J-_ K-_
G50:
Scaling/Mirror image setting
X_ Y_ Z_: The center coordinate value of mirror image should be absolute G90. If X_Y_Z_ are omitted, the location
where G51 is commanded becomes the center of the mirror image.
I-_ J-_ K-_: You should designate in negative number by the use of ‘-‘. The mirror image magnification for each axis
should be designated in the relation of I = X axis, J = Y axis, and K = Z axis. It is always 1/1000.
The mirror image function is made by adding the mirror function to the scaling function. Therefore, it is possible to
reduce/enlarge the programmed forms and at the same time, it is possible to symmetrically move. If you designate I_ J_
K_ (or P_) in positive numbers when using mirror image G51, the scaling function works. If you designate in negative
numbers, the mirror image function works.
9-56
Chapter 9 NC Control Function
9-57
Chapter 9 NC Control Function
G52 X_ Y_ Z_
The local coordinate system is the coordinate system that sets and uses the reference point at an arbitrary point based
on the set workpiece coordinate system when creating the program by the workpiece coordinate system. With the local
coordinate system command, the new coordinate system, namely, the local coordinate system can be set in all
workpieces coordinate systems (G54 to G59). The origin of each local coordinate system is the X_Y_Z_ locations
specified by each workpiece coordinate system. The local coordinate system is cleared to 0 when a new workpiece
coordinate system is set.
G52 X Y Z
Local coordinate
Machine origin
9-58
Chapter 9 NC Control Function
G28X0Y0
G00G90X1, Y1,
G92X0Y0
G00X500Y500
G52X1, Y1,
G00X0Y0
G01X500F100
Y500
G52X0Y0
G00X0Y0
9-59
Chapter 9 NC Control Function
G90 G53 X_ Y_ Z_
G53 is the command to use the machine coordinate system and the tool moves rapidly to the X_Y_Z_ position above in
the machine coordinate system. G53 is the stand-alone G code so it is valid in the commanded block only. It is still valid
in the absolute command (G90) but becomes ineffective in the incremental command (G91). If you want to move the tool
to the machine-specific position such as a tool change position, you should program it in the machine coordinate system
with G53. The tool diameter compensation, tool length compensation, and tool position compensation must be canceled
before the G53 command, otherwise, it will be moved to the compensated state. In addition, since the machine
coordinate system must be set before the G53 is commanded, manual homing or homing with G28 should be executed
after turning on the power.
G40 G80
G53 G90 X-140 Y-120 Z0 (Move to position X-140 Y-120 Z0 of machine coordinate system)
G92 X0 Y0 Z150 (Reset by changing the workpiece coordinate system)
G30 G91 Z0
G54 G00 G90 X0 Y0
M30
9-60
Chapter 9 NC Control Function
27) Select workpiece Coordinate System1~6(G54, G55, G56, G57, G58, G59)
G54 X_ Y_ Z_
G55 X_ Y_ Z_
G56 X_ Y_ Z_
G57 X_ Y_ Z_
G58 X_ Y_ Z_
G59 X_ Y_ Z_
The coordinate system used for workpiece machining is called the workpiece coordinate system. This is the coordinate
system that allows the operator to create a program conveniently on the basis of drawings, and to set any point of the
workpiece to be machined as the origin by applying the NC program as it is. After turning on the power, it is necessary to
executing homing for proper application of the coordinate system. When using G54 ~ G59, it is not necessary to set the
coordinate system with G92.
G40 G80
G28 G91 X0 Y0 Z0 (Returning to machine origin where the waypoint is the current position value
[G91mode])
G54 G00 G90 X0 Y0 Z0 % Use the 54 workpiece coordinate system and traverse it to the origin rapidly. i.e.
G54
% Traverse to the origin of the coordinate system rapidly
M30
9-61
Chapter 9 NC Control Function
G90 G60 X_ Y_ Z_ U_
Single Direction Positioning (G60) is the function used for tool traversing, which replaces the Rapid Traverse or runs last.
After stopping at the position separated by the overrun stroke set for the commanded positioning direction, it moves to
the end position and obtains the effect of backlash compensation.
Therefore, the G60 command is applied, it always moves from the same direction to the target position.
The overrun amount is stored in the parameters.
Please refer to the overrun feed amount of the single direction positioning of NC channel / axis parameters.
NC
Group and parameter name
Parameter
NC
Channel/Axis
Parameter
Note that the single direction positioning command does not eliminate the backlash physically.
If the positioning direction is specified for the X + direction as shown in the figure, it will always move from the same
direction to the target position.
If the overrun amount is not set or the feed amount is 0, the single direction positioning command is not applied.
In addition, it does not apply to the Z axis in the drill cycle, and it is not affected by the mirror image for the set direction.
9-62
Chapter 9 NC Control Function
G21
G17 G40 G80 T01
M06
G90 G54 G60 X5.0 Y5.0
S1200 M03 T02
G43 Z2.5 H01 M08
G99 G82 R2.5 Z-2.0 P200
F150.0
G60 Y20.0
G60 X20.0
G60 Y5.0
G80 Z2.5 M09
G28 Z2.5 M05
M01
9-63
Chapter 9 NC Control Function
G61
The Exact Stop mode (G61) command is used to avoid not exactly reaching the location designated in the previous
block due to NC’s continuous execution between continuous blocks in the cutting feed.
If exact stop mode is commanded, motion speed is reduced to 0 in the end point of motion of a block. After confirming if
reaching the command position, execute the next block. Exact Stop mode (G61) is a modal command while G09 is a
one-shot command. G61 is continuously applied to the cutting feed until G62 (automatic corner override mode), G63
(tapping mode) and G64 (cutting mode) are commanded.
G54 G00 X0 Y0
G61 G01 X10 F50
Y100
G64 X0
Y0
M30
9-64
Chapter 9 NC Control Function
G62
This function enables smooth feed by automatically reducing the tool feed speed to prevent the load on the tool from
increasing while moving to the inner corner in the tool diameter compensation mode (G41/G42).
There are 4 types of inner corners to which automatic corner override mode is applied. Corner angle Θ ranges from 2° ≤
Θ ≤ Θp ≤178°.
Programmed path
Tool Center path
Linear - Linear Circular - Circular
Θ
Θ
NC
Channel
Parameter
9-65
Chapter 9 NC Control Function
Override is applied to the feed rate from the start section to the end section of the corner when it is determined as the
inner corner.
The start section and end section are saved in parameters. The save location is as follows.
NC
Automatic corner override
Parameter
NC
Channel
Parameter
Linear distances Le and Ls to which feedrate override is applied are the linear distances between a point on the tool
center path and the intersection of the corners.
Program path
Le Ls
a b
Tool centerd path
Override applied path: From a point to B
point
The amount of override in the corner section where the override is applied is set as a parameter as follows.
NC
Automatic corner override
Parameter
NC
Channel
Parameter
9-66
Chapter 9 NC Control Function
9-67
Chapter 9 NC Control Function
NC
Channel
Parameter
NC
Channel
Parameter
NC
Channel
Parameter
9-68
Chapter 9 NC Control Function
Program path
Rp Rc
Tool centered
path
If there is a circular arc in the corner while automatic corner override is applied, the feed rate is applied as follows.
Deceleration section feed rate = Command feed rate × Rx/Rp × auto corner override amount × feed rate
override amout
G63
Tapping mode (G63) command carries out the cutting feed the same as cutting mode. A tool is not decelerated at the
end point of a block and executes the next block.
Cutting feedrate override is fixed at 100% and the function of Feed Hold is not applied.
This function, as a modal command (group 15), is continuously applied to the cutting feed until G61 (Exact Command
Mode), G62 (Automatic Corner Override Mode) and G64 (Cutting Mode) are commanded.
9-69
Chapter 9 NC Control Function
G64
The Cutting mode (G64) command is the feed mode that is set as the default of the cutting feed mode. A tool is not
decelerated at the end point of a block and executes the next block.
But as in the real feed, the current block is previously decelerated and the next block is previously accelerated, a
phenomenon of rounding happens at the corner. This function, a modal command (group 15), is valid until G61 (Exact
Command Mode), G62 (Automatic Corner Override Mode) and G63 (Tapping Mode) are commanded.
G54 G00 X0 Y0
G64 G01 X50 F100
Y100
G61 X0
Y0
M30
9-70
Chapter 9 NC Control Function
A custom macro can be called with the macro call (G65) command.
Custom macro that is designated as program addresses can be called with macro call (G65) command.
And data variables can be delivered by designating factors.
If it is needed to designate frequency of repetition, set the range value of 1~9999 after L.
If input of repetition frequency is omitted, 1 is set as default.
9-71
Chapter 9 NC Control Function
Factors designated 2
- It is possible to designate factors with address A, B, C. It is possible to designate the factor consisting of a
set of addresses I, K, J up to a maximum of 10 sets.
- The number in () means the order of designating factors is not used when it is actually commanded.
-
Address Variable Address Variable Address Variable
number in number in number in
macro macro macro
A #L1 K(3) #L12 J(7) #L23
B #L2 I(4) #L13 K(7) #L24
C #L3 J(4) #L14 I(8) #L25
I(1) #L4 K(4) #L15 J(8) #L26
J(1) #L5 I(5) #L16 K(8) #L27
K(1) #L6 J(5) #L17 I(9) #L28
I(2) #L7 K(5) #L18 J(9) #L29
J(2) #L8 I(6) #L19 K(9) #L30
K(2) #L9 J(6) #L20 I(10) #L31
I(3) #L10 K(6) #L21 J(10) #L32
J(3) #L11 I(7) #L22 K(10) #L33
9-72
Chapter 9 NC Control Function
Combination designations
- Even if factors are designated by combining designation of factors 1 and 2, alarms do not occur.
- In this case, factor address follow designation 1. Variable
As in the figure, in case of a combination designation, the address according to the designation of factors 1 is valid.
Therefore, D5.0, not I(2)4.0, is valid in #L7 address.
G67
Factor designation of the macro modal call (G66)/cancel (G67) command is the same as macro all (G65).
9-73
Chapter 9 NC Control Function
After executing the block that motion is commanded during a macro call, the macro call is carried out.
If G66 is commanded again during a macro modal call (G66), the next modal call can be carried out.
If G67 is commanded, the macro call is not carried out from the next block.
G66 and G67 always exist in the same program.
9-74
Chapter 9 NC Control Function
G17 G68 X_ Y_ R_
G18 G68 Z_ X_ R_
G19 G68 Y_ Z_ R_
G69
By commanding the rotation center and rotation angle of the shape through the coordinate system rotation command
(G18), it can be rotated by an arbitrary angle. In addition, the rotated shape can be created and used as an auxiliary
program.
Shape
B
R
Shape
A
Y
X
In coordinate rotation in the G17 plane, the
counterclockwise rotation direction is the + direction of
the rotation angle command.
9-75
Chapter 9 NC Control Function
The Counter Tapping Cycle (G74) command is the function that is useful in creating counter screws. After it rapidly
moves to R point after positioning, execute tapping up to the Z point. Dwell is carried out when tapping ends. It is the
cycle function that the master axis directly revolves (M3) and moves to the R point after stopping.
Initial Level
Forward Forward
rotation of P Z point rotation of P Z point
main axis main axis
9-76
Chapter 9 NC Control Function
G80
The Canned Cycle Cancel (G80) command is the function that releases all drilling data and aborts the canned cycle
function. As it aborts canned cycle data such as R point and Z point, R point and Z point become 0 through incremental
command.
9-77
Chapter 9 NC Control Function
The Drilling Cycle/Spot Drilling Cycle (G80) commands are used for general drilling, reaming and spot boring. The tool
does cutting feed to the bottom of a hole and then goes out of it at a rapid traverse.
Initial Level
R Level
R R
shift
Z point Z point
9-78
Chapter 9 NC Control Function
The Drilling Dwell Cycle / Counter Boring Cycle (G82) commands are used for general drilling. After cutting feed to the
bottom of a hole, perform the set dwell. If dwell is omitted, it is same as G81.
Initial Level
R Level
R R
shift
Z point
P Z point P
9-79
Chapter 9 NC Control Function
The Tapping Cycle (G84) command is used for creating screws. This tapping cycle makes a screw by directly revolving
(M3) the master axis with a right screw tap spindle and counterclockwise revolving (M4) at the bottom of a hole to escape.
Initial Level
Reverse Reverse
rotation of P Z point rotation of P Z point
main axis main axis
G84 with G98 G84 with G99
9-80
Chapter 9 NC Control Function
G90 G01 X_ Y_ Z_ A_ B_ C_ U_ V_ W_
The absolute command (G90) is the method of commanding the feed position based on the currently set coordinate
system.
The feed end point uses the value calculated from the origin of the currently specified coordinate system, regardless of
where the current position is on the coordinate. The absolute command (G90) is a modal command, and once it is
commanded, it still acts as a valid command unless another position command for the feed target is set.
The above program represents the movement of the above figure with the G code.
9-81
Chapter 9 NC Control Function
G91 G01 X_ Y_ Z_ A_ B_ C_ U_ V_ W_
The incremental command (G91) is the method to instruct the movement amount to the target point to traverse for the
current position based on the currently set coordinate system.
The incremental command (G91) is a modal command, and once it is commanded, it still acts as a valid command
unless another position command for the feed target is set.
The above program represents the movement of the above figure with the G code.
9-82
Chapter 9 NC Control Function
The work-piece coordinate system setting is a command to shift the coordinate system in current use as much as the
input offset.
It is used when resetting the coordinate system based on the reference point of the workpiece.
It operates based on the coordinate system shifted (G54 ~G59) before selecting the work-piece coordinate system after
the relevant command.
Set the upper limit for input speed when controlling constant surface speed (G96). When controlling constant surface
speed, if the input value of speed is greater than the command value of G92, the spindle revolves at the set speed of
G92.
G92 S100 % When controlling constant surface speed, the maximum revolution speed of the spindle
is designated at 100 rpm
G96 S1000 % When controlling constant surface speed, cutting speed is 1000 m/min
9-83
Chapter 9 NC Control Function
G94 G01 X_ F_
It is the command to set the input unit to the user input unit (mm, degree) per minute.
Under the command, for the F input unit, the unit / min (mm / min, deg / min) is applied.
G94 G01 X10 F10 % If the unit is mm, the feed rate is commanded in 10mm / min.
G95 G01 X_ F_
It is the command to set the input unit to the feed rate per revolution of the master axis.
Under the command, for the F input unit, the unit /rev(mm/rev) is applied.
G95 G01 X10 F10 % If the unit is mm, set the speed to 10mm / rev.
9-84
Chapter 9 NC Control Function
G96 S_
* Note: As a diameter becomes 0 and the N value reaches infinity when machining the center of a material, if you want to
execute G96, designate the maximum rotation number by setting G92 (the maximum spindle speed) to a code before
executing G96 for safety.
If selecting G96 first, the speed of constant surface speed control, S, should be input. If you have selected G96 previously,
you don’t need to input it.
The parameter items related to constant surface speed control are as follows:
NC
Group and parameter name
Parameter
NC
Channel
Parameter
9-85
Chapter 9 NC Control Function
G97 S_
G96: Constant surface speed control cancel = Constant rotation number control
S_: Set the rotation speed of the spindle in rpm
The modal code operates before G96 (constant surface speed control) is commanded. The code is used when rotating
the spindle at the constant speed.
G98
Rapidly return to the initial point (the height of Z axis when the canned cycle mode setting is commanded) after
completing boring.
Initial point
G98 G99
9-86
Chapter 9 NC Control Function
G99
G99 : Return to Initial Point, R point (initial point of cutting feed) at a Canned Cycle
Initial point
G98 G99
9-87
Chapter 9 NC Control Function
G107 C_
The cylindrical interpolation is a type of contour control, which is the control mode for machining a cylindrical surface. It
can be easily created when grooving the cylindrical CAM.
It performs the circular (G02, G03) and linear interpolation (G01) with other axes by converting the movement amount
of the rotation axis specified by the angle into the linear axis distance of the circumference.
G107 C10
G90 G01 G18 Z0 C0 % Select the circular interpolation plane (ZX) Z0 C10 linear interpolation command
Caution
In the cylindrical interpolation mode, the circular arc radius command can be done with R only.
In the cylindrical interpolation mode, the positioning command (G00) is not available.
In the cylindrical interpolation mode, the coordinate system command is not available.
9-88
Chapter 9 NC Control Function
G112
G01/G02/G03
G113
G112: Set the polar coordinate interpolation mode, it is maintained until the G113 is commanded.
G01/G02/G03: Command to the rectangular coordinate system of the linear and rotary axis.
G113: Disable the polar coordinate interpolation mode
The polar coordinate interpolation converts the command entered into the rectangular coordinate system into the
movement of the linear axes (X, Y, Z: tool movement) and the rotary axes (A, B, C: workpiece). This is executed on the
polar coordinate interpolation plane created by the linear axis and the imaginary axis that is orthogonal to the linear axis.
The linear and the rotation axes should set in the parameters before the polar coordinate interpolation.
NC
Group and parameter name
Parameter
NC
Channel
Parameter
In this mode, the tool diameter can be compensated and the polar coordinate interpolation is performed for the
compensation path of the tool diameter.
It is mainly used for grinding of the CAM shaft, etc.
Rotation axis
9-89
Chapter 9 NC Control Function
Caution
In the polar coordinate interpolation, only the straight line (G01) and circular interpolation (G02 / G03) can be used.
The command unit of a virtual axis is the same as a linear axis. The coordinate of the virtual axis becomes 0 under
the G112 command.
The F command in the polar coordinate interpolation is the linear velocity (the relative velocity of the workpiece and
the tool).
The circular interpolation imagines the X and Y planes so the distance from the starting point to the central point is
commanded by I and J only.
9-90
Chapter 9 NC Control Function
(2) M code
Operating the machine through the motion control requires the functions for various mechanical operations in addition to
the functions such as feed and interpolation using the G codes. In order to control the machine using the functions other than
those supported by the G codes, the motion controller supports the M codes.
The M codes of the motion controller support the Pause, the function indicating the end of the NC program and the
functions to interface with each motion control flag.
M codes can be commanded again only after all operations of the codes that have been already commanded are
completed.
Mxx
G90
G01 X100. Y100,
G01 X150. Y200
M00 % Pause command
G01 X10. Y10,
G01 Y30. Z30,
M02
Actual operations may differ because the machine manufacturer determines which function of the machine is to be given to
the M code. However, the general code table that is commonly used is as follows.
9-91
Chapter 9 NC Control Function
Program End At the end of the program, the program returns to its beginning again.
M30
End of Tape All commands are RESET.
Auxiliary program
M98 The function to call an auxiliary program while the automatic program runs
call
End of the auxiliary The function to terminate the auxiliary program.
M99
program [Used even if the main program is executed repeatedly]
9-92
Chapter 9 NC Control Function
Other instructions of the motion controller are the commands that control the progress of the program that is not supported
by G code, M code, or logical / numerical operation function. Using the variables and instructions, it can program flexible and
complicated forms of operations synchronized with the G / M code. These operation functions used in the NC program are
similar to those used in the motion program but since they are operated directly in the NC program, it is possible to develop
programs that can operate the machine more flexibly. In terms of the difference from the operation processed in the motion
program, the motion program operates in the fixed cycle mode, while the operation of the NC program is executed through
one flow only except that it is specified as the iteration statement.
The motion controller supports the variables available in the NC program as the macro variables. The macro variable
replaces the part where the variable is used with its own value. By using the macro variable, you can give flexibility to the
machine control through a controller.
1) Variable (#)
For the variables, # followed by a variable type and a number. Multiple variables are separated by a number after the #.
The constraints on using variables are as follows.
It is possible to use the variable instead of the value following the address.
ex) F[#L103] F100 (when, #L103 = 100)
Z-[#L110] Z-250 (when, #L110 = 250).
A value exceeding the maximum command value set for each address cannot be specified.
ex) #L140 = 1000
G[#L140] ; Maximum command value OVER.
For the global variables, # followed by a device type, M with a variable type and a number. The range of input values
available for each variable type is different. The constraints on using variables are the same as the local variable.
9-93
Chapter 9 NC Control Function
For the system variables, # followed by a device type, M with a variable type and a number. The range of input values
available for each variable type is different. The constraints on using variables are as follows.
The range of the variable is limited by the variable's number. It is divided into the local variable, global variable, and
system variable according to the range, and the details are as follows.
Bit(X) Addressing the leaner bitwise value from bit 0 after the 'X' indicator
16 bit(W) Addressing the value in word units (16bit) after the 'W' indicator
32 bit(D) Addressing the value in double word units(32bit) after the 'D' indicator
64 bit(L) Addressing the value in long word units(64bit) after the 'L' indicator
9-94
Chapter 9 NC Control Function
2-3) Performing the address range check for each data type
N_
“N" for specifying the Statement Number is the command used in instructions such as IF, GOTO, etc., and displays the
corresponding block so that other commands can recognize it. Since the NC program of the motion controller does not
memorize the block’s line number of each program separately, the "N" command is used for the block to be displayed.
The "N" command can be used with other commands in the block or it can be used alone in one block.
However, the number used for the "N" command must be unique for each program's motion file (.nc file). If there is a
duplicated Statement Number, an Error will occur.
The Statement Numbers that can be specified with the "N" command range from 0 to 2147483647. If you use a number
exceeding this range, an error is generated. In addition, the number of Statement Numbers that can be specified in one
motion program is up to 1000. If the total number of specified Statement Numbers exceeds 1000, an error occurs.
The statement numbers ordered commanded with the "N" do not have to be used in numerical order on the program. That
is, the Statement Numbers can be used in random order.
4) Conditional statements(IF)
IF [……] GOTO N_
IF: IF statements
[……]: IF statements condition
GOTO N_: Specify the Statement Number to be branched
When the condition following“IF”is met, the conditional statement branches to the block with the Statement Number
"N_" specified immediately after it. If the condition is not met, it starts sequentially from the block immediately below.
For the conditions following “IF”in the conditional statement, you can create them by comparing local variables with
constants, comparing between local variables, and comparing between constants. In the condition after the "IF" in the
conditional statement, variables and constants used in the condition can be applied up to 2 including variables and
constants.
It cannot branch to another motion file (.nc file) or another motion program.
9-95
Chapter 9 NC Control Function
5) Branch Instruction(GOTO)
GOTO N_
The branch instruction is the function to branch unconditionally to the block marked with the Statement Number "N_"
that is specified after "GOTO".
It cannot branch to another motion file (.nc file) or to another motion program.
When the <conditional expression> is met, it repeats from the block following DO n to the END n block.When the
<conditional expression> is not met, it jump to the next block of END. WHILE [<conditional expression>] can be omitted
and If omitted, it repeats infinitely from DO n to END n.
WHILE [<conditional expression>] Do n and END n are always used as a pair, and by the identification number n, the pair
is identified. If another loop is selected in the Iteration loop, it is distinguished by the pair of identification factors.
9-96
Chapter 9 NC Control Function
7) Operation command
There are substitution of variables and integers, the four fundamental arithmetic operations, Mathematical operation, etc.
for available operations. The types of commands are shown in the table below. When using multiple operations in
combination, the priority is given in order of variable, multiplication / division, addition / subtraction. The brackets "[]" are
used to set the priority.
8) annotation(;, %, ())
%, ;, ()
% : annotation
; : annotation
( ) : annotation
Command description
All characters, expressions and numbers following "%" or ";" are commented out and ignored during the program
execution.
"%" is valid in one line only.
The statement between the parentheses "(" and ")" is also treated as a comment.
G90
G00 X100. Y100, Z100, U100, % From here, the whole line is commented out.
M02
9-97
Chapter 9 NC Control Function
G90
N150 WHILE [#L100 LE [360.-#L102]] DO 210 % Repeat up to N210 until the condition is met
N200 WHILE [#L101 GE 10.] DO 220 % Repeat up to N220 until the condition is met
G0 Z10.
#L101 = #L101 + 10. (INCREASE) % calculation formula
M02
9-98
Chapter 9 NC Control Function
9.4 NC Parameter
NC parameter is channel parameter and axis parameter.
The each parameter is as follows.
Parameter Group No. Item Description
1. Channel 1. Standard 1 Target machining quantity Set the target machining quantity.
settings (0 ~ 2,147,483,647)
Parameter It is possible to write NC parameters during NC
channel automatic operation.
2 Target machining quantity at M99 Set the target machining quantity for repeated
repeated machining machining with M99. If the set value matches the
current machining quantity, the cycle automatically
stops.
(0 ~ 2,147,483,647)
It is possible to write NC parameters during NC
channel automatic operation.
3 Check of decimal point Set whether to check decimal point of the NC
program.
0: Decimal point check
(Mm if there is a decimal point, um if there is no
decimal point)
1: No decimal point check (mm)
4 Keep workpiece coordinate Set whether to keep the workpiece coordinate
system system when resetting.
0:Hold,
1: Do not hold
5 Whether to call the macro when Set whether to call the macro program (9000.nc ~
the T code is commanded 9009.nc) when the T code is commanded.
0: Do not call
1: Call
6 Dwell Method Set the dwell function (G04) to use the data
corresponding to X, P as time or the number of
revolutions of the spindle.
If the data is set to the number of revolutions of the
spindle, it is applied in the status of feed per
revolution (G95).
0: times
1: Rotation number
7 Select a progress block at reset Set whether to initialize to the start block of the
program at reset.
If you want to set to 0 (keep the current block), the
parameters of "Keep workpiece coordinate system"
should be set to 0 (keep).
0: Keep the current block
1: Initialize to the start block of the main program
2: Initialize to the current block of the main program
It is possible to write NC parameters during NC
channel automatic operation.
9-99
Chapter 9 NC Control Function
9-100
Chapter 9 NC Control Function
9-101
Chapter 9 NC Control Function
9-102
Chapter 9 NC Control Function
9-103
Chapter 9 NC Control Function
9-104
Chapter 9 NC Control Function
Tool
centere
d path
9-105
Chapter 9 NC Control Function
9-106
Chapter 9 NC Control Function
9-107
Chapter 9 NC Control Function
9-108
Chapter 9 NC Control Function
Off Z
-X +X Xt
-X traversing direction
contact surface
-Z traversing direction
contact surface
-Z
Zt
+Z
Decceleration
Start position
err err
r
9-109
Chapter 9 NC Control Function
9-110
Chapter 9 NC Control Function
9-111
Chapter 9 NC Control Function
9-112
Chapter 9 NC Control Function
9-113
Chapter 9 NC Control Function
9-114
Chapter 9 NC Control Function
The parameter number, group number, and item number in the table above can be used as operands of NC_ReadParameter or
NC_WriteParameter when reading or writing NC parameters in a motion program.
For the function block, refer to 6.8.14 and 6.8.15.
NC_WriteParameter
NC_ReadParameter BOOL Execute Done BOOL
UINT NcChannel NcChannel UINT
BOOL Enable Valid BOOL
UINT NcChannel NcChannel UINT UINT NcAxis Busy BOOL
UINT NcAxis Busy BOOL INT ParameterGroup Error BOOL
INT ParameterGroup Error BOOL INT ParameterNumber ErrorID WORD
INT ParameterNumber ErrorID WORD LREAL Value
Value LREAL UINT ExecutionMode
Input-Output
UINT NcChannel Set the NC channel to make the command.
Input
UINT NcAxis Set the channel axis. (1~10: X=1, Y=2, … B=8, C=9, S=10)
When set to 0, ‘Write Channel Parameters’ is setting
INT ParameterGroup Specify the number in the group of the parameter.
INT ParameterNumber Specify the item number in the group of the parameter.
9-115
Chapter 9 NC Control Function
A spindle is a rotating axis that is used to equip a work-piece or a cutting tool in machine tools. The NC control of a motion controller
provides methods to control the spindle axis and various operation functions.
2) EtherCAT inverter
To connect with the NC spindle axis, the EtherCAT inverter should support the vl (velocity, frequency converter) mode
among operation modes of the CiA402 drive profile.
To operate the vl operation mode, the following objects should be registered with the EtherCAT PDO setting.
Type Index Parameter name
0x6041:0 Status word
TxPDO
0x6044:0 vl velocity actual value
0x6040:0 Control word
RxPDO
0x6042:0 vl target velocity
9-116
Chapter 9 NC Control Function
Notes
If the basic operation mode of drive profiles is not set to csv or vl according to supported devices, set the operation
mode to csv (9) or vl (2) using the ‘EtherCAT parameter – Slave – Start command’.
[Ex.] Set the operation mode to csv (9) in the start command of the LS ELECTRIC L7NH servo drive
※ Confirm if essential objects for the vl operation mode is registered by confirming the PDO setting of slaves
9-117
Chapter 9 NC Control Function
9-118
Chapter 9 NC Control Function
9-119
Chapter 9 NC Control Function
9-120
Chapter 9 NC Control Function
(c) Flag
※ If the NC spindle axis conducts automatic operation in the NC function module, users can confirm the number
of the axis set as the main spindle axis in the NC Channel 01 Main Spindle Axis’ (_NC01_MainSpindle) flag.
2) Parameter setting
To conduct automatic operation of the spindle axis in the NC function module, parameters should be set as follows:
(a) NC parameter
The NC channel / S axis should be registered with the NC parameter.
9-121
Chapter 9 NC Control Function
9-122
Chapter 9 NC Control Function
(b) Flag
※ The value of the‘NC Channel 01 Confirm the Main spindle axis number’ (_NC01_MainSpindle) flag becomes 0.
2) Parameter setting
In order that users directly control the spindle axis in a task program, not to conduct its automatic operation in the NC
function module, parameters should be set as follows:
(a) NC channel parameter - Main spindle axis number
Set the ‘main spindle axis number’ to ‘0: Disable’.
9-123
Chapter 9 NC Control Function
9-124
Chapter 9 NC Control Function
(offset) and velocity, and the traveling direction. 0:forward direction , 0-Forward
Orientation diredtion
1:reverse direction direction
Orientation offset 0 ~ 360 0
The tolerance range to reach the Determine whether to reach the command speed
0 ~ 100 % 95 %
spindle rotation command speed of the spindle axis by the set value.
The tolerance RPM to reach the Determine whether to reach the zero speed of the
0~ 100 rpm 5 rpm
spindle rotation zero speed spindle axis by the set value.
9-125
Chapter 9 NC Control Function
9-126
Chapter 9 NC Control Function
(3) Stop
1) Operation
If executing the M05 block in the NC program, when operating the spindle axis, stop the spindle axis.
Conduct operation using ‘rapid traverse acceleration/deceleration/jerk’ of channels / S axis parameters to stop the spindle
axis.
After starting the M05 stop operation, the program of the next block is automatically operated.
2) Status
After starting the M05 stop operation, the flag value changes as follows: (Described based on NC channel 1).
Variable Description Value
NC channel 01 target speed of the spindle (S Designated values of S-code in a
_NC01_TVelOfSpindle
command value) program
Values of the current command
_NC01_CVelOfSpindle NC channel 01 Spindle Command Velocity
velocity of the spindle
_NC01_SpindleStop NC channel 01 Signal to confirm spindle stop status On when stopped
Turn Off when stopping after
_NC01_SpindleCW NC channel 01 Signal to confirm spindle CW status
keeping the previous status
Turn Off when stopping after
_NC01_SpindleCCW NC channel 01 Signal to confirm spindle CCW status
keeping the previous status
NC channel 01 Signal to confirm the status of reaching
_NC01_SpindleCVelAgr Off
spindle command velocity
NC channel 01 Signal to confirm the status of reaching
_NC01_SpindleZeroVel On when stopped
zero velocity of the spindle
Turn Off when stopping after
_NC01S_ForwardRun NC channel 01 Traversing axes toward the axis S +
keeping the previous status
Turn Off when stopping after
_NC01S_ReverseRun NC channel 01 Traversing axes toward the axis S -
keeping the previous status
9-127
Chapter 9 NC Control Function
Conduct operation using ‘rapid traverse acceleration/deceleration/jerk’ of channels / S axis parameters to change velocity
of the spindle axis.
After starting the S-code velocity change operation, the program of the next block is automatically operated.
2) Status
After starting the M05 stop operation, the flag value changes as follows: (Described based on NC channel 1).
Variable Description Value
NC channel 01 target speed of the spindle (S Designated values of S-code in a
_NC01_TVelOfSpindle
command value) program
Values of the current command
_NC01_CVelOfSpindle NC channel 01 Spindle Command Velocity
velocity of the spindle
Designated values of S-code in a
_NC01_ScodeData NC channel 01 S Code Data output
program
_NC01_SpindleCW NC channel 01 Signal to confirm spindle CW status Keep previous status
_NC01_SpindleCCW NC channel 01 Signal to confirm spindle CCW status Keep previous status
NC channel 01 Signal to confirm the status of reaching After reaching the target velocity,
_NC01_SpindleCVelAgr
spindle command velocity turn On
NC channel 01 Signal to confirm the status of reaching
_NC01_SpindleZeroVel Off
zero velocity of the spindle
_NC01S_ForwardRun NC channel 01 Traversing axes toward the axis S + Keep previous status
_NC01S_ReverseRun NC channel 01 Traversing axes toward the axis S - Keep previous status
(5) Home operation
1) Operation
When executing commands by setting the NcAxis input of the NC_Home command to 10 (S axis) and the
ReferenceNum input to ‘1: The 1st homing’, execute the homing operation of the spindle axis according to the method
set in the ‘method for homing operation’ of the axis parameter when executing commands.
Axis parameter - Operation according to the ‘method for homing operation’ is as follows:
(a) 0: Servo drive supported
If the axis connected to the spindle axis is a servo drive, the homing operation supported by the servo drive is
executed. Servo drive parameters used for homing operation are as follows:
9-128
Chapter 9 NC Control Function
9-129
Chapter 9 NC Control Function
2) Parameter setting
Parameters related to homing operation of the spindle axis are as follows:
Item Description Setting range
1: Motor ENC
Set the method that an encoder attached to a 2: Built-in ENC1
Select the Spindle Encoder
motor of the spindle axis is connected. 3: Built-in ENC2
4: EtherCAT ENC
If the ‘spindle encoder selection’ parameter setting
Number of pulses per rotation of
value is ‘4: EtherCAT ENC’, set number of pulses 1 ~ 4294967295
the spindle EtherCAT encoder
per rotation of an encoder.
If the ‘spindle encoder selection’ parameter setting
Spindle EtherCAT encoder %ID0 ~ %ID4095
value is ‘4: EtherCAT ENC’, set the device where
position variable/address %MD0 ~ %MD524287
the current position of the encoder is saved.
0: Servo drive supported
33: Reverse direction, Z
phase
How to conduct the homing Set the homing operation method when executing
34: Forward direction, Z
operation the NC_Home command to the spindle axis.
phase
35: Set the homing of the
current position
Switch navigation speed of the Set the operated speed to detect switch signals
homing operation after starting the homing operation. Long real (LREAL) positive
Zero navigation speed of the Set the operated speed to detect zero signals after number
homing operation starting the homing operation.
Set acceleration/deceleration to accelerate and 0 or
Acceleration/deceleration of the
decelerate to the target speed after starting the Long real (LREAL) positive
homing operation
homing operation. number
Set the device where the Z phase signal used as %IX0 ~ %IX131072
Z phase variable/address
the Zero signal of the homing operation is saved. %MX0 ~ %MX16777215
If the ‘spindle encoder selection’ parameter is ‘0: Disable’, the homing operation cannot be executed. If satisfying the
following conditions according to the ‘spindle encoder selection’ parameter, homing operation can be normally executed.
(a) ‘1: Motor ENC’
The position actual value (0x6064:0) object should be set in the setting of the EtherCAT Slave TxPDO.
(b) ‘2: Built-in ENC1’
a) Unit of Encoder 1 = 0: pulse
b) Encorder1 max. value = 2147483647 pls
9-130
Chapter 9 NC Control Function
9-131
Chapter 9 NC Control Function
(6) Orientation
1) operation(Described based on NC channel 1).
When executing the M19 block in the NC program, move the spindle axis to the ‘Spindle Orientation Offset’ position of
the spindle axis.
Start operation at the ‘Orientation speed’ of the axis parameter and toward the ‘Orientation direction’. Conduct operation
up to the target speed using ‘rapid traverse acceleration/deceleration/jerk’ of channels / S axis parameters. Stop at the
‘Orientation Offset’ position after starting the M19 Orientation operation and then, a program of the next block is
automatically operated.
When executing the M19 Orientation operation, the detailed operation is as follows:
(a) If the spindle axis is operated by M03 or M04 commands, decelerate and stop.
(b) Start operation with ‘Orientation velocity’, NC axis S’s rapid traverse acceleration/deceleration/jerk’. Orientation
direction is operated toward the direction set to the ‘Orientation direction’ parameter.
(c) After starting operation, decelerate and stop at the ‘Orientation Offset’ position.
(d) Wait until the ‘NC channel 01 Axis S In-position Detection’ (_NC01S_INPOSITION) signal turns On.
(e) After detecting in-position, the ‘NC channel 01 Confirm Spindle Orientation Status signal’ (_NC01_SpindleOrient) flag
turns On.
2) Parameter setting
Parameters related to Orientation operation of the spindle axis are as follows:
Item Description Setting range
1: Motor ENC
Set the method that an encoder attached to a 2: Built-in ENC1
Select the Spindle Encoder
motor of the spindle axis is connected. 3: Built-in ENC2
4: EtherCAT ENC
If the ‘spindle encoder selection’ parameter setting
Number of pulses per rotation of
value is ‘4: EtherCAT ENC’, set number of pulses 1 ~ 4294967295
the spindle EtherCAT encoder
per rotation of an encoder.
If the ‘spindle encoder selection’ parameter setting
Spindle EtherCAT encoder %ID0 ~ %ID4095
value is ‘4: EtherCAT ENC’, set the device where
position variable/address %MD0 ~ %MD524287
the current position of the encoder is saved.
Long real (LREAL) positive
Orientation velocity
When the M19 Orientation command is executed number
on the NC program, set the Orientation position 0:forward direction ,
Orientation diredtion
(offset) and velocity, and the traveling direction. 1:reverse direction
Orientation offset 0 ~ 360
If the ‘spindle encoder selection’ parameter is ‘0: Disable’, the Orientation operation cannot be executed. If satisfying the
following conditions according to the ‘spindle encoder selection’ parameter, Orientation operation can be normally
executed.
(a) ‘1: Motor ENC’
The position actual value (0x6064:0) object should be set in the setting of the EtherCAT Slave TxPDO.
(b) ‘2: Built-in ENC1’
d) Unit of Encoder 1 = 0: pulse
9-132
Chapter 9 NC Control Function
9-133
Chapter 9 NC Control Function
speed control) command in the NC program, the NC spindle axis controls constant surface speed.
Keep the cutting speed constant and revolve the spindle axis by calculating the rotation number of the spindle according
change in material diameters.
For more information, see 9.3.3 Explanation of NC Commands (1) G code 35) Surface speed control (G96).
9-134
Chapter 9 NC Control Function
9-135
Chapter 9 NC Control Function
9-136
Chapter 9 NC Control Function
NC_SpindleControl
BOOL Enable Enabled BOOL
UINT NcChannel NcChannel UINT
BOOL TgtVelReached Busy BOOL
BOOL ZeroVelReached Error BOOL
BOOL SS_Control ErrorID WORD
Input-Output
UINT NcChannel Designate the NC channel to give commands
Input
BOOL Enable While an input is enabled, conduct the specified operation on the main spindle
in the relevant channel.
BOOL TgtVelReached Convey whether the main spindle reaches the target speed to the NC control.
0: The target speed is not reached
1: The target speed is reached
BOOL ZeroVelReached Convey whether the main spindle reaches the zero speed to the NC control.
0: The zero speed is not reached
1: The zero speed is reached
BOOL SS_Control Start the SS control mode of the main spindle. (future support)
0: Start SS controls
1: End SS controls
Output
BOOL Enabled Indicate that the function block is performed.
BOOL Busy Indicate that execution of the function block is not completed.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the error number that occurred while the function block is running.
For function block operation, see ‘6.8.22 Spindle Operation Control (NC_SpindleControl)’.
9-137
Chapter 9 NC Control Function
9-138
Chapter 9 NC Control Function
2) Function Block
The spindle gear conversion (NC_ChangeSpindleGear) function block is as follows:
Motion Function Block
NC_ChgSpindleGear
BOOL Execute Done BOOL
UINT NcChannel NcChannel UINT
LREAL ChangeVelocity Busy BOOL
BOOL GearChangeCmpl Error BOOL
ErrorID WORD
LREAL MaxVelocity
UINT GearOfMotor GearChangeEnable BOOL
UINT GearOfMachine
LREAL Backlash
LREAL P_Gain
LREAL FF_Gain
LREAL Analog10Vrpm
Input-Output
UINT NcChannel Designate the NC channel to give commands
Input
BOOL Execute Give the spindle gear conversion command in the rising Edge of input.
LREAL ChangeVelocity Set the speed value to change
BOOL GearChangeCmpl The signal that gear changes have been completed.
Each input value is set to the relevant parameter after this input turns
On
LREAL MaxVelocity The maximum setting value for velocity parameters
UINT GearOfMotor The gear ratio parameter of a motor
UINT GearOfMachine The gear ratio parameter of machine
LREAL Backlash Backlash compensation amount (Backlash)
LREAL P_Gain P gain setting value
LREAL FF_Gain Feed forward gain setting value
LREAL Analog10Vrpm Disabled
Output
BOOL Done Indicate that the function block is successfully applied.
BOOL Busy Indicate that execution of the function block is not completed.
BOOL Error Indicates whether an error occurs or not.
WORD ErrorID Output the error number that occurred while the function block is
running.
BOOL GearChangeEnable Indicate whether to change gears
※ For function block operation, see ‘6.8.24 NC Spindle Operation Control (NC_ChgSpindleGear)’.
9-139
Chapter 9 NC Control Function
Two NC channels operating independently of each other can be operated simultaneously. The two NC channels can specify the
same or different NC programs and can be executed separately.
9-140
Chapter 9 NC Control Function
9-141
Chapter 9 NC Control Function
NC channel 1 NC channel 2
waiting waiting
NC channel 1 NC channel 2
Written program can be Written program can be
specified specified
NC channel 1 NC channel 2
NC channel 1 NC channel 2
Continue running the Running program Written program can be
(Program to be written after completion can be
specified
specified)
9-142
Chapter 9 NC Control Function
NC channel 1 NC channel 2
NC channel 1 NC channel 2
Continue running the Running Continue running the Running
program(Program to be written after program(Program to be written aft
completion can be specified) completion can be specified)
(1) When using ‘PLC Erase’ function in XG5000 V4.60 or lower version
In XG5000 V4.60 or lower version, if NC parameters are erased by 'PLC Clear' function, even if NC parameters are written
again, 0x3100 (NC channel parameter data is abnormal), 0x3200 (NC channel/axis) The parameter data is abnormal.) error may
still occur. In this case, the error can be resolved by writing NC parameters using XG5000 V4.70 or higher version.
9-143
Chapter 9 NC Control Function
9-144
Chapter10 CPU Function
In the task, 1 to 256 programs can be used. The programs are executed in the order in which they are
assigned.
I/O refresh refers to the exchange of data between the digital I/O module and the analog module. The I/O
refresh is performed at the beginning of the main task execution per cycle.
10-1
Chapter10 CPU Function
Periodic task cycle that can be set depending on the main task cycle
Main task cycle Periodic task cycle that can be set
500 ㎲ 1㎳, 2㎳, 3㎳, 4㎳, 5㎳, … 95㎳, 96㎳, 97㎳, 98㎳, 99㎳, 100㎳
1㎳ 1㎳, 2㎳, 3㎳, 4㎳, 5㎳, … 95㎳, 96㎳, 97㎳, 98㎳, 99㎳, 100㎳
2㎳ 2㎳, 4㎳, 6㎳, 8㎳, 10㎳, … 92㎳, 94㎳, 96㎳, 98㎳, 100㎳
4㎳ 4㎳, 8㎳, 12㎳, 16㎳, 20㎳, … 84㎳, 88㎳, 92㎳, 96㎳, 100㎳
If the main task program execution cycle is reached during the execution of the periodic task program, the main
task program is executed. Therefore, while the main task program is executed in accordance with the cycle, the
periodic task program can be executed in several main task cycles. If you use the periodic task program, you
should write the program by referring to this point.
In addition, the cycle should be set so that the task program execution can be completed within the set period.
If the task exceeds the set period, a warning is issued. If the task execution is not completed until the periodic
error detection time, the system switches to the ERROR state.
10-2
Chapter10 CPU Function
Perform
Waiting Program Waiting Program
periodic task
Performance time of periodic task
Periodic task period
In the main task execution, the double line display after the program execution the motion control or
periodic task execution indicates that the task execution is completed.
For example, if the main task cycle is 1㎳, and the periodic task cycle is 2㎳, the periodic task is executed
every time the main task is executed twice.
Main task period Main task period Main task period Main task period
Perfor m I/O P rogra Mot ion I/O P rogra Mot ion I/O P rogra Mot ion I/O P rogra Mot ion
main task refres h m c ontrol refres h m c ontrol refres h m c ontrol refres h m c ontrol
Notice
If the initialization task execution completion (_INIT_DONE) flag is set by the user-written initialization task
program, the execution of the initialization task program is terminated, and the execution of the main task and
periodic task programs are started.
The initialization task operates in the main task cycle and is included in the main task execution time.
10-3
Chapter10 CPU Function
When the initialization program execution is completed, and the initialization task execution is terminated as
shown below, the main task program and periodic task program are executed.
Perform
periodic task Waiting Program
Main task period Main task period Main task period Main task period
Perfor m I/O P rogra Mot ion I/O P rogra Mot ion I/O P rogra Mot ion I/O P rogra Mot ion
main task refres h m c ontrol refres h m c ontrol refres h m c ontrol refres h m c ontrol
Perfor m
periodic task
Main task period Main task period Main task period Main task period
Perfor m I/O P rogra Mot ion I/O P rogra Mot ion I/O P rogra Mot ion I/O P rogra Mot ion
main task refres h m c ontrol refres h m c ontrol refres h m c ontrol refres h m c ontrol
Main task period Main task period Main task period Main task period
Perfor m I/O
Ini tial program
Mot ion I/O P rogra Mot ion I/O P rogra Mot ion I/O P rogra Mot ion
main task refres h c ontrol fref res h m c ontrol fref res h m c ontrol fref res h m c ontrol
Perfor m Prog
Waiting Program Waiting Waiting Program
periodic task ram
10-4
Chapter10 CPU Function
The system service is executed after the completion of the main task or the periodic task and s run at an idle
time when the task is not running. The system service is executed in the shaded section as shown below.
Main task period Main task period Main task period Main task period
The order of priority of the system service and each task is main task > periodic task > system service, and the
main task has the highest priority. When the main task execution cycle is reached while the system service is
running, the system service is paused, and the main task is executed. In addition, if the main task execution
cycle is reached while the system service is running, the system service is paused, and the periodic task is
executed. When the execution of both the main task and the periodic task is completed, the paused system
service is executed sub sequentially.
10-5
Chapter10 CPU Function
In the figure below, the program occupancy rate is currently 64%, which means that the main task and periodic
task are executed about 64% of the time for one second, and the system service is running for the remaining
time.
If there is no periodic task as shown below, the system service can be executed in the shaded section if the
main task execution is completed.
Main task period Main task period Main task period Main task period
10-6
Chapter10 CPU Function
If the program occupancy rate is high (system service occupancy rate is low) as shown below, the system
service may not be performed normally. In the basic parameter, a user can set the value ranging from 50 to 95%,
and if the set value is exceeded, the task program occupancy rate warning is generated. If the program
occupancy rate exceeds 100%, the system enters the ERROR state.
※ Adjust the main task cycle so that the program occupancy rate does not exceed 90%, if possible.
Main task period Main task period Main task period Main task period
I/O
I/O I/O I/O
refres Motion Motion Motion Motion
Program refres Program refres Program refres Program
h control control control control
h h h
If the cycle warning is generated as shown below, the program occupancy rate may increase.
History
Period
warning
Main task period Main task period Main task period Main task period
The value for setting the task program occupancy rate excess warning detection can be set from 50% to 95% in
the basic parameter settings.
10-7
Chapter10 CPU Function
If the task program occupancy rate exceeds the set value, the task occupancy rate excess warning
(_TASK_PRM_USAGE_OVER_WAR) is generated. If the task program occupancy rate exceeds 100%, the
system state switches from RUN to ERROR, and the task program occupancy rate excess error
(_TASK_PRM_USAGE_OVER_ER) is generated.
The program occupancy rate is inversely proportional to the system occupancy rate. If the program occupancy
rate is 20%, the system occupancy rate is 80%. But if the program occupancy rate is 80%, the system
occupancy rate is 20%.
Program
occupancy rate
100%
System service
The increase in the task program occupancy rate means that the main task and the periodic task occupy a large
portion in one cycle, and thus the time required for the system service execution is reduced. Please make sure
that the program occupancy rate does not exceed 95%. If it exceeds 95%, change the main task cycle.
10-8
Chapter10 CPU Function
10-9
Chapter10 CPU Function
If the value of %MW100 is read and written in the main task and periodic task programs as shown below, the
value of %MW100 will be changed continuously depending on the usage position in the periodic task.
① =30 ⑥ =32
Write Read
%MW100
Write
⑤ =32
② =30
③ =31
④ =31
Read
Write
Read
Main I/O
refre Program
Motion
I/O
refre Program
Motion
I/O
refre Program
Motion
control control control
task sh sh sh
Program 프로그램 수행
Program Program
Since the value of %MW100 is continuously changed to 30, 31 and 32 in one cycle of the periodic task, the
value may be different depending on the location of the device use. If in the periodic task program, the value is
written in the global variable (example: %MW100) used in the main task program, the result of the main task
program operation may be affected.
※ Please be careful when programming to avoid using the same device between the main task program and the
periodic task program, if possible.
10-10
Chapter10 CPU Function
10-11
Chapter10 CPU Function
History History
Period Period
waring waring
Main task period Main task period Main task period Main task period
I/O I/O
Motion Motion
refre Program refre Program
control control
sh sh
If the task execution is completed in the previous cycle as shown in the figure below, the history is stored. If
the cycle over warning is continuously generated, the cycle over warning history is saved only for the first
occurrence of the warning. The saved history can be checked in the error history.
History
Main task period Main task period Main task period Main task period
I/O
Motion
refre Program
control
sh
10-12
Chapter10 CPU Function
History
Period
error
Histroy
Period Period
warning warning
Main task period Main task period Main task period Main task period
RUN RUN RUN ERROR
Performance time
of main task
50~95%
0 100%
As shown in the figure below, if the program occupancy rate excess warning detection value of the basic
parameter is set to 70%, a warning is generated when the program occupancy rate ranges from 70 to 99%,
and an error occurs when it is 100%.
Histroy
Error
70% Waring
0 100%
10-13
Chapter10 CPU Function
You can set up 3 items; ‘Basic operation setting’, ‘Device area setting’, ‘Error operation setting’.
10-14
Chapter10 CPU Function
10-15
Chapter10 CPU Function
It is the function to set up and reserve the information for each I/O. If you click 『I/O Parameter』in the project
window, the below setting window will be displayed.
If you click the 『Module』in the 『slot』 position, the list of each module will be displayed. Then, choose the
module that is matched with the actual system to be configured. The selected slot will be displayed as below.
10-16
Chapter10 CPU Function
10-17
Chapter10 CPU Function
The Self-Diagnosis function is the function for the CPU part to diagnose the motion controller system for defects. In case
errors occur during supplying the power to the motion controller system or during operation, it detects errors to prevent
malfunction of the system and preventive maintenance.
(1) It is used to detect that the program is executed for the time that exceeds the user’s intended period due to an
operation delay caused by the main task/periodic task program error. The main task/periodic task cycle error
detection time is set in the basic parameters of XG5000 as shown below.
(2) While the program is running, the elapsed scan time is monitored, and if the set detection time is exceeded, the
operation of the motion controller is stopped immediately, and an error is generated.
(3) When the main task/periodic task error occurs, the error is cleared if the power is turned on again, or the mode is
switched to Stop mode
10-18
Chapter10 CPU Function
(1) The task program occupancy rate excess warning is set in the basic parameter of XG5000 as follows.
(2) If the set occupancy rate is exceeded while monitoring the task program occupancy rate during the execution of
program, the task program occupancy rate excess warning is generated. If the task program occupancy rate is 100%
in the state where the warning occurs, the task program occupancy rate error is generated.
(3) The following measures are required when the task program occupancy rate warning/error occurs.
(a) Secure the time for the system service to operate by reducing the amount of the user program execution
within the main task/periodic task.
(b) Secure the time for the system servic to operate by increasing the execution cycle of the main task/periodic
task of the basic parameter.
(c) Increase the task program occupancy rate excess warning setting of the basic parameter.
10-19
Chapter10 CPU Function
Notice
The saved error history is deleted by clicking ‘Clear’ in the error/warning window.
If the error history exceeds 1,024, it is removed from the earliest history, and the latest 1,024 history is saved.
10-20
Chapter10 CPU Function
The failures of the motion controller system are mainly caused by the below.
10-21
Chapter10 CPU Function
The information on failures occurrence is saved in the special relay (F area). Among F area flags, the
information related to the failures are as below.
Double
Bit Flag Name Function Description
Word
%FD0 %FX2 _ERROR Error Error status
Reports the failure status of the
- _CNF_ER System error
system.
External device Failures are detected from the
%FX70 _ANNUM_ER
failure external device.
There are some problems with the
%FX72 _BPRM_ER Basic parameters
basic parameters.
There are some problems with I/O
%FX73 _IOPRM_ER IO parameters
parameters.
Special module Abnormal special module
%FX74 _SPPRM_ER
parameters parameters
Communication Abnormal communication module
%FX75 _CPPRM_ER
module parameters parameters
There are some errors with the
%FX76 _PGM_ER Program error
program.
%FD2 %FX78 _SWDT_ER System Watch dog The system Watchdog works.
%FX80 _SWDT_ER System Watch dog The system Watchdog works.
Encoder parameter
%FX85 _ENCPRM_ER Abnormal encoder parameter
error
%FX86 _AXISPRM_ER Axis parameter Abnormal axis parameter
%FX87 _GROUPPRM_ER Axis group parameter Abnormal axis group parameter
%FX88 _ECPRM_ER EtherCAT parameter Abnormal EtherCAT parameter
%FX89 _NCPRM_ER NC parameter Abnormal NC parameter
%FX90 _NCPGM_ER NC program Error of NC parameter
%FX91 _PTASK_CYCLE_ER Main task Period error of main task
%FX92 _CTASK_CYCLE_ER Periodic task Period error of periodic task
%FX93 _SYSTEM_ER System error System error
_TASK_PRM_USAGE_ Occupancy rate over The task program occupancy rate
%FX94
OVER_ER error of task program exceeds 100%
10-22
Chapter10 CPU Function
Double
Bit Flag Name Function Description
Word
Reports the minor failure status of
- _CNF_WAR System warning
the system.
%FX128 _RTC_ER RTC data error Abnormal RTC data
%FX129 _PTASK_CYCLE_WAR Main task Period warning of main task
%FX130 _CTASK_CYCLE_WAR Periodic task Period warning of periodic task
Shutdown caused by Stoppage caused by abnormal
%FX131 _ABSD_ER
abnormal operation operation.
%FD4
_MOTION_CONTRO_W Motion control
%FX132 Motion control function warring
AR warring
External device Minor failures are detected from the
%FX134 _ANNUM_WAR
failure external device.
Occupancy rate over
_TASK_PRM_USAGE_ The task program occupancy rate
%FX135 warring of task
OVER_WAR exceeds.
program
In case of calculation error, this is
%FX224 _ERR Calculation error
ON during 1 scan
When overall output is OFF, this is
%FX227 _ALL_OFF Overall output OFF
ON
Operational error It maintains 0 in case of operational
%FX229 _LER
latch error.
Array index range In case of range over error of array
%FD7 %FX247 _ARY_IDX_ERR
over index, this is ON during 1 scan
Array index range In case of range over error of array
%FX248 _ARY_IDX_LER
over latch index, this is ON during 1 scan
In case of over error of UDF stack,
%FX249 _UDF_STACK_ERR UDF stack over
this is ON during 1 scan
In case of over error of UDF stack,
%FX250 _UDF_STACK_LER UDF stack over latch
this is ON
Information on the
Displays the information on the
%FW202 - _ANC_ERR external device’s
external device’s failure
failure
Information on the
Displays the information on the
%FW203 - _ANC_WAR external device’s
external device’s minor failure
minor failure
Notice
For more details on the whole flags, refer to the Appendix 1 Flag Table of the Outline of this manual.
10-23
Chapter10 CPU Function
10-24
Chapter10 CPU Function
Notice
Instantaneous power failure refers to the state where the voltage of the power supply specified by the motion
controller in the power condition is lowered as it exceeds the allowable fluctuation range, and the power failure
for a short time (several ms to dozens of ms) is called instantaneous power failure.
10-25
Chapter10 CPU Function
The motion controller has the embedded clock (RTC) function that keeps running by battery backup even when the
power is off. The time data of the embedded RTC can be used for time management such as the system’s operating
history or failure history, etc. The RTC’s current time is updated every scan by the flags for the system’s operating
state information.
3) If you want to send the time of the PC to the motion controller, click ‘Synchronization with PC clock’
button.
4) If you want to set up the user defined time, after changing set values of the data and time box, click
‘Send to motion controller’.
10-26
Chapter10 CPU Function
10-27
Chapter10 CPU Function
Notice
• The clock data may not be stated when the product is sent out from a factory so you need to set up
clock data correctly before using the product.
• If you apply unavailable clock data to the RTC, it will not work normally.
Ex.) 25:00, 32th, 14 month
• In case the RTC stops due to battery problem or errors occur, when you input new clock data to the
RTC, the error will be cleared.
10-28
Chapter10 CPU Function
In the motion controller, you can change the operation mode through the key switch attached to the module or
through communication. For remote operation, put the basic unit’s mode change switch on STOP position.
10-29
Chapter10 CPU Function
The forced I/O function is used to turn On/Off I/O areas by force regardless of the results of program execution.
The below table represents the items related to the forced I/O setting.
10-30
Chapter10 CPU Function
10.6.2 Time to Process the Forced I/O On/Off and Processing Method
(1) Forced input
When the forced input is set, among the data read from the input model at the time of Refresh, the data of the contact
set as the forced On/Off is replaced by the forced set data to update the input image area. Accordingly, during program
operation, among the actual input data, the forced set area is operated with the results replaced by the forced set data.
10-31
Chapter10 CPU Function
There are 5 types of operation history; error history, mode conversion history, power down history and system history. The
occurrence time, frequency, operating details of each event are saved in the memory and you can conveniently monitor the
data through XG5000. The operation history is saved in the motion controller unless it is deleted through XG5000.
10-32
Chapter10 CPU Function
You can modify the programs and communication parameters without stopping control operations during running
the motion controller. The below describes the basic modification method. For more details on Modification during
RUN, refer to the XG5000 manual.
The items that can be modified during RUN are limited to programs, network parameters.
You cannot modify adding tasks, deletion, parameters, etc. during RUN.
10-33
Chapter10 CPU Function
(3) Then, the background color of the program window changes and it is converted into the mode of modification
during RUN.
(5) When the modification of the program is completed, click 『Online』-『Write Modification During RUN』
(6) When Write Program is completed, click 『Online』-『End Modification During RUN』.
10-34
Chapter10 CPU Function
(7) The background color of the program window changes into the original one and modification during RUN is
completed.
Notice
• For Modification of communication parameters during RUN, after changing the network configuration
items of XG5000 in the RUN status without going into the Modification during RUN menu, click
『Online』-『Write』 and choose ‘Network Parameter’ to execute Write.
10-35
Chapter10 CPU Function
It is the function to monitor each module’s information comprising the motion controller system.
(1) If you click 『Online』-『Diagnosis』-『I/O Information』, the information of each module of connected
systems will be monitored.
(2) If you click ‘Detailed Information’ after choosing the module, the details on the module will be displayed.
10-36
Chapter10 CPU Function
10-37
Chapter10 CPU Function
10-38
Chapter10 CPU Function
Note
For more details on the monitoring function, refer to XG5000 manual.
10-39
Chapter10 CPU Function
The function to delete all of motion controller is the initialization function to delete all programs, parameters,
passwords, data stored in the motion controller.
(b) If you choose 『Yes』 in the dialog box, the window for selecting the connection method with the motion
controller to be deleted is created.
(c) If you select “Yes” in the confirmation window, the data value will be cleared to “0”. Since the parameter
may need a default value depending on the data, an error may occur after the erase operation. If an error
occurs, it is necessary to write the data as an initial value once.
10-40
Chapter10 CPU Function
The below timing chart represents the operations of the input filter function.
10-41
Chapter10 CPU Function
(b) Select ‘Digital Input/Output (XMC-DN24)’ in I/O parameter setting window and double-click.
Notice
When the filter value is set, the cycle of the main task should be set to a value smaller than the set filter
value.
For example, if the filter value is set to 3ms, the cycle of the main task should be set to 1ms or 2ms.
10-42
Chapter10 CPU Function
(a) Detect ‘Digital Input/Output (XMC-DN24)’ in I/O parameter setting window and double-click.
If you select [Clear] as the output setting when an error occurs, the output is turned off when the operation
is stopped due to an error that occurs in the motion controller. If you select [Hold], the output status is
maintained.
10-43
Chapter10 CPU Function
Ex) If the serial number is 123456789, the flag are displayed as follows
(The unused area of the serial number is displayed as 0)
10-44
Chapter11 Datalog Function
11.1 Overview
Motion controller comes with built-in datalog function. This chapter describes the specification and usage of the datalog
function.
11.1.1 Features
Using the motion controller internal datalog function, you can collect run data of motion controller and save them into a
SD memory card in the CSV (Comma-Separated Values) format just with a simple parameter configuration. The
function has the following features.
In addition, it eliminates problems that might be caused in network-based data collection, such as communication
cutoff or cable disconnection.
11-1
Chapter11 Datalog Function
③ ④
Names Description
① Status LED Indicates run status of SD memory and datalog.
② SD memory mounting slot A slot where SD memory is mounted.
The port is used when transmitting files using the FTP function of the
③ Internal Ethernet Port
internal Ethernet.
It is used for SD PWR ON, OFF or SD additional functions
④ SD CMD Button • Push the button for 0.7[sec] ~ 3[sec] : SD additional function
• Push the button above 3[sec] : SD PWR ON, OFF
11-2
Chapter11 Datalog Function
Start
SD memory insert
No
Check error code Normal?
Yes
Finish
Note
1. The SD memory should be formatted in FAT 32 format to be used for motion controller datalog function.
2. The maximum storage of SD memory supported is 32GB.
11-3
Chapter11 Datalog Function
Motion
controller
CSV Format
11-4
Chapter11 Datalog Function
Note
SanDisk, Transcend SD memories are recommended for internal datalog. Use of SD memory from other
manufacturer may result in unexpected run. Please choose your SD memory card with caution.
11-5
Chapter11 Datalog Function
CSV
(4) LOG2
ᆞᆞᆞ
CSV
SD memory card
Data
Abnormal occurrence value
(3)
CSV
(1)
Time
Buffer area
2012.12.19 15:30:31 1 14
2012.12.19 15:32:09 2 20
…
2012.12.19 15:35:12 4 15
….
2012.12.19 15:40:02 9 28
….
2012.12.19 15:55:12 11 18
(2)
11-6
Chapter11 Datalog Function
11-7
Chapter11 Datalog Function
11-8
Chapter11 Datalog Function
Note
If the data are saved using the LINT type, the following may not be represented when verifying the data
through Excel.
In such cases, you can view the normal data by reading the data using Word Pad.
Note
Float conversion, such as REAL type, supports IEEE754 standards as follows.
BIT 31 BIT 0
Sign (S) Exponent Fix
E) d
Decimal Point (F)
Note
In case of REAL, LREAL types, –NaN, +NaN are saved for undefined data, and -INF, +INF character strings
are saved for data with infinite range.
Please verify the data save range before use.
11-9
Chapter11 Datalog Function
Time
Data
Current Current Current
value: 100 value: 60 value: 120
Time
Trigger Trigger
Before value
11-10
Chapter11 Datalog Function
Time
Event Event
11-11
Chapter11 Datalog Function
Note
Elevation
BIT
Condition Saves data at descent edge of set device bit value
Descent
Elevation
Word
Small
Condition
Samples data at the descent edge when Device Set Condition
changes from TRUE (1) to FALSE(0).
Descent
11-12
Chapter11 Datalog Function
Trigger
Device
Occurrence Operation Note
Set Condition
Condition
Samples data at the descent edge when Device Set Condition
changes from FALSE (0) to TRUE(1).
Elevation
Small or Same
Samples data at the descent edge when Device Set Condition
changes from TRUE (1) to FLASE(0).
Descent
Elevation
Word Large
Condition Samples data at the descent edge when Device Set Condition
changes from TRUE (1) to FALSE (0).
Descent
Elevation
Large or Same
Samples data at the descent edge when Device Set Condition
changes from TRUE (1) to FALSE(0).
Descent
11-13
Chapter11 Datalog Function
Trigger
Device
Occurrence Operation Note
Set Condition
Condition
Samples data at the elevation edge when Device Set Condition
changes from FALSE (0) to TRUE(1).
Elevation
Same
Samples data at the descent edge when Device Set Condition
changes from TRUE (1) to FALSE(0).
Descent
Word
Condition Samples data at the elevation edge when Device Set Condition
changes from FALSE (0) to TRUE(1).
Elevation
Different
Samples data at the descent edge when Device Set Condition
changes from TRUE (1) to FALSE (0).
Descent
Trigger occurrence condition is decided by main task END. If trigger occurs again when data sampling, the trigger is
ignored and data sampling keeps on
11-14
Chapter11 Datalog Function
Elevation
Descent
Bit Transfer
Condition
or
Saves data when set device bit value is ON
ON
OFF
11-15
Chapter11 Datalog Function
Trigger Release
Device
Occurrence Operation Value
Set Condition
Condition Setting
Samples data at the elevation edge when Device Set Condition
changes from FALSE (0) to TRUE (1).
Setting
Elevation
Available
Descent
Word
Transfer Small
Condition
ON FALSE(0) TRUE(1)
Ex) Ex)
Device value ≥ Set value Device value < Set value
Device value = Set value
Device value > Set value
Ex) Ex)
Device value < Set value Device value ≥ Set value
Device value = Set value
Device value > Set value
11-16
Chapter11 Datalog Function
Trigger Release
Device
Occurrence Operation Value
Set Condition
Condition Setting
Samples data at the elevation edge when Device Set Condition
changes from FALSE (0) to TRUE (1).
Setting
Elevation
Available
Descent
Word
Transfer Small or Same
Condition
ON FALSE(0) TRUE(1)
Ex) Ex)
Device value ≥ Set value Device value < Set value
Device value = Set value
Device value > Set value
Ex) Ex)
Device value < Set value Device value ≥ Set value
Device value = Set value
Device value > Set value
11-17
Chapter11 Datalog Function
Trigger Release
Device
Occurrence Operation Value
Set Condition
Condition Setting
Samples data at the elevation edge when Device Set Condition
changes from FALSE (0) to TRUE (1).
Setting
Elevation
Available
Descent
Word
Transfer Large
Condition
ON FALSE(0) TRUE(1)
Ex) Ex)
Device value ≥ Set value Device value < Set value
Device value = Set value
Device value > Set value
Ex) Ex)
Device value < Set value Device value ≥ Set value
Device value = Set value
Device value > Set value
11-18
Chapter11 Datalog Function
Trigger Release
Device
Occurrence Operation Value
Set Condition
Condition Setting
Samples data at the elevation edge when Device Set Condition
changes from FALSE (0) to TRUE (1).
Setting
Elevation
Available
Descent
Word
Transfer Large or Same
Condition
ON FALSE(0) TRUE(1)
Ex) Ex)
Device value ≥ Set value Device value < Set value
Device value = Set value
Device value > Set value
Ex) Ex)
Device value < Set value Device value ≥ Set value
Device value = Set value
Device value > Set value
11-19
Chapter11 Datalog Function
Trigger Release
Device
Occurrence Operation Value
Set Condition
Condition Setting
Samples data at the elevation edge when Device Set Condition
changes from FALSE (0) to TRUE (1).
Setting
Elevation
Available
Descent
Word
Transfer Same
Condition
ON FALSE(0) TRUE(1)
Ex) Ex)
Device value ≥ Set value Device value < Set value
Device value = Set value
Device value > Set value
Ex) Ex)
Device value < Set value Device value ≥ Set value
Device value = Set value
Device value > Set value
11-20
Chapter11 Datalog Function
Trigger Release
Device
Occurrence Operation Value
Set Condition
Condition Setting
Samples data at the elevation edge when Device Set Condition
changes from FALSE (0) to TRUE (1).
Setting
Elevation
Available
Descent
Word
Transfer Not Same
Condition
ON FALSE(0) TRUE(1)
Ex) Ex)
Device value ≥ Set value Device value < Set value
Device value = Set value
Device value > Set value
Ex) Ex)
Device value < Set value Device value ≥ Set value
Device value = Set value
Device value > Set value
When Event Save method is used, data are saved after END of each main task where the set bit condition occurred.
Event Save samples data at main task after the event occurs.
11-21
Chapter11 Datalog Function
(1) Folder Name: Folder name is fixed. Creating additional folder other than the structures show in in the Figure below
in the SD memory, datalog function does not show normal function. Please be careful.
(2) Data Save Folder: This folder saves log data generated by datalog. Each parameter setting group uses different
folders. The file names are created in accordance with the following rules. The data folder name can be as long as
32 characters (in case of English, no space). (The folder name indicated in the folder structure diagram is arbitrary.
Users can change the names.)
11-22
Chapter11 Datalog Function
Items Description
Separation Character Comma (,)
Line Change Code CR, LF(0x0D, 0x0A)
Character Code ASCII Code
Field Data Decimal, Hexadecimal, Exponent, character string
File Size Up to 16Mbyte
Header File
Data File
11-23
Chapter11 Datalog Function
First data row Data save time Index Data0 Data1 Data2 ... Data63
Note
1. Index indicates the number of saved data
2. Data 0, Data 1, …, Data 63 indicate data names
Note
When you read a CSV file in Microsoft Office Excel, several data may be displayed in a single cell. This is
because you are required to use the “symbol as the text qualifier” when opening the CSV file in Excel. In this
case, if you open the CSV file in the following order, it will be displayed normally.
1. Select the text in the data menu after executing Excel and then select the CSV file you want to open
2. Select [Comma] as a separator and [None] as a text in the Text Wizard - Step 2 and then click Finish
11-24
Chapter11 Datalog Function
11-25
Chapter11 Datalog Function
Note
In case the SD memory is not capable of saving 256 files and the storage is full, it maintains the initial history
saves file up to the full storage of SD memory, then stops data saving regardless of the the [History Setting]
value in the parameter and generate the error code 6(%KW522)
11-26
Chapter11 Datalog Function
Motion controller
In accordance with the set sampling condition, the collected data are stored in the buffer memory first and then saved
in to the temporary memory of the SD memory card when datalog condition occurs. Therefore, setting too fast data
sampling condition or sampling too much data, data loss can be caused by buffer memory excess.
In case of data loss, ‘C’ string is stored together with the loss data. In this case, adjust the storage period in the
datalog parameter, or reduce the amount of collected data to prevent data loss.
11-27
Chapter11 Datalog Function
Motion controller
11-28
Chapter11 Datalog Function
To prevent this, the collected data need to be saved into the data at certain intervals regardless of the storage. The
data saved into the SD memory is not lost even in case of sudden power change. Backup time can be set at from 1 to 5
seconds. However, setting too short backup time may affect datalog performance.
11-29
Chapter11 Datalog Function
11-30
Chapter11 Datalog Function
Note
It runs when both the datalog parameter and the datalog EN flag are set. In case either condition is omitted,
the datalog run will not progress. Please verify whether both the datalog parameter and the datalog EN flag
are set. (See 11.10, Flag List)
(d) Set the path, history setting and file conversion point at [Save Setting]
11-31
Chapter11 Datalog Function
(e) Set the data conversion type, storage device and name
(f) Connect the SD memory card, and turn on the Datalog Enable Flag (%KW8224) when the _DL_Rdy(%KX8800)
Flag is On to activate the function. Datalog will not be activated if the Enable Flag is ON while _DL_Rdy(%KX8800)
Flag is OFF.
11-32
Chapter11 Datalog Function
When the SD memory still has data to save, the Log Ending _DLxx_Stoping (%KX8963) flag turns ON, and back
to OFF once all data are saved.
Note
When using Main task save, set the datalog parameters by referring to main task performance cycle.
Setting too much data and too fast interval may cause data loss.
- Main task run time can be verified from the following menu.
[On-line] –[Diagnosis] – [motion controller Information] –[Performance Tab]
Time
Data
Current Current Current
value: 100 value: 60 value: 120
11-33
Chapter11 Datalog Function
11-34
Chapter11 Datalog Function
(d) Set the path, history setting and file conversion point at [Save Setting]
(e) Set the data conversion type, storage device and name
(f) Connect the SD memory card, and turn on the Datalog Enable Flag (%KW8224) when the _DL_ Rdy(%KX8800)
Flag is On to activate the function. Datalog will not be activated if the Enable Flag is ON while _DL_ Rdy
(%KX8800) Flag is OFF.
11-35
Chapter11 Datalog Function
11-36
Chapter11 Datalog Function
Time
Data
Current Current Current
value: 100 value: 60 value: 120
11-37
Chapter11 Datalog Function
(d) Select one of Every Year / Month / Week / Day / Hour / Minute
(e) Set the path, history setting and file conversion point at [Save Setting]
11-38
Chapter11 Datalog Function
(f) Set the data conversion type, storage device and name
(g) Connect the SD memory card, and turn on the Datalog Enable Flag (%KW8224) when the _DL_ Rdy (%KX8800)
Flag is On to activate the function. Datalog will not be activated if the Enable Flag is ON while _DL_ Rdy (%KX8800)
Flag is OFF.
11-39
Chapter11 Datalog Function
Time
Trigger Trigger
Before value
Note
After selecting Trigger Save, if the first trigger condition occurs and another trigger condition occurs while
collecting data, the new trigger is ignored and the trigger reoccurrence flag value increases.
Note
If a trigger occurs after collecting one less than the number of sample blocks prior to the trigger, only the
number of blocks collected until then is stored, and the sample is started after the trigger. In this case, the
total number of blocks collected can be less than the total number of trigger blocks
11-40
Chapter11 Datalog Function
11-41
Chapter11 Datalog Function
Elevation
Bit
condition Saves data at descent edge of set device bit value
Descent
Elevation
Small
Saves data at the descent edge of the relevant bit, when the
set word device value is smaller than the input set value
Descent
Word
Condition
Elevation
Small or Same
Saves data at the descent edge of the relevant bit, when the
set word device value is smaller than or the same as the
input set value
Descent
11-42
Chapter11 Datalog Function
Trigger
Device
Occurrence Operation Note
Set Condition
Condition
Saves data at the descent edge of the relevant bit, when the
set word device value is larger than the input set value
Elevation
Large
Saves data at the descent edge of the relevant bit, when the
set word device value is larger than the input set value
Descent
Word
Condition
Large or Same
Saves data at the descent edge of the relevant bit, when the
set word device value is larger than or the same as the input
set value
Descent
Elevation
Same
Saves data at the descent edge of the relevant bit, when the
set word device value is the same as the input set value
Descent
11-43
Chapter11 Datalog Function
Trigger
Device
Occurrence Operation Note
Set Condition
Condition
Saves data at the elevation edge of the relevant bit, when
the set word device value is different from the input set value
Elevation
Word
Different
Condition
Saves data at the descent edge of the relevant bit, when the
set word device value is different from the input set value
Descent
Note
When less than 2 single conditions are set for trigger multiple condition, the following error message is
displayed.
11-44
Chapter11 Datalog Function
11-45
Chapter11 Datalog Function
11-46
Chapter11 Datalog Function
(b) OR Calculation
Trigger occurs when even one condition is satisfied at a single main task. After selecting Trigger Save, if the
Trigger Condition is again satisfied before data saving is complete, the new trigger is ignored and the number of
collisions flag value increases.
11-47
Chapter11 Datalog Function
11-48
Chapter11 Datalog Function
No. of sample blocks = Trigger Buffer Space1) / {(No. of set data2) * size of set data3)) +(RTC data size4))}
No. of stored samples = sample block * No. of set data
Ex)
- Set the buffer memory: 128KB
- Number and type of setting data: 64 (BYTE)
11-49
Chapter11 Datalog Function
Main task interval, 20ms, 50ms, 100 ms, 200 ms, 500 ms, 1000 ms, 2000 ms
Caution
After selecting Trigger Save, if the Trigger Condition is again satisfied before data saving is complete, the new
trigger is ignored and the trigger collisions number flag value increases. Trigger Condition is checked after
saving the set number of trigger sample blocks, and then the data are saved.
11-50
Chapter11 Datalog Function
(2) If Trigger occurs before the number of previous data set by the parameter
Saves data in the number of transfer data collected, and then collects subsequent data
(Saves less number of data than the number set by the parameter)
11-51
Chapter11 Datalog Function
(c) Select [Trigger Logging] at [Data Collection Method] to activate [Setting] menu on the left.
Then, select the [Setting] menu on the left.
(d) Upon selection, the following window is activated for trigger setting.
Select [Single Condition] as the Trigger Condition. Select either [Elevation] or [Descent] as the Trigger
Occurrence Condition.
(e) Select the condition setting menu to activate the following setting window.
Select [BIT Condition], and input device values into the device window in BIT types.
11-52
Chapter11 Datalog Function
When setting is complete, the window closes and the conditions initially set at the Trigger Setting Condition menu
are displayed as follows.
(g) Input sampling interval, total number of samples and number of samples after trigger, then finish Trigger setting.
See [11.5.2 Trigger Sample Block Calculation] for operation of number of sample blocks.
11-53
Chapter11 Datalog Function
(h) Device values set at the Datalog Basic Setting window are collected, and saved into the SD memory after type
conversion.
11-54
Chapter11 Datalog Function
(c) Select [Trigger Logging] at [Data Collection Method] to activate [Setting] menu on the left.
Then, select the [Setting] menu on the left.
(d) Upon selection, the following window is activated for trigger setting.
Select [Single Condition] as the Trigger Condition. Select either [Elevation] or [Descent] as the Trigger
Occurrence Condition.
(e) Select the condition setting menu to activate the following setting window.
Select [Word Condition], and input device values into the device window in BIT types, and input comparison
condition and comparison values
☞ Comparison Condition: Large, Large or Same, Same, Small, Small or Same, Not Same.
11-55
Chapter11 Datalog Function
When setting is complete, the window closes and the conditions initially set at the Trigger Setting Condition menu
are displayed as follows.
(g) Input sampling interval, total number of samples and number of samples after trigger, then finish Trigger setting.
See [11.5.2 Trigger Sample Block Calculation] for operation of number of sample blocks.
(h) Device values set at the Datalog Basic Setting window are collected, and saved after type conversion.
Caution
When inputting single, word condition set values, set device type as [BIT] and [WORD], respectively.
11-56
Chapter11 Datalog Function
(c) Select [Trigger Logging] at [Data Collection Method] to activate [Setting] menu on the left.
Then, select the [Setting] menu on the left.
11-57
Chapter11 Datalog Function
(d) Upon selection, the following window is activated for trigger setting.
Select [Multiple Condition] as Trigger Condition, Select either [Elevation] or [Descent] as the Trigger Occurrence
Condition.
(e) Select [Trigger Condition] and [Multiple Condition] to activate the condition setting window which allows for up to
4 inputs.
(f) Select each condition setting menu one by one, inputting specific set values.
[Multiple Condition] activates Trigger Condition by combining [Single Conditions] through operation to save data.
As described below, the basic setting method is the same as that of Single Condition.
11-58
Chapter11 Datalog Function
When setting is complete, the window closes and the conditions initially set at the Trigger Setting Condition menu
are displayed as follows.
If only one [Condition Setting] is input after selecting Calculation Condition before finishing the setting, the following
phrase is displayed and the setting is not complete.
(g) Input sampling interval, total number of samples and number of samples after trigger, then finish Trigger setting.
11-59
Chapter11 Datalog Function
(h) Device values set at the Datalog Basic Setting window are collected when the Trigger Condition occurs,
converted into the set type, and saved into the SD memory.ion.
(a) Select each condition setting menu one by one, inputting specific set values.
[Multiple Condition] activates Trigger Condition by combining [Single Conditions] through operation to save data.
As described below, the basic setting method is the same as that of Single Condition.
When setting is complete, the window closes and the conditions initially set at the Trigger Setting Condition menu
are displayed as follows.
11-60
Chapter11 Datalog Function
If only one [Condition Setting] is input after selecting Calculation Condition before finishing the setting, the following
phrase is displayed and the setting is not complete.
(b) Input sampling interval, total number of samples and number of samples after trigger, then finish Trigger setting.
(c) Device values set at the Datalog Basic Setting window are collected when the Trigger Condition occurs,
converted into the set type, and saved into the SD memory.
11-61
Chapter11 Datalog Function
Time
Event Event
Note
After selecting Trigger Save, if the first trigger condition occurs and another trigger condition occurs while
collecting data, the new trigger is ignored.
11-62
Chapter11 Datalog Function
11-63
Chapter11 Datalog Function
Note
Release value can be set as follows. If the following is not complied with, an error window will appear
and data input will not work. Check it when setting the parameter.
☞ Release value many not overlap with the range of set values.
Condition Range of Release Value
Large Set Value >= Release Value
Large or Same Set Value > Release Value
small Set Value <= Release Value
Small or Same Set Value <= Release Value
Same
Setting Available
Not Same
Example 1) In the word condition, if the value is set to %MW0>100, and the cancelation value is set to 50.
☞ If %MW0 exceeds 100, an event occurs, and the data is saved. However, since the cancelation value is set to
50, the data storage is performed until it reaches 50.
☞ When the condition is met, the data is saved at the point of time set in the even occurrence condition.
[Rise], [Fall], [Transition] conditions store 1 block of data by operation, and [ON],[OFF] conditions store data
until the conditions are not met by the level operation.
11-64
Chapter11 Datalog Function
Example 2) In the word condition, if the value is set to %MW0<50, and the cancelation value is set to 200
☞ If %MW0 is less than 50, an event occurs, and the data is saved. However, since the cancelation value is set
to 200, the data is saved until it reaches 200.
Trigger Release
Device
Occurrence Operation Value
Set Condition
Condition Setting
Saves data at elevation edge of set device bit value
Elevation
Descent
Bit Transfer
Condition
or
Saves data when set device bit value is ON
ON
OFF
11-65
Chapter11 Datalog Function
Trigger Release
Device
Occurrence Operation Value
Set Condition
Condition Setting
Samples data at the elevation edge when Device Set Condition
changes from FALSE (0) to TRUE (1).
Setting
Elevation
Available
Descent
Word
Transfer Small
Condition
ON FALSE(0) TRUE(1)
Ex) Ex)
Device value ≥ Set value Device value < Set value
Device value = Set value
Device value > Set value
Ex) Ex)
Device value < Set value Device value ≥ Set value
Device value = Set value
Device value > Set value
11-66
Chapter11 Datalog Function
Trigger Release
Device
Occurrence Operation Value
Set Condition
Condition Setting
Samples data at the elevation edge when Device Set Condition
changes from FALSE (0) to TRUE (1).
Setting
Elevation
Available
Descent
Word
Transfer Small or Same
Condition
ON FALSE(0) TRUE(1)
Ex) Ex)
Device value ≥ Set value Device value < Set value
Device value = Set value
Device value > Set value
Ex) Ex)
Device value < Set value Device value ≥ Set value
Device value = Set value
Device value > Set value
11-67
Chapter11 Datalog Function
Trigger Release
Device
Occurrence Operation Value
Set Condition
Condition Setting
Samples data at the elevation edge when Device Set Condition
changes from FALSE (0) to TRUE (1).
Setting
Elevation
Available
Descent
Word
Transfer Large
Condition
ON FALSE(0) TRUE(1)
Ex) Ex)
Device value ≥ Set value Device value < Set value
Device value = Set value
Device value > Set value
Ex) Ex)
Device value < Set value Device value ≥ Set value
Device value = Set value
Device value > Set value
11-68
Chapter11 Datalog Function
Trigger Release
Device
Occurrence Operation Value
Set Condition
Condition Setting
Samples data at the elevation edge when Device Set Condition
changes from FALSE (0) to TRUE (1).
Setting
Elevation
Available
Descent
Word
Transfer Large or Same
Condition
ON FALSE(0) TRUE(1)
Ex) Ex)
Device value ≥ Set value Device value < Set value
Device value = Set value
Device value > Set value
Ex) Ex)
Device value < Set value Device value ≥ Set value
Device value = Set value
Device value > Set value
11-69
Chapter11 Datalog Function
Trigger Release
Device
Occurrence Operation Value
Set Condition
Condition Setting
Samples data at the elevation edge when Device Set Condition
changes from FALSE (0) to TRUE (1).
Setting
Elevation
Available
Descent
Word
Transfer Same
Condition
ON FALSE(0) TRUE(1)
Ex) Ex)
Device value ≥ Set value Device value < Set value
Device value = Set value
Device value > Set value
Ex) Ex)
Device value < Set value Device value ≥ Set value
Device value = Set value
Device value > Set value
11-70
Chapter11 Datalog Function
Trigger Release
Device
Occurrence Operation Value
Set Condition
Condition Setting
Samples data at the elevation edge when Device Set Condition
changes from FALSE (0) to TRUE (1).
Setting
Elevation
Available
Descent
Word
Transfer Not Same
Condition
ON FALSE(0) TRUE(1)
Ex) Ex)
Device value ≥ Set value Device value < Set value
Device value = Set value
Device value > Set value
Ex) Ex)
Device value < Set value Device value ≥ Set value
Device value = Set value
Device value > Set value
11-71
Chapter11 Datalog Function
11-72
Chapter11 Datalog Function
☞ When setting with combination of BIT and WORD conditions (no release value set)
Event
Comparison Set Release
Condition Set Device Occurrence
Condition Value Value
Condition
Condition 0 Word < 50 - %MW100
Elevation
Condition 1 BOOL %MX15
☞ When setting with combination of BIT and WORD conditions (release value set)
Event
Comparison Set Release
Condition Set Device Occurrence
Condition Value Value
Condition
Condition 0 WORD < 50 100 %MW100
Elevation
Condition 1 BOOL %MX15
11-73
Chapter11 Datalog Function
(b) OR Calculation
Event occurs when even one condition is satisfied at a single main task. After selecting Trigger Save, if the
Trigger Condition is again satisfied before data saving is complete, and the trigger reoccurrence flag value
increases.
11-74
Chapter11 Datalog Function
☞ When setting with combination of BIT and WORD conditions (no release value set)
Event
Comparison Release
Condition Set Value Set Device Occurrence
Condition Value
Condition
Condition 0 WORD < 50 - %MW10
Elevation
Condition 1 BOOL %MX15
11-75
Chapter11 Datalog Function
☞ When setting with combination of BIT and WORD conditions (release value set)
Event
Comparison Release
Condition Set Value Set Device Occurrence
Condition Value
Condition
Condition 0 Word < 50 100 %MW10
ON
Condition 1 BOOL %MX15
11-76
Chapter11 Datalog Function
11-77
Chapter11 Datalog Function
(c) Select [Event Logging] at [Data Collection Method] to activate [Setting] menu on the left.
Then, select the [Setting] menu on the left.
(d) Upon selection, the following window is activated for event setting.
Select [Single Condition] as the Event Condition.
11-78
Chapter11 Datalog Function
(e) Select the condition setting menu to activate the following setting window.
Select [BIT Condition], and input device values into the device window in BIT types.
When setting is complete, the window closes and the conditions initially set at the Event Setting
Condition menu are displayed as follows.
(f) Select the timing of data saving at the Event Occurrence Condition. The number and timing of data change
depending on the set value.
11-79
Chapter11 Datalog Function
(c) Select [Event Logging] at [Data Collection Method] to activate [Setting] menu on the left.
Then, select the [Setting] menu on the left.
11-80
Chapter11 Datalog Function
(d) Upon selection, the following window is activated for event setting.
Select [Single Condition] as the Event Condition.
(e) Select the condition setting menu to activate the following setting window.
Select [WORD Condition], and input device values into the device window in BIT types.
11-81
Chapter11 Datalog Function
When setting is complete, the window closes and the conditions initially set at the Event Setting Condition menu
are displayed as follows.
(f) Select the timing of data saving at the Event Occurrence Condition. The number and timing of data change
depending on the set value.
11-82
Chapter11 Datalog Function
(c) Select [Event Logging] at [Data Collection Method] to activate [Setting] menu on the left.
Then, select the [Setting] menu on the left.
(d) Select the timing of data saving at the Event Occurrence Condition and set the operation condition to AND
operation. The number and timing of data change depending on the set value and Time.
11-83
Chapter11 Datalog Function
(e) Select [Event Condition] and [Multiple Condition] to activate the condition setting window which allows for up to 4
inputs.
(f) Select each condition setting menu one by one, inputting specific set values. [Multiple Condition] activates Event
Condition by calculating [Single Conditions] using the set run method. The basic setting is performed in the same
way as Single Condition.
(g) When setting is complete, the window closes and the conditions initially set at the Event Setting Condition menu
are displayed as follows.
11-84
Chapter11 Datalog Function
If only one [Condition Setting] is input after selecting Calculation Condition before finishing the setting, the
following phrase is displayed and the setting is not complete.
(a) The same sequence as [AND Calculation Condition] applies up to the [Event Setting] menu.
(b) Select [Event Logging] at [Data Collection Method] to activate [Setting] menu on the left. Then, select the [Setting]
menu on the left.
11-85
Chapter11 Datalog Function
(c) Select [Event Condition] and [Multiple Condition] to activate the condition setting window which allows for up to 4
inputs.
(d) Select the timing of data saving at the Event Occurrence Condition and set the operation condition to OR
operation. The number and timing of data change depending on the set value.
(e) Select each condition setting menu one by one, inputting specific set values. [Multiple Condition] activates Event
Condition by calculating [Single Conditions] using the set run method. The basic setting is performed in the same
way as Single Condition.
11-86
Chapter11 Datalog Function
(f) When setting is complete, the window closes and the conditions initially set at the Event Setting Condition menu
are displayed as follows.
(g) If only one [Condition Setting] is input after selecting Calculation Condition before finishing the setting, the
following phrase is displayed and the setting is not complete.
11-87
Chapter11 Datalog Function
☞ Saves data in the maximum number of saved files (256 ☞ Saves data in the maximum number of saved files
files/folder), and then goes back to the beginning to delete (256 files/folder), and then stops file saving.
old files, and save the latest history. ☞ If the 10% or less of the SD memory storage is
☞ When the maximum files are saved after selecting free, stops file saving.
[Overwrite with Latest History], the file save excess flag
value increases. (See 5.10, Flag List)
☞ If the 10% or less of the SD memory storage is free, the
data are written over the file first saved.
☞ The overwritten file has the same size as the previous
one.
Setting Method
11-88
Chapter11 Datalog Function
Note
1. When performing [Formatting Function] at motion controller, all contents within the SD memory are
deleted, followed by creation of a folder with the name set by the parameter.
2. If the SD card file system is not FAT32, the format function is not supported in the XG5000. In an
attempt to format the SD card other than FAT32, a warning window “No file system other than FAT32 is
supported” is created. Please use after formatting to FAT32 in PC
11-89
Chapter11 Datalog Function
(2) Execution
(b) Before executing SD memory formatting, cautions for formatting process are activated..
After reviewing the cautions, press [Yes] to proceed to the next stage.
Caution
1. Detaching the SD memory with force, power off or reset during formatting may cause internal damage of the
connected card, which may not show normal run afterwards.
2. If SD memory is being recognized when connected, the formatting can be performed after the operation is
completed.
3. Check RD/WRLED and relevant flags when SD memory is connected. If the motion controller mode is
changed while the formatting is in progress, the formatting will not be performed normally (supported only in
STOP state).
4. Transition to RUN mode is not possible during formatting.
(c) Subsequently the formatting setting window is activated. The setting window is as follows.
The storage, file system and allotted unit size are Default values that are read when connecting the SD memory.
Also, only fast formatting is supported. Volume label should be in English, and can be as long as 10 characters.
After setting as indicated above, press [Start] to begin formatting. The status bar indicates the current progress.
11-90
Chapter11 Datalog Function
11-91
Chapter11 Datalog Function
_SD_FmtDone (%KX8369) Bit turns ON when formatting is complete. In this case, the following completion
window appears.
If formatting failed, an error window appears along with the relevant code.
Caution
Since sudden power off may cause file system / file damage or saving of abnormal data.
Therefore, make sure to execute STOP flag or push the SD CMD button for 2 second when trying to stop
datalog function, so as to ensure normal data saving.
11-92
Chapter11 Datalog Function
Name F I L E 0 0 0 0 0 .CSV
Group
Description File Name File Number Extension
Number
Fixed
Range Fixed Value 0~15 000 ~ 255
Value
The first 4 characters are fixed as ‘FILE,’ and the 5 ~ 6th numbers indicates the group number selected, and the
following
7~9th numbers indicate the file number.
For example, the 8th file of the ‘GROUP11’ folder will be named ‘FILE11008.CSV.’
Note
While the data value collected from motion controller is saved at the interval set by the parameter, saving into
the SD memory is performed using Main Task Save method, starting from Group 0. However, it can change
flexibly depending on file storage.
11-93
Chapter11 Datalog Function
Items Description
Memory Capacity: Up to 32 GB (supports SPI MODE, SD, SDHC)
(Only 8GB can be available in more than 8GB memory)
File System FAT32
Voltage Range 2.7 ~ 3.6V
Working Temperature Range -25℃ ~ 85℃
Static Tolerance Should satisfy IEC61000-4-2
Number of Detachments Up to 10,000 times
Current Consumption Up to 100mA (when reading, writing)
Number of Read/Writes Up to 100,000 times (for SLC)
Size 15mm * 11mm * 1mm
Recommended Products SanDisk, Transcend
Note
1. Datalog function of motion controller is capable of using all SD memories that satisfy the specifications
above.
2. Optimal performance can be expected by using the recommended products (SanDisk, Transcend).
Please use the recommended products unless required otherwise
11.9.2 Caution
Please pay attention to the following when using datalog function with SD memory card.
(b) Power off or motion controller reset during writing of data collected by motion controller into the SD memory
causes all data saved in the buffer memory inside the buffer memory. Therefore, the data collected immediately
before power off may not have been saved properly. When powering off motion controller, please perform power
off after verifying that the SD memory writing is not being performed.
While the datalog stop is being performed, DLxx_Stoping (xx is the group number) flag is turned on, and when the
stop is completed, _DLxx_Finish flag is turned on. During the stop, the size of the remaining dada to be saved to the
SD card is displayed in the _DLxx_WaitingData flag.
11-94
Chapter11 Datalog Function
Caution
1. SD memory state may affect main task time and saving performance. SD memory should be formatted
before use.
2. When using the SD memory for a long time, formatting on a regular basis is required to maintain
performance.
11-95
Chapter11 Datalog Function
11-96
Chapter11 Datalog Function
11-97
Chapter11 Datalog Function
* _DLxx_Enable (Datalogging Enable Flag per Group) is set to each Bit of %KW514
11-98
Chapter11 Datalog Function
11-99
Chapter11 Datalog Function
Enet Communication,
Digital Input/Output,
Analog Input/Output
EtherCAT
11-100
Chapter11 Datalog Function
Number of Devices
16 WORD 32 WORD 64 WORD
4 WORD 8 WORD
(16 WORD * 1 (32 WORD * 1 (32 WORD * 2
(4 WORD * 1 Group) (8 WORD * 1 Group)
Group) Group) Group)
Buffer overflow Buffer overflow Buffer overflow Buffer overflow
1ms Normal
occurred occurred occurred occurred
Buffer overflow Buffer overflow Buffer overflow
2ms Normal Normal
occurred occurred occurred
Buffer overflow
4ms Normal Normal Normal Normal
occurred
11-101
Chapter11 Datalog Function
Start
End
11-102
Chapter11 Datalog Function
11-103
Chapter11 Datalog Function
11-104
Chapter 12 SD Function
12.1 Overview
The motion controller has built-in additional functions using the SD card. This chapter describes the specifications and usage of the SD
additional features.
12.1.1 Characteristics
Through the motion controller’s SD additional features, you can perform the PLC update, backup, comparison, boot operati
on. These functions can be executed by operating the SD CMD buttons on the PLC.
- Motion controller’s auto reset and operation mode can be set after updating
- You can compare the motion controller’s parameters, motion data, motion controller programs, NC codes, CAM d
ata.
- The comparison results can be saved and checked on the SD card.
- Limiting the boot operation using the motion controller’s MAC address
12-1
Chapter 12 SD Function
card. The function, ‘Export to SD card’ is available only when the XG5000 is not online.
(1) PLC Update
The PLC update function is to update the program stored in the SD card to the PLC.
Classification Content
Target drive Select the storage medium to store the project data
Alphabet/Number only (However, when checking flag update, only numbers
File Name
0 to 255 are possible.)
Flag update PLC update by selecting the desired project with the flag
Select action folder Location where you will save the project data (folder)
Set the PLC operations when inserting the SD card
Select operation mode
PlC Update: Updating the PLC using the data stored in the SD card
When the PLC project is updated using the SD, ‘Read from PLC’ is prohibi
Do not read from PLC
ted.
Check whether the PLC project can be updated using the SD including the
Use PLC password
PLC password setting
Limit PLC usage Specify the PLC that can update the PLC project
Auto-reset after update is co
Whether to execute the PLC reset after the PLC update is completed
mpleted
PLC status after update is co
Set the PLC operation mode after the PLC update is completed
mpleted
12-2
Chapter 12 SD Function
12-3
Chapter 12 SD Function
In the comparison mode with the PLC, the description of each item is as follows.
Classification Content
Target drive Select the storage medium to store the project data
Select action folder Location where you will save the project data (folder)
Set the PLC operations when inserting the SD card
Select operation mode
Compare PLC: Compare the projects stored in the PLC and SD card
Compare item Only the desired items can be compared.
Save comparison results to a
Check whether the comparison result is saved as csv type file.
file
The description of each item in the PLC boot operation mode is as follows.
Classification Content
Target drive Select the storage medium to store the project data
Select action folder Location where you will save the project data (folder)
Set the PLC operations when inserting the SD card
Select operation mode
PLC Update: Updating the PLC using the data stored in the SD card
Use PLC password Check whether the PLC boot operation can be updated using the SD
Limit PLC usage Specify the PLC that can execute the PLC boot operation
12-4
Chapter 12 SD Function
If you select ‘PLC update’ in ‘Export to SD card’ and click OK, the writing window will be created as below.
After completing ‘Export to SD card’ successfully, the window indicating successful completion is created and the saved
drive is displayed.
When checking the saved drive, an add-on folder is created under the model folder and the file is created in the Confi
g and Restore folder.
12-5
Chapter 12 SD Function
When the SD card is inserted into the SD card slot of the PLC, the flag (% KW541) of SD additional features is displayed
according to the values set in the Config.
%KW541 SD additional functions mode
0 additional functions
1 PLC backup function
2 PLC update function
3 Comparison with PLC Function
4 Boot operation function
If you press the SD CMD button once for more than 0.7 second and less than 2 seconds, the flag (%KX8640) will be turned On
and the PLC update operation will be executed while the SD RD/WR LED and SD additional features are running.
Besides the SD CMD button method, PLC update using flags is also possible. If the SD add-on function is PLC update, you can
update any project stored in the SD card. However, when exporting to an SD card, the project name must be set from 0 to 255. In
XG5000, input the project to be updated in the SD memory project number (%KB1088) flag, and when the SD memory project
update permission (%KX8688) flag is turned on, PLC update operation is performed.
When the update is completed normally, the flag (%KX8640) is turned Off and the completion flag of SD additional features
(%KX8642) is turned On while the SD RD/WR LED and SD additional features are running. If an error occurs during operation,
the SD additional function error flag (%KX8641) is turned On and the error value is displayed in the SD additional function error
code (%KW542).
(1) When ‘Read-protected from PLC’ is set, even if the update process is normal, reading from the PLC via XG5000 is
prohibited. If the PLC password option is set and the password has not been set in the PLC, the password will be
saved to the PLC along with the project update. In addition, if the password is already set in the PLC before perfor
ming the project update using the SD, the update will be executed only when the password set as the option matc
hes the password of the PLC.
(2) If ‘Limit PLC usage’ option is set, the PLC update is performed only when the MAC address stored as the option ma
tches the MAC address of the PLC.
(3) If auto-reset is set after update is completed, the PLC will be reset automatically after updating is done, and the PLC
operation mode will be changed into the PLC status option specified value.
12-6
Chapter 12 SD Function
After completing ‘Export to SD card’ successfully, the window indicating successful completion is created and the saved
drive is displayed.
When checking the saved drive, an add-on folder is created under the model folder and the file is created in the Config
folder.
When the SD card is inserted into the SD card slot of the PLC, the flag (% KW541) of SD additional features is displayed
according to the values set in the Config.
%KW541 SD additional functions mode
0 additional functions
1 PLC backup function
2 PLC update function
3 Comparison with PLC Function
4 Boot operation function
If you press the SD CMD button once for more than 0.7 second and less than 2 seconds, the flag (%KX8640) will be turned On
and the PLC update operation will be executed while the SD RD/WR LED and SD additional features are running. When the
backup is completed normally, the flag (%KX8640) is turned Off and the completion flag of SD additional features (%KX8642) is
turned On while the SD RD/WR LED and SD additional features are running.
If an error occurs during operation, the SD additional function error flag (%KX8641) is turned On and the error value is displayed in
the SD additional function error code (%KW542).
After removing the SD card, you can see the project will be saved under the Backup folder in the product’s correspondin
g path and the saved project will be opened when executing ‘Import from SD’ in XG5000.
12-7
Chapter 12 SD Function
result can be checked through the flag or .csv file. If you select ‘Comparison with the PLC’ in ‘Export to SD card’ an
d click OK, the writing window will be created as below.
After completing ‘Export to SD card’ successfully, the window indicating successful completion is created and the saved
drive is displayed.
When checking the saved drive, an add-on folder is created under the model folder and the file is created in the Confi
g, Compare folder.
12-8
Chapter 12 SD Function
When the SD card is inserted into the SD card slot of the PLC, the flag (% KW541) of SD additional features is displayed
according to the values set in the Config.
.
%KW541 SD additional functions mode
0 additional functions
1 PLC backup function
2 PLC update function
3 Comparison with PLC Function
4 Boot operation function
If you press the SD CMD button once for more than 0.7 second and less than 2 seconds, the flag (%KX8640) will be turned On
and the PLC update operation will be executed while the SD RD/WR LED and SD additional features are running.
When the comparison is completed normally, the flag (%KX8640) is turned Off and the completion flag of SD additional features
(%KX8642) is turned On while the SD RD/WR LED and SD additional features are running.
If an error occurs during operation, the SD additional function error flag (%KX8641) is turned On and the error value is displayed in
the SD additional function error code (%KW542).
(1) (1) When there is a discrepancy of the comparison, the SD comparison result flag (% KX8643) is turned Off and if it
is the same, the SD comparison flag is turned On.
(2) If you check the item, 'Save comparison result to file' when executing ‘Export to SD card’, the result file (CmpResult.c
sv) is created in the ‘Compare’ folder and the comparison result is saved.
12-9
Chapter 12 SD Function
If you select ‘PLC boot operation’ in ‘Export to SD card’ and click OK, the writing window will be created as below.
After completing ‘Export to SD card’ successfully, the window indicating successful completion is created and the saved
drive is displayed.
When checking the saved drive, an add-on folder is created under the model folder and the file is created in the Confi
g, Boot folder.
12-10
Chapter 12 SD Function
The boot operation must be performed when the PLC is powered off. After installing the SD card in the PLC power off state, turn
on the PLC power while pressing the SD CMD button.
When the boot operation mode is completed normally, the flag (%KX8640) is turned Off and the completion flag of SD additional
features (%KX8642) is turned On while the SD RD/WR LED and SD additional features are running.
If an error occurs during operation, the SD additional function error flag (%KX8641) is turned On and the error value is displayed
in the SD additional function error code (%KW542).
12-11
Chapter 12 SD Function
There are the items for automatic logging setting on the top left of the data log parameters window.
If you save the auto logging settings after setting the parameter related to data log, you can save the setting file to the
desired path.
Auto-logging is executed when the power is turned On after the SD card is mounted while the PLC is off.
(1) If the parameters stored in the PLC are set to ‘Prohibit automatic logging’, the settings of Autolog.cfg will not be refle
cted but will operate according to the existing program settings.
(2) Since the corresponding parameters stored in the SD are saved in the PLC, if other SD card is inserted and the PL
C power is turned off or on, same operations will be executed as auto logging settings.
(3) If the automatic logging stop (_DL_AutoLogStop: %KX8192) command flag is turned on during automatic logging,After
that, logging is not resumed even if the group data logging enable flag is turned on or the automatic logging stop
command flag is turned off.
12-12
Chapter 12 SD Function
12-13
Chapter 12 SD Function
12-14
Chapter13 Built-in Analog Function
Before using the analog input and output function, follow steps below.
XMC-E32A
Wiring
Wiring
Wiring analog input / output
(Setting types of Voltage / Current
input / output)
Reading analog input data Writing analog Analog input / output test
XG5000 special module
monitor
Programming Programming
Programming for reading and writing
analog data
(U Device)
Refer to trouble shooting when there is
error or analog data is abnormal.
Notes
The analog function is supported only by analog-type products (XMC-E32A/E16A/E08A).
13-1
Chapter13 Built-in Analog Function
13-2
Chapter13 Built-in Analog Function
13-3
Chapter13 Built-in Analog Function
13-4
Chapter13 Built-in Analog Function
Voltage/Current input ranges are able to set from each channel by using user program or I/O parameter.
Data output type of digital is defined as below.
1) Unsigned Value
2) Unsigned Value
3) Precise value
4) Percentile Value
Digital
output 5000 0 8000
value
0 -8000 0
-120 -8192 -192 Offset
value
DC 4 ~ 20 mA 4 mA 12 mA 20 mA
Analog DC 0 ~ 20 mA 0 mA 10 mA 20 mA
DC 1 ~ 5 V 1V 3V 5V
input
DC 0 ~ 5 V 0V 2.5 V 5V
value
DC 0 ~ 10 V 0V 5V 10 V
DC -10 ~ 10 V -10 V 0V 10 V
13-5
Chapter13 Built-in Analog Function
3) DC 1 ~ 5V input range
Digital Analog input voltage (V)
output range 0.952 1 2 3 4 5 5.047
Unsigned Value
-192 0 4,000 8,000 12,000 16,000 16,191
(-192~16,191)
Signed Value
-8,192 -8,000 -4,000 0 4,000 8,000 8,191
(-8,192~8,191)
Precise value
952 1,000 2,000 3,000 4,000 5,000 5,047
(952~5,047)
Percentile value
-120 0 2,500 5,000 7,500 10,000 10,119
(-120~10,119)
4) DC 0 ~ 5V input range
Digital Analog input voltage (V)
output range -0.06 0 1.25 2.5 3.75 5 5.059
Unsigned Value
-192 0 4,000 8,000 12,000 16,000 16,191
(-192~16,191)
Signed Value
-8,192 -8,000 -4,000 0 4,000 8,000 8,191
(-8,192~8,191)
Precise value
-60 0 1,250 2,500 3,750 5,000 5,059
(-60~5,059)
Percentile value
-120 0 2,500 5,000 7,500 10,000 10,119
(-120~10,119)
13-6
Chapter13 Built-in Analog Function
4V 3.75V 7.5V 5V
Analog
output 3V 2.5V 5V 0V
value
1V 0V 0V -10V
0.952 -0.06 -0.12 -10.24
Offset value
Unsigned value -191 0 8000 16000 16191
Digital
Signed value -8192 -8000 0 8000 8191
input value
Percentile value -120 0 5000 10000 10119
1) DC 1 ~ 5V Output range
Digital Analog Output voltage (V)
Input 0.952 1 2 3 4 5 5.047
Unsigned Value
-192 0 4,000 8,000 12,000 16,000 16,191
(-192~16,191)
Signed Value
-8,192 -8,000 -4,000 0 4,000 8,000 8,191
(-8,192~8,191)
Precise value
952 1,000 2,000 3,000 4,000 5,000 5,047
(952~5,047)
Percentile value
-120 0 2,500 5,000 7,500 10,000 10,119
(-120~10,119)
13-7
Chapter13 Built-in Analog Function
2) DC 0 ~ 5V output range
Digital Analog Output voltage (V)
Input -0.06 0 1.25 2.5 3.75 5 5.059
Unsigned Value
-192 0 4,000 8,000 12,000 16,000 16,191
(-192~16,191)
Signed Value
-8,192 -8,000 -4,000 0 4,000 8,000 8,191
(-8,192~8,191)
Precise value
-60 0 1,250 2,500 3,750 5,000 5,059
(-60~5,059)
Percentile value
-120 0 2,500 5,000 7,500 10,000 10,119
(-120~10,119)
13-8
Chapter13 Built-in Analog Function
8000
32
0
-32
0V 5V 10 V
Analog input voltage
13-9
Chapter13 Built-in Analog Function
8 mA 10 mA 3V 2.5 V 5V 0V
13-10
Chapter13 Built-in Analog Function
(i.e.) If the number of channels used is 3, its process time will be 3 x 0.5 ㎳ = 1.5 ㎳
Sampling is used to calculate the sampling value of continuous analog sign at a specific interval.
13-11
Chapter13 Built-in Analog Function
(Pre - Filtered Input Value × Filter Constant ) + (Current Input Value × 0.5 ms × Number of used channels )
Filtered Value =
Filter Constant + (0.5 ms × Number of used channels )
The time required for A/D conversion of analog input sign till saved on the memory depends on the number of channels used.
Input
Input value after filtering
value
Actual input value
10000
6320
As the above graph, if the input value rapidly decreases from 0 to 10,000, the input value will be filtered.
Specified time with filter constant is that the input value is the time to change by 63.2% of actual time constant.
13-12
Chapter13 Built-in Analog Function
Average time
Average processing count =
Number of used channels x 0.5 ms
Time average is converted to count average in A/D conversion module internally, and then processed. In this case,
remainder can be generated when dividing average time by (number of used channels X conversion speed). The
remainder generated at this time is discarded, and the average number of processing is determined by the quotient
of (set time) ÷ (number of channels used × conversion speed).
2) Count Average
Input value of specified channel accumulates during setting numbers and then the average value of the sum is shown with
digital data
Input value after
평균처리후
average 입력값
processing
실제 입력값
Actual input value
Average
Averageprocessing
processinginterval
interval 평균처리구간
Average processing interval 샘플링처리구간
Sampling processing interval
Average processing interval [㎳] = Number of average count × Number of used channels × 0.5 ㎳
3) Moving Average
The inputs into the designated channel are accumulated for the presser number, its average is calculated, and output as
digital data.
However, in moving average method, each scan provides its average value.
13-13
Chapter13 Built-in Analog Function
(2) (3)
(4) (7)
(5) (6)
(1)
(1)+(2)+(3)+(4) (3)+(4)+(5)+(6)
Averaging No. Averaging No.
(2)+(3)+(4)+(5)
Averaging No.
4) Weighted Average
Weighted average function processes transition of input data gradually by filter (delay) of input sampling data.
Notes
(1) In case of the time/number of average, every conversion time input value is not outputted. And precondition is
retained until the average time/number is arrived.
.
2. Four kinds of average functions and introduced filtering functions that are above are able to deal with at the same
time. When those are chosen at the same time, the top priority is filter function in the processing sequence. At that
time digital data value is outputted as the final processing value.
(3) Number of used channel include input/output channel.
13-14
Chapter13 Built-in Analog Function
1) Detection conditions
When input signal range of 4 to 20 mA and 1 to 5 V is used, disconnection of input circuit can be detected.
The detection conditions of each input signal range are as below.
Voltage/Current recognized as a
Input signal range
disconnection
4~20㎃ 0.8mA or less
2) When between used wiring and module is disconnected, the LED will be turned on/off 1s intervals.
3) Each channel can detect disconnection. However, Disconnection is only displayed for specified operation channel.
The LED can commonly use the channel from 0 to 1. If one or more channel is disconnected, LED will be turned
on/off.
Disconnection
Input connections Channel run AD LED status
Flag
Operation ON OFF
Normal
Stop ON OFF
4) In case of disconnection, disconnection flag of relevant channel will turn on and In case of connection, disconnection
flag of relevant channel will turn off.
5) In case of disconnection, the input value displays the lowest value among each input range.
13-15
Chapter13 Built-in Analog Function
(1) Digital output value depending on input range (unsigned value, signed value, percentile value)
Unsigned Percentile
Classification Signed Value Precise value
Value value
Function disabled -192~16,191 -8,192~8,191 -120~10,119
(2) Reference
Function enabled 0~16,000 -8,000~8,000 0~10,000
Analog
Classification Precise value
input range
Function disabled 3,808~20,191
4~20㎃
Function enabled 4,000~20,000
Function disabled -240~20,239
0~20㎃
Function enabled 0~20,000
Function disabled 952~5,047
1~5V
Function enabled 1,000~5,000
Function disabled -60~5,059
0~5V
Function enabled 0~5,000
Function disabled -120~10,119
0~10V
Function enabled 0~10,000
Function disabled -10,240~10,239
-10~10V
Function enabled -10,000~10,000
2) Operation
When operating with 4 ~ 20 ㎃ with this function enabled, the output for input value changes at the moment is as
follows. (Output data type: In case of 0~16,000)
Input current
12㎃ 3㎃ 4㎃ 12㎃ 21㎃ 20㎃
(mA)
Digital output
8,000 8,000 0 8,000 8,000 16,000
value
Previous Previous
Note - - - -
value Hold value Hold
13-16
Chapter13 Built-in Analog Function
Signal
Analog Permission Lower limit
Difference Upper limit
input range range alarm
(Difference)
4~20㎃ 16㎃ 3.808㎃ 20.192㎃
0~20㎃ 20㎃ -0.240㎃ 20.240㎃
1~5V 4V 0.952V 5.048V
1.2%
0~5V 5V -0.060V 5.060V
0~10V 10V -0.120V 10.120V
-10~10V 20V -10.240V 10.240V
13-17
Chapter13 Built-in Analog Function
Notes
The channel conversion data will be 0 and Lower limit alarm flag will be ON if the input signal is out of the effective
range as below when the input channel is enabled and hold last value function is enabled.
1) Function
When initialization of module and error of XMC system are happened, use to prevent abnormal output.
2) Type
You can set an output status of channel among Previous, Min, Mid, Max value.
(1) Previous value: The last output operated normally is retained.
(2) Min: The Min value of each range is outputted.
(3) Mid: The Mid value of each range is outputted.
(4) Max: The Max value of each range is outputted.
3) Example
When the range of output channel is set to 0 ~ 10V and the output is 7V, if the system is changed from 'Run' to 'Stop', the
output will be as follows depending on setting data of channel output status.
.
13-18
Chapter13 Built-in Analog Function
(a) Interpolation prohibition: It doesn't execute interpolation operation. And it outputs digital input value intact.
(b) Linear interpolation: The output is changed up to objective value with linear during the interpolation time.
D/4 Reaching
a target value
D/2
D/4
(c) S-type interpolation: The output is changed up to objective value with S-type during the interpolation time.
D/8 Reaching
a target value
D/2
D/8
13-19
Chapter13 Built-in Analog Function
5) Interpolation flag turns on while the interpolation is outputted. And when the interpolation output value is reached at
objective value, it will turn off.
※ Interpolation flag can be monitored when interpolation time is set to 1[s] or 60[s].
6) Example
The interpolation method is set to S-type interpolation and interpolation time is set to 60s. If the output is changed from 4
㎃ to 20 ㎃, and then changed to 4 ㎃ again when it is reached to 20 ㎃, the output is as graph below.
Analog
Output value Reaching a target value Change of the output value
20mA
18mA
12mA
Reaching
6mA a target value
4mA
Notes
1) During the interpolation output, If the internal parameter is changed, the interpolation operation will be
temporarily stopped and the output can be immediately changed to objective value.
2) If the change of internal parameter is needed, change the parameter during interpolation output after the flag
turns off when the analog output value is not changed.
13-20
Chapter13 Built-in Analog Function
13-21
Chapter13 Built-in Analog Function
5) The example of analog input 2-Wire sensor/transmitter wiring (The current input)
Use I+ and COM terminal after connecting V+ with I+ terminal.
I0+ CH0
2-Wire +
Transmitter DC
COM0 -
I1+
CH1
2-Wire +
COM1
Transmitter - DC
6) The example of analog input 4-Wire sensor/transmitter wiring (The current input)
Use I+ and COM terminal after connecting V+ with I+ terminal.
I0+ CH0 +
4-Wire DC
Transmitter -
COM0
CH1
I1+ 4-Wire +
Transmitter - DC
COM1
Rs Rc
Vs
Vin Ri
Rc
Load
here
Rc: Resistance value due to line resistance of cable
Rs: Internal resistance value of transmitter or sensor
Ri: Internal resistance value (1㏁) of voltage input module
13-22
Chapter13 Built-in Analog Function
Vin
%Vi = 1 − ×100%
Vs
Notes
1) While using a input voltage range among 1 to 5 V, 0 to 5 V, 0 to 10 V, -10 to 10 V If the external wiring is
disconnected, It will take a certain amount of time to display output data value of 0 V. If you want to reduce that
time, connect the resistance about 0.1 ㏁ to 1 ㏁ between input channel V+ and COM.
13-23
Chapter13 Built-in Analog Function
+ CH0
1kΩ or more
-
※1
+ CH1
1kΩ or more
-
※1
13-24
Chapter13 Built-in Analog Function
Built-in analog conversion module’s operation parameters can be specified through XG5000’s [I/O parameters].
1) Setting items
For the user’s convenience of D/A conversion module, XG5000 provides GUI (Graphical User Interface) for
parameters setting of D/A conversion module. Setting items available through [I/O parameters] on the XG5000 project
window are as described below in the table.
Item Content
(a) Input parameter setting
Specify the following setting items necessary for the module operation.
1) Operation Channel
2) Input range
3) Output Data Type
4) Filter constant
5) Average Method
6) Average value
7) Keep valid conversion values
[I/O parameter] (b) Output parameter settings
Specify the following setting items necessary for the module operation.
1) Operation Channel
2) Output range
3) Input data type
4) Channel output status setting
5) Interpolation method setting
6) Interpolation time
(c) When the parameters set by user in XG5000 is downloaded, that data is saved in
flash memory of motion controller.
13-25
Chapter13 Built-in Analog Function
(3) [I/O Parameter setting] On the ‘I/O Parameter setting’ screen, find and clink the slot 1 (internal) which has embedded
function.
(4) Click the arrow button on the screen above to display the screen where an applicable module can be selected.
(5) A screen will be displayed for you to specify parameters for respective channels as below.
Click a desired item to display parameters to set for respective items.
13-26
Chapter13 Built-in Analog Function
Notes
1) The screen may not normally be shown due to the lack of system resource. In this case, terminate all
applications and try to start XG5000 again.
2) I/O parameter set in status of [Special Module Monitor] is temporally set to implement the test. Therefore,
when the [special module monitor] status is terminated, the set I/O parameters are extinguished.
3) The test of [Special Module Monitor] is an examination function to check operation of the analog Input/output
module when the sequence program is not made up.
13-27
Chapter13 Built-in Analog Function
(2) Select “Special Module” and click [Module information] to display the information as shown below.
(3) Click [Monitor] on the “Special Module” screen in [Special Module List] to display [Special Module Monitoring] screen as
shown below.
13-28
Chapter13 Built-in Analog Function
(4) Start Monitoring: Click [Start Monitoring] to show digital input / output data of current operated channel.
Monitoring
13-29
Chapter13 Built-in Analog Function
(5) Test: [Test] is a function to change the parameter of the embedded analog module which is presently set. In case of
clicking the setting value in the bottom of the screen, you can change the parameter. [Test] is able to set only if operation
status of motion controller is STOP.
13-30
Chapter13 Built-in Analog Function
(7) close
[Close] is used to escape from the monitoring/test screen.
When the monitoring/test screen is closed, the max value, the min. value and the present value will not be saved
any more.
13-31
Chapter13 Built-in Analog Function
Register the variables for each module referring to the special module information that is set in the I/O parameter.
The user can modify the variables and comments.
1) Procedure
13-32
Chapter13 Built-in Analog Function
2) Save variables
(1) The contents of ‘View Variable’ can be saved as a text file.
(2) Select [Edit] [Export to File].
(3) The contents of ‘View variable’ are saved as a text file.
(2) Select [View] [Variables]. Click ‘view variables on the ‘view’ of menu.
13-33
Chapter13 Built-in Analog Function
(3) Select [View] [Devices/Variables]. Devices and variables are both displayed.
(4) Select [View] -> [Device/Comments]. Devices and comments are both displayed.
13-34
Chapter13 Built-in Analog Function
(5) Select [View] -> [Variables/Comments]. Variables and comments are both displayed.
13-35
Chapter13 Built-in Analog Function
13-36
Chapter13 Built-in Analog Function
Memory
Variable name Type Description
allocation
_01_AD_HOLDVAL_ARY ARRAY[0..1] OF BOOL %UX0.1.320 Specify to hold valid conversion value for each
channel
_01_AD_HOOR_ARY ARRAY[0..1] OF BOOL %UX0.1.48 Alarm (Upper Limit) by channel
_01_AD_IDD_ARY ARRAY[0..1] OF BOOL %UX0.1.72 Input disconnection detection by channel
_01_AD_LOOR_ARY ARRAY[0..1] OF BOOL %UX0.1.56 Alarm (Lower Limit) by channel
_01_AD_RANGE_ARY ARRAY[0..1] OF BYTE %UB0.1.22 Range setting by channel
_01_AD_RUN_ARY ARRAY[0..1] OF BOOL %UX0.1.160 Operation setting by channel
13-37
Chapter13 Built-in Analog Function
Memory
Variable name Type Description
allocation
_01_DA_INTPVAL_ARY ARRAY[0..1] OF WORD %UW0.1.25 Interpolation value by channel
_01_DA_INTP_ARY ARRAY[0..1] OF BOOL %UX0.1.64 Interpolation enabled by channel
_01_DA_OUTEN_ARY ARRAY[0..1] OF BOOL %UX0.1.112 Output enable setting by channel
_01_DA_OUTSTAT_ARY ARRAY[0..1] OF WORD %UW0.1.21 Output status setting by channel
_01_DA_RANGE_ARY ARRAY[0..1] OF BYTE %UB0.1.24 Range setting by channel
_01_DA_RUN_ARY ARRAY[0..1] OF BOOL %UX0.1.168 Operation setting by channel
%UW0.1.0
Ready
Error
- - - - - - - - - - - - - -
Output channel 1
%UW0.1.1
Input channel 0
Input channel 1
- - - - - - - - - - - -
13-38
Chapter13 Built-in Analog Function
%UW0.1.3
Input channel 0
Input channel 1
Input channel 0
Input channel 1
- - - - - - - - - - - -
Output channel 1
%UW0.1.4
Input channel 0
Input channel 1
disconnection
disconnection
interpolation
interpolation
- - - - - - - - - - - -
13-39
Chapter13 Built-in Analog Function
Output channel 0
Output channel 1
%UW0.1.7
- - - - - - - - - - - -
-
Output permission information
Bit On(1) : Permission
Bit Off(0) : Prohibition
Bit15 Bit4 Bit13 Bit12 Bit11 Bit10 Bit9 Bit8 Bit7 Bit6 Bit5 Bit4 Bit3 Bit2 Bit1 Bit0
Output channel 1
%UW0.1.10
Input channel 0
Input channel 1
- - - - - - - - - - - -
13-40
Chapter13 Built-in Analog Function
(2) When the input range is not set, it is processed as DC 4~20mA range.
(3) _01_AD0_RANGE (%UB0.1.22): Input channel 0 range setting.
_01_AD1_RANGE (%UB0.1.23): Input channel 1 range setting.
Bit15 Bit4 Bit13 Bit12 Bit11 Bit10 Bit9 Bit8 Bit7 Bit6 Bit5 Bit4 Bit3 Bit2 Bit1 Bit0
%UW0.1.11
Don't Care Input channel 1 Don't Care Input channel 0
%UW0.1.12
Don't Care Output channel 1 Don't Care Output channel 0
%UW0.1.13
Input Input
Don't Care Don't Care
channel 1 channel 0
A/D conversion output data type setting (2 Bit per channel) 4~20㎃ : 4,000~20,000
0 : 1~16,000 0~20㎃ : 0~20,000
1 : -8,000~8,000 1~5V : 1,000~5,000
2 : Precise value 0~5V : 0~5,000
3 : 0~10,000 0~10V : 0~10,000
-10~10V : -10,000~10,000
13-41
Chapter13 Built-in Analog Function
%UW0.1.14
Output Output
Don't Care Don't Care
Channel 1 Channel 0
%UW0.1.17
Input Input
Don't Care Don't Care
channel 1 channel 0
13-42
Chapter13 Built-in Analog Function
- - - - - - - - - - - - - - Input channel 1
Channel setting
Bit On (1) : Permission
Bit Off (0) : Prohibition
Channel 0
%UW0.1.21 Don't care
status
Channel 1
%UW0.1.22 Don't care
status
13-43
Chapter13 Built-in Analog Function
Output Output
%UW0.1.23 Don't Care Don't Care
channel 1 channel 0
Output Output
%UW0.1.24 Don't Care Don't Care
channel 1 channel 0
13-44
Chapter13 Built-in Analog Function
Error code
Type LED sign Description Priority Note
(Decimal)
10# Setting error of input channel range 1
AD LED
20# Setting error of input channel filter value 2
Flickering 1s
Setting error of input channel average
30# intervals 3
value #: channel
Error 40# Setting error of output channel range 4 number
DA LED Setting error of output channel digital (Channel 0~1)
50# 5
Flickering 1s input value range
intervals Output channel interpolation method
60# 6
setting error
(4) When errors of two or more are caused, the high priority error code is saved. And when the same error code is
caused in channels of two or more, the error code of low channel number is saved preferentially.
13-45
Chapter13 Built-in Analog Function
(1) The input channel 0 is set with operation channel and the range is set with 4~20mA.
(2) The voltage output channel 0 is set with operation channel and the range is set with 1~5V.
13-46
Chapter13 Built-in Analog Function
2) Example of program
13-47
Chapter13 Built-in Analog Function
The chapter describes diagnostics and measures method in case of any trouble occurs during use of built-in analog module.
When CH is
Item Normal Status When parameter setting is error
disconnected
Flickering 1s Flickering 1s intervals
AD LED ON
intervals (Input parameter setting error)
Flickering 1s intervals
DA LED ON -
(Output parameter setting error)
Normal Operation of all
operation functions Operation of all functions
Module Operation
Operation of all Shows minimum (Operation as parameter default)
functions input value.
Corrective Actions - Check wiring Check parameter setting
1) Execution sequence
You can run it in one of the ways below.
(1) [Monitor] [System Monitor] Click the right button of mouse on the painting of module. [Module
Information]
(2) [Monitor] [System Monitor] Double click the painting of module
(3) [Monitor] [Special Module Monitor] Built-in Analog Module Selection Click the module information
(4) [Online] [I/O Information] Built-in Analog Module Selection Click the details
(5) [Online] [I/O Information] Built-in Analog Module Double click
13-48
Chapter13 Built-in Analog Function
AC220V is supplied.
Yes
Yes
2) LED is flickering
AD or DA LED is flickering.
13-49
Chapter13 Built-in Analog Function
FG ground is normal.
Modify FG ground correctly by referring
No wiring method from instructions.
Yes
The parameter setting is normal.
(Permission of driving channels,
Input range setting)
Modify correctly by referring parameter
No
setting method from instructions.
Yes
Yes
13-50
Chapter14 Local Ethernet Function
If user selects Local Ethernet Parameter item, Local Ethernet Parameter setting window will be displayed.
14-1
Chapter14 Local Ethernet Function
To use the Local Ethernet function, user should set the parameters.
Retransmission time-out * Note: Retransmission time-out should be set depending on the network
(10 ㎳) situation.
If the setting time is too long, it takes a long time to resend a data in case of
data missing.
This will deteriorate the network performance. But if the setting time is too
short, there is a chance to make a frequent disconnection or increase the load
to the network.
Number of dedicated
Number of TCP dedicated services accessible at a time. (Max.4)
connections
Modbus TCP/IP server Set when operated as Modbus server driver (slave)
14-2
Chapter14 Local Ethernet Function
Classification Description
Access allowed to applicable module of IP address registered in host table.
Enable host table
Unregistered client (IP address) is prohibited from connection when enabled.
14-3
Chapter14 Local Ethernet Function
Select the connection setting of XG5000. Then, select the options of connection option as below.
Click the setting button to specify Ethernet IP. Click OK after specify the Ethernet IP set before.
User can find the IP information available now.
14-4
Chapter14 Local Ethernet Function
14-5
Chapter14 Local Ethernet Function
Note
1) Modbus TCP/IP server connection function allows RST packet transmission depending on the network
condition.(TCP/IP protocol)
So the user devices connecting to CPU module should have RST packet process.
2) Connection to user devices can be disconnected for retransmission time-out.
For the retransmission timeout period, the connection is terminated after waiting twice as long as the previous waiting
time after retransmission time setting value set by the user in the local Ethernet parameter(default value: 100)X10ms),
the number of retransmissions(three times, twice the previous waiting time) and three transmissions.
Retransmission time-out = retransmission time-out value(set in the Local Ethernet Parameter window) x 30ms
3) Too much Network loads can affect a scan time. So user should consider appropriate network loads for CPU scan time.
14-6
Chapter14 Local Ethernet Function
(1) Click the System Diagnosis as shown in the left figure after access through XG5000.
14-7
Chapter14 Local Ethernet Function
(2) Then, the current system is displayed as shown in the below figure. Put the mouse on the figure of the module and
click the right mouse button.
(3) If you click the loca1l Etnernet diagnostic information among the menus that occur when clicking the right mouse
button, the local Etnernet diagnostic information window will be created as shown below. Through the local Ethernet
information window, you can monitor the Ethernet basic information, exclusive service information and detailed
diagnostic information of clients connected to the exclusive information.
14-8
Chapter14 Local Ethernet Function
File download
14-9
Chapter14 Local Ethernet Function
(1) Input the “TCP/IP setting” parameters in the window for setting FEnet basic.
- Input the IP address, subnet mask, gateway, DNS server address.
- This address is commonly used for XGT server, Modbus TCP/IP server, SNTP service, FTP service.
14-10
Chapter14 Local Ethernet Function
(3) Enter the user ID and password to be used to access the FTP server.
- You can change the user ID and password through XG5000 only.
(4) Check ‘Display Password’ and verify whether the entered password is correct.
(7) If you press the OK button, setting the parameters to use FTP is completed.
(8) When you execute [Online] [Write Parameter], the parameters are written in the motion controller.
Note
1. Unless you set the user ID and password, basic ID and password will be set initially
- Default setting ID: LSIS
- Default password: 0000
2. Rules for applying the user ID and password
- You can enter the user ID and password that are composed of alphabetical characters and numbers
but special characters are not available.
- They must be case-sensitive and must not exceed the maximum of 8 digits.
14-11
Chapter14 Local Ethernet Function
Note
1. The compatibility with other commercial client programs other than Windows FTP client is not
guaranteed.
2. It is not support the multiple sessions, only one user can access at the same time.
3. To execute the command prompt window, enter ‘cmd’ to the window or press [Start]
[All Programs] [Auxiliary Programs] [Command Prompt].
For more details on execution of command prompt, refer to the Windows manual.
14-12
Chapter14 Local Ethernet Function
(b) Enter the FTP command in command prompt to start the FTP session.
(c) Enter the ‘open [IP address]’to access to the FTP server
- You can enter the FTP [IP address] in the command prompt instead of using the open command.
14-13
Chapter14 Local Ethernet Function
(d) Enter the user ID and password to access to the FTP server.
- It is normal that the password is not displayed on the screen.
(e) When login is completed successfully, the message will be displayed; “User name accepted.”
14-14
Chapter14 Local Ethernet Function
(f) In case you access to the FTP server through windows command prompts, you cannot see the progress status of
file download. Accordingly, you can check the current progress of file download by activating the HASH function.
14-15
Chapter14 Local Ethernet Function
(g) You can view the directories and file lists that exist in the drive currently through the ‘DIR’ command.
(h) You can go into the lower folder through the ‘cd [Folder name]’command. If you execute the ‘DIR’ command again
after going into the lower folder, only the files ahasnd folder lists that exist in the lower folder will be displayed.
14-16
Chapter14 Local Ethernet Function
(i) Designate the directory path of the FTP client side that will download the file through the ‘lcd’ command.
(j) Select the file to be imported through the ‘get’ command and download it. At this time, the file is located in the sub-
group folder in DATALOG.
14-17
Chapter14 Local Ethernet Function
(k) When the HASH function is activated and deactivated, the transmission status is shown in as below.
14-18
Chapter14 Local Ethernet Function
14-19
Chapter14 Local Ethernet Function
Note
1. You need to distinguish ASCII from Binary command depending on the file extension. If you transmit the
file with a wrong mode, the file will not work properly.
(a) File extension names using ASCII: html, htm, txt, cgi, pl, php, phtml, php3, sql, c, ph, py, etc.
(b) File extension names using Binary: gif, jpg, swf, png, exe, asf, wmv, zip, rar, gzip, tar, gz, etc.
2. If you download the network setting parameters when accessing to the FTP server, the current
download will stop and serious errors may occur in the relevant file so you cannot open it in the PC.
Accordingly, if possible, you are recommended to disconnect the FTP server when downloading the
network setting parameters.
14-20
Chapter14 Local Ethernet Function
Note
If you clear the Windows Firewall, you may be exposed to various external intrusions so you are
recommended to register the exceptional rules to a firewall.
14-21
Chapter14 Local Ethernet Function
14-22
Chapter14 Local Ethernet Function
Note
For registering exceptional rules, refer to the window manual.
14-23
Chapter14 Local Ethernet Function
(1) Select the [Start] button of Windows for execution.(Shortcut key /Windows key + R)
(2) Input ‘regedit’ to the execution window and run the process.
(4) Depending on the devices installed in the PC, You can see the folders are created
14-24
Chapter14 Local Ethernet Function
(5) If there are several register folders, select one by one and find the folder where the current PC’s IP address is set in
the right register value.
(6) Click with the right mouse button on the right screen of the relevant folder and select New] [DWORD(32bit) value].
(8) Double-click the created register and enter 1 to the value data.
14-25
Chapter14 Local Ethernet Function
Procedures Description
Setting for
SNTP
1. Input the [TCP/IP setting] parameters in the Ethernet basic setting window.
- Enter the IP address, subnet mask, gateway, DNS server address.
- This address is commonly used for FTP server, SNTP client service, etc.
2. Check [SNTP Time Synchronization Enable].
3. Then, set up the SNTP server’s IP address and Port No., synchronization cycle, TIME
ZONE setting.
14-26
Chapter14 Local Ethernet Function
Procedures Description
Write
parameters
and Link
2
Enable
Note
1. When parameter setting is done, the PLC reads periodically the time value from the SNTP server.
2. The SNTP server IP address is initially set as follows.
IP Port
211.233.84.186 123
211.233.40.78 123
178.63.135.195 123
104.131.51.97 123
14-27
Chapter14 Local Ethernet Function
Note
3. If you want to use other SNTP servers, change the IP address and port No. of the SNTP server
before input. Below is an example of public NTP server and port.
Server address IP Port Support
time.apple.com 17.253.6.243 123 Apple
time.asia.apple.com 17.83.253.7 123 Apple
time.euro.apple.com 17.72.148.52 123 Apple
ntp.kornet.net 168.126.3.6 123 KT(Korea)
time.kriss.re.kr 210.98.16.100 123 KRISS(Korea)
time.nuri.net 211.115.194.21 123 inethosting(Korea)
time.nist.gov 132.163.4.102 123 NIST(Korea)
time.windows.com 191.233.81.105 123 MS
1.kr.pool.ntp.org 211.233.40.78 123 Navyism(Korea)
1.asia.pool.ntp.org 125.62.193.121 123 Navyism(Korea)
2.asia.pool.ntp.org 82.200.209.236 123 Navyism(Korea)
3.asia.pool.ntp.org 218.189.210.4 123 Navyism(Korea)
(4) If you cannot use a public NTP server, Please setup a local NTP server refer to ‘14.3.3 How to
setup a local NTP server’.
(1) Select the [Start] button of Windows for execution.(Shortcut key /Windows key + R)
(2) Input ‘regedit’ to the execution window and run the process.
14-28
Chapter14 Local Ethernet Function
14-29
Chapter14 Local Ethernet Function
14-30
Chapter14 Local Ethernet Function
(g) Select UDP(U) and Special local port(S). Input ‘123’ and click Next button.
14-31
Chapter14 Local Ethernet Function
(i) Please select the checkbox to meet your security policy, and click Next button.
(j) Input the server name (anything) and description and click Finish button.
(k) Select the [Start] button of Windows for execution (Shortcut Key /Windowskey + R)
(m) In the command window, Input ‘net stop w32time’and press Enter key. And then, also input ‘net start w32time’and
press Enter key.
(n) Input ‘ipconfig’ and press Enter key in the command window to find out the IP address of NTP server.
(o) Setting the parameters using IP address of NTP server. (refer to ‘14.3.2 SNTP server parameter setting’)
14-32
Chapter14 Local Ethernet Function
Program processing
7 VAR Stage UDINT
procedure
Choose whether to start the
8 VAR TestEnable BOOL
test
ARRAY[0..1399] OF memory of transmit/receive
9 VAR UdpBuffer
BYTE data
For setting the frequency of
10 VAR CycleCounter UDINT
program execution
(3) ST Program
IF(TestEnable= TRUE) THEN
CycleCounter := CycleCounter + 1;
14-33
Chapter14 Local Ethernet Function
CASE Stage OF
0: //Check and create socket service channel status to use
SocketServiceCh := 1;
//Specify the socket channel to use
INST_SOCKET_STATUS(
//instance reset
REQ := FALSE,
SOCKCH := SocketServiceCh);
INST_SOCKET_STATUS(
//instance execution
REQ := TRUE,
SOCKCH := SocketServiceCh);
INST_SOCKET_UDPCREATE(
//instance reset
REQ := FALSE,
SRCPORT := 8000,
OPENSOCKCH := SocketServiceCh);
END_IF;
14-34
Chapter14 Local Ethernet Function
1: //data receive
INST_SOCKET_UDPRECV(
//instance execution
REQ := TRUE,
SOCKCH := SocketServiceCh,
//Socket service channel to created
TIMEOUT := 7,
//Receive Standby for up to 7 sec
SIZE := 1400, //specify the maximum
receive size (cannot set more than the buffer size)
RECVDATA := UdpBuffer);
//received data buffer
END_IF;
IF(INST_SOCKET_UDPRECV.ERROR = TRUE)THEN
//When performing abnormal
Stage := 0;
//change Stage 0
INST_SOCKET_CLOSE(
//instance execution
REQ := TRUE,
SOCKCH := SocketServiceCh);
//Socket service channel to close
14-35
Chapter14 Local Ethernet Function
INST_SOCKET_CLOSE(
//instance reset
REQ := FALSE,
SOCKCH := SocketServiceCh);
INST_SOCKET_UDPRECV(
//instance reset
REQ := FALSE,
SOCKCH := SocketServiceCh,
TIMEOUT :=7,
SIZE := 1400,
RECVDATA := UdpBuffer);
END_IF;
2: //data sending
INST_SOCKET_UDPSEND(
//instance execution
REQ := TRUE,
SOCKCH := SocketServiceCh,
//Socket service channel to created
DSTPORTNO := INST_SOCKET_UDPRECV.FROMPORTNO,
//Received port information
DSTIPADDR := INST_SOCKET_UDPRECV.FROMIPADDR,
//Received IP information
ENDDATA := UdpBuffer,
// Send data buffer
SIZE := INST_SOCKET_UDPRECV.RECVSIZE);
//send data size
IF(INST_SOCKET_UDPSEND.ERROR = TRUE)THEN
//When performing abnormal
14-36
Chapter14 Local Ethernet Function
Stage := 0;
//change Stage 0
INST_SOCKET_CLOSE(
//instance execution
REQ := TRUE,
SOCKCH := SocketServiceCh);
//Socket service channel to close
INST_SOCKET_CLOSE(
//instance reset
REQ := FALSE,
SOCKCH := SocketServiceCh);
END_IF;
INST_SOCKET_UDPSEND(
//instance reset
REQ := FALSE,
SOCKCH := SocketServiceCh,
DSTPORTNO := INST_SOCKET_UDPRECV.FROMPORTNO,
DSTIPADDR := INST_SOCKET_UDPRECV.FROMIPADDR,
SENDDATA := UdpBuffer,
SIZE := INST_SOCKET_UDPRECV.RECVSIZE);
END_CASE;
END_IF;
END_IF;
14-37
Chapter14 Local Ethernet Function
(3) ST PROGRAM
14-38
Chapter14 Local Ethernet Function
SOCKCH := SocketServiceCh);
INST_SOCKET_STATUS( //instance
execution
REQ := TRUE,
SOCKCH := SocketServiceCh);
INST_SOCKET_UDPCREATE(
//instance reset
REQ := FALSE,
SRCPORT := 8001,
OPENSOCKCH := SocketServiceCh);
END_IF;
1: //data sending
DestIpAddr[0] := 192;
DestIpAddr[1] := 168;
DestIpAddr[2] := 0;
DestIpAddr[3] := 111;
//Initialize the IP value of the receiving side
14-39
Chapter14 Local Ethernet Function
INST_SOCKET_UDPSEND(
//instance execution
REQ := TRUE,
SOCKCH := SocketServiceCh,
//Socket service channel to created
DSTPORTNO := 8001, //Receiving side
port information
DSTIPADDR := DestIpAddr,
//Receiving side IP information
ENDDATA := UdpBuffer, // send
data buffer
SIZE := 1400); //size of received data
SOCKCH := SocketServiceCh);
//Socket service channel to close
END_IF;
INST_SOCKET_UDPSEND(
//instance reset
14-40
Chapter14 Local Ethernet Function
REQ := FALSE,
SOCKCH := SocketServiceCh,
DSTPORTNO := INST_SOCKET_UDPRECV.FROMPORTNO,
DSTIPADDR := INST_SOCKET_UDPRECV.FROMIPADDR,
SENDDATA := UdpBuffer,
SIZE := 1400);
2: //data receive
INST_SOCKET_UDPRECV(
//instance execution
REQ := TRUE,
SOCKCH := SocketServiceCh,
//Socket service channel to created
TIMEOUT := 7,
//Receive Standby for up to 7 sec
SIZE := 1400, //specify the maximum receive size
(cannot set more than the buffer size)
RECVDATA := UdpBuffer);
//received data buffer
END_IF;
14-41
Chapter14 Local Ethernet Function
//change Stage 0
INST_SOCKET_CLOSE( //instance
execution
REQ := TRUE,
SOCKCH := SocketServiceCh);
//Socket service channel to close
INST_SOCKET_UDPRECV(
//instance reset
REQ := FALSE,
SOCKCH := SocketServiceCh,
TIMEOUT :=7,
SIZE := 1400,
RECVDATA := UdpBuffer);
END_IF;
END_CASE;
END_IF;
END_IF;
14-42
Chapter14 Local Ethernet Function
(3) ST PROGRAM
14-43
Chapter14 Local Ethernet Function
CASE Stage OF
0: //specifying and creating a Server Socket Channel
ServerSocketServiceCh := 3; //Specify the
socket channel to use(server)
eerSocketServiceCh := 4;
//Specify the socket channel to use(peer)
INST_SOCKET_STATUS( //instance reset
REQ := FALSE,
SOCKCH := ServerSocketServiceCh);
INST_SOCKET_STATUS( //instance
execution
REQ := TRUE,
SOCKCH := ServerSocketServiceCh);
//Socket service channel to use(server)
INST_SOCKET_TCPLISTEN(
//instance reset
REQ := FALSE,
14-44
Chapter14 Local Ethernet Function
SRCPORT := 8002,
PEERCNT := 1,
OPENSOCKCH := ServerSocketServiceCh);
END_IF;
INST_SOCKET_STATUS( //instance
execution
REQ := TRUE,
SOCKCH := PeerSocketServiceCh); //Socket service
channel to use(peer)
14-45
Chapter14 Local Ethernet Function
SERVERSOCKCH := ServerSocketServiceCh,
OPENPEERSOCKCH := PeerSocketServiceCh,
TIMEOUT := 5);
END_IF;
END_IF;
END_IF;
END_IF;
2: //data receiving and sending
INST_SOCKET_TCPRECV(
//instance execution
REQ := TRUE,
14-46
Chapter14 Local Ethernet Function
INST_SOCKET_TCPSEND(
//instance execution
REQ := TRUE,
SOCKCH := PeerSocketServiceCh, //Connection allowed peer
socket service channel
SENDDATA := TcpBuffer, // send
data buffer
SIZE := INST_SOCKET_TCPRECV.RECVSIZE); //send
size
14-47
Chapter14 Local Ethernet Function
END_IF;
INST_SOCKET_TCPSEND(
//instance reset
REQ := FALSE,
SOCKCH := PeerSocketServiceCh,
SENDDATA := TcpBuffer,
SIZE := INST_SOCKET_TCPRECV.RECVSIZE);
END_IF;
14-48
Chapter14 Local Ethernet Function
END_IF;
END_IF;
END_CASE;
END_IF;
END_IF;
14-49
Chapter14 Local Ethernet Function
(3) ST PROGRAM
14-50
Chapter14 Local Ethernet Function
SOCKCH :=SocketServiceCh);
END_IF;
1: //try to connection
DestIpAddr[0] := 192;
DestIpAddr[1] := 168;
DestIpAddr[2] := 0;
DestIpAddr[3] := 111; //Initialize the IP value of
the connection
INST_SOCKET_TCPCONNECT( //instance execution
REQ := TRUE,
SRCPORT := 8003, //Set port to 8003
TIMEOUT := 5, // connection for up to 5
sec
DSTIPADDR := DestIpAddr, // connection IP
information
DSTPORT := 8003, //connection station Port
information
OPENSOCKCH := SocketServiceCh); //Socket service channel to use
14-51
Chapter14 Local Ethernet Function
OPENSOCKCH := SocketServiceCh);
END_IF;
END_IF;
2: //data sending
INST_SOCKET_TCPSEND( //instance execution
REQ := TRUE,
SOCKCH := SocketServiceCh, //Connection confirmed
socket service channel
SENDDATA := TcpBuffer, // send data buffer
SIZE := 1400); //sending data size
END_IF;
14-52
Chapter14 Local Ethernet Function
INST_SOCKET_CLOSE(
REQ := FALSE,
SOCKCH := SocketServiceCh); //instance reset
END_IF;
3: //data receive
INST_SOCKET_TCPRECV( //instance execution
REQ := TRUE,
SOCKCH := SocketServiceCh, //Connection confirmed
socket service channel
TIMEOUT := 3, //Receive Standby for
up to 3 sec
SIZE := 1400, //specify the maximum
receive size (cannot set more than the buffer size)
RECVDATA := TcpBuffer); //received data buffer
END_IF;
14-53
Chapter14 Local Ethernet Function
END_IF;
END_CASE;
END_IF;
END_IF;
14-54
Chapter14 Local Ethernet Function
(1) Start command operation with Rising Edge of Execute, initialize ErrorID
(2) Done occurs when normal operation is completed after the command operation (Busy) state, Output Parameter
is valid (updated)
(3) When Execute Falling, Done Flag Reset.
(4) In case of command operation (Busy) state, even if Execute falls, the previous operation is continued
(5) Done occurs after completion of command operation (Busy), and if Execute status is 0, Done is maintained
during one call
(6) Even if Rising Edge of Execute occurs during command operation (Busy), the previous operation is continued
(7) Start command operation with Rising Edge of Execute, initialize ErrorID
(8) Error occurs when abnormal operation is completed after command operation (Busy) status, ErrorID update
(9) Execute Falling 시 Error Flag Reset
(10)Done occurs after completion of command operation (Busy), and if Execute status is 0, Error is maintained
during one call
※ Follows PLC Open FB operation standard
14-55
Chapter14 Local Ethernet Function
14-56
Chapter14 Local Ethernet Function
14-57
Chapter14 Local Ethernet Function
14-58
Chapter15 Built-in Cnet Communication
15.1.1 Characteristics
Cnet I/F is a serial communication device supporting RS-232C and RS-485 protocols and has the following characteristics.
1) It offers a user-friendly experience and is easy to connect with the products of other companies.
2) Using the XG5000 that operates in the Windows environment, a user can directly write communication speed
and communication mode (protocol), and it is easy to connect with the products of other companies.
5) It provides a dedicated communication function for multi-drop configuration that con connect up to 32 units when
RS-485 is used.
9) It provides dedicated communication (user defined communication and XGT client/server communication),
10) It provides a client mode (LS bus) for communication dedicated for LS Industrial Systems Inverter.
11) Smart server automatically recognizes the protocol (LS ELECTRIC dedicated protocol, Modbus RTU/ ASCII) and works.
12) It provides a repeater mode to convert RS-232C into RS-485 or uses it as an isolated repeater.
13) It has a built-in termination resistor, and thus termination can be set in the default parameter, when the termination resistance
is needed.
Notice
The serial communication function is supported only for communication type products. (XMC-E32C)
15-1
Chapter15 Built-in Cnet Communication
(2) Please download the XG5000 from LS Industrial Systems website below.
The model name of the cable is as follows.
15-2
Chapter15 Built-in Cnet Communication
(d) When click the XML-CH2A module for which you want to check the stand-alone motion controller product information,
[Serial Communication Module Information] screen appears.
(e) Check the product version at the bottom right of this screen..
15-3
Chapter15 Built-in Cnet Communication
15.3 Specifications
15.3.1 Performance Specifications
Specifications
Item
Channel 1 Channel 2
Serial communication
RS-232C RS-485
method
Modem connection function - -
Operates as a communication client
- XGT dedicated protocol client
Operation P2P - Modbus ASCII/RTU client
mode(define - User defined communication
operation for - LS bus client Note 1)
each channel)
- XGT dedicated protocol server
Server
- Modbus ASCII/RTU server
Data bit 7 or 8
Data
Stop bit 1 or 2
type
Parity Even/Odd/None
Synchronous method Asynchronous method
Notice
15-4
Chapter15 Built-in Cnet Communication
Num
Name Contents
ber
RS-232C data LED
TX LED
① ON/OFF: Transmitting/receiving communication data
RX LED
OFF: Standby for communication
RS-232C communication
⑥ Connector for connecting RS-232C communication signals
connector
RS-485 communication
⑦ Connector for connecting RS-485 communication signals
connector
15-5
Chapter15 Built-in Cnet Communication
Conductor
Insulator
AL/MYLER TAPE
Ground line
Braided
Sheath
Structure
15-6
Chapter15 Built-in Cnet Communication
The termination resistor is used to prevent signal distortion due to the reflected wave of the cable when use for long
distance communication, the resistance (120Ω, 1/2W) equal to the characteristic impedance value of the cable should be
connected to the end of the network.
When using the recommended cable, connect the termination resistor to both ends of the line.
Even when using cables other than the recommended cable, connect a resistor with the same value as the characteristic
impedance value to both ends of the line.
15-7
Chapter15 Built-in Cnet Communication
1) Server Mode
Operates as a server in the network. XGT server and Modbus server are optional.
(1) XGT server: dedicated communication protocol supported, memory Read, Write available.
(2) Modbus server: Modbus protocol supported, RTU/ASCII type optional.
(3) Setting necessary for conversion between Modbus protocol memory area and XGT memory area.
(4) Smart server: Smart server automatically analyzes the protocol (XGT, Modbus ASCII/RTU) automatically and operates as
analyzed server.
15-8
Chapter15 Built-in Cnet Communication
RS-232C channel
RS-232C cable
TX
RX
PLC CPU
RS-422 channel
RS-422 cable
TX
RX
Notes
[Note 1] While in operation, mode change is not available. In order to change the mode, download the standard
communication parameters and reset the communication module.
[Note 2] Although do not Reset the PLC separately, the changed mode will be applied when the download is
completed.
15-9
Chapter15 Built-in Cnet Communication
1) Repeater Mode
Repeater mode is a function that transmits data received from each channel to another channel.
15-10
Chapter15 Built-in Cnet Communication
15-11
Chapter15 Built-in Cnet Communication
Notice
1) Response waiting time: It means the waiting time until the reception of response frame after the completion of
frame transmission.
(1) Operation setting: It can e set when P2P is used in operation mode.
(2) Response waiting time = Basic response waiting time + (response waiting time set value x 100ms) + inter-
character waiting time
(3) Basic response waiting time by communication speed
1) 9,600~115,200bps: 100ms
2) 7,200~2,400bps: 200ms
3) 1,800~1,200bps: 400ms
2) Delay time setting: It means transmitting a frame after the delay time set by a user.
(1) Client operation setting: Client operation can be set when communication type is RS-485.
(2) Server operation setting: It is possible to transmit a frame after the delay time for the response of the server to
be set.
3) Inter-character waiting time: It means the spacing between characters in one frame processed as one frame in
case of a character that comes in the set time in one frame.
(1) Operation setting: It can be set regardless of operation mode.
4) Parity reception error: When [Accept] is selected, data can be received even if there is an error in the reception
parity bit.
5) Stop bit: It means the end of a single packet and checks the stop bit set at the time of data transmission. If the
stop bit of the received data is smaller than the set stop bit, data cannot be received normally. In
order to receive data normally, the stop bit should be configured identically.
(1) When stop bit is set to 1, all frames can be received.
(2) Normal communication may not be possible in communication with equipment where stop bit is set to 2.
(3) When stop bit is set to 2, data of stop bit 1 cannot be received.
(4) The parameters should be set the same for normal communication.
15-12
Chapter15 Built-in Cnet Communication
15-13
Chapter15 Built-in Cnet Communication
Notice
1) Start condition in user-defined frame communication is selectable only when the P2P function is SEND.
2) The number of variables and data size can be set only in the case of continuous mode in XGT client and Modbus
ASCII/RTU client.
3) Settings in user-defined frame communication can be established only when the fixed size parameter or variable size
parameter is selected.
4) Frame settings can be entered after the frame type and group name of the user frame definition are set.
5) LS Bus client is a function provided by the B type Cnet I/F module.
15-14
Chapter15 Built-in Cnet Communication
2) Modbus settings
Modbus
Channel Settings Item XMC-E32Cdefault
Used/unused
P2P used Disable - -
XGT server Disable - -
Bit Read Area Start Address: %IX0.0.0
Modbus Bit write Area start Address: %QX0.0.0
Enable
ASCII server Word Read Area Start Address: %MW0
Channel 1
Word Write Area Start Address: %MW100
Bit Read Area Start Address: %IX0.0.0
Modbus Bit Write Area Start Address: %QX0.0.0
Enable
RTU server Word Read Area Start Address: %MW0
Word Write Area Start Address: %MW100
P2P used Disable - -
XGT server Disable - -
Bit Read Area Start Address: %IX0.0.0
Modbus Bit Write Area Start Address: %QX0.0.0
Enable
ASCII server Word Read Area Start Address: %MW0
Channel 2
Word Write Area Start Address: %MW100
Bit Read Address Start Address: %IX0.0.0
Modbus Bit Write Area Start Address: %QX0.0.0
Enable
RTU server Word Read Area Start Address: %MW0
Word Write Area Start Address: %MW100
15-15
Chapter15 Built-in Cnet Communication
15-16
Chapter15 Built-in Cnet Communication
15-17
Chapter15 Built-in Cnet Communication
• Wiring method
15-18
Chapter15 Built-in Cnet Communication
Note) In the case of PMU, 4 and 6, and 7 and 8 should be short-circuited for use.
15-19
Chapter15 Built-in Cnet Communication
• Wiring method
15-20
Chapter15 Built-in Cnet Communication
Module settings
Type
RS-232C RS-485 Station number
PLC Cnet #1 station XGT server P2P 1
15-21
Chapter15 Built-in Cnet Communication
15.7.1 Summary
Communication parameters can be divided into basic setting parameters and P2P setting parameters as shown below.
This is the part that sets the media information, hardware information and basic protocol information of
serial communication of Standalone Motion Controller
Paramet Sub- Possibility of settings
Setting item Setting range Notice
er menu Client Server
RS-232C
Communication type Possible Possible -
RS-485
Communication
1200 ~ 115,200 Possible Possible -
speed(bps)
Connec
Termination
tion Enabled/Disabled Possible Possible
resistance
settings
XGT
Station number is not
communication:
Station number Possible Possible significant when
Default 0~255
setting client
settings Modbus: 0~255
P2P used Possible - -
XGT server - Possible -
One mode is
Modbus ASCII server - Possible -
Operati selectable
Modbus RTU server - Possible -
on
mode Smart server - Possible
All services are
Repeater mode Enabled/Disabled - - stopped when
repeater mode is set
In Modbus ASCII, the
Data bit 7, 8 Possible Possible number of data bits is
7.
Connec
Stop bit 1, 2 Possible Possible *Note 5)
tion
Parity bit NONE,ODD,EVEN Possible Possible -
settings
Parity reception error Allowed/ Not
Advance *Note 4) Possible Possible -
allowed
d settings
Modem type Null modem Possible Possible -
Response waiting *Note 1)
0~50 (x 100ms) Possible -
time
Time
Delay time 0~255 (x 10ms) Possible Possible *Note 2)
settings
Inter-character waiting
0~255 (x 10ms) Possible Possible *Note 3)
time
15-22
Chapter15 Built-in Cnet Communication
Notice
1) Response waiting time: It means the waiting time until the reception of response frame after the completion of
frame transmission.
(1) Operation setting: It can e set when P2P is used in operation mode.
(2) Response waiting time = Basic response waiting time + (response waiting time set value x 100ms) + inter-
character waiting time
(3) Basic response waiting time by communication speed
1) 9,600~115,200bps: 100ms
2) 7,200~2,400bps: 200ms
3) 1,800~1,200bps: 400ms
2) Delay time setting: It means transmitting a frame after the delay time set by a user.
(1) Client operation setting: Client operation can be set when communication type is RS-485.
(2) Server operation setting: It is possible to transmit a frame after the delay time for the response of the server to
be set.
3) Inter-character waiting time: It means the spacing between characters in one frame processed as one frame in
case of a character that comes in the set time in one frame.
(1) Operation setting: It can be set regardless of operation mode.
4) Parity reception error: When [Accept] is selected, data can be received even if there is an error in the reception
parity bit.
5) Stop bit: It means the end of a single packet and checks the stop bit set at the time of data transmission. If the
stop bit of the received data is smaller than the set stop bit, data cannot be received normally. In
order to receive data normally, the stop bit should be configured identically.
(1) When stop bit is set to 1, all frames can be received.
(2) Normal communication may not be possible in communication with equipment where stop bit is set to 2.
(3) When stop bit is set to 2, data of stop bit 1 cannot be received.
(4) The parameters should be set the same for normal communication.
(2) Dedicated service(XGT server, Modbus ASCII server, Modbus RTU server)
(a) This service allows PC and peripheral devices to read and write information and data without the creation of a separate
program in the PLC.
(b) It can operate as XGT server that support the XGT protocol and Modbus server that supports the Modbus RTU/ASCII
protocol.
15-23
Chapter15 Built-in Cnet Communication
15-24
Chapter15 Built-in Cnet Communication
Notice
1) Start condition in user-defined frame communication is selectable only when the P2P function is SEND.
2) The number of variables and data size can be set only in the case of continuous mode in XGT client and Modbus
ASCII/RTU client.
3) Settings in user-defined frame communication can be established only when the fixed size parameter or variable
size parameter is selected.
4) Frame settings can be entered after the frame type and group name of the user frame definition are set.
5) LS Bus client is a function provided by the B type Cnet I/F module.
3) Transmission Standard
In order to use the Cnet I/F module, set the transmission standard like baud rate, data/stop bit. The basic setting item
of Cnet I/F module should be same with transmission standard of system. The written basic setting values are saved
in the XMC, those are kept regardless of power off until rewriting the values.
a) XGT Server
Support reading/writing memory of the dedicated service
b) Modbus ASCII/RTU Server
1) This is used when network is configured with modbus protocol and Cnet I/F module acts as server.
2) Since modbus memory area is different with XGT memory area, memory mapping is necessary.
15-25
Chapter15 Built-in Cnet Communication
2) After Cnet module is registered, double click the Cnet module and the following default setting window appears.
15-26
Chapter15 Built-in Cnet Communication
15-27
Chapter15 Built-in Cnet Communication
1) Server function
15-28
Chapter15 Built-in Cnet Communication
The maximum number of Modbus commands and response data supported by the Modbus RTU/ASCII driver is
shown in the following table. The other client device should make requests only within the scope of the table below.
The area corresponding to the command code in the above table must be set in the Stand-alone Motion controller
serial communication module memory. The [Modbus Settings] button becomes active when the Modbus ASCII server
or Modbus RTU server is selected as the operation mode in the [Preferences] window. If you click on it, the [Modbus
Settings] window will appear as shown below, and you can set the start address here.
15-29
Chapter15 Built-in Cnet Communication
1) P2P Service
P2P service performs the client operation of the communication module, and there are four commands available in
Cnet: Read/Write/Send/Receive. The registration and editing of P2P service are done in XG5000, and each P2P
parameters consist of up to 64 P2P blocks. The following figure shows an example of the P2P parameter setting
window of XG5000.
15-30
Chapter15 Built-in Cnet Communication
15-31
Chapter15 Built-in Cnet Communication
The following drivers can be selected when 'Enable P2P' is selected in the operation mode.
Driver Meaning
None P2P service is not used
User frame definition Used when it sends/receives the desired user-defined frame
XGT client Selected when it performs memory read/write of XGT
LS Bus client Selected when it communicates with the inverter of its company
Modbus ASCII client Selected when it operates as a Modbus client and is used in ASCII mode
Modbus RTU client Selected when it operates as a Modbus client and is used in RTU mode
User frame definition communication is possible only when P2P driver is set to user frame with respect to the
communication channel.
15-32
Chapter15 Built-in Cnet Communication
15-33
Chapter15 Built-in Cnet Communication
15-34
Chapter15 Built-in Cnet Communication
(b) Check ( ) the module with the default settings and click [OK].
(c) Click the [OK] button, and when the parameter writing finishes, reset each module.
15-35
Chapter15 Built-in Cnet Communication
(a) Select [Online] → [Communication Module Settings] → [System Diagnosis] or click the icon ( ).
(b) Click the communication module whose status you want to diagnose and press the right mouse button.
(c) When the following screen appears, click [Frame Monitor] or [Service Status] to check the operation status.
15-36
Chapter15 Built-in Cnet Communication
15-37
Chapter15 Built-in Cnet Communication
* In the case of user frame definition, the frame must be created in the user frame definition before it can be used.
(b) Check ( ) the module with the default settings and click [OK].
(c) Click the [OK] button, and when the parameter writing finishes, reset each module.
(a) Select [Online] → [Communication module settings] → [Link Enable] or click the icon ( )
(b) Check ( ) the configured P2P and click [Write].
15-38
Chapter15 Built-in Cnet Communication
(a) Select [Online] → [Communication Module Settings] → [System Diagnosis] or click the icon ( ).
(b) Click the communication module whose status you want to diagnose and press the right mouse button.
(c) When the following screen appears, click [Frame Monitor] or [Service Status] to check the operation status.
15-39
Chapter15 Built-in Cnet Communication
(a) Select [Online] → [Communication Module Settings] → [System Diagnosis] or click the icon ( ).
(b) Click the communication module whose status you want to diagnose and press the right mouse button.
(c) When the following screen appears, click [Frame Monitor] or [Service Status] to check the operation status.
15-40
Chapter15 Built-in Cnet Communication
(a) Select [Online] → [Communication Module Settings] → [System Diagnosis] or click the icon ( ).
(b) Click the XMC base unit and then right-click.
(c) If you click [CPU Module Information], the screen to check the status of the CPU module is displayed as shown below.
(a) Select [Online] → [Communication Module Settings] → [System Diagnosis] or click the icon ( ).
15-41
Chapter15 Built-in Cnet Communication
(b) Click the Cnet I / F module and click the right mouse button.
(c) If you click [Communication module information], the screen to check the status of communication module is displayed
as below.
Items Contents
Indicate the type of the communication module currently being
Communication module type
diagnosed.
Indicate the base information of the communication module
Base No. currently being diagnosed.
It is fixed to 0 and displayed in XGB PLC.
Indicate the slot number of the communication module currently
Slot No. being diagnosed.
It is fixed to 0 and displayed in built-in communication
Station No. Station number of the channel used in P2P and dedicated service
Information of the communication type (RS-232C, RS-485) of the
Connection method
corresponding channel
Indicate whether the hardware of the communication module is
Hardware error status
normal or not.
Hardware version Version of communication module hardware
OS version Indicate the version of the communication module OS
P2P Indicate the P2P communication is enabled/disabled
Whether to download the default communication parameters
System parameter information
Display the error information of default communication parameters
4) Frame monitor
The frame monitor of XG5000 allows you to check whether the frame transmitted/received through the Cnet I/F
module is normal or not.
15-42
Chapter15 Built-in Cnet Communication
(a) Select [Online] → [Communication Module Settings] → [System Diagnosis] or click the icon ( ).
(b) Click the Cnet I / F module and click the right mouse button.
(c) If you click [Frame Monitor], the screen to monitor the communication status will appear as shown below.
15-43
Chapter15 Built-in Cnet Communication
5) Service status
(1) Dedicated service
15-44
Chapter15 Built-in Cnet Communication
(a) Select [Online] → [Communication Module Settings] → [System Diagnosis] or click the icon ( ).
(b) Click the built-in Cnet and then right-click.
(c) Click [Service Status] and select [Dedicated Service] in the following screen.
(d) Click [Continue Reading] to check the status of each service.
(a) Select [Online] → [Communication Module Settings] → [System Diagnosis] or click the icon ( ).
(b) Click the built-in Cnet and then right-click.
(c) Click [Service Status] and select [P2P Service] in the following screen.
(d) Click [Continue Reading] to check the status of each service.
15-45
Chapter15 Built-in Cnet Communication
15-46
Chapter15 Built-in Cnet Communication
6) Media Information
It provides statistical value of media status and service status of built-in Cnet and is used to determine whether
communication is normal or not.
15-47
Chapter15 Built-in Cnet Communication
(a) Select [Online] → [Communication Module Settings] → [System Diagnosis] or click the icon ( ).
(b) Click the built-in Cnet and then right-click.
(c) If you click [Media Info], the following screen appears.
15-48
Chapter15 Built-in Cnet Communication
In addition, it can check the communication status by monitoring the actual protocol when communicating with the other
device through the frame monitoring of XG5000. The XGT protocol is divided into an XGT client that requests the other
device to read and write data and an XGT server that responds to the contents requested from the XGT client.
15-49
Chapter15 Built-in Cnet Communication
1) Frame structure
(1) Command frame sequence
When the request frame that is standardized from the XGT client is transmitted to the server, the server analyzes the
received request server frame and transmits the ACK response when receiving the frame that conforms to the
predetermined protocol rule. Otherwise, it transits the NAK frame to which the error code is attached.
2) NAK response frame (Received frame that does not meet the rules of the XGT protocol)
Header Its station Command Error code Frame check
Command Tail(ETX)
(NAK) number type (ASCII type 4 byte) (BCC)
15-50
Chapter15 Built-in Cnet Communication
c) All items that display all data sizes in the structured data area
d) Command registration number with respect to monitor registration and execution command
e) All contents of data
(c) In the case of hexadecimal data, ‘h’ is attached to the number as in h01, h12345, h34, h12 and h89AB, etc. to
indicate that this data is hexadecimal.
(d) The maximum length of available frame is 256 bytes.
(e) The contents of control codes used are shown below.
(f) If the command is composed of lowercase letters, the BCC value is added to the frame check. If it consists of
capital letters, the BCC value is not added.
Example)Device read command R(r)
- Lowercase letter r: BCC is added
- Capital letter R: BCC is not added
15-51
Chapter15 Built-in Cnet Communication
Command
Division Main command Registration No. Processing contents
Item Frame Registration
Hex Hex
example No.
Monitor variable
x(X) h78(h58) 00 ~ 09 h3030 ~ 3039 Register variables to monitor
registration
Monitor execution y(Y) h79(h59) 00 ~ 09 h3030 ~ 3039 Execute monitor of registered variables
Notice
Note 1) Bit continuous read is not allowed in the case of continuous read.
Note 2) Bit continuous write is not allowed in the case of continuous write.
Note 3) Double word: 1 double word is 4 byes when converted into byte.
Note 4) Long word: 1 long word is 8 bytes when converted into byte
15-52
Chapter15 Built-in Cnet Communication
15-53
Chapter15 Built-in Cnet Communication
Statio
Comm Numbe Varia
Head n Comma Variable Frame
Division and r of ble Data ... Tail
er numb nd name check
type blocks length
er
%MW1
Frame ENQ 20 W(w) SS 01 06 00E2 ... EOT BCC
00
h254D5
h3030453
Hex h05 h3230 h57(77) h5353 h3031 h3036 7 ... h04
2
313030
Notice
(1) The device data type of each block should be the same.
(2) If the data type is a bit, the data to be written should be represented by 1 byte in hexadecimal.
That is, if bit value is 0, it should be h00(3030), and if it is 1, h01(3031).
15-54
Chapter15 Built-in Cnet Communication
- NAK response
Station Command
Division Header Command Error code Tail Frame check
number type
Error code
Frame NAK 01 W(w) SS ETX BCC
(2 bytes)
Error code
Hex h15 h3031 h57(77) h5353 h03
(4 bytes)
This function is used to direct specify and read the PLC device according to the data type.
It makes it possible to read 16 independent device memories at a time.
15-55
Chapter15 Built-in Cnet Communication
b) NAK response
Station Command Error code
Division Header Command Tail Frame check
number type (2 bytes)
Frame NAK 20 R(r) SS 1132 ETX BCC
Hex h15 h3230 h52(72) h5353 h31313332 h03 -
Division Descriptions
15-56
Chapter15 Built-in Cnet Communication
▶It means the number of bytes of Hex type and is converted into ASCII.
▶ The number is determined by the data type(X,B,W,D,L) contained in the direct variable name of
the external communication device request format
▷The number of data according to the variable type is shown below.
▶ The value obtained by converting the data of area hexadecimal into ASCII code is stored
▷Usage example 1
If the number of data is h04 (ASCII code: h3034), it indicates that there are 4 bytes of Hex data
in the data. That is, 4 bytes of hexadecimal data is converted into ASCII code in the data.
Data
▷Usage example 2
If the number of data is h04, and the data is h12345678, its ASCII code conversion value is
“31 32 33 34 35 36 37 38”, and this content is contained in the data area. That is, the highest value
comes first, and the lowest number is transmitted for the last time.
Notice
1) If the data type is a bit, the read data is displayed in the form of a byte.
That is, if bit value is 0, it is displayed as h00, and if it is 1, h01.
15-57
Chapter15 Built-in Cnet Communication
(It is assumed that h1234 is contained in M0020, and M0001 contains h5678.)
- NAK response
Hea Station Comman Command
Division Error code Tail Frame check
der number d type
Frame NAK 01 R(r) SS Error code(2 bytes) ETX BCC
Hex h15 h3031 h52(72) h5353 Error code(4 bytes) h03
15-58
Chapter15 Built-in Cnet Communication
b) NAK response
Station Command Error code
Division Header Command Tail Frame check
number type (Hex 2 bytes)
The number of data specifies the number according to the type of direct variable.
That is, if the device data type is word, the number of data is 5, it means that 5 words need to be
Number of data
written. The maximum number of data is 120 bytes for Hex, and it is 240 bytes when converted
to ASCII value.
15-59
Chapter15 Built-in Cnet Communication
- NAK response
Format Station
Header Command Command type Error code Tail Frame check
name number
Frame NAK 01 W(w) SB Error code(2) ETX BCC
Hex h15 h3031 h57(77) h5342 Error code(4) h03
15-60
Chapter15 Built-in Cnet Communication
PLC device.
(1) Example of continuous read request frame of XGT client
Station Comma Command Variable Number of data Frame
Division Header Variable name Tail
number nd type length (Up to 240 bytes) check
Frame ENQ 10 R(r) SB 06 %MW100 05 EOT BCC
Hex h05 h3130 h52(72) h5342 h3036 h254D57313030 h3035 h04
b) NAK response
Head Station Comman Error code
Division Command Tail Frame check
er number d type (Hex 2 byte)
Frame NAK 10 R(r) SB 1132 ETX BCC
Hex h15 h3130 h52(72) h5342 h31313332 h03
Division Descriptions
▶It means the number of bytes of Hex type and is converted to ASCII.
▶The number indicates the number of bytes.
Data type Available direct variables Number of data
Bit(X) %(P,M,L,K,F,T,C,I,Q,W,R)X 1
Number of data Byte(B) %(P,M,L,K,F,T,C,I,Q,W,R)B 1
Word(W) %(P,M,L,K,F,T,C,I,Q,W,R)W 2
Double word(D) %(P,M,L,K,F,T,C,I,Q,W,R)D 4
Long word(L) %(P,M,L,K,F,T,C,I,Q,W,R)L 8
▶The data area contains the value obtained by converting Hex data to ASCII code
▷Usage example 1
If the memory type included in the direct variable name of the PC request format is W(word),
and the number of data in the PC request format is 03, the number of PLC ACK response
Data data after executing the command is h06(2*03 = 06 bytes)bytes, and this value is ASCII code
value 3036.
▷ Usage example 2
In the above example, if the 3-word data contents are 1234,5678,9ABC in order, the actual
ASCII code conversion value is 31323334 35363738 39414243, and this content is contained
in the data area.
(It is assumed that the following data is contained in M000 and M001.)
M000 = h1234
M001 = h5678
- NAK response
Head Station
Division Command Command type Error code Tail BCC
er number
Frame NAK 0A R(r) SB Error code(2 bytes) ETX BCC
Hex h15 h3041 h52(72) h5342 Error code(4 bytes) h03
15-62
Chapter15 Built-in Cnet Communication
b) NAK response
Registrat
Heade Station Comma Error code
Structure ion Tail Frame check
r number nd (Hex 2 bytes)
number
Frame NAK 01 X(x) 09 h1132 ETX BCC
Hex h15 h3031 h58(78) h3039 h31313332 h03
Notice
Note1) Please be sure to select one of the following registration formats for request formats.
1 block(Max. 16 blocks)
▶Continuous reading of device
RSB Variable length (2 bytes) Variable name (16 bytes) Number of data
15-63
Chapter15 Built-in Cnet Communication
- NAK response
Station Registration
Division Header Command Error code Tail Frame check
number number
Frame NAK 01 X(x) 01 Error code(2) ETX BCC
Hex h15 h3031 h58(78) h3031 Error code(4) h03
15-64
Chapter15 Built-in Cnet Communication
registered number and executes the reading of device registered by the number.
-If the registration format of registration number is continuous reading of direct variable
Registrati
Station Comman Number Frame
Division Header on Data Tail
number d of data check
number
Frame ACK 10 Y(y) 09 04 9183AABB ETX BCC
Hex h06 h3130 h59(79) h3039 h3034 h3931383341414242 h03
b) NAK response
Station Registration Error code Frame
Division Header Command Tail
number number (Hex 2 byte) check
Frame NAK 10 Y(y) 09 1132 ETX BCC
Hex h15 h3130 h59(79) h3039 h31313332 h03
15-65
Chapter15 Built-in Cnet Communication
It is assumed that what is registered is device M000, and its number of blocks is 1.
- NAK response
Station Registration
Division Header Command Error code Tail Frame check
number number
Frame NAK 01 Y(y) 01 Error code(2) ETX BCC
Hex h15 h3031 h59(79) h3031 Error code(4) h03
1) Summary
15-66
Chapter15 Built-in Cnet Communication
XGT communication operates as XGT server or P2P service depending on what setting of Cnet I / F module
operation mode. Each mode must be set to XG5000.
15-67
Chapter15 Built-in Cnet Communication
(b) Check ( ) the module with the default settings and click [OK].
(c) Click the [OK] button, and when the parameter writing finishes, reset each module.
15-68
Chapter15 Built-in Cnet Communication
(a) Select [Online] → [Communication Module Settings] → [System Diagnosis] or click the icon ( ).
(b) Click the communication module whose status you want to diagnose and press the right mouse button.
(c) When the following screen appears, click [Frame Monitor] or [Service Status] to check the operation status.
15-69
Chapter15 Built-in Cnet Communication
Division Contents
- Set P2P channel to define the communication protocol of P2P service to
perform
P2P channel - XGT/Modbus available
- It is possible to set independently for each channel. It is applied only when
the operation mode of the default settings is “Use P2P”.
P2P block Set 64 P2P blocks that operate independently
User-defined frame
Set frame for user-defined communication
registration
15-70
Chapter15 Built-in Cnet Communication
The following drivers can be selected when 'Enable P2P' is selected in the operation mode.
Driver Meaning
None P2P service is not used
User frame definition Used when it sends/receives the desired user-defined frame
XGT client Selected when it performs memory read/write of XGT
LS Bus client Selected when it communicates with the inverter of its company
Modbus ASCII client Selected when it operates as a Modbus client and is used in ASCII mode
Modbus RTU client Selected when it operates as a Modbus client and is used in RTU mode
If the P2P driver is selected as XGT or Modbus, user frame definition cannot be used.
15-71
Chapter15 Built-in Cnet Communication
2) Basic setting
15-72
Chapter15 Built-in Cnet Communication
(a) Double-click the corresponding XMC built-in Cnet to open the [Preferences] window and set the
communication type, communication speed, modem type, data bit, stop bit and station number in the
[Connection Settings] menu.
(b) The modem function is not available.
(c) The delay time can be set only when the communication type is RS485, and the response wait time
can be set only when the communication type is RS485 and the operation mode is P2P.
3) Operation mode
Select 'Use P2P'.
(a) Setting P2P parameters
The set drive name changes according to the driver set in P2P
1 Channel
driver.
1. Enter special flag or bit contact to select the time when data is
Start
3 transmitted and received
condition
2. Example: _T20MS(cycle: 20ms), %MX0(when MX0 is On)
Number Classification Block type Contents
1.Individual: Used to read or write data of up to 4 memory areas to
the other station(Example: M01, M10, M20, M30)
4 Mode
2.Continuous: Used to read or write continuous data to the other
station (Example: M01~M10)
15-73
Chapter15 Built-in Cnet Communication
1. Individual mode: Data types are divided into five types: bit, 1 byte,
2 byte, 4 byte and 8 byte.
5 Data type
2. Continuous mode: Data types are divided into four types: 1 byte,
2 byte, 4 byte and 8 byte
Partner 1.It is checked automatically. If you do not use the block, click the
8
station check mark once again and the block will not work.
2) Check ( ) the module with the default settings and click [OK].
3) Click the [OK] button, and when the parameter writing finishes, reset each module.
15-74
Chapter15 Built-in Cnet Communication
15-75
Chapter15 Built-in Cnet Communication
4) Frame monitor
With the frame monitoring function provided by XG5000, you can check the frame that the client and
server exchange.
15-76
Chapter15 Built-in Cnet Communication
(1) Functions
a) The use of P2PSN command makes it possible to change the station number of P2P
service partner during the run.
b) It changes BL_NUM block remote station number of P_NUM P2P to NUM.
(2) Errors
When an error occurs, the error number is displayed on STAT.
STAT_NUM Contents Details
Occurs when a value other than
1 P2P number setting
cP_NUM(1~8) is set
Occurs when a value other than
2 Block number setting
BL_NUM(0~63) is set
4 Slot does not exist -
5 Module mismatch Not a communication module
Communication module that cannot be
6 Module mismatch
used for the command
Occurs when a value other than
7 Station number setting error
NUM(0~63) is set
15-77
Chapter15 Built-in Cnet Communication
2) P2PRD
P2PRD
Input REQ :Function block execution request
BOOL REQ DONE BOOL P_NUM : P2P number
BL_NUM :Block number
USINT P_NUM STAT USINT VAL_NUM :Variable number
USINT BL_NUM VAL_SIZE :Variable size
DEV :Device(only direct variables can be entered)
USINT VAL_NUM
VAL_SIZE Output DONE :Maintain 1 after initial operation
USINT
STAT : Complete and ERR information
ANY_BIT DEV
DWORD
STRING
LWORD
WORD
LREAL
UDINT
USINT
ULINT
BOOL
BYTE
REAL
DATE
TIME
DINT
UINT
SINT
LINT
TOD
ANY type Variable
INT
DT
variable name
description
DEV ○ ○ ○ ○ ○
(1) Functions
a) The P2PRD command changes the variable size of the P2P parameter block and the READ
device area. (Individual/continuous reading can be changed.)
b) The P_NUM, BL_NUM and VAL_NUM are used to specify the P2P parameters, blocks and
variables and change the variable size and device to VAL_SIZE(In the case of continuous reading,
VAL_SIZE means variable size, and it is the size of variable type in the case of individual reading)
and DEV, respectively. However, only direct variables can be entered for DEV. (e.g., %MW100)
(2) Errors
If the setting is outside the allowable range of P2P parameter set in XG5000, the corresponding error code occurs.
STAT_ Contents Details
NUM
1 P2P number setting error Occurs when a value other than P_NUM(1~8) is set
2 Block number setting error Occurs when a value other than BL_NUM(0~63) is set
Occurs when the variable number that is not allowed in the
3 Variable number setting error
P2P parameter set in XG5000 is entered.
4 Slot does not exist -
5 Module mismatch Not a communication module
6 Module mismatch Communication module that cannot be used for the command
Impossible to enter the offset of Modbus(e.g., 0x10000)
10 Modbus setting error
because only direct variables can be entered for DEV
Occurs when the variable size that is not allowed in the P2P
11 Variable size setting error
parameter set in XG5000 is entered
Occurs when the variable type that is not allowed in the P2P
12 Data type setting error
parameter set in XG5000 is entered
15-78
Chapter15 Built-in Cnet Communication
3) P2PWR
STRING
LWORD
WORD
LREAL
UDINT
USINT
ULINT
BOOL
BYTE
REAL
DATE
TIME
DINT
UINT
SINT
LINT
TOD
ANY type Variable
INT
DT
variable name
description
DEV ○ ○ ○ ○ ○
(1) Functions
a) The P2PWR command changes the variable size of the P2P parameter block and the WRITE device
area. (Individual/continuous writing can be changed.)
b) The P_NUM, BL_NUM and VAL_NUM are used to specify the P2P parameters, blocks and variables
and change the variable size and device to VAL_SIZE(In the case of continuous writing, VAL_SIZE
means variable size, and it is the size of variable type in the case of individual writing) and DEV,
respectively. However, only direct variables can be entered for DEV. (e.g., %MW100)
(2) Errors
If the setting is outside the allowable range of P2P parameter set in XG5000, the corresponding error code occurs.
STAT_NUM Contents Details
1 P2P number setting error Occurs when a value other than P_NUM(1~8) is set
Block number setting Occurs when a value other than BL_NUM(0~63) is set
2
error
Variable number setting Occurs when the variable number that is not allowed in the P2P
3
error parameter set in XG5000 is entered.
4 Slot does not exist -
5 Module mismatch Not a communication module
6 Module mismatch Communication module that cannot be used for the command
Impossible to enter the offset of Modbus(e.g., 0x10000) because only
10 Modbus setting error
direct variables can be entered for DEV
Occurs when the variable size that is not allowed in the P2P parameter
11 Variable size setting error
set in XG5000 is entered
Occurs when the variable type that is not allowed in the P2P parameter
12 Data type setting error
set in XG5000 is entered
15-79
Chapter15 Built-in Cnet Communication
1) Frame structure
(1) Basic structure
(a) Request frame (external communication device → Cnet)
Header Statio Frame check Tail
Command Structured data area
(ENQ) n No. (BCC) (EOT)
(b) ACK response frame (Cnet → external communication device, when receiving data normally)
Header Statio Frame check Tail
Command Structured data area
(ACK) n No. (BCC) (EOT)
(c) NAK response frame (Cnet → external communication device, when receiving data abnormally)
Header Statio Frame check Tail
Command Error code(ASCII 4 Byte)
(NAK) n No. (BCC) (EOT)
Notice
(1) The numeric data of all frames is displayed in ASCII code for hexadecimal values unless otherwise specified. The
items displayed in hexadecimal are as follows.
• Station number
• The command type supports R(read) and W(write).
• All contents of data
(2) For hexadecimal data, ‘H’ is prefixed to the number in the frame, as in H01, H12345, H34, H12, H89AB and etc.
to indicate that the data is hexadecimal.
(3) The available frame length is up to 44 bytes.
(4) The control codes used are summarized below.
Hex
Code Name Control contents
value
ENQ H05 Enquire Start code of request frame
ACK H06 Acknowledge Start code of ACK response frame
NAK H15 Not Acknowledge Start code of NAK response frame
EOT H04 End of Text Frame end ASCII code for request
15-80
Chapter15 Built-in Cnet Communication
15-81
Chapter15 Built-in Cnet Communication
Division Descriptions
Only one low-order byte of the value obtained by adding one byte each to the ASCII value
BCC
excluding the values of ENQ and EOT is converted into ASCII and added to BCC.
The number of words to be written is specified. When converted to ASCII, it ranges from H01
Data size
(ASCII value: 3031) to H08 (ASCII value: 3038).
The inverter address to be read is entered. It should be ASCII value with 4 characters, and
Inverter address
only numbers are allowed.
If the value to be written in the inverter address 0100 area is H’A, the data format should be
Data
H000A.
• Usage example
If the data type to be written is WORD, and the data to be written is H1234, its ASCII code conversion value is
31323334, and this content should be contained in the data area. That is, the highest value is transmitted first, and
the lowest value should be transmitted for the last time.
Notice
15-82
Chapter15 Built-in Cnet Communication
Division Descriptions
Only one low-order byte of the value obtained by adding one byte each to the ASCII value excluding the
BCC
values of ENQ and EOT is converted into ASCII and added to BCC.
Division Descriptions
Only one low-order byte of the value obtained by adding one byte each to the ASCII value excluding the
BCC
values of ENQ and EOT is converted into ASCII and added to BCC.
The types of errors are indicated by the contents of 1Byte in Hex (2 Byte in ASCII code).
Error code
Please refer to the error code of the inverter for details.
15-83
Chapter15 Built-in Cnet Communication
Division Descriptions
Only one low-order byte of the value obtained by adding one byte each to the ASCII value excluding
BCC
the values of ENQ and EOT is converted into ASCII and added to BCC.
The number of words to be written is specified. When converted to ASCII, it ranges from H01 (ASCII
Data size
value: 3031) to H08 (ASCII value: 3038).
The inverter address to be read is entered. It should be ASCII value with 4 characters, and only
Inverter address
numbers are allowed.
Notice
Division Descriptions
Only one low-order byte of the value obtained by adding one byte each to the ASCII value excluding the
BCC
values of ENQ and EOT is converted into ASCII and added to BCC.
Division Descriptions
Only one low-order byte of the value obtained by adding one byte each to the ASCII value excluding the
BCC
values of ENQ and EOT is converted into ASCII and added to BCC.
The types of errors are indicated by the contents of 1Byte in Hex(2 Byte in ASCII code).
Error code
Please refer to the error code of the inverter for details
15-84
Chapter15 Built-in Cnet Communication
15-85
Chapter15 Built-in Cnet Communication
Link Enable
15-86
Chapter15 Built-in Cnet Communication
2) Protocol configuration
Modbus protocol is largely composed of PDU consisting of function code and data and ADU with the partner
station number and error check added to PDU.
client server
When a Modbus communication error occurs, the server sends a response that includes the error code to the
client as shown below.
client server
When an abnormal frame is received, the server sends an error code and an exception code to the client. The
error code is represented by adding 80(Hex) value to the function code, and the exception code indicates the
details of the error. The contents for each code are shown below.
Requests the client to make a request again at a proper time because the
05 Retransmission request
content to be processed is too huge for the server to handle at the moment
The server station takes time to process. The master should make a
06 Processing time delay
request again.
15-87
Chapter15 Built-in Cnet Communication
Function
Division Start Station No. Data Error check End
code
Size(byte) 1 2 2 N 2 2
15-88
Chapter15 Built-in Cnet Communication
Function
Division Start Station No. Data Error check End
code
Size(byte) Idle time 1 1 N 2 Idle time
Maximum response
Code(Hex) Use Usage area Address
data
01 Bit individual/continuous write Bit output 0XXXX 2000 bits
02 Bit individual/continuous read Bit input 1XXXX 2000 bits
03 Word individual/continuous read Word output 4XXXX 120 words
04 Word individual/continuous read Word input 3XXXX 120 words
05 Bit individual write Bit output 0XXXX 1 bit
06 Word individual write Word output 4XXXX 1 word
0F Bit continuous write Bit output 0XXXX 1968 bits
10 Word continuous write Word output 4XXXX 120 words
15-89
Chapter15 Built-in Cnet Communication
15-90
Chapter15 Built-in Cnet Communication
Frame 01 81 02 CRC
15-91
Chapter15 Built-in Cnet Communication
(h) Data: It is sent in byte units with the address of request frame as the start address.
(i) Error code: It is represented by adding 80 (Hex) values to the function code and transmitted in 82(Hex) for
the bit reading of output area.
(j) Exception code: It means the detailed error description and consists of 1 byte.
15-92
Chapter15 Built-in Cnet Communication
(h) Data: It is sent in byte units with the address of request frame as the start address, when the data is word
type, so its size is the same as twice the number of bytes..
(i) Error code: It is represented by adding 80 (Hex) values to the function code and transmitted in 83(Hex) for the
bit reading of output area.
(j) Exception code: It means the detailed error description and consists of 1 byte.
15-93
Chapter15 Built-in Cnet Communication
(f) Tail: It is applied only in the case of ASCII mode, and CRLF is added after LRC.
(g) Number of bytes: It means the number of bytes of data that responds.
(h) Data: It is sent in byte units with the address of request frame as the start address, when the data is word
type, so its size is the same as twice the number of bytes.
(i) Error code: It is represented by adding 80 (Hex) values to the function code and transmitted in 84(Hex) for
the bit reading of output area.
(j) Exception code: It means the detailed error description and consists of 1 byte
15-94
Chapter15 Built-in Cnet Communication
(e) Frame error check: It uses LRC in the case of ASCII mode or CRC error check method in the case of STU
mode and consists of 2 bytes.
(f) Tail: It is applied only in the case of ASCII mode, and CRLF is added after LRC.
(g) Number of bytes: It means the number of bytes of data that responds.
(h) Error code: It is represented by adding 80 (Hex) values to the function code and transmitted in 85(Hex) for
the bit reading of output area.
(i) Exception code: It means the detailed error description and consists of 1 byte.
15-95
Chapter15 Built-in Cnet Communication
15-96
Chapter15 Built-in Cnet Communication
(d) Number of outputs: It means the number of data to be written and consist of 2 bytes. Example)
If the address writes 10 data consecutively from No. 20, the number of outputs is 00A (Hex).
(e) Data size: The number of outputs is represented by a byte value. That is, if the data size is 1, the number
of continuous write data is 8. Example) When 10 consecutive bits of data is written, the data size is 2.
(f) Output value: It means the data value to be written in address set in the address.
(g) Frame error check: It uses LRC in the case of ASCII mode or CRC error check method in the case of
STU mode and consists of 2 bytes.
(h) Tail: It is applied only in the case of ASCII mode, and CRLF is added after LRC.
(i) Number of bytes: It means the number of bytes that responds.
(j) Error code: It is represented by adding 80 (Hex) values to the function code and transmitted in 8F(Hex)
for the bit reading of output area.
(k) Exception code: It means the detailed error description and consists of 1 byte.
15-97
Chapter15 Built-in Cnet Communication
15-98
Chapter15 Built-in Cnet Communication
15-99
Chapter15 Built-in Cnet Communication
15-100
Chapter15 Built-in Cnet Communication
(b) Check ( ) the module with the default settings and click [OK].
(c) Click the [OK] button, and when the parameter writing finishes, reset each module.
(a) Select [Online] → [Communication Module Settings] → [System Diagnosis] or click the icon ( ).
(b) Click the communication module whose status you want to diagnose and press the right mouse button.
(c) When the following screen appears, click [Frame Monitor] or [Service Status] to check the operation status.
15-101
Chapter15 Built-in Cnet Communication
15-102
Chapter15 Built-in Cnet Communication
(e) Check ( ) the module with the default settings and click [OK].
(f) Click the [OK] button, and when the parameter writing finishes, reset each module.
15-103
Chapter15 Built-in Cnet Communication
(a) Select [Online] → [Communication Module Settings] → [System Diagnosis] or click the icon ( ).
(b) Click the communication module whose status you want to diagnose and press the right mouse button.
(c) When the following screen appears, click [Frame Monitor] or [Service Status] to check the operation status.
15-104
Chapter15 Built-in Cnet Communication
15-105
Chapter15 Built-in Cnet Communication
15-106
Chapter15 Built-in Cnet Communication
Numb Classificati
Block type Meaning
er on
1 Channel The set drive name changes according to the driver set in P2P driver
P2P 1. Read: Used to read arbitrary data from the other station
2
function 2. Write: Used to write arbitrary data to the other station
1. Enter special flag or bit contact to select the time when data is
Start
3 transmitted and received
condition
2. Example: _T20MS(cycle: 20ms), %MX0(when MX0 is On)
5 Data type Data types can be selected among bits and words
▷It defines data size to be transmitted and received and is enabled only
in continuous mode.
1. If the P2P function is Read
1) Modbus RTU client
(1)Bit type: 1~2000
(2)Word type: 1~120
2) Modbus ASCII client
(1)Bit type: 1~976
6 Data size
(2)Word type: 1~61
2. If the P2P function is Write
1) Modbus RTU client
(1)Bit type: 1~1968
(2)Word type: 1~120
2) Modbus ASCII client
(1)Bit type: 1~944
(2)Word type: 1~120
15-107
Chapter15 Built-in Cnet Communication
Numb Classificati
Block type Meaning
er on
Partner It is checked automatically. If you do not use the block, click it once
7
station more, otherwise the block will not work.
Partner
1. It means the station number of the partner station.
8 station
1) Modbus: A total of 256 station numbers can be set from 0 to 255.
number
Settings
9
(b) Check ( ) the module with the default settings and click [OK].
(c) Click the [OK] button, and when the parameter writing finishes, reset each module.
15-108
Chapter15 Built-in Cnet Communication
(a) Select [Online] → [Communication Module Settings] → [System Diagnosis] or click the icon ( ).
(b) Click the communication module whose status you want to diagnose and press the right mouse button.
(c) When the following screen appears, click [Frame Monitor] or [Service Status] to check the operation status.
15-109
Chapter15 Built-in Cnet Communication
(a) Select [Online] → [Communication Module Settings] → [System Diagnosis] or click the icon ( ).
(b) Click the communication module whose status you want to diagnose and press the right mouse button.
(c) When the following screen appears, click [Frame Monitor] or [Service Status] to check the operation status.
15-110
Chapter15 Built-in Cnet Communication
15-111
Chapter15 Built-in Cnet Communication
Follow the procedure below when using user frame definition communication.
15-112
Chapter15 Built-in Cnet Communication
Frame
HEAD BODY TAIL
Segment 1 Segment 1 Segment 1
Segment 2 Segment 2 Segment 2
Segment 3 Segment 3 Segment 3
Segment N Segment N Segment N
In BCC settings, if BCC calculation method is classified as a dedicated communication method, there is no
need to set BCC setting range and display method. On the other hand, it is classified as a general-purpose
communication method, BCC setting range and display method should be set.
15-113
Chapter15 Built-in Cnet Communication
Item Contents
Area Specify where to start BCC calculation from head/body/tail
Start
Specify the segment position to start BCC calculation within the head/body/tail. 0 is included in the BCC
position Segment
calculation from the beginning of the frame
Before BCC Included in the calculation from start position to before BCC
End
End of are Included in the calculation from start position to the end of the specified area
position
Setting Included in the calculation from start position to the specified area segment position
ASCII conversion Convert result values to ASCII characters, the size increases two times.
Initial value 0 The initial value of BCC calculation can be set to 0. If not specified, FFH becomes the initial value.
The specifications of the transmission and reception frames supported in the user-defined communication of
Cnet I/F are summarized below.
Group Frame Segment Remarks
Numerical constant Max. 10 bytes
HEAD
String constant Max. 10 bytes
Numerical constant Max. 10 bytes
Transmission TAIL String constant Max. 10 bytes
frame BCC Only one BCC applicable
Numerical constant Max. 10 bytes
BODY String constant Max. 10 bytes
Variable size parameter Up to 4 available
Numerical constant Max. 10 bytes
HEAD
String constant Max. 10 bytes
Numerical constant Max. 10 bytes
TAIL String constant Max. 10 bytes
BCC Only one BCC applicable
Reception Numerical constant Max. 10 bytes
frame String constant Max. 10 bytes
Up to 4 can be set
Fixed size parameter 3 fixed size parameters and 1 variable size
BODY
parameter available
Only one variable size parameter can be set.
Variable size parameter Impossible to add segment after variable size
parameter
15-114
Chapter15 Built-in Cnet Communication
Frame generation
1. The group name is the name of the frame a user wants to create.
2. Select transmission as a frame type because the transmission frame needs to be created at present.
15-115
Chapter15 Built-in Cnet Communication
Frame generation
HEAD,TAIL,BODY
generation
1. Click Add Frame and then select the type of frame to be created.
2. Type: HEAD,TAIL,BODY
3. Select HEAD.
4. Repeat the above process (No.3) to create tail and body.
5. The name of the frame editing window is enabled only when the type is BODY.
6. Multiple bodies can be created with different names.
HEAD registration
15-116
Chapter15 Built-in Cnet Communication
BODY registration
1. Double click BODY to enable the editor screen and select the data type.
1) The meaning of numerical and string constants is the same as that in the header registration.
3)Conversion
▶Hex To ASCII: Convert the data read from the PLC memory into ASCII to configure the transmission frame
▶ASCII To Hex: Convert the data read from the PLC memory into Hex to configure the transmission frame
1) 4) Swap
▶2 byte swap: 2-byte swap of the data value (Example: 0x1234->0x3412)
▶4 byte swap: 4-byte swap of the data value (Example: 0x12345678->0x78564321
▶8 byte swap: 8-byte swap of the data value
15-117
Chapter15 Built-in Cnet Communication
Frame generation
2
1. The group name is the name of the frame a user wants to create.
2. Select reception as a frame type because the reception frame needs to be created at present
Frame generation
HEAD,TAIL,BODY
generation
4
1. Click Add Frame and then select the type of frame to be created.
2. Type: HEAD,TAIL,BODY
3. Select HEAD.
4. Repeat the above process (No.3) to create tail and body.
5. The name of the frame editing window is enabled only when the type is BODY.
6. Multiple bodies can be created with different names.
15-118
Chapter15 Built-in Cnet Communication
HEAD registration
5
1. Double click HEAD to create an editor screen.
2. Double click the editor screen or click the right mouse button to select Add Segment.
3. Select the type.
1) The meaning of each type is the same as that of the head registration shown in
No. 5 in writing transmission frame.
4. Enter a value in data.
BODY registration
1. Double click BODY to enable the editor screen and select the data type.
1) The meaning of numerical and string constants is the same as that in the header registration.
2) Variable type parameter
(1) Used in cases where the length of the frame varies
(2) One variable size parameter can be set, and segment cannot be added
7 when the variable size parameter is set
(3) Possible to save data in PLC memory when checking Specify Memory
(4) Control by byte
3) Fixed size parameter
(1) Used if the frame length is fixed to a certain size
(2) Up to 4 parameters can be set in one body
(3) Possible to save data in PLC memory when checking Specify Memory
4) Specify Memory: Checked when the device area to be saved in PLC is set.
5) Conversion
▶Hex To ASCII: Convert the received data into ASCII to configure the reception frame
▶ASCII To Hex: Convert the received data into Hex to configure the reception frame
6) Swap
▶2 byte swap: 2-byte swap of the data value (Example: 0x1234->0x3412)
▶4 byte swap: 4-byte swap of the data value (Example: 0x12345678->0x78564321
▶8 byte swap: 8-byte swap of the data value
15-119
Chapter15 Built-in Cnet Communication
4) Parameter settings
In order to transmit and receive data by using the transmission and reception frames created through the user frame
definition in P2P view of XG5000, you should set parameters through P2P block. The parameter setting method is
shown below.
Num Classific
Block type Meaning
ber ation
1 Channel The set drive name changes according to the driver set in P2P driver.
1. Enter special flag or bit contact and select the point of time when data is
transmitted and received.
Start
3 2.In the user frame definition, it is enabled only when the P2P function is
condition
Send.
3. Example) _T20MS(cycle: 20ms),%MX01
1. The setting in the P2P block of the user frame definition can be done
only when Specify Memory of the fixed size parameter and variable size
5 Settings parameter created by a user is checked.
2. Storage area: It means the firs address of the area to store data received
from the other station.
15-120
Chapter15 Built-in Cnet Communication
5) Writing parameters
(b) Check ( ) the module with the default settings and click [OK].
(c) Click the [OK] button, and when the parameter writing finishes, reset each module.
(a) Select [Online] → [Communication Module Settings] → [System Diagnosis] or click the icon ( ).
(b) Click the communication module whose status you want to diagnose and press the right mouse button.
(c) When the following screen appears, click [Frame Monitor] or [Service Status] to check the operation status.
15-121
Chapter15 Built-in Cnet Communication
(a) Select [Online] → [Communication Module Settings] → [System Diagnosis] or click the icon ( ).
(b) Click the communication module whose status you want to diagnose and press the right mouse button.
(c) When the following screen appears, click [Frame Monitor] or [Service Status] to check the operation status.
15-122
Chapter15 Built-in Cnet Communication
(1) SEND_UDATA
a) Functions
- This command is used to transmit user-defined data (hereafter referred to as DATA).
- For BASE and SLOT, enter the base and slot number on which the current CNET module is mounted.
- CH means channel number, and only 1 or 2 should be set.
- DATA should be declared as ARRAY OF BYTE type.
- The size of the array declared as SIZE ranges from 1 to 1024.(Unit: Byte)
- Store as much data as the number of SIZE from DATA [0] in the transmission buffer. (The number of
data sizes that can be sent at a time is limited to 1024)
- When normal operation is performed, 1 is displayed in DONE and STAT, and status information is
displayed when an error occurs.
b) Errors
STAT Contents Details
0 Initial state Initial state before command execution
1 No error Normal operation
2 Module setting error The module is not mounted on the base slot, or it is not a CNET module
3 Channel setting error It occurs when exceeding the input range(1, 2)
4 Array size error The size of transmitted data exceeds 1024
Communication The communication parameter of the Cnet module is not set to user-
5
parameter setting error defined, and Link Enable is not done.
Command timeout There is no response from the module, or the maximum scan time (10
6
error scans) is exceeded.
15-123
Chapter15 Built-in Cnet Communication
(2) RCV_UDATA
a) Functions
- This command is used to store data of the frame received through CNET.
- For BASE and SLOT, enter the base and slot number on which the current CNET module is mounted.
- CH means channel number, and only 1 or 2 should be set.
- DATA should be declared as ARRAY OF BYTE type.
- The size of the array declared as SIZE ranges from 1 to 1024.(Unit: Byte)
- SIZE represents the size of the received data
- When normal operation is performed, 1 is displayed in DONE and STAT, and status information is
displayed when an error occurs.
b) Errors
STAT Contents Details
0 Initial state Initial state before command execution
1 No error Normal operation
2 Module setting error The module is not mounted on the base slot, or it is not a CNET module
3 Channel setting error It occurs when exceeding the input range(1, 2)
4 Array size error The size of transmitted data exceeds 1024
Communication The communication parameter of the Cnet module is not set to user-
5
parameter setting error defined, and Link Enable is not done.
Command timeout There is no response from the module, or the maximum scan time (10
6
error scans) is exceeded.
15-124
Chapter15 Built-in Cnet Communication
• P2P service: It operates as a client (master) and makes a request to read/write data from/to the partner station.
- XGT client
- LS BUS client
- Modbus RTU/ASCII client
- User frame definition
• Server: It operates as a server (slave) and responds according to the protocol type when requested by the client.
- XGT server
- Modbus RTU server
15-125
Chapter15 Built-in Cnet Communication
Setting
Sequence Setting method
process
Connection
settings
1
Default
settings
1. Double click the Cnet I/F to execute the default setting window and set the communication type, communication
speed, module type, data bit, stop bit and station number in the connection setting window.
2. Model initialization is only possible when the modem type is a dial-up modem, not a null modem.
3. Latency setting: it means that the frame is sent after the delay time set by a user.
1) Operation setting: It can be set when the communication type is RS-485.
* When used as a Modbus ASCII server, the data bit should be set to 7.
15-126
Chapter15 Built-in Cnet Communication
Setting
Sequence Setting method
process
Operation
1. Select the operation mode of a server to be used by a user.
4 mode
2. XMC Cnet I/F supports the XGT server, Modbus ASCII server and Modbus RTU server.
selection
Writing
parameters
5
Operation
check
6
1. Slect Online -> Comunication Module Settings -> System Diagnostics or click the icon( ).
2. Click the module, press the right mouse button.
3. Click [Frame Monitor] or [Service Status] to check the operation status.
15-127
Chapter15 Built-in Cnet Communication
Setting
Sequence Setting method
process
Default The steps 1 to 3 are the same as those in the above case.
1
settings *When set to Modbus ASCII client, the data bit is set to 7
Operation
2 mode
P2P settings
3
1. Right-click the Cnet module in the project tree and select [Add Item] → [P2P Communication].
2. Select the P2P number (01).
P2P channel
settings
4
1. Double click the P2P channel and select protocols for each channel.
2. P2P driver supports the user frame definition, XGT client and Modbus RTU/ASCII client.
15-128
Chapter15 Built-in Cnet Communication
Setting
Sequence Setting method
process
P2P block
settings
5
1. P2P block setting values are enabled differently according to the type of client selected in the channel settings.
2. Create the frame in the enabled cell according to the protocol type.
*In the case of user frame definition, it is available only when the frame is created in the user frame definition.
Writing
parameters
6
Link Enable
7
1. Select Online ->Communication Module Settings ->Link Enable or click the icon( ).
2.Check the P2P whose setting is completed and click Write.
Operation
check
8
1. Slect Online ->Communication Module Settings ->System Diagnostics or click the icon( ).
2. Click the module and then right-click.
3. Click [Frame Monitor] or [Service Status] to check the operation status.
15-129
Chapter15 Built-in Cnet Communication
• It is a protocol defied by LS ELECTRIC and is classified into XGT client and XGT server
• XGT client: requests the server to read/write data
• XGT server: responds to the client’s request
Here is an example of how to use XGT dedicated communication using XGT protocol.
dedicated communication
2) Server-side settings
Type Setting contents
Basic unit XMC-E32C
Communication module Basic unit built-in communication(RS-232C)
Communication type RS-232C
Communication speed 38,400
Data bit 8
Stop bit 1
Parity bit None
Modem type Null modem
Station No. 1
15-130
Chapter15 Built-in Cnet Communication
Connection
settings
1
Default
settings
3
1. It is created the same as in the setting value on the server side of the exemplary system in the built-in
communication channel 1.
2. Operation mode is set as XGT server since it operates as a dedicated communication server.
15-131
Chapter15 Built-in Cnet Communication
Writing
parameters
4
15-132
Chapter15 Built-in Cnet Communication
In order to operate the XBL-C21A on the client side as an XGT client, the default settings of the Cnet I/F module are
done in the following order.
Setting
Sequence Setting method
process
Connection
settings
1
Default
settings
1. Select XBL-C21A to create in the same way as in the setting value on the client side
of the exemplary system in channel 2.
2. Set it to an arbitrary station number (0~255) since the station number setting is meaningless
when operating as a client.
3. Operation mode should always be set to P2P use when operating as a client.
15-133
Chapter15 Built-in Cnet Communication
When the default setting is completed, P2P channel and P2P block should be set. The setting method is shown below.
Sequ
Setting process Setting method
ence
1 P2P settings Click P2P in the lower part of the project window.
Communication
module settings
2
P2P channel
3 settings
1. Double click of P2P 02 to set the P2P driver of channel 2 as a XGT Client and click OK.
4 1. Double click of P2P 02.
Write operation
settings
1. Channel: Select the channel 2 set as the XGT client in P2P channel setting.
2. Select WRITE to perform the write operation.
3. Start condition: Use special flag F92 to transmit frame every 200㎳.
4. Method, data type: Select 2 Byte which means individual and word since I word is to be written.
5. Number of variables: Select 1 variable since it is 1 word.
6. Partner station number: Enter 1, which is the station number on the server side.
7. Settings: Set the Read area and Storage area and click OK.
1) Read area: Device address of data stored on the client side
2) Storage area: Device address of data stored on the server side
* When all settings are completed normally, the text color of the index changes to black.
15-134
Chapter15 Built-in Cnet Communication
Read operation
settings
1. Channel, start condition, method, data type, number of variables and partner station number are
set as the same as write operation.
2. P2P function: Select READ since it performs read operation.
3. Settings: Set the read and storage area and click OK.
1) Read area: Device area of data stored in server station
2) Storage area: Device area of data to be stored in client
Writing
parameters
15-135
Chapter15 Built-in Cnet Communication
Link Enable
8
1. Select Online ->Communication Module Settings ->Link Enable or click the icon( ).
2. Check the P2P whose setting is completed and click Write.
15-136
Chapter15 Built-in Cnet Communication
Sequenc Setting
Setting method
e process
System
diagnostic
s
1
1. Connect to XG5000 on the client side and select Online ->Communiation Module Settings ->System
Diagnostics , or click the icon( ).
2. Click on the module, press the right mouse button and click the frame monitor.
Frame
monitor
2
15-137
Chapter15 Built-in Cnet Communication
1) Client-side settings
Basic unit XGI-CPUUN
Communication XGL-CH2B(Slot No. 2)
module
Communication RS-485
type
Communication 38,400
speed
Data bit 8
Stop bit 1
Parity bit None
Operation cycle 200ms
▶Save 1 word of MW100 on the client side in the word write area M1 on the server side
▶Save 4 words from MW101 on the client side and to M5 in the word write area M2
Write ▶Save MX1 bit value on the client side in the bit write area M20 on the server side
▶Save MX2~MX17 bit value on the client side in the bit write area M21~M36 on the server
side
Operation
▶Save 1 word value of M2 in the read area on the server side in MW160 on the client side
status
▶Save 4 words from M0 of the read area on the server side in MW150 to MW153 on the client
side
Read ▶Save bit values of M10 in the bit read area on the server side in the 1th bit of MX170 on the
client side
▶Save bit values of M10 to M25 in the bit read area on the server side in MX180 to MX195
bits on the client side
15-138
Chapter15 Built-in Cnet Communication
2) Server-side settings
Basic unit XMC-E32C
Communication type Built-in RS-485
Communication speed 38,400
Data bit 8
Stop bit 1
Parity bit None
Station number 1
Bit read P0
Bit write M0
Start address
Word read P0
Word write M0
Setting
Sequence Setting method
process
Connection
settings
1
15-139
Chapter15 Built-in Cnet Communication
Setting
Sequence Setting method
process
Default
settings
3
1. It is created the same as in the setting value on side server side in the built-in communication channel 2.
2. Modbus RTU server is set as operation mode.
Modbus
settings
4
1. Start address of bit read area : MX0 2.Start address of bit write area : MX100
3. Start address of word read area : MW200 4.Start address of word write area : MW300
Writing
parameters
5
15-140
Chapter15 Built-in Cnet Communication
Setting
Sequence Setting method
process
Connection
settings
1
Default
settings
3
1. It is created the same as in the setting value on the client side of the exemplary system in channel 2.
2. Set it to an arbitrary station number (0~255) since the station number setting is meaningless when acting as a
client.
3. Operation mode should always be set to P2P use when operating as a client.
15-141
Chapter15 Built-in Cnet Communication
When the default setting is completed, P2P channel and P2P should be set. The setting method is shown below.
Seque Setting
Setting method
nce process
Communication
module settings
1
P2P channel
2 settings
1.Double click of P2P 02, set the P2P driver of channel 2 to Modbus RTU Client and click OK.
3 1. Double click of P2P 02.
Write operation
settings(1)
▶Save 1 word of MW100 on the client side in the word write area M1 on the server side
1. Channel: Select the channel 2 set as the Modbus RTU client in P2P channel setting.
2. P2P function: Select WRITE to perform the write operation.
3. Start condition: Use special flag F146 to transmit frame every 200㎳.
4. Method, data type: Select Individual or Word for I word.
5. Partner station number: Select station No. 1 on the server side.
7. Settings: Set the read area and storage area and click OK.
1) Read area: Device address of data stored on the client side(MW100)
2) Storage area: Device address of data stored on the server side(0x40001:M1)
* When all settings are completed, the text color of the index changes to black
15-142
Chapter15 Built-in Cnet Communication
Write operation
settings(2)
▶Save 4 words from MW101 on the client side in the word write area from M2 to M5 on the server side
1. Channel, P2P function, start address and partner station number: The same as in the sequence No. 4.
2. Method, data type: Select Continuous, Word since it is continuous 4-word writing.
3. Data size: Enter 4 since it is 4 words.
4. Settings: Set the read area and storage area and then click the OK button.
(1) Read area: Device address of data stored on the client side(MW101)
(2) Storage area: Device address of data to be stored in the server station(0x40002: M2)
Write operation
settings(3)
▶Save MX1 bit value on the client side in the bit write area M20 on the server side
1. Channel, P2P function, start condition, method and partner station number: The same as in the sequence 4.
2. Data type: Select Bit.
3. Settings: Set the read area and storage area and then click the OK button.
(1) Read area: Device area of data stored on the client side(MX1)
(2) Storage area: Device address of data to be stored in the server station (0x00020: M20)
Write operation
settings(4)
▶Save bit values ranging from MX2 to MX17 on the client side in the bit write area from M21 to M36 on the server side
1. Channel, P2P function, start condition and data type: The same as in the sequence No. 6.
2. Method: Select Continuous.
3. Data size: Enter 5.
4. Settings: Set the read area and storage area and then click the OK button.
(1) Read area: Device area of data stored on the client side(MX2)
(2) Storage area: Device address of data to be stored in the server station (0x00020: M21)
15-143
Chapter15 Built-in Cnet Communication
Sequ
Setting process Setting method
ence
Read operation
settings(1)
8
▶Save 1 word value of M2 in the word read area on the server side in MW160 on the client side
1. Channel, start condition, method, data type and partner station number: The same as in the sequence No.4
2. P2P function: Select READ.
3. Settings: Set the read area and storage area and then click the OK button.
(1) Read area: Device area of data stored on the client side(0x30002)
(2) Storage area: Device address of data to be stored in the client (MW160)
Read operation
settings(2)
9
▶Save 4 words from M0 of the read area on the server side in the address from MW150 to MW153 on the client side
1. Channel, function, start condition, method, data type and partner station number: The same as in the sequence
No. 8
2. Method: Select Continuous
3. Settings: Set the read area and storage area and then click the OK button.
(1) Read area: Device area of data stored on the server side(0x30000)
(2) Storage area: Device address of data to be stored in the client (MW150)
Read operation
settings(3)
10
▶Save the bit value of M10 in the bit read area on the server side in the 1th bit of MX170 on the client side
1. Channel, function, start condition, method and partner station number: The same as in the sequence No. 8.
2. Data type: Select Bit.
3. Settings: Set the read area and storage area and then click the OK button.
(1) Read area: Device address of data stored on the server side(0x10010)
(2) Storage area: Device address of data to be stored in the client(MX170)
Read operation
settings(4)
11
▶Save the bit value of M10 in the bit read area from M10 to M25 on the server side in the bit of MX180 to MX195 on
the client side
1. Channel, function, start condition, method and partner station number: The same as in the sequence No. 10.
2. Method: Select Continuous
3. Settings: Set the read area and storage area and then click the OK button.
(1) Read area: Device address of data stored on the server side(0x10010)
(2) Storage area: Device address of data to be stored in the client(MX180)
Seque Setting Setting method
15-144
Chapter15 Built-in Cnet Communication
nce process
Writing
parameters
12
Link Enable
13
1. Select Online ->Communication Module Settings ->Link Enable or click the icon( ).
2. Check the P2P whose setting is completed and click Write..
15-145
Chapter15 Built-in Cnet Communication
System configuration
<client> < server >
user-defined communication
In this example, the Cnet I / F and the external device to communicate by user defined communication are as follows.
Note 1) Latency value is set in RS-422/485 communication and is designed to prevent the frame from being broken when communicating with the other device with slow
response. The set value varies depending on the other device and distance, and the set value generally ranges from 50 to 100ms.
Note 2) Please refer to the user’s manual (http://hynux.com) for details on the communication settings of the temperature controller used in this example.
15-146
Chapter15 Built-in Cnet Communication
The frame structure of PC Link, which is the communication protocol of HANYOUNG temperature controller
used in this example, is as follows.
The frame of the temperature controller is executed as an ASCII string, and the contents of the defined D,I
Register can be read and written. The type of protocol is divided into the STD standard protocol and the SUM
protocol with a checksum added to the standard type. The type of protocol is selected by the parameter of the
temperature controller. The standard protocol is “STD”, and its structure starts with the start character STX(0x02)
and ends with the termination character CR(0x0D) LF(0x0A).
Please refer to the PLC communication example of HANYOUNG NUX (http://hynux.com) for details on the
command and data structure.
station
STX command data error code CR LF
number
0x02 1~99 Check Sum 0x0D 0x0A
[SUM protocol architecture]
This example is when the current value and setting value of the temperature controller are stored in the M
device area of the PLC and the table below shows the frames requesting reading of contiguous areas of
data and the frames responding to requests to read data.
number of start address
frame STX station No. DRS , CR LF
data of D register
Size (Byte) 1 2 3 1 2 4 1 1
[Request frame]
station
frame STX DRS , OK , Data 1 , Data N CR LF
No.
Size
1 2 3 1 2 1 4 1 4 1 1
(Byte)
[Request frame]
•DRS: It is a command to read the consecutive values of D register, and the number of data to be read on the
frame and the start address of D register should be set.
• In the example, the number of data is 2, and 0 is entered as the start address of the current value.
15-147
Chapter15 Built-in Cnet Communication
1. After completing the default settings, double click P2P 01 on the P2P screen.
2. Base and slot are set to 0 in built-in communication. Click OK.
3. Double click P2P channel and select the User Frame Definition in Channel 2
1. Click the User Frame Definition and press the right mouse button.
2. Select Add Group to enter the frame name (DRS) created in the group name and select Transmission in the frame
type.
1. Press the right mouse button in the added DRS group, click Add Frame and add HEAD, TAIL and BODY,
respectively.
2. In this example, test is entered as the name of the BODY.
1. Select the DRS.HEAD tab on the right editor screen and double click the editor window to create the segment
setting screen.
2. Enter the numeric constant that represents the Hex value in ASCII code as a type and 2, which is the Hex value
that means STX, as data in the segment addition.
15-148
Chapter15 Built-in Cnet Communication
1. In the same way, enter the numerical constant that represents the Hex value in ASCII as a type and D,A, which
are Hex values that mean CR and LF, as data in DRS.TAIL.
1. Double click the DRS.test tab and edit the segment as shown below.
2. Create a frame that makes a request to read the data value of two consecutive areas with No. 1 of D register of
the station No. 1 as the start address.
3. When the frame is created through the segment editing by double clicking the editor screen, the size per segment
is 10 or less.
1. The above shows the result of creating the full frame of the data read request frame.
15-149
Chapter15 Built-in Cnet Communication
1. Frame is created in the same way as in the sequence No. 2 of the data read request frame creation, when the
frame type is set to reception.
2. The frame name is DRS_RECE.
1. Press the right mouse button in the added DRS_RECE group, click the Add Frame and add HEAD, TAIL, and
BODY, respectively.
2. In this example, RECE_DRS is entered as the name of the BODY.
3 1. Method on how to create HEAD and TAIL is the same as the sequence No. 4 to 5 of the data read request frame.
1. As set in the operation of [Table15.10.1], the current temperature value should be saved in MB200, and the
temperature setting value in MB210, and therefore the storage area of the 1st and 2nd data should be set.
2. Since the size of data 1 and 2 is 4 byes as identified in the structure of the response frame in the exemplary frame
creation, the type is a fixed size variable, and the size is 4 when entered in the segment.
3. Check the Specify Memory to select the storage area of data.
15-150
Chapter15 Built-in Cnet Communication
1. The above shows the result of creating the full frame of response that receives the data responded by the
temperature controller.
15-151
Chapter15 Built-in Cnet Communication
1. Select Online ->Communication Moduel Settings ->System Diagnostics or click the icon( ).
2. Click the module and click the right mouse button.
3. Click [Frame Monitor] or [Service Status] to check the operation status.
4. If the frame is erroneously written, the message [unknown] is displayed in the processing result.
2 Check the data of device area set through the device monitoring of XG-5000.
15-152
Chapter15 Built-in Cnet Communication
15-153
Chapter15 Built-in Cnet Communication
Checked
Detailed results
contents
CPU
Module
information
Communication
module
information
15-154
Chapter15 Built-in Cnet Communication
Items Contents
Communication module type Indicate the type of the communication module currently being diagnosed.
Indicate the base information of the communication module currently being
Base No. diagnosed.
It is fixed to 0 and displayed in XGB PLC.
Indicate the slot number of the communication module currently being diagnosed.
Slot No.
It is fixed to 0 and displayed in built-in communication
Station No. Station number of the channel used in P2P and dedicated service
Information of the communication type (RS-232C, RS-422) of the corresponding
Connection method
channel
Hardware error status Indicate whether the hardware of the communication module is normal or not.
Hardware version Version of communication module hardware
OS version Indicate the version of the communication module OS
P2P Indicate the P2P communication is enabled/disabled
Whether to download the default communication parameters
System parameter information
Display the error information of default communication parameters
▶ Frame monitor
The frame monitor of XG5000 allows you to check whether the frame transmitted/received through the Cnet I/F
module is normal or not.
Checked
Detailed results
contents
Frame monitor
Basic information Base No. Base position of the communication module being monitored
15-155
Chapter15 Built-in Cnet Communication
15-156
Chapter15 Built-in Cnet Communication
▶ Service status
Checked Detailed results
contents
Dedicated
service
P2P
service
▶ Details by service
15-157
Chapter15 Built-in Cnet Communication
15-158
Chapter15 Built-in Cnet Communication
15-159
Chapter15 Built-in Cnet Communication
0007 Data type error Data other than X,B,W,D and L is received 01rSS1105%MK10
1234 Reserved frame error There is additional content that is not needed 01rSS0105%MW10000
Data type mismatch In the case of individual read/write, all blocks should
1332 01rSS0205%MW1005%MB10
error be requested with respect to the same data type
1432 Data value error Data value cannot be converted to Hex value 01wSS0105%MW10AA%5
15-160
Chapter15 Built-in Cnet Communication
15-161
Chapter15 Built-in Cnet Communication
15.13.3 Troubleshooting
1) Solution when P2P parameter setting error warning occurs when connected to XG5000
Problem Cause Solution
P2P setting error warning when connected to
XG5000
2) If the communication is not done even though P2P setting is completed when operating as a client
Problem Cause Solution
Basic unit is in the stop Connect to XG5000, check operation mode and
state convert Stop to Run
Communication default
Communication setting is completed, Connect to XG5000, select “File->Open from PLC” and
parameter mismatch
but Tx/Rx of LED of CnetI/F does not check the communication default setting of the module
between the client and
blink that acts as client and server
the server
After performing P2P parameter, select the Link-Enable
Link-Enable is not done
of the P2P and execute Write.
3) If the communication type is set to RS-485, and the response frame is missing when operating as a client
Problem Cause Solution
1. Change the P2P start condition of P2P block setting
in consideration of communication time
2. Communication time= Transmission time + reception
time
P2P start condition is • Transmission time= Start condition + basic unit
Frame monitoring after completing faster than Scan time + communication module
the settings of multiple P2P communication time Reaction time + data
parameters in P2P block results in Delivery time
missing response frames • Reception time= Basic unit scan time
+ communication module reaction time
+ data delivery time
Response time of the
1.Increase the latency in the default network setting
communication module
section of XG5000
acting as a server is slow
15-162
Chapter15 Built-in Cnet Communication
4) Solution when transmitting and receiving data that cannot be subject to frame analysis
Problem Cause Solution
1. Execute 1:1 communication with the device acting as a
In a multi-drop connection, server and check whether it is normal
a plurality of servers 2. In case of normal communication between all devices, a
transmit data at the same plurality of servers may transmit data at the same time in a
time multi-drop configuration. Take the Interlock and be sure not
to transmit in this case
Parity bit setting is not Match the parity bit setting between Cnet I/F and device
Transmitting and receiving data matched acting as a server
that cannot be subject to frame
analysis Length of the stop bit is Match the stop bit setting between Cnet I/F and device
not set correctly acting as a server
Communication speed Match the communication speed setting between Cnet I/F
setting is not matched and device acting as a server
In multi-drop, termination Check whether the termination resistor between Cnet I/F
resistance is not set and device acting as a server is installed or not.
5) If it is unclear whether the error is caused by the client or the device operating as a server
Problem Cause Solution
It is unclear whether the 1.Check Cnet I/F module
communication error is caused by - Check the installation status of the module
-
the client or the device acting as a - Check the wiring status
server 2.Check the basic unit status
15-163
Chapter15 Built-in Cnet Communication
15-164
Appendix1 Flag List
A1-1
Appendix1 Flag List
A1-2
Appendix1 Flag List
A1-3
Appendix1 Flag List
A1-4
Appendix1 Flag List
A1-5
Appendix1 Flag List
A1-6
Appendix1 Flag List
A1-7
Appendix1 Flag List
4) Master flag
Variable Type Address Description
_EC_LINKUP_INFO BOOL %FX65600 Link Up/Down Information
_EC_COMM BOOL %FX65601 communication connection status
_EC_COMM_ERR BOOL %FX65602 Communication timeout error
_EC_PDO_ERR_CNT UINT %FW4102 PDO error count
_EC_SLAVE_RDY ARRAY[0..63] OF BOOL %FX65664 Slave ready
_EC_SDO_BUSY ARRAY[0..63] OF BOOL %FX65792 Slave SDO processing Busy
_EC_SDO_ERR ARRAY[0..63] OF BOOL %FX65920 Slave SDO processing error
_EC_LINE_FAIL ARRAY[0..63] OF BOOL %FX66048 Cable disconnection
_EC_MASTER_STATE BYTE %FB8264 Master EtherCAT STATE(1 : Init, 2 : PreOP,
3 : bootstrap, 4 : SafeOP, 8 : OP, 99 : CHG)
_EC_SLAVE_NUM WORD %FW4133 Number of EtherCAT slave connections
_EC_ERR_INFO1 STRING %FB8272 EtherCAT error information 1
_EC_ERR_INFO2 STRING %FB8304 EtherCAT error information 2
_EC_TRANSMITTED_OK UDINT %FD2084 number of frames transmitted
_EC_RECEIVED_OK UDINT %FD2085 number of frames received
_EC_CRCERR_CNT UDINT %FD2086 Receive CRC error frame
_EC_COLLISION_CNT UDINT %FD2087 Number of collision frames
_EC_CARRIER_SENSE_ERR UDINT %FD2088 Carrier sense error
_EC_LINKOFF_CNT UDINT %FD2089 Number of link offs
_EC_OVERSIZE_FRAME UDINT %FD2090 Receiving oversized Frames
_EC_UNDERSIZE_FRAME UDINT %FD2091 Receiving undersized Frames
_EC_JABBER_FRAME UDINT %FD2092 Receive Jabber Frame
_EC_PDO_CUR_TRANSCYCLE UDINT %FD2093 PDO transmission cycle(ns)
_EC_PDO_MAX_TRANSCYCLE UDINT %FD2094 Maximum PDO transmission cycle (ns)
_EC_PDO_MIN_TRANSCYCLE UDINT %FD2095 Minimum PDO transmission cycle (ns)
_EC_PDO_TRANS_JITTER UDINT %FD2096 PDO frame transmission jitter (ns)
_EC_PDO_ERR_CNT_TOTAL UDINT %FD2104 PDO error count(accumulation)
_EC_LOST_FRAME UDINT %FD2105 Frames lost
_EC_PDO_ERR_CNT_MAX UDINT %FD2106 PDO error count (Max)
A1-8
Appendix1 Flag List
A1-9
Appendix1 Flag List
6) NC channel flag
It displays the state of NC channel. NC channel flag is displayed as “_NCyy_...”
(yy indicates the NC channel No.( Decimal))
Variable Type Address Description
_NCyy_Ready BOOL %FX524288 NC Ch. yy NC ready
_NCyy_Warning BOOL %FX524289 NC Ch. yy warning occurrence
_NCyy_Alarm BOOL %FX524290 NC Ch. yy alarm occurrence
_NCyy_ResetStatus BOOL %FX524291 NC Ch. yy reset state
_NCyy_CycStartBegin BOOL %FX524292 NC Ch. yy cycle start begin information
_NCyy_CycStartFinish BOOL %FX524293 NC Ch. yy cycle start finish information
_NCyy_TargetQtyCmpl BOOL %FX524294 NC Ch. yy target quantity reached signal
_NCyy_PrgmNormalCmpl BOOL %FX524295 NC Ch. yy normal completion of program
execution
_NCyy_PwrFailInAuto BOOL %FX524296 NC Ch. yy power failure in automatic operation
_NCyy_ErrorCode WORD %FW32770 NC Ch. yy error code
_NCyy_IPR_HeartBeat UDINT %FD16386 NC Ch. yy IPR HeartBeat
_NCyy_IPR_Run BOOL %FX524384 NC Ch. yy IPR operation state (0:stop,
1:running)
_NCyy_IPR_WaitEoM BOOL %FX524400 NC Ch. yy waiting end of motion state (0: not
waiting, 1:waiting)
_NCyy_IPR_EndOfMot UINT %FW32776 NC Ch. yy end of motion
_NCyy_IPR_AfBufSts UINT %FW32777 NC Ch. yy AutoFIFO buffer state (0: empty,
another: buffer usage)
_NCyy_IPR_ErrorCode UINT %FW32778 NC Ch. yy IPR error code
_NCyy_PA_ErrorCode UINT %FW32779 NC Ch. yy program access error code
_NCyy_IPR_AlarmSts ARRAY[0..4] OF DWORD %FD16390 NC Ch. yy IPR alarm information
_NCyy_CycleStart BOOL %FX524672 NC Ch. yy cycle start state
_NCyy_FeedHold BOOL %FX524673 NC Ch. yy feed hold state
_NCyy_AutoOperation BOOL %FX524674 NC Ch. yy automatic operation state
_NCyy_RetraceMove BOOL %FX524675 NC channel yy Signal to confirm reverse
operation
_NCyy_RapidTrvsOpr BOOL %FX524736 NC Ch. yy rapid traverse operation
_NCyy_CuttingFeedOpr BOOL %FX524737 NC Ch. yy cutting feed operation
_NCyy_ConstSurfSpeed BOOL %FX524738 NC channel yy Signal controlling constant
surface speed
_NCyy_TargetVelocity LREAL %FL8200 NC Ch. yy target velocity (F command value)
_NCyy_CmdVelocity LREAL %FL8201 NC Ch. yy command velocity
_NCyy_TVelOfSpindle LREAL %FL8203 NC Ch. yy spindle target velocity (S command
value)
_NCyy_CVelOfSpindle LREAL %FL8204 NC Ch. yy spindle command velocity
_NCyy_FeedOverride LREAL %FL8206 NC Ch. yy feed override
A1-10
Appendix1 Flag List
A1-11
Appendix1 Flag List
A1-12
Appendix1 Flag List
7) NC channel/axis flag
It displays the state of axis configured on the NC channel. NC channel/axis flag is displayed as “_NCyy_X...”, “NCyy_Y…”
(yy indicates the NC channel No.( Decimal) and X,Y,Z,A,B,C,U,V,W is the assigned axis)
Variable Type Address Description
_NC01X_Ready BOOL %FX532480 NC Ch. 01 axis X ready
_NC01X_Warning BOOL %FX532481 NC Ch. 01 axis X warning occurrence
_NC01X_Alarm BOOL %FX532482 NC Ch. 01 axis X alarm occurrence
_NC01X_ServoOn BOOL %FX532483 NC Ch. 01 axis X servo On/Off
_NC01X_ServoReady BOOL %FX532484 NC Ch. 01 axis X servo ready
_NC01X_ServoAlarm BOOL %FX532485 NC Ch. 01 axis X servo alarm occurrence
_NC01X_OprRdy BOOL %FX532544 NC Ch. 01 axis X operation ready
_NC01X_FeedMode BOOL %FX532552 NC Ch. 01 axis X axis feed mode (0: linear axis, 1:
rotation axis)
_NC01X_LinkedAxNum UINT %FW33285 NC Ch. 01 axis X actual axis number of IPR axis
_NC01X_Busy BOOL %FX532608 NC Ch. 01 axis X busy state
_NC01X_Direction BOOL %FX532609 NC Ch. 01 axis X operation direction
_NC01X_ForwardRun BOOL %FX532610 NC Ch. 01 axis X running to positive direction
_NC01X_ReverseRun BOOL %FX532611 NC Ch. 01 axis X running to negative direction
_NC01X_RapidTraverse BOOL %FX532612 NC Ch. 01 axis X rapid traverse operation
_NC01X_CuttingFeed BOOL %FX532613 NC Ch. 01 axis X cutting feed operation
_NC01X_Homing BOOL %FX532614 NC Ch. 01 axis X homing operation
_NC01X_SpindleRun BOOL %FX532615 NC channel axis 01 X Spindle operation
_NC01X_PosCmpl BOOL %FX532672 NC Ch. 01 axis X positioning completion
_NC01X_Inposition BOOL %FX532673 NC Ch. 01 axis X in-position detection
_NC01X_HomeCmpl BOOL %FX532675 NC Ch. 01 axis X homing completion
_NC01_Mirror BOOL %FX532736 NC channel axis 01 X Signal to confirm Mirror
_NC01X_CmdPosInWC LREAL %FL8325 NC Ch. 01 axis X command position in workpiece
coordinate system
_NC01X_CmdPosInRC LREAL %FL8326 NC Ch. 01 axis X command position in relative
coordinate system
_NC01X_ActualVel LREAL %FL8327 NC Ch. 01 axis X actual current velocity
_NC01X_RemDistance LREAL %FL8329 NC Ch. 01 axis X remaining distance
_NC01X_PosDeviation LREAL %FL8330 NC Ch. 01 axis X servo position deviation (tracking error)
_NC01X_WcOffset LREAL %FL8334 NC Ch. 01 axis X offset value of workpiece coordinate
system
_NC01X_WcBasicOffset LREAL %FL8335 NC Ch. 01 axis X basic offset value of workpiece
coordinate system
_NC01X_WcShiftOffset LREAL %FL8336 NC Ch. 01 axis X shift offset value of workpiece
coordinate system
_NC01X_LocalWcOffset LREAL %FL8337 NC Ch. 01 axis X offset value of local workpiece
coordinate system
A1-13
Appendix1 Flag List
8) SD memory flag
Variable Type Address Description
_SD_Attach BOOL %KX8256 SD attachment state
_SD_Rdy BOOL %KX8257 SD memory ready
_SD_Err BOOL %KX8258 SD memory error
_SD_Init BOOL %KX8259 SD memory initializing state
_SD_Closing BOOL %KX8260 SD memory closing state
_SD_FATErr BOOL %KX8261 File System Error
_SD_AutoLogAct BOOL %KX8262 Act Auto-logging
_SD_Busy BOOL %KX8263 SD memory busy state
_SD_SpaceWarn BOOL %KX8264 SD memory insufficient state
_SD_Detach BOOL %KX8265 SD memory detachment state
_SD_VolTot UDINT %KD259 SD memory storage capacity(GB)
_SD_VolAvail UDINT %KD260 Available storage capacity(KB)
_SD_Ecode WORD %KW522 SD memory error code
_SD_FmtInfo WORD %KW523 SD memory format information
_SD_FmtRun BOOL %KX8368 SD memory format operation state
_SD_FmtDone BOOL %KX8369 SD memory format complete state
_SD_FmtErr BOOL %KX8370 SD memory format fail state
_SD_FmtEcode WORD %KW524 SD memory format error code
_SD_FmtProgress WORD %KW525 SD memory format progress ratio (%)
_SD_AttachCnt WORD %KW526 SD memory attachment count
_SD_DetachCnt WORD %KW527 SD memory detachment count
_SD_AddfuncAct BOOL %KX8640 SD additional function operation state
_SD_AddfuncErr BOOL %KX8641 SD additional function error state
_SD_AddfuncDone BOOL %KX8642 SD additional function complete state
_SD_CmpResult BOOL %KX8643 SD result of comparison
_SD_AddfuncKind WORD %KW541 SD type of additional function
_SD_AddfuncEcode WORD %KW542 SD additional function error code
A1-14
Appendix1 Flag List
A1-15
Appendix1 Flag List
A1-16
Appendix 2 Error Information and measurement
It describes the error information of the motion control module and how to deal with it.
Appendix2-1
Appendix 2 Error Information and measurement
Error code
Error Description Action
Hex Dec
002E 46 EtherCAT parameter error Re-download after modifying parameters
002F 47 NC parameter error Re-download after modifying parameters
0030 48 NC program detection error Re-download after checking the program
Repair and restart the wrong device by referring to the fault detection
0032 50 Significant error detection in external device
flag of the external device (according to the parameter).
Check the main task and cycle flag and re-download after modifying
0038 56 Main task period error the main task program or download by increasing the main task
cycle of the basic parameter.
Check the cycle task and cycle flag and re-download after modifying
0039 57 Cycle task period error the cycle task program or download by increasing the cycle task
cycle of the basic parameter
1) Secure the time for the system service to operate by reducing the
amount of the user program execution within the main task/cycle
task.
003A 58 Task program occupancy excess error
2) Please set the execution cycle of the main task/cycle task in the
basic parameter higher to secure time for the internal service of the
system to operate.
003B 59 Local Ethernet parameter check error Re-download after modifying parameters
Using RTC clock function, resetting and ouccuring repeatly, request
01F5 501 RTC data error
A/S.
Appendix 2-2
Appendix 2 Error Information and measurement
Error code
Error Description Action
Hex Dec
SD Additional Function error code
0001 1 File error(file open failure, CRC error) After creating fie and then in operation.
0002 2 Damaged file (damaging Head, Tail etc.) After creating fie and then in operation.
In case the password set in SD card but it does not exsit in saved
0005 5 No password in file
file. After setting password and then create file.
The password set in PLC does not match with saved on SD card.
0006 6 Password mismatch
Check the password.
Setting MAC address does not match with MAC address of PLC.
0007 7 MAC address mismatch
Check MAC address and reset the address.
000A 10 No saved file There is no saved file on SD card. In operation after creating file.
000B 11 PLC mode is RUN status Check after PLC mode change to STOP.
Appendix2-3
Appendix 2 Error Information and measurement
Appendix 2-4
Appendix 2 Error Information and measurement
Appendix2-5
Appendix 2 Error Information and measurement
Encoder 2 input filter value in the encoder Set encoder 2 input signal in the encoder parameter to
0E1F 3615 Alarm
parameter exceeded the setting range. be between 0 and 6.
Appendix 2-6
Appendix 2 Error Information and measurement
Appendix2-7
Appendix 2 Error Information and measurement
Appendix 2-8
Appendix 2 Error Information and measurement
ESC write command cannot be executed when Change the status of the slave to PreOP, SafeOP, or
0F75 3957 Warning
the slave is in Init state. OP, then execute again.
Appendix2-9
Appendix 2 Error Information and measurement
Appendix 2-10
Appendix 2 Error Information and measurement
Appendix2-11
Appendix 2 Error Information and measurement
Appendix 2-12
Appendix 2 Error Information and measurement
A SuperImposed stop command cannot be Execute the SuperImposed stop operation command
1083 4227 Warning
executed while not operating a SuperImposed. while operating SuperImposed.
Appendix2-13
Appendix 2 Error Information and measurement
Appendix 2-14
Appendix 2 Error Information and measurement
The command cannot be executed because the Execute the command after setting the target speed
target speed setting value of the positioning gear setting value of the positioning gear operation
10D9 4313 Alarm
operation command is smaller than the current command to be higher than the current operation
operation speed or gear operation speed. speed or gear operation speed.
Increase the target speed setting value of the
During the positioning gear operation operation,
positioning gear operation command or execute the
the subordinate axis cannot reach the subordinate
command after adjusting MasterStartDistance so that
10DA 4314 axis synchronous position at the set target speed Alarm
the subordinate axis can move to the subordinate axis
within the time the main axis operates to the main
synchronous position within the time that the main axis
axis synchronous position.
operates to the main axis synchronous position.
Synchronous operation commands (gear, cam, Execute the synchronous operation command (gear,
10DB 4315 Warning
etc.) cannot be executed when the main axis is in cam, etc.) while the main axis is not in homing
Appendix2-15
Appendix 2 Error Information and measurement
Appendix 2-16
Appendix 2 Error Information and measurement
Appendix2-17
Appendix 2 Error Information and measurement
The CmdPosMode setting value of synchronous CmdPosMode only supports a value of 0 (applies
1162 4450 speed control (CSV) operation exceeds the input current position as command position). Execute the Warning
range. command again after setting CmdPosMode to 0.
1170 4464 Part length value is not valid Part length value cannot be set less than 0. Warning
1171 4465 The perimeter value is not valid. The perimeter cannot be set to a value less than 0. Warning
The cutting start position cannot be set to a value
1172 4466 The cutting start position value is not valid. Warning
smaller than 1/4 of the circumference value.
The cutting end position cannot be set smaller than the
1173 4467 The cutting end position value is not valid. Warning
cutting start position or larger than 3/4 of the perimeter.
The value of the speed ratio of the cutting section must
1174 4468 The synchronous speed ratio value is not valid. Warning
be set between 50 and 200.
The value of 0 speed section must be set between 0
1175 4469 The 0 speed section ratio value is not valid. Warning
and 50.
Change the camp profile type value and run the
1176 4470 The cam profile type value is not valid. Warning
command.
1177 4471 The cam point count value is invalid. Change the camp point count and run the command. Warning
Change the cam curve type value and run the
1178 4472 The cam curve type value is not valid. Warning
command.
Change the length of the cutting section or change the
1179 4473 The cutting area is too wide. Warning
speed ratio value of the cutting section and execute
Appendix 2-18
Appendix 2 Error Information and measurement
Master position loop control cannot be Execute/release master position loop control when the
1230 4656 Warning
enabled/disabled based operation. corresponding axis is not in operation.
The P gain input value of the master position loop Enter a value of 0 or more in the P gain of the master
1231 4657 Warning
control function block is negative. position loop control function block.
The I gain input value of the master position loop Enter a value of 0 or more in I gain of the master
1232 4658 Warning
control function block is negative. position loop control function block.
The control output limit value of the master Enter a value of 0 or more in the control output limit
1233 4659 Warning
position loop control function block is negative. value of the master position loop control function block.
The command axis and the connection axis of the Set different axes for the command axis and the
1235 4661 cross-coupled control function block must be connection axis of the cross-coupled control function Warning
different axes. block.
In order to operate cross-coupled control, the In order to drive cross-coupled control, execute master
1236 4662 Warning
master position loop controller must be running. position loop control for the relevant axis first.
Appendix2-19
Appendix 2 Error Information and measurement
The P gain input value of the Cross-coupled Enter a value of 0 or more in the P gain of the Cross-
1237 4663 Warning
control function block is negative. coupled control function block.
Appendix 2-20
Appendix 2 Error Information and measurement
Appendix2-21
Appendix 2 Error Information and measurement
Appendix 2-22
Appendix 2 Error Information and measurement
Appendix2-23
Appendix 2 Error Information and measurement
Linear interpolation operation cannot be executed Execute the command after changing the setting of
2094 8340 when the main axis or sub axis is “allowed” for infinite running repeat of main axis or sub axis to "0: Warning
infinite running repeat. Prohibited".
Execute the command after making the homing state
Circular Interpolation command cannot be
20A0 8352 with the home return command or the current position Warning
executed in undecided homing status.
setting command.
Circular interpolation mode setting value Set the circular interpolation mode to a value between
20A1 8353 Warning
exceeded the range. 0 and 2 (0: auxiliary point, 1: center point, 2: radius).
The circular interpolation pass selection setting Set the circular interpolation pass selection setting
20A2 8354 Warning
value exceeds the range. value between 0 and 1 (0: CW, 1: CCW).
Set radius setting from circular interpolation main axis
The radius setting exceeded the range in the
20A3 8355 operating data for 80% bigger than its half distance of Warning
circular interpolation radius method.
beginning point to end point.
Cannot be operated if circular interpolation start Execute circular interpolation after setting the center
20A4 8356 point =center point (middle point) or center point point (or middle point) to a position different from the Warning
(middle point)= end point. starting point (or end point) in circular interpolation.
Appendix 2-24
Appendix 2 Error Information and measurement
Appendix2-25
Appendix 2 Error Information and measurement
Appendix 2-26
Appendix 2 Error Information and measurement
Appendix2-27
Appendix 2 Error Information and measurement
Appendix 2-28
Appendix 2 Error Information and measurement
Appendix2-29
Appendix 2 Error Information and measurement
Appendix 2-30
Appendix 2 Error Information and measurement
Appendix2-31
Appendix 2 Error Information and measurement
Appendix 2-32
Appendix 2 Error Information and measurement
Appendix2-33
Appendix 2 Error Information and measurement
Appendix 2-34
Appendix 2 Error Information and measurement
Appendix2-35
Appendix 2 Error Information and measurement
Operation cannot be executed due to the Check the NC parameters, and if the settings such as the
3101 12545 Alarm
NC parameters error. data range are abnormal, set them again.
Upper/Lower speed limit of the cutting feed of NC channel
Upper/Lower speed limit of the cutting
parameter set to a values greater than 0. Set the Upper
3102 12546 feed of NC channel parameter exceeded Alarm
speed limit of the cutting feed higher than the lower speed
the range.
limit of the cutting feed.
Set the upper/lower limit cutting speed values of the
The upper/lower limit cutting speed setting
circular milling speed limit in the NC channel parameter to
value of the circular milling speed limit in
3103 12547 a value greater than 0. Set the Upper speed limit of circular Alarm
the NC channel parameter exceeded the
interpolation higher than the lower speed limit of circular
range.exceeded the range.
interpolation.
Set Max. Speed of Spindle at Constant Speed Control
Max/Min Speed of Spindle at Constant
setting of NC channel parameter higher than Min Speed of
3104 12548 Speed Control setting of NC channel Alarm
Spindle at Constant Speed Control setting of NC channel
parameter exceeded the range.
parameter.
NC Channel /axis parameter data is Download the data from XG5000 again, and if it occurs
3200 12800 Warning
abnormal. repeatedly after re-executing, request A/S.
The NC Feed Hold command was Execute the NC Feed Hold command (NC_FeedHold)
executed in a state other than automatic while the NC channel is in automatic operation. If
3310 13072 operation, or the currently executing automatic operation is currently in progress, please check Warning
program block is in a state where NC whether the currently executing program block is in a state
Feed Hold cannot be executed. where Feed Hold is possible.
Feed Hold function was canceled If the Feed Hold function is required, execute the
3311 13073 because reset by NC_Reset or command again in the automatic operating status after the Warning
NC_Emergency command was executed. NC_Reset or NC_Emergency command is finished.
NC_FeedHold command cannot be
Execute the NC command after the NC_Reset or
3312 13074 executed while reset by NC_Reset or Warning
NC_Emergency command is finished.
NC_Emergency command is in progress.
The override factor of the NC rapid Set the VelFactor, AccFactor, and JerkFactor values of the
3320 13088 traverse override command exceeded the override command to 0 or more and execute the override Warning
range. command.
Appendix 2-36
Appendix 2 Error Information and measurement
Rapid Traverse override function was If the Rapid Traverse override function is required, execute
332B 13099 canceled because reset by NC_Reset or the command again after the NC_Reset or Warning
NC_Emergency command was executed. NC_Emergency command is finished.
Appendix2-37
Appendix 2 Error Information and measurement
Appendix 2-38
Appendix 2 Error Information and measurement
Appendix2-39
Appendix 2 Error Information and measurement
Appendix 2-40
Appendix 2 Error Information and measurement
Appendix2-41
Appendix 2 Error Information and measurement
Appendix 2-42
Appendix 2 Error Information and measurement
The position unit or velocity unit setting of For NC operation, set the unit of NC channel configuration
3542 13634 Warning
the NC Y axis is incorrect. axis to mm or deg. Set the speed unit as unit/min.
The position unit or velocity unit setting of For NC operation, set the unit of NC channel configuration
3543 13635 Warning
the NC Z axis is incorrect. axis to mm or deg. Set the speed unit as unit/min.
The position unit or velocity unit setting of For NC operation, set the unit of NC channel configuration
3544 13636 Warning
the NC A axis is incorrect. axis to mm or deg. Set the speed unit as unit/min.
The position unit or velocity unit setting of For NC operation, set the unit of NC channel configuration
3545 13637 Warning
the NC B axis is incorrect. axis to mm or deg. Set the speed unit as unit/min.
The position unit or velocity unit setting of For NC operation, set the unit of NC channel configuration
3546 13638 Warning
the NC C axis is incorrect. axis to mm or deg. Set the speed unit as unit/min.
The position unit or velocity unit setting of For NC operation, set the unit of NC channel configuration
3547 13639 Warning
the NC U axis is incorrect. axis to mm or deg. Set the speed unit as unit/min.
The position unit or velocity unit setting of For NC operation, set the unit of NC channel configuration
3548 13640 Warning
the NC V axis is incorrect. axis to mm or deg. Set the speed unit as unit/min.
The position unit or velocity unit setting of For NC operation, set the unit of NC channel configuration
3549 13641 Warning
the NC W axis is incorrect. axis to mm or deg. Set the speed unit as unit/min.
354A 13642 The position unit or velocity unit setting of For NC operation, set the speed unit of spindle axis to Warning
Appendix2-43
Appendix 2 Error Information and measurement
Appendix 2-44
Appendix 2 Error Information and measurement
Appendix2-45
Appendix 2 Error Information and measurement
The axis setting value of the NC Set axis number to a value between 1 and 10. If the axis
3672 13938 parameter write command exceeded the value is 0, write channel parameters, and if 1 to 10, write Warning
allowable range. NC axis X to NC axis S.
The setting range of the parameter group is 1 to 17 for
The Parameter group setting value of the channel parameters and 1 to 5 for channel/axis
3673 13939 NC parameter write command exceeded parameters. After checking the group number to which the Warning
the allowable range. parameter you want to write belongs, execute the
parameter write command (NC_WriteParameter).
Check whether the parameter number set in the channel
The parameter number set in the parameter or channel/axis parameter group is supported.
3674 13940 parameter group of the NC parameter After checking the group number and parameter number Warning
write command is not supported. to which the parameter you want to write belongs, execute
the parameter write command (NC_WriteParameter).
NC The data set value of the parameter After checking the data setting range of the parameter you
3675 13941 set in the NC parameter write command is want to set, execute the parameter write command Warning
out of range. (NC_WriteParameter) with a value within the range.
When NC axis is operating, writing to “axis When NC axis is not operating, executes writing to to “axis
3676 13942 setting” group parameter item of NC setting” group parameter item of NC channel/axis Warning
channel/axis parameter can be executed. parameter.
Only the Cancel Tool Retract/Recover After specifying Cancel Tool Retract/Recover Mode (0),
Mode (0), Tool Retract Mode (1) or Tool Tool Retract Mode (1), or Tool Recover Mode (2) in the
3690 13968 Warning
Recover Mode (2) commands can be ToolMode input, execute the Tool Retract/Recover
commanded. (NC_ToolMode) command.
Tool Retract cannot be commanded if it is Execute the Tool Recover Mode (2) command after tool
3691 13969 Warning
not in tool Recover mode. Retract is completed in Tool Retract Mode (1).
If the tool Retract operation is not
Execute tool Recover mode (2) command after executing
performed in the tool Retract mode, the
3692 13970 tool Retract operation with JOG operation in tool Retract Warning
tool Recover command cannot be
mode.
commanded.
Block Optional Skip number is out of Set the value to be set for SkipNum from 0 to 9 and
36A0 13984 Warning
range. (0~9) execute the command.
The axis setting value of the manual tool
Set one of the X~Z (1~3) axes in NcAxis and execute the
36B0 14000 correction command exceeded the Warning
command.
allowable range. (X, Y, Z)
The command cannot be executed
because the axis of the manual tool Set the axis set in NcAxis as a configuration axis and
36B1 14001 Warning
correction command is not prepared as a execute the command.
configuration axis.
36B2 14002 The axis of the manual tool correction Assign the axis to the NC axis set in NcAxis and execute Warning
Appendix 2-46
Appendix 2 Error Information and measurement
SrcProgramName program does not Check if the program of SrcProgramName is saved, and
36E1 14049 Warning
exist. enter the program name of the command correctly.
Appendix2-47
Appendix 2 Error Information and measurement
36E3 14051 An error occurred while reading the file. Please check if the status of the saved file is normal. Warning
In the NC rapid traverse command, the After checking the speed limit value of the axis connected
380A 14346 operating speed value of the NC S to the NC S axis, set the rapid traverse speed within the Warning
exceeded the speed limit. range that does not exceed the speed limit.
During NC rapid traverse operation, the in Check the command in position width and the in position
position of the axes of rapid traverse was completion monitoring time of the NC channel parameters
380B 14347 Warning
not completed within the in position among the parameters of the axes connected to the NC
completion monitoring time. axis.
During NC rapid traverse operation, Check the axis in which the error occurred among the NC
automatic operation cannot be continued configuration axes. Check the error occurred in the NC
380C 14348 Alarm
because there is an error among the NC axis from the axis error code number of the NC
configuration axes. channel/axis flag.
3810 14352 In NC feed-per-revolution mode, the Set the speed of cutting feed operation to a non-zero value Warning
Appendix 2-48
Appendix 2 Error Information and measurement
In the NC cutting traverse command, the After checking the speed limit value of the axis connected
3822 14370 operating speed value of the NC Y axis to the NC Y axis, set the cutting traverse speed within the Warning
exceeded the speed limit. range that does not exceed the speed limit.
In the NC cutting traverse command, the After checking the speed limit value of the axis connected
3823 14371 operating speed value of the NC Z axis to the NC Z axis, set the cutting traverse speed within the Warning
exceeded the speed limit. range that does not exceed the speed limit.
In the NC cutting traverse command, the After checking the speed limit value of the axis connected
3824 14372 operating speed value of the NC A axis to the NC A axis, set the cutting traverse speed within the Warning
exceeded the speed limit. range that does not exceed the speed limit.
In the NC cutting traverse command, the After checking the speed limit value of the axis connected
3825 14373 operating speed value of the NC B axis to the NC B axis, set the cutting traverse speed within the Warning
exceeded the speed limit. range that does not exceed the speed limit.
In the NC cutting traverse command, the After checking the speed limit value of the axis connected
3826 14374 operating speed value of the NC C axis to the NC C axis, set the cutting traverse speed within the Warning
exceeded the speed limit. range that does not exceed the speed limit.
In the NC cutting traverse command, the After checking the speed limit value of the axis connected
3827 14375 operating speed value of the NC U axis to the NC U axis, set the cutting traverse speed within the Warning
exceeded the speed limit. range that does not exceed the speed limit.
In the NC cutting traverse command, the After checking the speed limit value of the axis connected
3828 14376 operating speed value of the NC V axis to the NC V axis, set the cutting traverse speed within the Warning
exceeded the speed limit. range that does not exceed the speed limit.
In the NC cutting traverse command, the After checking the speed limit value of the axis connected
3829 14377 operating speed value of the NC W axis to the NC W axis, set the cutting traverse speed within the Warning
exceeded the speed limit. range that does not exceed the speed limit.
In the NC cutting traverse command, the After checking the speed limit value of the axis connected
382A 14378 operating speed value of the NC S axis to the NC S axis, set the cutting traverse speed within the Warning
exceeded the speed limit. range that does not exceed the speed limit.
Appendix2-49
Appendix 2 Error Information and measurement
Appendix 2-50
Appendix 2 Error Information and measurement
If the 'Spindle encoder selection' item of If the 'Spindle encoder selection' item of the axis
the axis parameter is '3: Built-in ENC2', parameter is '3: Built-in ENC2', set the encoder 2 unit =
3876 14454 the setting of the encoder ENC2 is pulse, Encoder 2 maximum value = 2147483647, Warning
incorrect and Orientation operation (M19) Encoder 2 minimum value = -2147483648 and then
cannot be executed. execute the orientation operation command (M19), it.
The reference axis of constant speed Execute the command after setting the 'reference axis for
3880 14464 control is not set. Cannot switch to constant speed control' setting value of the NC channel Warning
constant speed control (G96) mode parameter to a value within the range of '1: X~9: W'.
After checking the 'error block number' among the NC
channel flags, check that there is no program error in the
Interpreter (IPR) Parsing Error - Invalid
3F00 16128 corresponding block. After resetting the NC channel with Alarm
LEX MAIN TABLE configuration
the NC reset command (NC_Reset), execute the
automatic operation again.
After checking the 'error block number' among the NC
channel flags, check that there is no program error in the
Interpreter (IPR) Parsing Error - Undefined
3F01 16129 corresponding block. After resetting the NC channel with Alarm
character exists.
the NC reset command (NC_Reset), execute the
automatic operation again.
After checking the 'error block number' among the NC
Interpreter (IPR) parsing error - the channel flags, check that there is no program error in the
3F02 16130 number has exceeded the maximum corresponding block. After resetting the NC channel with Alarm
buffer. the NC reset command (NC_Reset), execute the
automatic operation again.
After checking the 'error block number' among the NC
Interpreter (IPR) parsing error - tThe channel flags, check that there is no program error in the
3F03 16131 number of LEX tokens exceeds the corresponding block. After resetting the NC channel with Alarm
maximum buffer. the NC reset command (NC_Reset), execute the
automatic operation again.
After checking the 'error block number' among the NC
channel flags, check that there is no program error in the
Interpreter (IPR) parsing error - more than
3F04 16132 corresponding block. After resetting the NC channel with Alarm
one decimal point.
the NC reset command (NC_Reset), execute the
automatic operation again.
After checking the 'error block number' among the NC
Interpreter (IPR) parsing error - the channel flags, check that there is no program error in the
3F05 16133 number of parentheses in the formula corresponding block. After resetting the NC channel with Alarm
does not match. the NC reset command (NC_Reset), execute the
automatic operation again.
After checking the 'error block number' among the NC
channel flags, check that there is no program error in the
Interpreter (IPR) Parsing Error - an invalid
3F06 16134 corresponding block. After resetting the NC channel with Alarm
character exists in the formula.
the NC reset command (NC_Reset), execute the
automatic operation again.
After checking the 'error block number' among the NC
Interpreter (IPR) parsing error - the channel flags, check that there is no program error in the
3F07 16135 Alarm
grammar of the formula is not correct. corresponding block. After resetting the NC channel with
the NC reset command (NC_Reset), execute the
Appendix2-51
Appendix 2 Error Information and measurement
Appendix 2-52
Appendix 2 Error Information and measurement
Appendix2-53
Appendix 2 Error Information and measurement
Appendix 2-54
Appendix 2 Error Information and measurement
Appendix2-55
Appendix 2 Error Information and measurement
Appendix 2-56
Appendix 2 Error Information and measurement
Appendix2-57
Appendix 2 Error Information and measurement
Appendix 2-58
Appendix3 Setting Example
A3-1
Appendix3 Setting Example
Notes
When the installation of servo drive has completed, make sure to check the following points by using dedicated setting TOOL
provided by the servo drive manufacturer; failure to meet the standards requires reset to meet the actual user condition.
1. Power supply
Check if the power connected to servo drive and the allowable power conditions are the same.
(There are instances where no power setting is in parameter depending on the type of servo drive.)
2. The type of motor and encoder(feedback)
Set the parameter according to the type of encoder and motor connected to actual servo drive.)
3. Command position unit setting
If it is possible to set the command position unit by servo drive parameter, make sure to set it by pulse unit (Inc. or Counts), and set
the encoder resolution value per motor rotation according to the bit number of encoder used.
(There are instances where no separate setting item exists depending on the type of servo drive.)
(5) Execute XG5000 and create motion control project by selecting “Project(P) – New Project(N)”.
A3-2
Appendix3 Setting Example
(6) In the figure below, set up Project name, CPU series, CPU type, Program name to create new project.
(7) If you set up as the figure above, the project will be created as follows.
(8) Turn on motion controller and servo driver and connect PC with motion controller through USB or Ethernet cable.
A3-3
Appendix3 Setting Example
(11) If connection is complete, the controller will be shown in ‘Run’ or ‘Stop’ as follows.
(12) If the controller doesn’t become “Online” and keeps “Offline”, check whether the controller is connected cable, is turned on.
A3-4
Appendix3 Setting Example
(13) Check if motion controller is in Stop state. If motion controller is in Run state, change it to Stop state and execute the next steps.
(14) Writing must be executed in the motion controller after setting the servo drive actually connected to the network parameter in order
to execute the connection with servo drive. First, check if the relevant controller is in off-line state to set network parameter. If it is in
on-line state, execute "Online -Disconnect" to change it to off-line state.
(15) Right click on a mouse in the slave parameter of the project tree and select "Add item – Slave-servo drive" in order to add servo
drive to network parameter.
A3-5
Appendix3 Setting Example
(16) When the slave information window comes up, click the“…” button next to the slave name.
(17) Select the servo drive connected first to motion controller in the servo drive selection window and click OK.
A3-6
Appendix3 Setting Example
(18) When the axis number setting is completed, the servo drive added earlier is indicated in slave of EtherCAT parameter.
(19) Execute the servo drive addition in the same way for the other servo drives.
This is the screen to show all the servo drives actually connected to slave parameter are added.
A3-7
Appendix3 Setting Example
(20) After setting the slave, connect the set slave and the axis to be controlled by the motion controller.
The axes are set in the order that the slave is set but the user can arbitrarily assign slaves to the axes.
Select the axis parameters in the project tree, right-click and select "Axis / slave connection" to create the following window. Here
you can assign a slave to the axis. The axis can be set to the set slave and virtual axis
(21) After adding all the EtherCAT salves connected to EtherCAT parameter, execute "Online-Connection” first and execute "Online-
Write" to write EtherCAT parameter in motion controller.
A3-8
Appendix3 Setting Example
(22) When the project writing window comes up, check in the EtherCAT parameter and check OK to execute writing. This is the screen
to show the whole execution process of project writing.
A3-9
Appendix3 Setting Example
(23) Select "Online – Slave - Connect” to execute communication link between motion controller and servo drive.
(24) When the link is completed, the servo drive name of slave parameter is activated to black from gray.
Execute the "View – Display EtherCAT Network" in the menu to check the servo drive connection.
A3-10
Appendix3 Setting Example
Notes
When connecting the network for the first time after the system configuration using motion controller, use "slave auto connection" to
conveniently execute connection to servo drive without setting the EtherCAT slaver.
1. Execute the “Online - slave - auto connection” menu.
2. Popup notification message appears as follows. This is an alert message notifying when executing slave auto connection, the
network parameter set in the current XG5000 and motion controller is initialized and so the servo parameter(SDO parameter) in
XG5000 is. Check the message and click OK.
3. Slave connection message appears, and if the connection is completed normally, completion message is indicated.
A3-11
Appendix3 Setting Example
Notes
4. When executing the “slave auto connection" command, the EtherCAT slave information currently connected to the EtherCAT
parameter slave parameter of XG5000 is automatically registered if the connection command is completed normally.
(25) Read SDO parameter to set operation parameter and SDO parameter of EtherCAT slave.
Select “Online -Read”in the menu and select the item to be read.
A3-12
Appendix3 Setting Example
(26) Following is the reading of servo parameter content of L7NH servo drive. The content of servo parameter can differ depending on
the types of servo drive. Refer to the instruction manuals of each servo drive for details.
A3-13
Appendix3 Setting Example
In order to keep the data after turn on/off the power of slave(servo drive), execute the "Online-Save slave parameter to EEPROM"
command because modifying the parameter in operation of SDO parameter (individual) is only valid when the power is currently on.
Second method is to set all the SDO parameter you want to modify and execute 'Online -Write ' to write the whole SDO parameter
in slave(servo drive) at a time.
A3-14
Appendix3 Setting Example
When writing the whole SDO parameter, "Save SDO parameter to EEPROM" command is automatically executed. Therefore,
you do not need to execute "SDO parameter to EEPROM" separately. Refer to the instruction manual of the relevant slave(servo
drive) because sometimes modified set value is applied after the power is on/off depending on the item of SDO parameter.
(28) When finishing the SDO parameter setting, set the operation parameter of each axis and select the operation parameter of the
relevant axis in "Online-Write " to write in controller.
(29) If you turned off the power of slave(servo drive) and turned it on again in the step (28), execute "Online – Slave - Connect ” again to
connect module and slave(servo drive).
A3-15
Appendix3 Setting Example
(30) After selecting the command axis and turning on the servo of the relevant axis, check if the relevant axis is in servo on state and
check the motor operation by operating the motor using jog or others.
(31) If vibration or noise is generated when motor is operating, adjust the responsibility, inertia ratio, and gain values of servo parameter
and transmit them to servo drive. Use the dedicated setting tool of servo drive for detailed setting such as auto tuning.
A3-16
Appendix3 Setting Example
A3-17
Appendix3 Setting Example
Notes
1. In the case of EtherCAT I/O products, input and output variables can be checked in “Master”-“PDO variable information.
1) After adding EtherCAT I/O (APS-EC-DT32K) to slave parameters, execute “Online (O)-Slave-Connection”.
2) Access input/output variables from “Master”-“PDO variable information”. The output of EtherCAT I/O is assigned to the
output variable (Q) and the input to the input variable (I) and can be checked in the “Device” column. The value of each
variable can be checked or changed in “Monitor Value”.
A3-18
Appendix4 Dimension
Appendix 4 Dimension
XMC-E32A/XMC-E32C
-This figure shows the XMC-E32A. XMC-E32C has same Dimension.
※ The external size of the XMC-E16A, XMC-E08A, XMC-E32C is same as that of the XMC-E32A.
A4-1
Appendix4 Dimension
A4-2
Appendix5 ESC (EtherCAT Slave Controller) Register
A5-1
Appendix5 ESC (EtherCAT Slave Controller) Register
A5-2
Appendix5 ESC (EtherCAT Slave Controller) Register
6. AL Status (0x0130:0x0131)
Bit Description ECAT PDI Reset Value
3:0 Actual State of the Device State Machine: r*/- r/(w) 1
1: Init State
3: Request Bootstrap State
2: Pre-Operational State
4: Safe-Operational State
8: Operational State
4 Error Ind: r*/- r/(w) 0
0: Device is in State as requested or Flag cleared by command
1: Device has not entered requested State or changed State as result of a
local action
5 Device Identification: r*/- r/(w) 0
0: Device Identification not valid
1: Device Identification loaded
15:6 Reserved, write 0 r*/- r/(w) 0
Table 6: Register AL Status (0x0130:0x0131)
A5-3
Appendix5 ESC (EtherCAT Slave Controller) Register
NOTE: AL Status register is only writable from PDI if Device Emulation is off (0x0140.8=0), otherwise AL Status register will reflect AL
Control register values.
* Reading AL Status from ECAT clears ECAT Event Request 0x0210[3].
A5-4
Appendix6 Using EtherCAT Slaves from other companies
Describes how to use the EtherCAT slaves from other companies that is not existed ESI file in XG5000, to XMC-E32A.
For the latest version of ESI file, please contact the manufacturer or distributor of the slaves.
(a) Searching function of EtherCAT slave information (ESI) file (provided by XG5000 4.22 or later version)
After adding the ESI file to the EtherCATXML directory folder (XG5000\EtherCATXML) and restarting the XG5000, it will be
reflected in the ESI library window.
For user's convenience, XG5000 provides the function to open the folder. Perform the ESI file folder search function in the
following order.
1) Execute XG5000
2) Click ‘View’ – ‘ESI library window’ menu to activate the ESI library window.
3) Right-click on a mouse on ESI library window, and click on ‘ESI file folder’ menu.
A6-1
Appendix6 Using EtherCAT Slaves from other companies
(b) Adding function of EtherCAT slave information (ESI) file (provided by XG5000 4.22 or later version)
EtherCAT slave information file In addition to bulk addition of ESI files by folder search, it provides individual ESI file addition
function. ESI files can be added to the ESI library window without having to restart the XG5000.
Perform the ESI file adding function in the following order.
1) Execute XG5000.
2) Click ‘View’ – ‘ESI library window’ menu to activate the ESI library window.
3) Right-click on a mouse on ESI library window, and click on ‘ESI file adding’ menu.
A6-2
Appendix6 Using EtherCAT Slaves from other companies
6) Slave information the selected file is added to the ESI library window.
A6-3
Appendix6 Using EtherCAT Slaves from other companies
(3) Setting of slave supporting MDP (provided by XG5000 4.22 and XMC-E32A OS 1.1 or later
version)
The MDP (Modular Device Profile) is the EtherCAT standard (ETG50001) that defines the configuration data structure of EtherCAT
slave. Slave supporting MDP can be set in ‘EtherCAT parameter – Slave configuration edit window’ of XG5000.
In order to set slave supporting MDP, slave information and module information mounted on slave must be configured
3) In the slave select window, select the slave supporting MDP and click on the OK button.
A6-4
Appendix6 Using EtherCAT Slaves from other companies
5) The Slave is added as the sub item on Project tree (Motion data – EtherCAT parameter – Slave)
A6-5
Appendix6 Using EtherCAT Slaves from other companies
A6-6
Appendix6 Using EtherCAT Slaves from other companies
Note
In addition to manual configuration through user editing, Automatic configuration is provided for connection of slave
supporting MDP and generation of EtherCAT parameter.
Add ESI file of slave supporting MDP on ESI library window, connect XMC-E32A and slave as network, and perform the
function 'Online - EtherCAT Slave - Auto Connect'.
If the automatic configuration does not work normally, please upgrade the product OS. (XMC-E32A OS 1.1 or later
version)
A6-7
Appendix6 Using EtherCAT Slaves from other companies
A6-8
Appendix7 Terms of Cnet Communications
2) Transmission Methods
In consideration of the speed, stability and economical efficiency in binary (0 and 1) data transmission,
transmission methods are divided into the following two methods.
A7-1
Appendix7 Terms of Cnet Communications
3) Asynchronous Communication
This method transmits only 1 character at a time in serial transmission, when the synchronous signal (clock, etc.) is
not transmitted. It sends a character code with a start bit at the beginning of 1 character and end with a stop bit at the
end.
In case of transmitting
※'KOREA'를 전송하는 경우 ‘KOREA’
Direction of transmission
전송 방향
P S P S P S P S P S P S P S
S A E T
S A T
S A T
S A T
S A T
S A T
S A E T
T R O T R T R T R T R T R T R N
O I
T T
A
R
O I
T
A A
R
O I
T
E A
R
O I
T
R A
R
O I
T
O A
R
O I
T
K A
R
O I
T Q
A
R
P P P P P P P
Y
(04H)
T Y T Y T Y T Y T Y T Y
(05H)
T
4) Protocol
It refers to a communication rule defined between the transmission and reception sides of information in advance
to send and receive efficient and reliable information between more than two computers and terminals without errors.
In general, it defines call establishment, connection, structure of message exchange format, retransmission of error
message, circuit inversion procedures, and character synchronization between terminals.
A7-2
Appendix7 Terms of Cnet Communications
6) Node
Node refers to the connection point of data in a network tree structure. In general, a network consists of many nodes.
It is also referred to as station number.
7) Packet
It is a term used in packet switching, which is a method of grouping data that is transmitted over a network into
packets. The packet is a combination of the words “package” and “bucket” and attaches a header that indicates a
destination address (station number, etc.) by separating the transmission data into a predetermined length.
8) Port
It refers to a part of the data processing device that receives or sends data from a remote terminal in data
communication, and it means RS-232C or RS-422 port in Cnet serial communication.
9) RS-232C
It refers to a serial communication standard established by EIA according to the recommendations of CCITT as an
interface for connecting a modem to a terminal or a computer. It is used not only for modem connection but also for
direct connection to null modem. The disadvantages are that the transmission distance is short, and only 1:1
communication is possible, and a standard that overcomes these disadvantages is RS-422, RS-485.
10) RS-422/RS-485
It is one of the serial transmission standards and enables 1:N connection and ensures longer transmission distance
than RS-232C. The difference between the two standards is that RS-422 uses four signal lines: TX(+), TX(-), RX(+)
and RX(-), whereas RS-485 has two signal lines (+) (-) and performs transmission and reception trough the same
signal line. Accordingly, RS-422 implements full-duplex communication and RS-485 implements half-duplex
communication.
A7-3
Appendix7 Terms of Cnet Communications
It refers to a communication method that allows communication in both directions, but not at the same time, and RS-
485 communication method is applicable to this method. Since transmission and reception are made through a single
communication line, it is mainly used in multi-drop communication systems where several stations communicate over a
single signal line. Because it uses one signal line, data may be lost due to data collision when several stations transmit
data simultaneously, thereby ensuring that only one station transmits at a time. The flowing figure shows an example of
the configuration by half-duplex communication. Since each communication station is connected to each other so that it
can transmit and receive through one line, it is possible to communicate between all stations and thus to run multiple
servers
Client
RX TX
RX TX RX TX RX TX RX TX
Slave Slave Slave Slave
12) Full-Duplex Communication
It refers to a communication method that can transmit and receive data in both directions at the same time, and RS-
232C and RS-422 communication methods are applicable to this method. Since the transmission and reception lines
are separated, it can transmit and receive data simultaneously without data collision. The figure shows an example of
the configuration of RS-422 full-duplex communication. Since the transmitting end of the server station and the
receiving end of the client stations are connected to one line, and the transmitting end of the client stations is connected
to the receiving end of the server station, the multi-server function is limited because communication between the client
stations is impossible.
Client
RX TX
RX TX RX TX RX TX RX TX
Slave Slave Slave Slave
A7-4
Appendix8 EtherCAT Diagnostics
XG5000 can confirm frame sizes used by the EtherCAT that the current user added through the following procedure.
XG5000 performs the essential PDO (Process Data Object) examination for each operation mode of drive slaves that is
automatically allocated by connecting with an axis when adding slaves.
A8-1
Appendix8 EtherCAT Diagnostics
If there is no PDO item corresponding to the operation mode set in the PDO setting based on the above-mentioned contents,
the following warning message is output on the screen when adding slaves.
A8-2
Appendix8 EtherCAT Diagnostics
Note
The following is the contents of PDO configuration for each operation mode suggested by the Implementation
Directive for CiA402 Drive Profile
(ETG.6010 D(R) V1.1.0). For PDO configuration for each operation mode, see the contents.
XG5000 has a function to assess ESI files through XSD (XML Schema Definition) files, or structure-defined files of the ESI file.
An assessing item is the relationship between data in a file and consistency of the ESI file structure.
If an error is expected to occur in the ESI file of the assessed device, blue text is displayed on each slave of the ESI library
window.
For assessment of the relevant ESI, select the slave on which the blue text is displayed, right click on the menu and execute
the [ESI File Inspection] menu.
A8-3
Appendix8 EtherCAT Diagnostics
In the result window, you can confirm errors of the ESI file that the device currently assessed belongs to.
A8-4
Appendix8 EtherCAT Diagnostics
XMC provides diagnostic functions of the EtherCAT network that is currently connected through flags and diagnostic functions.
Diagnostic flags provide a function to read the ESC Register through a flag without using the existing ESC Register read
command (LS_READESC).
The operation of diagnostic flags is conducted after the EtherCAT connection is completed through a connection behavior after
manually writing the EtherCAT parameter or conducting EtherCAT slave>>Automatic connection through XG5000.
_SLVxx_InvalidFrameCounterA/B/C/D The count increases if there are errors in frame formats such as Preamble, SFD
and CRC. The whole bit sequence corresponds to the damaged frame.
Errors can occur in frames.
_SLVxx_ForwardedRXErrCounterA/B/C/D Abnormal frames detected through the previous slaves show the received
count.
Note
For more information about a diagnostic flag value, see Appendix 5 ECS Register.
Problems can occur in EtherCAT communication due to various causes such as device failure during EtherCAT communication
and the occurrence of external EMC failure. In such a case, a slave location where a problem occurs can be estimated through a
diagnostic flag.
The following figure shows the case that communication failure occurs because external noise flows into a cable
between slave 1 and slave 2.
A B A B A B
As communication failure occurs due to noise that flows into a cable between slave 1 and slave 2, the value of
A8-5
Appendix8 EtherCAT Diagnostics
SLV02_InvalidFrameCounterA or SLV02_RxErrorCounterA of slave 2 increases. As the frame that an error is detected in slave 2
is conveyed to slave 3, the value of SLV03_ForwardedRxErrCounterA of slave 3 increases. As frames in communication
loopbacked at slave 3 are conveyed to port B of slave 1 and slave 2, each value of SLV01_ForwardedRxErrCounterB and
SLV01_ForwardedRxErrCounterB increases.
Note
If a problem occurs during EtherCAT communication, diagnosis is performed by using a diagnostic flag as follows:
2 Confirm the detected slave and a cable of the slave connected to the front end.
- Confirm if the EtherCAT cable is located close to a power cable or noise sources
- Confirm if our manufactured cable is bad.
- Confirm if the cable shields are proper.
3 Confirm the detected slave and the slave device connected to the front end.
- Confirm if the power is proper.
- Confirm the ground of slaves.
4 Confirm if a problem is related with a specific device by moving the position or exchanging a
device of the detected slave.
A8-6
Appendix8 EtherCAT Diagnostics
XMC provides a monitoring function that can confirm flags to confirm the EtherCAT communication status on the screen through
[Master]-[Diagnostic information].
A8-7
Appendix8 EtherCAT Diagnostics
Users can confirm the CiA 402 Drive Profile mode supported by a slave on the screen of diagnostic information. After selecting a
slave on the screen of diagnostic information, right click and select [Basic information of a slave].
Users can confirm information of the CiA 402 support mode supported by the relevant slave along with Slave name/Revision
information on the slave information window. Users should previously confirm if the PDO configuration is appropriate for an
operation mode to use the supported operation mode.
[Whether to support] displays support modes supported by the current slave and
a cell marked with a white color shows the CiA 402 support mode provided by the EtherCAT master of the current XMC product
family. The [Current operation mode] displays the current value of an operation mode where a slave is operating.
Note
The EtherCAT master of the XMC product family supports VL (Velocity mode), HM (Homing Mode), CSP (Cyclic sync
position mode), CSV (Cyclic sync velocity mode) and CST (Cyclic sync torque mode) among the CiA 402 drive profile
modes.
The EtherCAT slave that supports modes other than them can be used by allocating it to the operating axes.
A8-8
Appendix8 EtherCAT Diagnostics
The function to view the history of EtherCAT slave errors on the screen of diagnostic information is provided. On the screen of
diagnostic information place mouse cursor to the detailed information of slaves, and right click and select the [History of slave
errors] menu. The selected history of slaves is displayed on the screen.
A function to change the status of EtherCAT slaves on the screen of diagnostic information is supported. On the screen of
diagnostic information, place the mouse cursor on the detailed information of slaves, right click and select the [Change the status of
slaves] menu and select the status that the users want to change.
A8-9
Appendix8 EtherCAT Diagnostics
A function to confirm the status of an EtherCAT slave connection on the screen of diagnostic information is supported. On the
screen of diagnostic information, place the mouse cursor on the detailed information of slaves, right click and select the [Status of
slave connection] menu and then, users can confirm the current status of slave connections.
Note
Online diagnostic flags and diagnostic functions are supported on XMC-E32A(C) OS 1.4 and XG5000 4.28 or later.
A8-10
Warranty and Environmental Policy
Warranty
1. Warranty Period
The product you purchased will be guaranteed for 18 months from the date of manufacturing.
2. Scope of Warranty
Any trouble or defect occurring for the above-mentioned period will be partially replaced or repaired. However, please note the
following cases will be excluded from the scope of warranty.
(1) Any trouble attributable to unreasonable condition, environment or handling otherwise specified in the manual,
(2) Any trouble attributable to others’ products,
(3) If the product is modified or repaired in any other place not designated by the company,
(4) Due to unintended purposes
(5) Owing to the reasons unexpected at the level of the contemporary science and technology when delivered.
(6) Not attributable to the company; for instance, natural disasters or fire
3. Since the above warranty is limited to PLC unit only, make sure to use the product considering the safety for system configuration or
applications.
Environmental Policy
LS ELECTRIC Co., Ltd supports and observes the environmental policy as below.
1
Warranty and Environment Policy
2
www.ls-electric.com
Disclaimer of Liability
LS ELECTRIC has reviewed the information in this publication to ensure consistency with the hardware and software described.
However, LS ELECTRIC cannot guarantee full consistency, nor be responsible for any damages or compensation, since variance
cannot be precluded entirely. Please check again the version of this publication before you use the product.
ⓒ LS ELECTRIC Co., Ltd 2015 All Right Reserved. 2024.02