Emotiontek MCU 2 Axis User manual

User’s Manual (2 AXES)

MOTION CONTROLLER MCU
User Manual
( MCU 2Axes Series )
V1.1
Special Note
zThis document is subject to change without prior notice.
zPlease contact us if you find something missing or incorrect in this document.
zYou will get a refund or exchange if there is incorrect collating or missing page.
Emotiontek
M
MC
CU
U
2
2
A
Ax
xi
is
s
C
Co
on
nt
tr
ro
ol
ll
le
er
r
U
Us
se
er
r
M
Ma
an
nu
ua
al
l
1206 Byuksan Digital Valley 5 Cha, 244, Beotkkot-ro Geumcheon-gu, Seoul
Tel : 82-2-2082-5790
Fax: 82-2-2082-4466
http://www.emotiontek.com

MOTION CONTROLLER MCU
(Make sure to read before use)
Be sure to read this document and all relevant auxiliary documents and get familiar with operational guidelines
regarding installation, operation, maintenance and inspection for a proper use of this controller. Don’t forget to
read and familiarize yourself with details on the equipment, safety information and precautions before
proceeding to use it.
This Instruction Manual has used marks, [Danger] and [Warning] to indicate safety warning and precautions
depending on the severity.
Danger:Ifhandledimproperly,theequipmentmaycausesevere
consequences such as personal injury or even death
Warning: If handled improperly, the equipment may cause serious/slight
personal injury or physical damage.
In addition, the events classified into Attention may lead to critical consequences. Therefore, it is required to take
extra care to preserve the instruction manual that comes with the product so that you can read it whenever it is
needed and to make sure to have it delivered to end users.
Safety Precautions

MOTION CONTROLLER MCU
Design Precautions
Danger Reference
Page
Install the safety circuit in this controller so that the equipment can operate in safe
mode when unplanned events such as faulty external power or outage of
controller.
The current for input/output power of this controller is limited.
zIf there is an overload caused by an external source a voltage drop
automatically occurs and the entry of I/O does not work while all outputs
are turned off.
Therefore, it is recommended to design external circuit or apparatus to
make the equipment operate in safe mode.
If there is a faulty output transistor, the output may keep remaining either on or
off. Therefore, when it comes to the output signal which may lead to serious
accidents, design an external circuit or apparatus in order to make the equipment
operate in safe mode.
The IMPULSE noise stems from the power and if the level of noise measured on
the power unit does not meet the requirements of this controller or if there is
noise excessive enough to distort the input voltage waveform, it is required to
install a noise filter or an isolated power transformer on the power input.
If there is a frequent occurrence of short interruption or the equipment is subject
to an unstable power environment it is necessary to use UPS orAVR to stabilize
power supply for the controller.
Warning Reference
Page
Make sure to use the product in a general environment described in manual.
Do not use the product in an environment subject to dust, soot, conductive dust,
corrosive gas, flammable gas, high temperature, condensation, rainstorm,
vibration and shock.
zHarsh conditions described above may cause a variety of negative side
effects, including electric shock, fire , malfunction, product damage or
blazing flame.
Take extra cautions not to let foreign particles or cable debris slip into the
ventilating window of the product when conducting hole machining or wiring
work.
zIt may cause fire, breakdown or malfunction.
Make sure to completely mount connection cable or memory cassette onto the
designated connector.

MOTION CONTROLLER MCU
zPoor connection may cause malfunction.
It is required to install a anti-dust filter if the product is used in a dusty
environment.
Clean the filter using a vacuum cleaner once every month.
Wiring Works
Danger Reference
Page
Make sure to cut off the external power supply before conducting installation,
wiring work etc.
zOtherwise, electric shock or product damage may be incurred.
Make sure to put the terminal cover on the product prior to power supply and
operation upon completion of installation and wiring work. .
zOtherwise, electric shock may be incurred.
Warning Reference
Page
DC power supply of this controller must be connected to the dedicated terminal
as described in the manual.
zIf you mistakenly connect AC power supply into the DC input/output
terminal or input power supply, the MC parts and components may be burnt.
zGetting an external power supply for this controller may cause product
damage.
Make sure to apply type-3 earth grounding on the ground terminal of the
controller using cable longer than 2m.
Do not apply the common earthing under strong electric field.
The input/output signal or telecommunication lines should be installed at
least 100mm away from the high voltage lines or power lines.
Otherwise, incorrect output or malfunction may be incurred.

MOTION CONTROLLER MCU
Precautions in startup and maintenance
Danger Reference
Page
Do not touch the terminal while power supply is plugged in.
You may get electric shock or cause malfunction.
Turn the power off before cleaning or tightening the terminal further.
You may get electric shock, otherwise.
Do not recharge, disassemble, apply heat, put it in fire or perform short-circuit.
It may lead to burst or outbreak of fire.
Make sure to read the manual carefully before you modify the program while in
operation, perform forceful output, or manipulate the controller using various
functions such as RUN or STOP.
Incorrect handling of the product may cause product damage or unplanned
events.
Make sure to get your body earthed if you need to open the controller cover and
touch the inside to prevent static from flowing into the controller.
Warning Reference
Page
Make sure to turn the power off before you detach or attach the controller
memory.
zDetaching it while power supply is connected may cause damage on
controller or memory.
Do not disassemble or remodel the product.
It may cause breakdown, malfunction, or even fire.
Contact the nearest customer care center or sales agency for after-sales services.
Make sure to turn the power off before you detach or attach additional connection
cables.
zOtherwise, breakdown or malfunction may be incurred.
Disposal
Warning Reference
Page
Treat the product as industrial waste when you throw it away.

MOTION CONTROLLER MCU
I. Installation Considerations
①Place the product at least 100mm away from the wall to ensure easy accessibility for
maintenance and ventilation.
②Do not install it in the following installation environment.
-Places with the surrounding temperature beyond the range between 0 and 50℃or
operating panel where high-voltage equipment is installed.
-Places with a strong and direct shock to the main body on a constant basis.
II. Power Wiring
① The input power supply is DC24V (allowable range 24V +/ 10%).
② It is recommended to install a separate captive power supply equipment if the product is
installed in an environment with a frequent change in voltage.
③ Anti-noise measures such as filter installation should be taken against power supply with
excessive noise.
④ Separate the power supply of the main body from the input/output lines of PLC, and power
supply lines from the system.
⑤ The telecommunication input/output lines must be installed separately from the power
supply lines.
III. Grounding
① Apply the dedicated grounding. Conduct type-3 grounding work as illustrated in the
picture below with the grounding cable 2㎟or longer.
② Place the grounding point near the main body and make the length of grounding cable
short.
Con t rol l er
The3rd T
y
p
e Wire
A
)
Excl usi ve Ear th : The best
Anot her Devi ce
Controller
Anot her Devi ce Controller
Anot her Devi ce
B) Excl usi ve Ear th :Good C) Excl usi ve Ear th : Bad
The3rd T
y
p
e Wire The3rd T
y
p
e Wire
[Figure. Grounding methods]
Installation Guideline
Controll
er Controll
er Controll
er
Others Others
Others
Type-3 Grounding Type-3 Grounding Type-3 Grounding
Exclusive Grounding: Exclusive Grounding:
Good Exclusive Grounding:
Bad

- 1 -
Table of Contents
Table of Contents
Chapter 1. About the Product………………………………………………………
3
Chapter 2. Programming
2.1 Types of MC program commands, variables and contacts usable………
2.2 MC program command details……………………………………………………………
2.3 MC program variable details…………………………………………………………
7
12
47
Chapter 3. Homing
3.1 Homing …………………………………………………………………………………………
3.2 Homing parameters…………………………………………………………………………
3.3 Execution of homing ……………………………………………………………………
3.4 Example of a homing………………………………………………………………………
51
51
52
56
Chapter 4. PLC Program
4.1 Types of PLC commands……………………………………………………………………
4.2 Types of application commands related to PLC contacts and motion
4.3 Description of PLC commands…………………………………………………………
4.4 Description of application commands related to PLC contacts………
4.5 Description of PLC motion related application commands………………
57
58
60
69
78
Chapter 5. Parameters
5.1 Types of parameters ………………………………………………………………………
5.2 Description of parameters ……………………………………………………………
103
104
Chapter 6. Connection
6.1 MCU-X………………………………………………………………………………………………
6.2 MCU-A2……………………………………………………………………………………………
6.3 MCU-P2……………………………………………………………………………………………
6.4 MCU-L………………………………………………………………………………………………
6.5 MCU-E………………………………………………………………………………………………
6.6 Wiring diagram………………………………………………………………………………
6.7 External appearance diagram…………………………………………………………
115
116
119
122
124
126
132

- 2 -
Table of Contents
Chapter 7. Operation
7.1 MSW-MCU2(for PC) …………………………………………………………………………
134
Chapter 8. Alarm………………………………………………………………………………
152
Chapter 9. Standard Input/Output Signal
9.1 MC output signal(MC Æ PLC) …………………………………………………………
9.2 MC input signal(PLC Æ MC) …………………………………………………………
9.3
Example of using an MC input/output signal for automatic operation
………
9.4
Example of using an MC input/output signal for manual operation
……………
9.5 Input, output and flag contact memory map……………………………………
9.6 PLC COMMUNICATION INTERFACE…………………………………………………………
9.7 Driver interface……………………………………………………………………………
154
156
162
168
175
181
186

- 3 -
Chapter 1. About the Product
Chapter 1. About the Product
1.1 Overview of the MCU
This can be used for one of the next purposes depending on the slave board combined with the
Main Board.
- for 2 axes servo motor drive by means of analog signal output
- for 2 axes step motor drive by means of pulse signal output
- High-end I/O controller

- 4 -
Chapter 1. About the Product
1.2 Features of the MCU
- Small size: 108mm * 80mm * 26mm
- Simple and easy to use
- Economical subminiature 2-axis motion controller
- Linear and arc interpolation
- Various operation variables(position, velocity, dwell, L variable)
- PLC function
- PLC, Touch panel communication
1.3 Application fields of the MCU
- For transportation and assembly: FEEDER, LOADER/UNLOADER, CONVAYOR
- Industrial device: Packer, semiconductor equipment, machine, cutter, XY TABLE
- Peripheral: Pallet
1.4 Product type name
MCU -
Motion Control Unit
Base B/D Type
X Built-in Main Base,
I/O(2/3)
E Extension base(Ext. Base-I/O)
Function
A2 Analog Output
P2 Pulse Output
L General input/output(Logic I/O)

- 5 -
Chapter 1. About the Product
1.5 General specification
Type name
Item
MCU-
XA2 XP2 XL E EL
Input
power
Input voltage DC 24V(+/- 10%)
Current consumption 150mA 180mA 121mA 77mA 105mA
Operator PC(Win98 or later) Serial communication
program
- -
Communica
tion
RS232 Max. 38400Bps
RS485 Max. 38400Bps, 64 Nodes
Analog
output
Number of channels 2Ch. - - - -
Output voltage -10V ~ +10V
Encoder type Incremental
Differential
Line drive,
Phase A/B/Z
- - - -
Encoder frequency Max. 2.5 MHz - - - -
Pulse
Output
Number of channels - 2Ch.
Output type - Differential
Line Drive
- - -
Output mode - CW/CCW
Pulse/Directi
on
- - -
Output frequency - 1~3.75Mpps - - -
External
separate
encoder
Number of input
channels
1Ch. 2Ch.
Input type Incremental Differential Line
drive, Phase A/B
- -- -
Input frequency Max. 2.5 MHz - - -
Extended
I/O
Cable Length/type Max. 10m 16Pin Flat Cable - -
Communication speed 1.5M Bps - -
No. of maximum
extended I/O
2EA(64(in)/48(out)) - -
I/O
In
pu
t
No. of
contacts
16 22 14 20 32
Input voltage 12V/24V(Min ON: 10V, Max OFF: 5V)
Input current 5mA/24V
Ou
tp
ut
No. of
contacts
11 13 13 14 24
Output voltage 5V / 12V / 24V
Output current Max. 80mA Sink Current
MC
program
No. of possible
registrations
10 EA
Maximum capacity 37.5 kBytes
Operation
variable
Position variable
(P)
100 EA
Speed variable (F) 10 EA
Pause variable (D) 10 EA
L variable (L) 2,000 EA
Program for PC MSW-MCU2
1.6 Use environment
Environment Condition
Ambient temperature 0ºC ~ +45ºC(no freezing)
Ambient humidity 85% RH or less(no dew condensation)
Storage temperature -15ºC ~ +65ºC(no freezing)
Storage humidity 90% RH or less(no dew condensation)
Ambient condition Dust and corrosion free(no gas)
Vibration 0.6G or less

- 6 -
Chapter 1. About the Product
1.7 Caution during installation and use
- When wiring a cable, make sure not to cross to or to be adjacent to noise sources such as AC
power cables, motor power cables, etc.
- When installing this product, allow enough ventilation to the vent. Otherwise, this product
may be over-heated to cause a malfunction.
- When connecting an extended I/O module(MCU-E/EL), wire a flat cable completely, select an ID
number by a dip switch, and then turn on power.
- When connecting this product to a serial port of a PC, do not connect it to other pins but
2(RxD), 3(TxD), 5(GND). This can damage the PC or cause a malfunction of the product.
- When using the RS485 communication, do not connect to other pins but 7(TRxD+), 8(TRxD-),
1(Protocol), 5(GND).
- Use termination resistance(120~220Ω)on both ends of the pin 7(TRxD+) and 8(TRxD-) when
using the RS485 communication.
- When connecting a communication cable, do not connect the RS232/485 Port 5(GND) of this
product to the external F.G.
This product may be electrically shocked seriously.
- When connecting a differential signal line such as an encoder, pulse output, etc., be sure
to use a twisted pair of shield wires.

- 7 -
Chapter 2. MC Programming
Chapter 2. MC Programming
2.1 Types of MC program commands, variables and contacts usable
A) MC program commands can be grouped into 8 categories in large.
(1) Program control related command: Commands for branching, ending, etc. of a program.
(2) Conditional branching related command: Controls program branching via an input/output
condition and an IF condition comparison sentence.
(3) Coordinate setting related command: Commands for resetting coordinate.
(4) Velocity setting related command: Commands for velocity setting.
(5) Movement related command: Commands for motor movement.
(6) Input/output contact related command: Controls execution of input, output and auxiliary
contacts and programs.
(7) Condition comparison related command: Used as a comparison operator for an IF condition
comparison sentence.
(8) Variable manipulation related command: Used as an operator for a variable manipulation
sentence.
B) The variables usable for MC programs can be grouped into 4 categories in large.
(1) P variable: Used to designate 2-dimensional position data.
(2) F variable: Used to designate velocity data.
(3) D(E) variable: Used to designate dwell data.
(4) L variable: Used to designate 2-dimensional position, velocity, time, pulse,
manipulation and comparison data as a variable with multi-purpose functions.
C) The input, output and auxiliary contacts used in MC programs can be grouped into 3
categories in large.
(1) X contact: Used to designate an input contact.
(2) Y contact: Used to designate an output contact.
(3) M contact: Used to designate an auxiliary contact.
Table 2.1 List of MC program commands
Division Command Function Type Example of use
Program
/* Declaration of a program comment /* <comment> /* TEST PROGRAM
LABL Designation of a program branching point block LABL <label name> LABL LB1
GOTO Program Branching command GOTO <label name> GOTO LB1
STOP Program pause command STOP STOP
END Program ending END END
DWL Program pause
DWL <D variable
number(0~9)>
DWL <L variable>
DWL 0
DWL L0
Conditio
nal
branchin
g
IF
Branching of a program and proceeding of the
next command according to the result of a
comparing sentence
IF <condition comparing
sentence> <label name> IF L0 .LE 0 LB1
IN0
Branching of a program if the designated
contact satisfies‘0’, otherwise proceeding of
the next command
IN0 <designated contact>
<label name>
IN0 X0.0 LB1
IN0 Y0.0 LB1
IN0 M0.0 LB1
IN1
Branching of a program if the designated
contact satisfies‘1’, otherwise proceeding of
the next command
IN1 <designated contact>
<label name>
IN1 X0.0 LB1
IN1 Y0.0 LB1
IN1 M0.0 LB1

- 8 -
Chapter 2. MC Programming
Division Command Function Type Example of use
Input/ou
tput
IN0 Execution of programs waiting until the
designated contact signal becomes‘0’
IN0 <input contact>
IN0 <output contact>
IN0 <auxiliary contact>
IN0 X0.0
IN0 Y0.0
IN0 M0.0
IN1 Execution of programs waiting until the
designated contact signal becomes‘1’
IN1 <input contact>
IN1 <output contact>
IN1 <auxiliary contact>
IN1 X0.0
IN1 Y0.0
IN1 M0.0
IIN0
Waiting until the designated input contact
signal becomes‘0’(used to check an input
contact at a high speed)
IIN0 <input contact> IIN0 X0.0
IIN1
Waiting until the designated input contact
signal becomes‘1’(used to check an input
contact at a high speed)
IIN1 <input contact> IIN1 X0.0
OUT0
Outputting‘0’to the designated contact (turn
OFF the designated contact and then execute the
next command)
OUT0 <output contact>
OUT0 <auxiliary contact>
OUT0 Y0.0
OUT0 M0.0
OUT1
Outputting‘1’to the designated contact (turn
ON the designated contact and then execute the
next command)
OUT1 <output contact>
OUT1 <auxiliary contact>
OUT1 Y0.0
OUT1 M0.0
Coordina
te
setting
SET Coordinate system setting(absolute coordinate)
SET <position point>
SET <L variable> <L
variable>
SET P0
SET L0 L1
XSET X-axis coordinate system setup(absolute
coordinate)
XSET <position point>
XSET <L variable> <L
variable>
XSET P0
XSET L0 L1
YSET Y-axis coordinate system setup(absolute
coordinate)
YSET <position point>
YSET <L variable> <L
variable>
YSET P0
YSET L0 L1
SET2 Coordinate system setting(absolute, machine
coordinate)
SET2 <position point>
SET2 <L variable> <L
variable>
SET2 P0
SET2 L0 L1
XSET2 X-axis coordinate system setup(absolute,
machine coordinate)
XSET2 <position point>
XSET2 <L variable> <L
variable>
XSET2 P0
XSET2 L0 L1
YSET2 Y-axis coordinate system setup(absolute,
machine coordinate)
YSET2 <position point>
YSET2 <L variable> <L
variable>
YSET2 P0
YSET2 L0 L1
Velocity
setting
VEL Movement velocity setting command
VEL <F variable number
(0~9)>
VEL <L variable>
VEL 0
VEL L0
XVEL
X-axis movement velocity command (Used for the
X-axis velocity command of the PTP and IPTP
movement command)
XVEL <F variable number
(0~9)>
XVEL <L variable>
XVEL 0
XVEL L0
YVEL
Y-axis movement velocity command (Used for the
Y-axis velocity command of the PTP and IPTP
movement command)
YVEL <F variable number
(0~9)>
YVEL <L variable>
YVEL 0
YVEL L0
A Acceleration time setting command A <D variable number(0~9)>
A <L variable>
A0
A L0
XA
X-axis acceleration time command (Used for the
X-axis acceleration time command of the PTP and
IPTP movement command)
XA <D variable number(0~9)>
XA <L variable>
XA 0
XA L0
YA
Y-axis acceleration time command (Used for the
Y-axis acceleration time command of the PTP and
IPTP movement command)
YA <D variable number(0~9)>
YA <L variable>
YA 0
YA L0
D Deceleration time setting command D <D variable number(0~9)>
D <L variable>
D0
D L0
XD
X-axis deceleration time command (Used for the
X-axis deceleration time command of the PTP and
IPTP movement command)
XD <D variable number(0~9)>
XD <L variable>
XD 0
XD L0
YD
Y-axis deceleration time command (Used for the
Y-axis deceleration time command of the PTP and
IPTP movement command)
YD <D variable number(0~9)>
YD <L variable>
YD 0
YD L0

- 9 -
Chapter 2. MC Programming
Division Command Function Type Example of use
Movement
MOV Move by interpolation from the current position
to the target point, decelerate and then stop
MOV <position point>
MOV <L variable> <L
variable>
MOV P0
MOV L0 L1
IMOV Move by interpolation from the current position
to the increment, decelerate and then stop
IMOV <position point>
IMOV <L variable> <L
variable>
IMOV P0
IMOV L0 L1
PTP
Move individually from the current position to
the target point, decelerate and then
stop(individual velocity)
PTP <position point>
PTP <L variable> <L
variable>
PTP P0
PTP L0 L1
IPTP
Move individually from the current position to
the increment, decelerate and then
stop(individual velocity)
IPTP <position point>
IPTP <L variable> <L
variable>
IPTP P0
IPTP L0 L1
XMOV Move the X-axis only from the current position
to the target point, decelerate and then stop
XMOV <position point>
XMOV <L variable>
XMOV P0
XMOV L0
YMOV Move the Y-axis only from the current position
to the target point, decelerate and then stop
YMOV <position point>
YMOV <L variable>
YMOV P0
YMOV L0
XIMOV Move the X-axis only from the current position
to the increment, decelerate and then stop
XIMOV <position point>
XIMOV <L variable>
XIMOV P0
XIMOV L0
YIMOV Move the Y-axis only from the current position
to the increment, decelerate and then stop
YIMOV <position point>
YIMOV <L variable>
YIMOV P0
YIMOV L0
CW
CW arc interpolation from the current
position(start point) to the target point(end
point)
CW <target point> <radius> CW P0 P1
CW PL0 PL1
CCW
CCW arc interpolation from the current
position(start point) to the target point(end
point)
CCW <target point> <radius> CCW P0 P1
CCW PL0 PL1
ICW
CW arc interpolation from the current
position(start point) to the increment(end
point)
ICW <increment> <radius> ICW P0 P1
ICW PL0 PL1
ICCW
CCW arc interpolation from the current
position(start point) to the increment(end
point)
ICCW <increment> <radius> ICCW P0 P1
ICCW PL0 PL1
PMOV Palletizing movement PMOV <data> <position> PMOV L0 P0
PMOV L0 L10
PCLR Palletizing counter clear PCLR <data> PCLR L0
FOS Pre-execution of the next block
FOS <D variable
number(0~9)>
FOS <L variable>
FOS 0
FOS L0
RET Move to the home RET RET
IF
conditio
n
comparis
on
.EQ Used for the comparison of ‘equal to(=)’in an
IF condition comparing sentence
IF <variable> .EQ
<variable>
<label name>
IF <variable> .EQ <number>
<label name>
IF L0 .EQ L1
LB1
IF L0 .EQ 0 LB1
.LE Used for the comparison of ‘less than or equal
to(<=)’in an IF condition comparing sentence
IF <variable> .LE
<variable>
<label name>
IF <variable> .LE <number>
<label name>
IF L0 .LE L1
LB1
IF L0 .LE 0 LB1
.LT Used for the comparison of ‘less than(<)’in
an IF condition comparing sentence
IF <variable> .LT
<variable>
<label name>
IF <variable> .LT <number>
<label name>
IF L0 .LT L1
LB1
IF L0 .LT 0 LB1
.GE
Used for the comparison of ‘greater than or
equal to(>=)’in an IF condition comparing
sentence
IF <variable> .GE
<variable>
<label name>
IF <variable> .GE <number>
<label name>
IF L0 .GE L1
LB1
IF L0 .GE 0 LB1
.GT Used for the comparison of ‘greater
than(>)’in an IF condition comparing sentence
IF <variable> .GT
<variable>
<label name>
IF <variable> .GT <number>
<label name>
IF L0 .GT L1
LB1
IF L0 .GT 0 LB1

- 10 -
Chapter 2. MC Programming
Division Command Function Type Example of use
.NE Used for the comparison of ‘not equal
to(!=)’in an IF condition comparing sentence
IF <variable> .NE
<variable>
<label name>
IF <variable> .NE <number>
<label name>
IF L0 .NE L1
LB1
IF L0 .NE 0 LB1
Variable
manipula
tion
= Used for the movement of manipulation results
in a variable manipulation sentence
<variable> = <variable>
<variable> = <number>
<variable> = <operation
sentence>
L0 = L1
L0 = 1234
L0 = L0 + 1
+ Used for addition in a variable manipulation
sentence
<variable> + <variable>
<variable> + <number>
<variable> + <operation
sentence>
<operation sentence> +
<operation sentence>
L0 = L1 + L2
L0 = L0 + 1
L0 = L1 + (L2-
1)
(L1*2) + (L2*4)
- Used for subtraction in a variable manipulation
sentence
<variable> - <variable>
<variable> - <number>
<variable> - <operation
sentence>
<operation sentence> -
<operation sentence>
L0 = L1 - L2
L0 = L0 - 1
L0 = L1 - (L2-
1)
(L1*2) - (L2*4)
* Used for multiplication in a variable
manipulation sentence
<variable> * <variable>
<variable> * <number>
<variable> * <operation
sentence>
<operation sentence> *
<operation sentence>
L0 = L1 * L2
L0 = L0 * 2
L0 = L1 * (L2-
1)
(L1+2) *
(L2/4))
/
Used for division in a variable manipulation
sentence
(used to obtain the ‘quotient’ of a division
result)
<variable> / <variable>
<variable> / <number>
<variable> / <operation
sentence>
<operation sentence> /
<operation sentence>
L0 = L1 / L2
L0 = L0 / 100
L0 = L1 / (L2-
1)
(L1*2) / (L2*4)
%
Used for division in a variable manipulation
sentence
(used to obtain the ‘remainder’ of a division
result)
<variable> % <variable>
<variable> % <number>
<variable> % <operation
sentence>
<operation sentence> %
<operation sentence>
L0 = L1 % L2
L0 = L0 % 100
L0 = L1 % (L2-
1)
(L1*2) % (L2*4)
(, )
Used to adjust the priority of operation in a
variable manipulation sentence(available up to
5 nesting)
(handle the operation sentence in the
parenthesis() first)
(((<operation sentence>))) ((L1+2)*(L2-4))

- 11 -
Chapter 2. MC Programming
Table 2.2 List of MC program variable functions
Division Variable Function Amount Example of use
Data
classifica
tion
P variable
Used to designate 2-dimensional position
data
Input range:
-2,147,483,648 ~ 2,147,483,647
P0 ~ P99 MOV P0, IMOV P1, SET2 P99, ..
F variable Used to designate velocity data F0 ~ F9 VEL 0, VEL 1, VEL 2, ~ VEL 9
D(E)
variable
Used to designate dwell data
Used to designate acceleration time data
Used to designate deceleration time data
-------------------------
Used as comparison data in a comparing
condition sentence
Used as manipulation data in a variable
manipulation sentence
Used to designate position data indirectly
D0 ~ D9
(E0 ~ E9)
DWL 0, DWL 1, DWL 2, ~ DWL 9
A0, A1, A2, ~ A9
D0, D1, D2, ~ D9
IF E8 .LT E9 LB1
E0=E8-E9
MOV PE0
L variable
Used to designate position data
Used to designate velocity data
Used to designate dwell data
Used to designate acceleration time data
Used to designate deceleration time data
Used as comparison data in a comparing
condition sentence
Used as manipulation data in a variable
manipulation sentence
Used to designate data indirectly
L0~ L1999
MOV L0 L1,IMOV L0 L1,
SET2 L1998 L1999, ..
VEL L0, VEL L1, ~ VEL L1999
DWL L0, DWL L1, ~ DWL L1999
A L0, A L1, A L2, ~ A L1999
D L0, D L1, D L2, ~ D L1999
IF L0 .LT L1999 LB1
L0=L0-L1999
MOV PL0, MOV LL0 LL1, VEL LL0, ..
Table 2.3 List of MC program contact functions
Division Variable Function Amount Example of use
Contact
classifica
tion
X contact
XP2 Main unit input contact
XA2 Main unit input contact
Extended No.1 unit input contact(MCU-E)
Extended No.1 unit input contact(MCU-L)
Extended No.2 unit input contact(MCU-E)
Extended No.2 unit input contact(MCU-L)
X0.0~X1.5
X0.0~X0.F
X2.0~X3.3
X3.4~X3.F
X4.0~X5.3
X5.4~X5.F
IIN0 X0.0, ~ IIN0 X0.F
IIN1 X0.0, ~ IIN1 X0.F
IN0 X0.0, ~ IN0 X5.F
IN1 X0.0, ~ IN1 X5.F
IN0 X0.0 LB1, ~ IN0 X5.F LB16
IN1 X0.0 AA1, ~ IN1 X5.F AA16
Y contact
XP2 Main unit output contact
XA2 Main unit output contact
Extended No.1 unit output contact(MCU-E)
Extended No.1 unit output contact(MCU-L)
Extended No.2 unit output contact(MCU-E)
Extended No.2 unit output contact(MCU-L)
Y0.0~Y0.C
Y0.0~Y0.A
Y1.0~Y1.D
Y1.E~Y2.7
Y3.0~Y3.D
Y3.E~Y4.7
IN0 Y0.0, ~ IN0 Y4.F
IN1 Y0.0, ~ IN1 Y4.F
IN0 Y0.0 LB1, ~ IN0 Y4.F LB16
IN1 Y0.0 AA1, ~ IN1 Y4.F AA16
OUT0 Y0.0, ~ OUT0 Y4.7
OUT1 Y0.0, ~ OUT1 Y4.7
M contact
Internal auxiliary contact
(used for control interlocked with a PLC
program)
M0.0
~M199.F
IN0 M0.0, ~ IN0 M199.F
IN1 M0.0, ~ IN0 M199.F
IN0 M0.0 LB1,~IN0 M199.F LB16
IN1 M0.0 AA1,~IN1 M199.F AA16
OUT0 M0.0, ~ OUT0 M199.F
OUT1 M0.0, ~ OUT1 M199.F
[Caution] : Do not use an area of M contacts reserved for an MC program contact.
- M50.0 ~ M79.F: MC output (MC PLC) flag contact area
- M80.0 ~ M99.F: MC input (PLC MC) flag contact area

- 12 -
Chapter 2. MC Programming
2.2 MC Program command details
1) LABL
Input type LABL <label name>
Terminology <Label name>: Set the name of a label. Possible up to 7 digits including English and
number.
Related
command GOTO,IF,IN0,IN1
Explanation Set a block to be branched by GOTO,IF,IN0,IN1.
(Note) The label name shall not be the same as a command or variable name.
Example
LABL LB0
…
GOTO LB0
Set a label with a name‘LB0’.
2) GOTO
Input type GOTO <label name>
Terminology <Label name>: Designate the name of a label to branch.
Related
command LABL
Explanation
Command a label to move to a ‘LABELED’ sentence to a set block with an absolute
branch command of program execution.
(Note) Designate the name of a label set by a LABL command, and if the name of the
designated label is not set, then an alarm takes place.
Example
VEL 0
MOV P0
LABL LB0
MOV P1
MOV P2
GOTO LB0
Move to a ‘LABELED’ sentence from a command “GOTO LB0”to“LABL LB0”.
Move to a ‘LABELED’ sentence, repeating commands “MOV P1”and “MOV
P2”.
3) STOP
Input type STOP
Explanation
Command pause of program execution.
The execution of a program stopped by a STOP command is restarted by a START signal.
The START signal is generated by an MSW-MCU2 program, a PLC contact ‘M80.2’, a PLC
command ‘START’, or an external input“X0.6” by parameter reservation.
Example
VEL 0
MOV P0
STOP
MOV P1
“MOV P0” is executed and then stopped, and the next command is
executed by a START signal.
4) END
Input type END
Explanation Command the end of program execution.
Example VEL 0
MOV P0
END
MOV P1
“MOV P0”is executed and then program execution is ended.

- 13 -
Chapter 2. MC Programming
5) DWL
Input type DWL <number> or DWL <L variable>
Terminology <Number>: Set a dwell time from the Dwell(E) Table.(0 ~ 9)
<L variable>: Set a dwell time from the L-VAR Table.(L0 ~ L1999)
Related
variable D variable, L variable
Explanation Program execution stops as much as the set dwell time(unit: msec) for the designated
variable.
Example of
use
DWL 0
DWL L0
Operation stops for the set time of a variable ‘DO’ in the Dwell(E)
Table, and then continues
Operation stops for the set time of a variable ‘L0’ in the L-VAR Table
and then continues.
Example
VEL 0
MOV P0
DWL 0
VEL 1
MOV P1
Fig. 2.1 Time pause function
Pause as much as the DO variable value by a command “DWL 0”.
[Reference: External encoder pause function]
Pause by an external encoder
Parameter P62: Encoder accumulation dwell during automatic operation
P63: Encoder Dwell [M80.5] during dwell
Explanation Setting basic parameter P63 stops program execution as many as the number of set
pulses of the designated variable.
See the Fig.2.2 Pulse pause function.
Setting basic parameter P62 stops program execution as many as the number of set
accumulated pulses of the designated variable.
See the Fig.2.3 Accumulated pulse pause function.
(Note) The time and the pulse pause function cannot be simultaneously used.
Do not set the parameters P62 and P63 simultaneously.
Velocity
Time
F0
F1
Current position P0
p
osition P1 position
Time pause
Table of contents