RC-410

Transcription

RC-410
Instruction Manual
I/O Controller
I/O Master
RC-410
RORZE CORPORATION
Introduction / Features
1-
Table of Contents
5-
Hardware
Specifications, outer shape, wiring,
and installation
7-
Software
Communication Commands
Appendix
47 -
User Program Commands
157 -
Sample programs
190 -
Default Value
200 -
Table of Communication Commands 202 Table of User Program Commands
212 -
Table of Error Codes
216 -
Optional Accessories
218 -
Index
219 -
Be sure to read the following precautions for your safety.
This section describes safety precautions to avoid danger to you or someone else, to avoid damage of your property,
and to use this product safely.
Precautions before using this product
This product is designed to be incorporated into general industrial machinery, and is NOT developed to be used in devices
such as aerospace machines, security equipment, or other safety devices where a failure or malfunction of this product may
directly threaten human lives or health.
Even if you use this product in a general device, make sure that you establish a sufficient level of safety in your device by
incorporating a protection function into your machine and guarantee your products based on safety tests on the whole set.
If you will use this product in devices like the above, please contact us. It should be noted that RORZE will not be
responsible for any damage caused by using a product in such a device without the consent of RORZE.
! WARNING
Ignoring the following warnings may cause a death or a serious injury.
◇Use this product at places where no explosive or flammable stuff exist nearby and no water is splashed on the product.
Otherwise it may cause a fire and/or an injury.
◇Turn off the power before moving or wiring the product. Otherwise you may suffer injuries or electric shocks.
◇Do not forcibly bend, pull, or nip lead wires. Otherwise they may cause an electric shock, fire, and/or failure.
◇Do not use lead wires with their sheath damaged. Otherwise they may cause an electric shock, fire, and/or failure.
◇Make sure that wires are correctly and securely connected at electrical terminals. Otherwise they may cause an electric
shock, fire, and/or failure.
◇Do not touch the internal parts of this product.
◇Do not disassemble or modify this product.
◇ Do not wire or operate a product with wet hands. Otherwise it may causes electric shocks.
◇ Assign a qualified person to transport, install, connect, operate, maintenance, or check this product. Otherwise it may
cause an electrical shock, a fire and/or an injury.
! CAUTION
Ignoring the following cautions may result in personal injuries and/or property damages.
◇Make sure that the delivered product is the one you ordered.
failure.
Installing the wrong product may cause a fire and/or a
Check the following items before turning on the power.
◇The output voltage of the power supply is as described in the specifications.
◇The voltage/current of the input/output terminals conforms to the ratings in the specifications.
◇Input/output terminals are not incorrectly wired or accidentally short-circuited.
◇ The connectors are securely crimped.
◇ When you run a product for the first time, make sure that the operation can be stopped immediately under an emergency
situation.
Ignoring the above cautions may cause a fire and/or a failure.
◇Immediately turn off the power, if you hear an unusual noise. Otherwise it may cause a fire and/or an injury.
◇Do not touch this product when it is in operation, as a malfunction may occur.
◇Do not carry this product by holding its connectors or lead wires. When the product is accidentally dropped, it may
cause a personal injury.
◇Do not place this product in unstable positions. When the product is accidentally dropped, it may cause a personal
injury.
Under some circumstances, ignoring the precaution described in the CAUTION section may also result in a death or a
severe injury.
Follow the above precautions described in both the WARNING and the CAUTION section.
I n tr o d uc ti o n
Thank you for purc hasing a I/O Master RC-410 from RORZE.
In order to use this controller effectively for a long time, please
read this instruction manual thoroughly before use.
If you have any questions regarding this manual, please feel
free to contact us.
I n th i s m a n ua l
This manual describes the specifications, and gives installation,
wiring, and maintenance instructions for the hardware, and it
also describes commands.
The document familiarizes you with the features of this
controller and allows you to get the most out of it.
1
Fe a tu re s
The RC-410 is a I/O controller with 16 general-purpose input/output terminals.
By controlling two axes stepping motor at the same time as using RORZE’s original built-in
oscillator driver. It can control operations such as home-searching, positioning, etc.
The RC-410 is managed in a network that consists of one RC-400 and twisted-pair lines.
The network can extend up to 1.2 km and handle up to 120 units of RC-4xx series
controllers.
Because the system runs as a fully-distributed control system and each component is
small-sized and light-weight, motors and sensors can be placed near the component as
shown in the figure below. Additionally, the amount of wiring is much less because only two
cables (power and signal) are required.
Therefore, a system comprised of the RC-4xx series allows you to:
(1) Start-up the system quickly.
(2) Reduce wire disconnection problems.
(3) Save time in exchanging devices in the case of a problem.
Simple instructions
RS-232C
(115.2kbps max.)
RS-485 (921.6kbps max.)
Long Distance (Distance: 1.2km max.)
Max. Connected Devices: 120 set
Link Master
RC-400
Personal Computer (PC)
Programmable Controller (PLC)
RC-410
I/O Master
RC-420
Generate
Master
RC-420
Generate
Master
RC-410
I/O Master
RD-323MS
Driver
RD-023MS
Driver
RD-323MS
Driver
RD-026MSA
Driver
Motor
Motor
Motor
・
・
・
・
・
・
Motor
A Control
Cluster Unit
A Control
Cluster Unit
A Control
Cluster Unit
A Control
Cluster Unit
Note: T he RC-400 is required to communicate with a PC or programmable controller etc.
2
Simultaneous control for two motor axes
The RC-410 can control the two axes positioning of RORZE motor driver with a built-in
oscillator.
Simultaneous
control
Command
PC etc.
Command
RC-400
RC-410
RORZE motor driver with
a built-in oscillator (No.1)
Stepping motor
(No.1)
RORZE motor driver with
a built-in oscillator (No.2)
Stepping motor
(No.2)
DIN rail compatible
Compact size
Compact (86Wx29.5Hx69D mm)
and light-weight
86mm
Control signal
Easy mounting with a DIN rail compatible
69mm
29.5mm
※Without a DIN rail, it can be mounted
with two screws at opposing corners.
Stand-alone control
By using 6039-step user program,
a motor can be controlled by the
RC-410 alone.
RC-410 can be an
independent controller
with no PC connected.
3
4
Stall detection function
Photo-coupler isolation
An stall sensor can detect a stall
error on a stepping motor.
All of the communication ports and
input/output circuits are isolated by
photo-couplers.
Table of contents
< Hardware >
Specifications, outer shape, wiring, and installation .................... 7
1. Specifications ..................................................................................... 8
2. The names and functions of each part
2. 1 The names of each part ............................................................ 10
2. 2 The functions of each part ........................................................ 11
3. Dimensions ...................................................................................... 15
4. Input/output circuits
4. 1 Pulse input circuit .................................................................... 16
4. 2 Input circuit ............................................................................. 16
4. 3 Output circuit .......................................................................... 17
5. Wiring the system
5. 1 Wiring the power supply ........................................................... 18
5. 2 Wiring the RS-485 port ............................................................. 19
5. 3 Wiring the I/O ports.................................................................. 19
5. 4 Safety measures...................................................................... 21
5. 5 Examples of drivers’ connections in each operation mode ............. 22
6. Wiring connectors
6. 1 Wiring Molex connectors........................................................... 29
6. 2 Wiring MIL connectors .............................................................. 30
7. Installation
7. 1 Environmental requirements ...................................................... 33
7. 2 Mounting space ....................................................................... 34
7. 3 Mounting/Removing ................................................................. 35
8. Start-up
8. 1 Checklist before a test run ........................................................ 37
8. 2 Operation procedures ............................................................... 38
9. Preventive maintenance .................................................................... 39
10. Troubleshooting
10. 1 Flowchart for troubleshooting .................................................... 40
10. 2 How to address a problem ........................................................ 42
< Software >
Communication Commands............................................................. 47
11. About Communication Commands ....................................................... 48
12. Syntax of Communication Commands .................................................. 49
5
13. Motor control functions
13. 1 Operation mode ....................................................................... 52
13. 2 Motor control method................................................................ 56
13. 3 Position pulse.......................................................................... 59
13. 4 Home search ........................................................................... 61
13. 5 Stall detection ......................................................................... 67
13. 6 Status..................................................................................... 69
13. 7 Input/output port ...................................................................... 71
13. 8 Event response........................................................................ 75
14. Description of Communication Commands
14. 1 Interpretation of communication commands ................................. 77
14. 2 0 command ( Home searc h)........................................................ 78
14. 3 1 command ( High speed move) .................................................. 86
14. 4 2 command (Low speed move)................................................... 93
14. 5 3 command (Position pulse) ...................................................... 97
14. 6
14. 7
14. 8
14. 9
14.10
14.11
14.12
14.13
14.14
14.15
5 command (Stop and speed change) ....................................... 106
6 command (Position management) .......................................... 109
9 command (Status) ............................................................... 111
C command (Input/output port) ................................................ 115
D command (Setting an input/output logic) ................................ 128
E command (Setting modes) .................................................... 132
F command (Flas h memory) .................................................... 137
L command (Setting a low step pulse) ....................................... 140
Q command (STALL sensor) .................................................... 142
U command ( User program) .................................................... 146
User Program Commands .............................................................. 157
15. User Program Commands
15. 1 Overview of user program commands ....................................... 158
15. 2 Creating a user program ......................................................... 159
16. Details of User Program Commands .................................................. 168
< Appendix >
17.
18.
19.
20.
21.
22.
23.
6
Sample programs............................................................................ 190
Default Value ................................................................................. 200
Table of Communication Commands .................................................. 202
Table of User Program Commands .................................................... 212
Table of Error Codes ....................................................................... 216
Optional Accessories ....................................................................... 218
Index ............................................................................................ 219
Hardware
Instruction Manual
< Hardware >
Specifications, outer shape,
wiring, and installation
7
1. Specifications
1. Specifications
■ General specifications
Ite ms
Specs
Rated voltage
18-36VDC ( ma ximu m rated voltage: 36V)
Rated current
200mA or less (@ 24VDC)
Allowable power voltage sag 10ms (@ 24VDC)
Operating temperature
Storage temperature
0℃ to +50℃
-20℃ to +70℃
Operating humidity
30 to 85% RH (non-condensing)
Storage humidity
30 to 85% RH (non-condensing)
Noise tolerance
>100MΩ @500VDC (between input/output and power terminals)
>100MΩ @500VDC (between input and output terminals)
500VAC 1 min. (between input/output and power terminals)
500VAC 1 min. (between input and output terminals)
1000Vp-p, Pulse Width = 50ns, 1μs (noise simulator method)
Environment
Free from corrosive gas and reduced dust
Insulation resistance
Withstand voltage
Dimensions
86W x 29.5H x 69D mm (excluding mounting bracket)
Weight
Approx. 120g
■ Performance specifications
Ite ms
Specs
General-purpose input
16 terminals including inputs for motor control.
can accepts interruptions.
Isolated by photo-couplers.
General-purpose output
16 terminals including outputs for motor control.
Open-collector output.
Isolated by photo-couplers.
Control motor
2 motors
Acceleration/deceleration method
Trapezoidal acceleration and deceleration
Stall detection method
STALL sensor
Clock response frequency
200kpps ma ximu m (for each phase)
Manageable position data
-1 billion < position data < +1 billion pulses
The number of pulse positions
2,048 points
User program
Max. 6,039 steps (approx. 2,000 commands) (*1)
Two of them
■ Communication method
Ite ms
Specs
Method
RS-485 asynchronous half-duplex transfer
Max. transfer rate
921.6 kbps
Max. connection distance
(total)
Max. no. of connectable
devices
Communication protocol
Approx. 1.2 k m
120 units
Proprietary protocol
simultaneously)
(able
to
control
multiple
controllers
*1 For details about the steps of a user program, see "15.2.4 Memory area and steps of a user
program".
8
1. Specifications
■ Input specifications
Ite ms
Specs
Type
Photo-coupler isolated (supporting AC input)
Rated input voltage
24VDC ±10%
Rated input current
Approx. 4.5 mA
Common connection
8 points/common (supporting double polarity [±])
■ Output specifications
Ite ms
Specs
Type
Photo-coupler isolated, open-collector output
Rated load voltage
5-24VDC (acceptable range: 4.75-26.4V)
Max. load current
150mA (@ 24 VDC)
Common connection
8 points/common
Max. voltage drop when ON
1.5V (@ 150mA)
9
2. The names and functions of each part
2. The names and functions of each part
2.1 The names of each part
※For details about ① - ⑥, see "2.2 The functions of each part".
DIN rail mount lever
RS-485
Holes for mounting
(Use two M3 screws)
③Status indicator LED
⑤Input port (26 pins)
CD
AB
6789
AB
45
45
6789
H
EF01
23
E F01
23
ID
CD
PWR
RUN
485
IN PORT 1
L
④Body number
10
OUT PORT
⑥Output port (26 pins)
No. 1 Pin
+ - + -
+ -
POWER
No. 1 Pin
①Power input (2 pins)
No. 1 Pin
②RS-485 Port (4 pins)
2. The names and functions of each part
2.2 The functions of each part
(The item numbers shown below correspond to those in "2.1 The names of each part".)
① Power input
Apply a voltage of 18-36VDC.
Use the supplied Molex connector (2 pins) for the connection.
For
information on suitable lead wires and how to wire them to Molex connectors, see "6.1 Wiring Molex
connectors".
Block
Power
Pin No.
2
1
Name
18-36V
0V
② RS-485 port
Connect each RS-485 port with the RC-400 and RC-410 to establish a communication between them.
(Connect '+' terminal to '+' and '-' to '-' of RS-485.)
Use the supplied Molex connector (4 pins) for the connection.
For information on suitable lead wires
and how to wire them to Molex connectors, see "6.1 Wiring Molex connectors".
Block Name
RS-485
Pin No.
4
3
2
1
Name
+
-
+
-
③ Status indicator LED
These three LEDs indicate the power supply status to the RC-410 and operation status of the RC-410
and the communication status of the RS-485 as shown in the table below.
Name
Description
PWR
Turns on when power is supplied.
RUN
Blinks at a certain blink interval when the device works normally.
485
Blinks when data is transferred via the RS-485 channel.
④ Body number
A body number is used to identify and manage each controller when multiple RC-410s and/or other
RC-4xx series controllers are connected in a system.
A body number can be set from 00h-77h, and up to 120 controllers can be handled.
Name
Setting
H
Most significant 4 bits: 0-7
L
Least significant 4 bits: 0-F
Note: ・Do not set a body number to 78h or above.
・Be sure to set the body number before turning on the power,
or otherwise the RC-410 won’t recognize the modification of
the rotary switch for setting.
11
2. The names and functions of each part
⑤ Input port
Pin assignment of input ports varies depending on the following operation modes:
・ Op e ra t io n m o de 0 ‥ ‥ S om e p o r ts a re u s e d t o c on t ro l on e R D - 1 x x d r i v e r a nd o th e r po r ts
ca n be us ed fo r an y pu r p os e.
・ Op e ra t io n m o de 1 ‥ ‥ S om e po r ts a r e us ed to c on t ro l t wo R D - 1 xx d r i ve r s an d o th e r po r ts
ca n be us ed fo r an y pu r p os e.
・ Op e ra t io n m o de 2 ‥ ‥ S om e p o r ts a re u s e d t o c on t ro l on e R D - 3 x x d r i v e r a nd o th e r po r ts
ca n be us ed fo r an y pu r p os e.
・ Op e ra t io n m o d e 3 ‥ ‥ S om e p or ts a re us ed t o c on t ro l t wo R D -3 x x d r i v e r s an d o t he r po r ts
ca n be us ed fo r an y pu r p os e.
・ Op e ra t io n m o d e 4 ‥ ‥ Input/output ports D0 to 15 are used as general purpose input/output
te r m i na ls .
(※ Use the command "EAS" to change an operation mode.
See "13.1 Operation mode" and "14.11 E
command" for details.)
■ Pin assignment of input ports in each operation mode
● Operation mode 0 or 2
Block
Pulse inputs
Motor #1 control inputs/General inputs #0 Motor #2 control inputs/General inputs #1
Pin No.
25
23
21
19
17
15
13
11
9
7
5
3
1
Name
CLK1
E5A
E5A
+COM
ORG
CCWLS
EMS
D7
+COM
D9
D11
D13
D15
Pin No.
26 *1
24
22 *1
20
18
Name
NC
CLK2
NC
+COM
STALL
14 *2
D4/
CWLS GROW
16
Note *1 …… Do not connect anything to NC pins.
12
10
8
6
4
2
D6
+COM
D8
D10
D12
D14
If a lead wire must be inevitably connected to a NC pin, as in
the case of using a flat cable, take care of the open end so that the wire and other signal are not
short-circuited.
*2
…… Pin #14 is assigned to D4 in operation mode 0 and to GROW in mode 2.
(As for other pins, the same pin assignment is applied in both mode 0 and 2.)
● Operation mode 1 or 3
Block
Pulse inputs
Pin No.
25
23
Motor #1 control inputs/General inputs #0 Motor #2 control inputs/General inputs #1
21
19
17
15
13
11
9
7
5
3
1
CCWLS
EMS
D7
+COM
ORG
CCWLS
D13
D15
12
10
8
D6
+COM
STALL
Name
CLK1
E5A
E5A
+COM
ORG
Pin No.
26 *3
24
22 *3
20
18
Name
NC
CLK2
NC
+COM
STALL
Note *3
14 *4
D4/
CWLS GROW
16
…… Do not connect anything to NC pins.
4 *5
D12/
CWLS GROW
6
2
D14
If a lead wire must be inevitably connected to a NC pin, as
in the case of using a flat cable, take care of the open end so that the wire and other signal are not
short-circuited.
*4
*5
…… Pin #14 is assigned to D4 in operation mode 1 and to GROW in mode 3.
…… Pin #4 is assigned to D12 in operation mode 1 and to GROW in mode 3.
(As for other pins, the same pin assignment is applied in both mode 1 and 3.)
● Operation mode 4
Block
Pulse inputs
Motor #1 control inputs/General inputs #0 Motor #2 control inputs/General inputs #1
Pin No.
25
23
21
19
17
15
13
11
9
7
5
3
1
Name
CLK1
E5A
E5A
+COM
D1
D3
D5
D7
+COM
D9
D11
D13
D15
Pin No.
26 *6
24
22 *6
20
18
16
14
12
10
8
6
4
2
Name
NC
CLK2
NC
+COM
D0
D2
D4
D6
+COM
D8
D10
D12
D14
Note *6 …… Do not connect anything to NC pins.
If a lead wire must be inevitably connected to a NC pin, as in
the case of using a flat cable, take care of the open end so that the wire and other signal are not
short-circuited.
12
2. The names and functions of each part
● Abbreviations used in the input port / pin assignment table
Block Name
Name
Description
+5 V output from the built-in isolated power supply
Pulse input for motor #1
Pulse input for motor #2
0 V output from the built-in isolated power supply
No connection (It can’t be used because internal circuit is
being used.)
P5A
CLK1
CLK2
E5A
Pulse inputs
NC
Motor #1 control inputs
+COM(19,20)
/General inputs #0
STALL
ORG
CWLS
CCWLS
GROW
EMS
D0…7
Motor #2 control inputs
+COM(9,10)
/General inputs #1
STALL
ORG
CWLS
CCWLS
GROW
D8…15
Common terminal for motor #1 control inputs and general
inputs #0
Input for STALL sensor of motor #1
Input for Home sensor of motor #1
Input for CW limit sensor of motor #1
Input for CCW limit sensor of motor #1
Input GROW OUT for motor #1
Input for an emergency stop signal
General-purpose input
Common terminal for motor #2 control inputs and general
inputs #1
Input for STALL sensor of motor #2
Input for Home sensor of motor #2
Input for CW limit sensor of motor #2
Input for CCW limit sensor of motor #2
Input GROW OUT for motor #2
General-purpose input
Use an Omron 26-pin MIL connector to connect input ports.
For information on suitable lead wires and how to wire them to MIL connectors, see "6.2.1
Wiring MIL connectors".
⑥ Output port
Pin assignment of output ports varies as shown in the tables below, depending on the following
operation modes (see "⑤ Input port"): For information on how to set an operation mode, see
"13.1 Operation mode" and "14.11 E command".
■ Pin assignment of output ports in each operation mode
● Operation mode 0 or 2
NC *1
Block
Motor #1 control outputs/General outputs #0 Motor #2 control outputs/General outputs #1
Pin No.
Name
25
NC
23
NC
21
NC
19
-COM
CW/CCW
17
Pin No.
Name
26
NC
24
NC
22
NC
20
+COM
18
16
STP/ST SPD H/L
Note *1 …… Do not connect anything to NC pins.
15
D3
13
D5
11
D7
9
-COM
7
D9
5
D11
3
D13
1
D15
14
D4
12
D6
10
+COM
8
D8
6
D10
4
D12
2
D14
If a lead wire must be inevitably connected to a NC pin, as in
the case of using a flat cable, take care of the open end so that the wire and other signal are not
short-circuited.
● Operation mode 1 or 3
NC *2
Block
Motor #1 control outputs/General outputs #0 Motor #2 control outputs/General outputs #1
Pin No.
Name
25
NC
23
NC
21
NC
19
-COM
CW/CCW
17
Pin No.
Name
26
NC
24
NC
22
NC
20
+COM
18
16
STP/ST SPD H/L
Note *2 …… Do not connect anything to NC pins.
15
D3
13
D5
11
D7
9
-COM
CW/CCW
7
5
D11
14
D4
12
D6
10
+COM
8
6
STP/ST SPD H/L
3
D13
1
D15
4
D12
2
D14
If a lead wire must be inevitably connected to a NC pin, as in
the case of using a flat cable, take care of the open end so that the wire and other signal are not
short-circuited.
13
2. The names and functions of each part
● Operation mode 4
NC *3
Block
Motor #1 control outputs/General outputs #0 Motor #2 control outputs/General outputs #1
Pin No.
Name
25
NC
23
NC
21
NC
19
-COM
17
D1
15
D3
13
D5
11
D7
9
-COM
7
D9
5
D11
3
D13
1
D15
Pin No.
Name
26
NC
24
NC
22
NC
20
+COM
18
D0
16
D2
14
D4
12
D6
10
+COM
8
D8
6
D10
4
D12
2
D14
Note *3 …… Do not connect anything to NC pins. If a lead wire must be inevitably connected to a
NC pin, as in the case of using a flat cable, take care of the open end so that the wire
and other signal are not short-circuited.
● Abbreviations used in the table of output pin assignment
Block Name
Name
NC
NC
Motor #1 control outputs +COM(20)
/General outputs #0 -COM(19)
STP/ST
CW/CCW
SPD H/L
D1…7
Motor #2 control outputs +COM(10)
/General outputs #1 -COM(9)
STP/ST
CW/CCW
SPD H/L
D8…15
Description
No connection (It can’t be used because internal circuit is being used.)
Common terminal for motor #1 control outputs and general outputs #0
Common terminal for motor #1 control outputs and general outputs #0
Stops/Starts motor #1 (Rotation stops when off and starts when on)
Specifies the rotation direction of motor #1 (In the CW direction when off
and the CCW when on)
Changes the speed of motor #1 (High speed when off and low when on).
General purpose output
Common terminal for motor #2 control outputs and general outputs #1
Common terminal for motor #2 control outputs and general outputs #1
Stops/Starts motor #2 (Rotation stops when off and starts when on)
Specifies the rotation direction of motor #2 (In the CW direction when off
and the CCW when on)
Changes the speed of motor #2 (High speed when off and low when on).
General-purpose output
Use an Omron 26-pin MIL connector to connect output ports.
For information on suitable lead wires and how to wire them to MIL connectors, see "6.2.1
Wiring MIL connectors".
14
3. Dimensions
3. Dimensions
86
79
L
29.5
OUT PORT
RS-485
5
CD
CD
AB
6789
AB
(mm)
45
6 789
H
E F01
23
EF01
4
23 5
ID
+ - + -
1
PWR
RUN
485
IN PORT
69
62
+ -
POWER
2-φ3.6
15
4. Input/output circuits
4. Input/output circuits
4.1 Pulse input circuit
RC-410 INPORT
RD-1xx/3xx series driver (No.1)
Pulse inputs
CLOCKOUT
26
+
GND
GND
390Ω
Internal
circuit
25
CLK1
Vcc
GND
390Ω
270Ω
Internal
circuit
Internal isolated
power supply
-
Vcc
NC
RD-1xx/3xx series driver (No.2)
24
270Ω 23
21
CLOCKOUT
CLK2
E5A
GND
E5A
4.2 Input circuit
RC-410 INPORT
RC-410 INPORT
Motor #1 control inputs/General inputs #0
Motor #2 control inputs/General inputs #1
24V
COM
10
COM
19
COM Stall detection sensor
9
COM Stall detection sensor
/General input 0
18 STALL/D0
10kΩ
20
Internal
circuit
Internal
circuit
10kΩ
24V
Emergency stop
/General input 5
13 EMS/D5
D6
D14
1
D15
10kΩ
10kΩ
10kΩ
General input 14
11
D7
10kΩ
10kΩ
2
5.1kΩ
General input 7
Internal
circuit
Internal
circuit
D13
General input 13
10kΩ
10kΩ
General input 6
12
Internal
circuit
Internal
circuit
3
5.1kΩ
5.1kΩ
16
4
GROW input
/General input 12
GROW/D12
5.1kΩ
10kΩ
10kΩ
10kΩ
10kΩ
10kΩ
GROW input
/General input 4
14 GROW/D4
5.1kΩ
5.1kΩ
5
CCW limit sensor
/General input 11
CCWLS/D11
5.1kΩ
Internal
circuit
Internal
circuit
10kΩ
CCW limit sensor
/General input 3
15 CCWLS/D3
Internal
circuit
Internal
circuit
5.1kΩ
6
CW limit sensor
/General input 10
CWLS/D10
5.1kΩ
Internal
circuit
Internal
circuit
5.1kΩ
7
Home sensor
/General input 9
ORG/D9
5.1kΩ
Internal
circuit
Internal
circuit
5.1kΩ
CW limit sensor
/General input 2
16 CWLS/D2
Internal
circuit
Internal
circuit
5.1kΩ
/General input 8
STALL/D8
5.1kΩ
Home sensor
/General input 1
17 ORG/D1
10kΩ
5.1kΩ
8
General input 15
5.1kΩ
4. Input/output circuits
4.3 Output circuit
RC-410 OUTPORT
RC-410 OUTPORT
Motor #1 control outputs/General outputs #0
Motor #2 control outputs/General outputs #1
20
+COM
10
+COM
19
-COM
9
-COM
24V
(STP/ST)
/D0
Internal
circuit
Internal
circuit
(Switch CW/CCW)
/General output 1
(CW/CCW)
/D1
17
Internal
circuit
Internal
circuit
18
24V
(STOP/START)
/General output 0
8
(STP/ST)
/D8
7
(Switch CW/CCW)
/General output 9
(CW/CCW)
/D9
(Change speed (H/L))
/General output 10
(SPD H/L)
/D10
(Change speed (H/L))
/General output 2
D5
Internal
circuit
12
D6
Internal
circuit
11
D7
General output 5
4
D12
3
D13
2
D14
Internal
circuit
Internal
circuit
13
General output 4
Internal
circuit
D4
D11
Internal
circuit
Internal
circuit
14
5
Internal
circuit
D3
6
Internal
circuit
Internal
circuit
General output 3
15
Internal
circuit
Internal
circuit
(SPD H/L)
/D2
16
1
D15
General output 11
General output 12
General output 13
General output 6
General output 7
(STOP/START)
/General output 8
General output 14
General output 15
17
5. Wiring the system
5. Wiring the system
5.1 Wiring the power supply
■ Connecting the power supply to the RC-410
Use the supplied Molex connector (2 pin type) to connect the RC-410 to the power supply.
For information on how to wire the Molex connector, see "6.1 W iring Molex connectors".
Note: Use a power supply
that provides a rated
output voltage.
● Suitable Lead W ire (stranded wire)
Size
Cross Section of Conductor
+:18-36VDC
-:0V
0.2-0.75mm 2
AW G24-18
※ See "Power lines" below for details.
■ Power supply
(1) To protect the product from an abnormal voltage gen erated on the power lines, use a n
isolated power supply with a built-in protection circuit.
(2) If no protection circuit is incorporated in the power supply, then insert fuses or other
protection devices into the power lines.
■ Power lines
Use separate power lines for the power of the
RC-410,
input/output
devices,
and
Circuit Breaker
main
Main Circuit
Device
devices as shown in the figure on the right.
Circuit Breaker
(1) Use a closely twisted-pair cable as a
power line and make the cable length as
short as possible to avoid the ill effects of
electric noise.
(2) Use wires as thick as possible (0.5 mm 2 or
AC
DC
Input/Output
Device
Circuit Breaker
AC
DC
RC-410
Isolated DC
power supply
more) to minimize voltage drop.
(3) Do not bind together (+ and -) power lines, main circuit lines (with high-voltage an d
high-current), and input/output signal lines.
away from each other.
18
Place these wires at least 100 mm (4 inches )
5. Wiring the system
5.2 Wiring the RS-485 port
■ Wiring the RS-485 port
Use the supplied Molex connector (4 pin type) to connect the RS-485 port.
For information on how to wire the Molex connector, see "6.1 W iring Molex connectors".
● Suitable Lead W ire (stranded wire)
Size
Cross Section of Conductor
AW G24-18
0.2-0.75mm
2
※ Use shielded, twisted pair wires.
5.3 Wiring the I/O ports
5.3.1 Common precautions for both input and output wiring
(1) Select the thickness of input and output wires in consideration of their current capacity.
(2) Do not bundle the input and output wires together.
These wires should be placed at least 100mm away from a high-voltage or high-current circuit.
Do not place these wires in the sam e duct.
(3) If these wires can not be separated from a main cable or power line, use a shielded wire an d
ground it.
19
5. Wiring the system
5.3.2 Wiring the output ports
● Protection circuit for inductive loads
(1) If an inductive load is connected to an output terminal, connect a protection circuit in
parallel with the load.
(2) If a DC inductive load is connected to an output terminal, connect a diode with the both
ends of the load.
DC inductive load
Diode
[Diode]
Peak inverse voltage :
Output
terminal
Load
RC-410
More than three tim es the load voltage
COM
terminal
Average current:
More than the load current
● Capacitive load
To reduce the effect of using a load with a
Output
terminal
big rush current, connect a protection
circuit as shown in the figure to the right.
Resistor
Load
RC-410
COM
terminal
● Overload protection
RC-410 does not have built-in fuses in its output circuits.
RORZE recommends that you use a n
external fuse for each output circuit to avoid damage to output circuits when a load i s
short-circuited.
shorted.
20
However, devices in the internal circuit may suffer damage when output circuit i s
5. Wiring the system
5.4 Safety measures
5.4.1 Overview
■Precautions in designing a system
A system using a controller may fail to work properly for any of the following reasons:
・The rise and fall tim e in power lines differ in the controller, input/output devices, and motor
circuits.
・A response tim e lag because of voltage interruption.
・Failures in the controller, external power supplies, and/or other devices.
To prevent such malfunctions from causing problems and/or accidents in a system, the following
precautions should be taken:
■Use an interlock circuit on the outside of the controller
If you control contradictory operations, such as a forward and reverse rotation of motors, install
an interlock circuit on the outside of the controller.
■Use an emergency stop circuit on the outside of the controller
A circuit that turns off the power of output devices should be on the outside of the controller.
5.4.2 Power voltage interruption
■ Operation when a voltage interruption occurs
The controller will continue to work normally if the time of a power voltage interruption is les s
than 10ms.
If it is 10ms or more, the operation’s behavior will change dep ending on the input
power voltage and other conditions.
(The controller may behave the same way as in a power reset.)
5.4.3 Power supply and its output protection
■Power supply
Use an isolated power supply with a built-in protection circuit.
If an abnormal voltage is applied
directly to the controller, the internal circuit may be damaged.
If you use a power supply withou t
a built-in protection circuit, use a fuse or other protection device between the power supply an d
the controller.
■Output protection
Use a fuse or other external protection circuit if an exc essive current beyond the rating may flo w
when motors are locked or coils of electromagnetic devices are short-circuited.
21
5. Wiring the system
5.5 Examples of drivers’ connections in each operation mode
RC-410 has five operation modes:
・Operation mode 0 ・・・・ Som e ports are used to control one RD-1xx driver and other ports can be
used for any purpose.
・Operation mode 1 ・・・・ Som e ports are used to control two RD-1xx drivers and other ports can
be used for any purpose.
・Operation mode 2 ・・・・ Som e ports are used to control one RD-3xx driver and other ports can be
used for any purpose.
・Operation mode 3 ・・・・ Som e ports are used to control two RD-3xx drivers and other ports can
be used for any purpose.
・Operation mode 4 ・・・・ Input/output port D0 to 15 are used as gen eral purpose input/output
terminals.
(※ Use the command "EAS" to change an operation mode.
See "13.1 Operation mode" and
"14.11 E command" for details.)
Operation mode 0 and 1 Controlling one or two RD-1xx series drivers
To the adjacent controller
RS-485
RS-485
RS-232C
Driver for motor #1
PC etc.
RC-400
RC-410
In the case of mode 0
Stepping motor #1
Input signals & limit
switches for motor #1
Driver for motor #2
In the case of mode 1
Stepping motor #2
Input signals & limit
switches for motor #2
Operation mode 2 and 3 Controlling one or two RD-3xx series drivers
To the adjacent controller
RS-485
RS-485
RS-232C
Driver for motor #1
PC etc.
RC-400
RC-410
In the case of mode 2
Driver for motor #2
In the case of mode 3
Operation mode 4
Stepping motor #1
Input signals & limit
switches for motor #1
Stepping motor #2
Input signals & limit
switches for motor #2
All of the I/O ports are used as general purpose ports
RS-485
RS-485
To the adjacent controller
General Input D0-15
RS-232C
PC etc.
22
RC-400
RC-410
General Output D0-15
5. Wiring the system
5.5.1 Wiring the power and communication line
The figure below illustrates how to connect a PC, a RC-400, RC-410s, and power supplies.
The following pins must be connected
to communicate successfully.
RTS
CTS
Short
DSR
DTR
Short
RS-232C port on a PC
TXD
RTS
RXD
CTS
SG
DTR
25
DSR
9
NEC PC-98xx compatible
25 Pin D-Sub (male)
13
5
DTR
TXD
SG
CTS
RTS
6
DSR
1
RXD
IBM PC/AT compatible
9 pin D-Sub (female)
1
14
PC
DC
18-36V
-
+
2
1
+
-
Twisted
RS-485
DC
18-36V
-
Tx
POWER RS-232C Rx
G
RC-400
+
+
-
3
2
1
4
3
2
1
+
2
1
Twisted
+
-
To TX on RC-400
To RX on RC-400
To G on RC-400
Carbon film resistor
100Ω(1/4W)
(※1)
Shielded and
Twisted wire pair
POWER
RS-485
RC-410
+
+
-
4
3
2
1
Shielded and
Twisted wire pair
I/O ports
・
・
・
・
・
2
1
Connectable to up to 120
RC-4xx series controllers
+
-
POWER
RS-485
RC-4XX
+
+
-
4
3
2
1
+
+
-
4
3
2
1
I/O ports
2
1
+
-
POWER
RS-485
RC-4XX
Carbon film resistor
100Ω(1/4W)
(※1)
I/O ports
(※1)
Please connect 100Ω resistor to the end of the RS-485 line.
23
5. Wiring the system
5.5.2 Wiring stepping motor drivers (operation mode: 0 or 1)
( 1 ) O p e r a t i o n m o de 0
S o m e p o r ts a r e u s e d t o c o n t r o l a R D - 1 x x d r i v e r ( s h o w n a s No . 1 i n t h e f i g u r e b e l o w )
a n d o t h e r p o r ts c a n b e u s e d f o r a n y p u r p o s e .
( 2 ) O p e r a t i o n m o de 1
S o m e p o r ts a r e u s e d t o c o n t r o l t w o R D - 1 x x d r i v e r s ( s h o w n a s No . 1 a n d N o . 2 i n t h e
f i g u r e b e l o w) a n d o t h e r p o r t s c a n b e u s e d f o r a n y p u r p o s e .
RORZE RD-1xx
series driver (No. 1)
RORZE controller
RC-410
INPORT
Pulse input
Internal
circuit
Internal isolated
power supply
Vcc
GND
390Ω
+
CLOCKOUT
25 CLK1
270Ω
-
GND
23 E5A
Internal
circuit
10kΩ
INPORT
Inputs for motor #1 control
20 COM
19 COM
18 STALL
24V
Stall detection sensor
Internal
circuit
10kΩ
5.1kΩ
Home sensor
17 ORG
Internal
circuit
10kΩ
5.1kΩ
16 CWLS
CW limit sensor
Internal
circuit
10kΩ
5.1kΩ
15 CCWLS
CCW limit sensor
Internal
circuit
10kΩ
5.1kΩ
14 D4
Internal
circuit
10kΩ
5.1kΩ
13 EMS
Emergency stop
5.1kΩ
OUTPORT
Outputs for motor #1 control
20 +COM
24V
GND
19 -COM
Internal
circuit
Internal
circuit
17 CW/CCW
CW/CCW
Internal
circuit
STOP/START
18 STP/ST
16 SPD H/L
SPEED C
SPEED D
Connection diagram for the 1st driver (used in both mode 0 and 1)
24
5. Wiring the system
RORZE RD-1xx
series driver (No. 2)
RORZE controller
RC-410
INPORT
Pulse input
Internal
circuit
Internal isolated
power supply
Vcc
GND
390Ω
+
CLOCKOUT
24 CLK2
270Ω
GND
21 E5A
-
Internal
circuit
10kΩ
INPORT
Inputs for motor #2 control
10 COM
9 COM
8
STALL
7
ORG
24V
Stall detection sensor
Internal
circuit
10kΩ
5.1kΩ
Home sensor
Internal
circuit
10kΩ
5.1kΩ
6 CWLS
CW limit sensor
Internal
circuit
10kΩ
5.1kΩ
5 CCWLS
CCW limit sensor
Internal
circuit
10kΩ
5.1kΩ
4
D12
Internal
circuit
10kΩ
5.1kΩ
3 D13
5.1kΩ
OUTPORT
Outputs for motor #2 control
10 +COM
24V
GND
9 -COM
Internal
circuit
STP/ST
Internal
circuit
7
CW/CCW
CW/CCW
Internal
circuit
STOP/START
8
6
SPD H/L
SPEED C
SPEED D
Connection diagram for the 2nd driver (used in mode 1 only)
25
5. Wiring the system
5.5.3 Wiring stepping motor drivers (operation mode: 2 or 3)
(1) Operation mode 2
Som e ports are used to control a RD-3xx driver (shown as No. 1 in the figure below) and other
ports can be used for any purpose.
(2) Operation mode 3
Som e ports are used to control two RD-3xx drivers (shown as No. 1 and No. 2 in the figur e
below) and other ports can be used for any purpose.
RORZE RD-3xx
series driver (No. 1)
RORZE controller
RC-410
INPORT
Pulse input
Internal
circuit
Internal isolated
power supply
Vcc
GND
390Ω
+
CLOCKOUT
25 CLK1
270Ω
-
GND
23 E5A
Internal
circuit
10kΩ
INPORT
Inputs for motor #1 control
20 COM
19 COM
18 STALL
24V
Stall detection sensor
Internal
circuit
10kΩ
5.1kΩ
Home sensor
17 ORG
Internal
circuit
10kΩ
5.1kΩ
16 CWLS
CW limit sensor
Internal
circuit
10kΩ
5.1kΩ
15 CCWLS
CCW limit sensor
Internal
circuit
10kΩ
5.1kΩ
GROWOUT
14 GROW
Internal
circuit
10kΩ
5.1kΩ
13 EMS
Emergency stop
5.1kΩ
OUTPORT
Outputs for motor #1 control
20 +COM
Internal
circuit
18 STP/ST
Internal
circuit
17 CW/CCW
Internal
circuit
16 SPD H/L
24V
GND
19 -COM
STOP/START
CW/CCW
(※1)
VR DC
SPEED
GND(VR GND)
Note: The connection ※1 may be omitted.
Connection diagram for the 1st driver (used in both mode 2 and 3)
26
5. Wiring the system
RORZE RD-3xx
RORZE controller
series driver (No. 2)
RC-410
INPORT
Pulse input
Internal
circuit
Internal isolated
power supply
Vcc
GND
390Ω
+
CLOCKOUT
24 CLK2
270Ω
GND
21 E5A
-
Internal
circuit
10kΩ
INPORT
Inputs for motor #2 control
10 COM
9 COM
8
STALL
7
ORG
24V
Stall detection sensor
Internal
circuit
10kΩ
5.1kΩ
Home sensor
Internal
circuit
10kΩ
5.1kΩ
6 CWLS
CW limit sensor
Internal
circuit
10kΩ
5.1kΩ
5 CCWLS
CCW limit sensor
Internal
circuit
10kΩ
5.1kΩ
4
GROWOUT
GROW
Internal
circuit
10kΩ
5.1kΩ
3 D13
5.1kΩ
OUTPORT
Outputs for motor #2 control
10 +COM
24V
GND
9 -COM
Internal
circuit
8
STP/ST
Internal
circuit
7
CW/CCW
Internal
circuit
6
STOP/START
CW/CCW
(※1)
VR DC
SPD H/L
SPEED
GND(VR GND)
Note: The connection ※1 may be omitted.
Connection diagram for the 2nd driver (used in mode 3 only)
27
5. Wiring the system
5.5.4 Wiring when all of the ports are used as general purpose I/Os (in
operation mode 4)
Input/output ports D0-15 are used as general purpose I/Os.
Electric parts such as sensors, solenoid valves, or relays can be connected to I/O ports a s
need ed.
RC-410 INPORT
RC-410 OUTPORT
(General input 0)
19
COM
18
D0
(General output 0)
20
+COM
19
-COM
24V
General output 0
General input 0
General input 1
18
D0
Internal
circuit
COM
Internal
circuit
Internal
circuit
10kΩ
24V
20
17
D1
5.1kΩ
Internal
circuit
10kΩ
General output 1
17
D1
5.1kΩ
・
・
・
・
・
・
・
General input 7
D6
General output 6
12
D6
Internal
circuit
12
General input 6
・
・
・
・
・
・
・
・
・
・
・
・
Internal
circuit
Internal
circuit
10kΩ
・
・
・
・
・
11
D7
10
+COM
9
-COM
5.1kΩ
Internal
circuit
10kΩ
General output 7
11
D7
10
COM
9
COM
8
D8
5.1kΩ
24V
(General output 1)
24V
General output 8
General input 9
8
D8
Internal
circuit
General input 8
Internal
circuit
Internal
circuit
10kΩ
(General input 1)
7
D9
5.1kΩ
Internal
circuit
10kΩ
General output 9
7
D9
5.1kΩ
・
・
・
・
・
・
・
General input 15
D14
2
General output 14
D14
Internal
circuit
2
General input 14
・
・
・
・
・
・
・
・
・
・
・
・
Internal
circuit
Internal
circuit
10kΩ
・
・
・
・
・
1
D15
5.1kΩ
Internal
circuit
10kΩ
General output 15
5.1kΩ
28
1
D15
6. Wiring connectors
6. Wiring connectors
6.1 Wiring Molex connectors
■ Suitable Connectors and Wires
To
connect
a
controller,
connectors and wires.
use
the
■ Preparing Wires
following
(1) Strip off the sheathe of a wire.
Note that a special tool is
needed when assembling.
3 - 3.5mm
(2) Lay a crimp terminal in a crimp tool, insert a wire
into the terminal, and then grip the levers lightly.
● Suitable Connector (supplied)
Manufacturer
Molex Japan
Co., Ltd.
Model No. (Molex Japan)
1pc.
Housing
51067-0200
Housing
51067-0400
1 pc.
Terminal
50217-8100
10 pcs.
● Suitable Lead Wire (stranded wire)
Size
AWG24-18
Cross Section
of Conductor
2
0.2 - 0.75 mm
Outer Diameter
(mm)
will go.
φ1.4 - φ3.0
(4) If you want to remove an assembly from a
■ Special Tool
Manufacturer
(3) Insert the assembly into the housing as far as it
housing, pull up an identification pin of the
Model No. (Molex)
housing with a slotted screwdriver and then pull
out the assembly.
Molex Japan Co., Ltd.
57189-5000
Slotted screwdriver
29
6. Wiring connectors
6.2 Wiring MIL connectors
6.2.1 Wiring MIL connectors
■ Suitable Connectors and Wires
Use connectors and wires shown in the tables below.
Note that a special
crimper is needed when assembling.
● Combinations of suitable connectors and stranded wires
Connector
Manufacturer
Suitable wire
Wire size
Outer
Diameter
(mm)
Cross
section of
conductor
2
(mm )
UL1061
AWG24
φ1.10
0.21
UL1007
AWG26
|
AWG28
φ1.30
|
φ1.22
0.13
|
0.09
Connector Parts No.
(Omron Corp.)
Contact Pin No.
UL No.
XG5M-2632-N
Contact No.1
XG5W-0031-N
XG5M-2635-N
Contact No.2
XG5W-0034-N
Omron Corp.
As for the position of the contact No. mark, see the figure in the next page.
<Note>
If you use a MIL connector for a flat cable, select Omron XG4M (26 pin) type as a connector.
■ Special Crimper
● Omron simple crimping tool
Manufacturer
Omron Corp.
Model No. (Omron Corp.)
XY2B-7006 (for 2 rows)
Note: For the outside shape of the tool, see the figure in "Wiring method" Section.
■ Wiring method
Push a wire in as far as
it will go.
Lever
(1) Insert a connector into the base.
(You can insert from both the right and left
side, but do not insert from the front.)
Align the wire with the
center of the polar.
(2) Align the center of the polar to be crimped
with the V slot in the base.
Punch
Stopper bolt
(3) Insert a wire into the crimping position.
Connector
V slot
Wire
Base
Simple crimping tool XY2B-7006 (Omron Corp.)
30
6. Wiring connectors
Lance hole
(4) Grip the levers slowly so as not to damage the side
Housing
Contact Pin No. Mark
walls of the connector with the punch until the
Make sure that the
metal teeth dig into
the wire.
lever hits the stopper bolt. (Be sure to keep
applying pressure until the lever hits the stopper
bolt.)
Make sure that the
wire is securely hold.
Connector
(5) Repeat the above procedures.
Wire
(6) After completing the crimping, pull out the
connector to the right or left.
Cover
(7) Verify that the assembly is correctly made.
(8) Attach a cover.
● Replacing a contact
Be sure to use a special contact removal tool to remove the contact from the housing when it is not crimped on
correctly.
(1) Remove the connector cover.
(2) Insert the lance press part (as shown in the
figure to the right) into the housing lance
01
00
N
RO OM Y2E
X
holes and pull out the contact while holding
Lance press part
the lance down.
(3) Insert a new contact.
〔 Contact removal tool XY2E-0001 (Omron Corp.) 〕
● Precautions in use
(1) Use the correct tools, connectors, and wires as listed in "Combination of suitable connectors and stranded
wires".
Give special attention to the thickness of a wire.
(2) Do not change the crimping stroke because it has been regulated at the factory.
(3) Do not place/remove a contact from the front of the tool, as it may cause malfunction.
(4) Check crimping quality periodically.
31
6. Wiring connectors
6.2.2 Avoiding incorrect mating of MIL connectors
To avoid incorrect mating of MIL connectors, use the following optional accessories.
■ Inserting coding pins
● Coding pin
(To prevent incorrect insertion.)
Manufacturer
Model No. (Omron Corp.)
Omron Corp.
XG4Z-0005
This pin is used to prevent confusion when many
connectors with the same number of contacts are
lined up.
● Usage
Insert
OMRON
Materials:
PBT resin (UL94V-0)
/ white
OMRON
Snap
Break
26-pin MIL connector for I/O ports
Note 1: If you use coding pins (XG4Z-0005), insert them into pin No. 22 of the in-port MIL connector and No. 21 of
the out-port MIL connector.
Note 2: To facilitate the usage of coding pins (XG4Z-0005), the corresponding plugs’ contacts (input port No. 22 /
output port No. 21) have been cut off at the factory.
32
7. Installation
7. Installation
7.1 Environmental requirements
■ When installing the product, avoid places where:
・the ambient temperature is below 0℃ or beyond 50℃.
・the ambient humidity is below 30% RH or beyond 85% RH.
・condensation occurs with sudden temperature changes.
・explosive, flammable, and/or corrosive gas exists.
・dust, oil mist, salt air, organic solvent, and/or conductive powder such as iron exists.
・strong acid (e.g. sulfuric acid) and/or strong alkali (e.g. caustic soda) or such substances exist.
・water, oil, and/or chemicals can be easily splashed.
・the product is exposed to direct sunlight.
・a high electromagnetic field exists.
・vibrations or mechanical impacts can be easily transmitted to the product.
■ Consider the effects of electric noise.
Consider taking the following measures if the product is installed near a source of high level electric noise
such as a high-voltage line, high-voltage device, power line, power machine, electromagnetic switch, or
transmitter of a radio transceiver.
・Install the product on a different panel other than that of the above noise sources.
・Keep a distance as far as possible from the above noise sources.
・To minimize noise level, use an isolation transformer, insert noise filters, and/or optimize the route of the
wiring.
■ Consider the effects of heat.
・To dissipate heat please dispose a controller considering natural convection and air flow.
・Do not block the ventilation slots of the product.
・When installing controllers, please use a spacer to leave a gap of more than 5 mm between controllers.
・Do not install the product above a device that generates a great amount of heat, such as a heater,
transformer, or high-wattage resistor.
・If the product is installed in an enclosed space (a control cabinet etc.) or near a heating element, keep the
product cool by making air vents.
・Cool down forcibly by fan, etc. as occasion demands.
■ Static electricity
・Excessive static electricity tends to be generated when it is dry. Under such an environment, discharge static
electricity by touching a metal part connected to the ground before handling the unit.
33
7. Installation
7.2 Mounting space
■ About Mounting Space
・ Keep a distance between a RC-410 and other
・If another device is placed in front of a RC-410,
devices of at least 50 mm to keep the controllers
keep a distance between them of at least 100 mm
cool and to replace it easily if necessary.
in order to avoid adverse effects of radiated noise
and heat and to make the wiring easier.
At least 100 mm
Other device
At least 50 mm
Other device
At least 50 mm
Other device
■ Spacing when mounting the RC-410 to a DIN rail
If multiple controllers are placed along a DIN rail, keep a distance between them of at least 5 mm.
※ To make a space of 5 mm, spacers for a DIN rail (see below) can be used. These are provided by IDEC
IZUMI Corporation.
● Spacer for DIN rail
Manufacturer
Model No. (IDEC IZUMI)
IDEC IZUMI Corporation
SA-406B
DIN rail
Spacer SA-406B
9
6 78 9
6 78
9
6 78
23
45
45
23
89
67
23
6 78 9
45
23
45
89
67
45
CD
AB
23
L
45
AB
1
EF0
CD
AB
01
EF
PWR
RUN
485
H
CD
23
CD
01
EF
L
AB
ID
AB
01
EF
PWR
RUN
485
H
L
01
EF
CD
RS-232C
Tx Rx G
34
CD
AB
01
EF
H
6 78 9
Width: 5 mm
SPEED
45
23
01
EF
232C
Black
CD
AB
ID
ID
PWR
RUN
485
PWR
RUN
485
7. Installation
7.3 Mounting/Removing
■ Mounting to and Removing from a DIN Rail
This product can be easily mounted to a DIN rail.
< How to mount the RC-410 >
① Hook the RC-410 on the top hook of the DIN rail.
② Push on the lower portion of the RC-410.
1
Rail
2
< How to remove the RC-410 >
①Insert a screwdriver blade into the mounting lever.
②Pull down on the mounting lever.
③Pull up the RC-410 to remove it.
3
2
1
35
7. Installation
■ Mounting onto and Removing from a flat board
Screws can be used to mount the RC-410 onto a flat board.
< How to mount/remove the RC-410 >
If the RC-410 is being mounted on a flat board, fix it using two M-3 screws as shown in the figure below.
If you want to remove the RC-410 from the board, use a screwdriver to unscrew the two screws and then remove
the controller.
Mounting Board
1
2
Note: Remove the two screws shown above before attempting to pull out the Molex connector.
36
8. Start-up
8. Start-up
This chapter describes how to start to operate a system that has already been mounted and wired.
8.1 Checklist before a test run
After completing wiring, check the following items before turning on the power.
■ Check Items
Ite m
RC-410 mounting conditions
Verify that...
・T he RC-410 is securely fixed.
Reference section
7.3
・T he polarity of the power cable is correct.
Power supply connection
・T he supply voltage is correct.
5.1
・T he size of the wires are suitable.
Communication port
・ Each wire correctly corresponds to each signal
terminal.
2.
・T he power voltage for input/output terminals are
suitable.
1.
・T he connectors are firmly inserted.
6.
・T he size of the wires are suitable.
6.
・ The body number switches of the RC-410 and
other controllers that connect to the RS-485
channel are correctly configured.
2.2
・ T he speed setting switch of the RC-400 is
correctly configured.
Refer to the RC-400
instruction manual
for details.
Controller settings
37
8. Start-up
8.2 Operation procedures
After completing the mounting and wiring of the controller, follow the chart below to set it up.
1. Setting the body number and SPEED
(1) Set the body number of the RC-410 to the desired number.
(2) Set the desired SPEED of the RC-400.
2. Turning on the power
(1) Verify the items on the previous page before turning on the power.
(2) After turning on the power, verify that the status indicator LED "PWR" of
the RC-400 and the RC-410 etc. lights up and that the status indicator
LED "RUN" on each unit blinks.
3. Checking a communication
Issue a communication command and check if a reply comes.
4. Verifying the output wiring
Turn on each general output in succession by using communication
commands and check the wiring port of the output.
5. Verifying the input wiring
Turn on each general input port in succession and verify the input data by
using communication commands.
6. Creating a program
Create a program to interface with this controller.
7. Test run
Check the operation of the created program and modify it if necessary.
Production Operation
38
9. Preventive maintenance
9. Preventive maintenance
The following table describes daily and regular checkups.
Class
Daily
checkups
Interval
Daily
Check Ite ms
・Are ambient temperature and humidity normal?
・ Is there any adhesion to the product such as dust, dirt, and/or
foreign materials?
・Are there any abnormal noises?
・Are there any foreign odors?
・Is the power voltage normal?
・Are there any damaged wires?
・Is there any lint and/or dust on the ventilation slots that prevent the
system fro m cooling?
・Is the mounting part clean?
・Are there any loose connections on peripheral devices?
Status indicator LED
Regular
checkups
once or twice
per year
「PWR」 LED
Lights up when power is supplied.
(turns off under abnormal conditions)
「RUN」 LED
Blinks at intervals when working normally.
「485」 LED
Blinks when data is transmitted through the
RS-485 channel.
・Are there any loose connections on terminals or connectors?
・Are there any damaged connectors?
・Is there any evidence of overheating?
39
10. Troubleshooting
10. Troubleshooting
If the system does not work properly, follow the instructions below before contacting us.
Please determine the probable causes of the trouble and take measures according to the "Basic
procedures for troubleshooting" below.
10.1 Flowchart for troubleshooting
10.1.1 Basic procedures for troubleshooting
The chart below describes how to quickly determine the cause of the problem to take measures when
trouble occurs.
(1) Visual observ ations
Perform checks on the following items:
①Operation of the machine (in halt and operation status)
②T he voltage of the power supply
③T he conditions of input/output devices
④Wiring condition (input /output wires and cables)
⑤T he status of each indicator (LED indicator on each unit)
⑥T he settings of configuration switches
⑦T he contents of parameters and programs
(2) Re production of the problem
Check whether the problem is consistent after the following
steps.
①Stop the controller.
②Reset the alarm.
③T urn the power off and on.
(3) Narrow ing dow n the possible cause s
Determine the causes of the problem according to the result of
the above checks ((1) and (2)).
①Is it the controller or the external part?
②Is it software or hardware?
40
10. Troubleshooting
10.1.2 T roubleshooting w hen the cause is in the controller
If the procedures in the previous page have revealed that the cause of the problem is in the controller,
follow the instructions below to deal with them.
RC-410 does not
work properly.
Is the
"PWR" LED on?
NG
Proceed to 10.2.1
"Checkpoints when 'PWR' LED does not turn on"
NG
Proceed to 10.2.2
"Checkpoints when '485' LED does not blink"
OK
Does the
"485" LED blink?
OK
Does the
"RUN" LED blink?
NG
Proceed to 10.2.3
"Checkpoints when 'RUN' LED does not blink"
OK
Does the
input/output units
work normally?
NG
to 10.2.4
Proceed
"Checkpoints when input/output units do not work normally"
OK
Other symptoms
Proceed to 10.2.5
"Checkpoints when other symptoms are observed"
41
10. Troubleshooting
10.2 How to address a problem
If the controller does not work normally, address the problem according to the following procedures,
which are sorted by problem type.
If the abnormal phenomena still persists, contact the distributor of
this product and send it back to RORZE.
10.2.1 Checkpoints w hen "PWR" LED does not turn on
Error
Check items
Actions
"PWR" LED does not turn on
Is the power supplied?
Supply the power.
Is the polarity of the power cable correct?
Correct the wiring.
Is the polarity of the power connector of
Correct the wiring.
the controller correct?
Is the power connector of the controller
Insert it securely.
firmly inserted?
Are the contact pins of the controller's
Crimp the contact pins again.
power connector loose?
Are the connection terminals on the power
Tighten the screws.
supply loose?
Is a suitable voltage supplied from the
Check the output voltage from the power
power supply?
supply and see if it is within the ratings of
the controller.
Has the overcurrent protection circuit in
Check the output current of the power
the power supply been activated?
supply and see if it is within the ratings of
the power supply.
Has the overvoltage protection circuit in
Turn off the power, keep the power supply
the power supply been activated?
off for an enough time for the output
voltage to become 0V and then turn it on
again.
Has the power supply output circuit fuse
Determine the actual output current and
blown?
replace the fuse with one that allows for
the current value.
42
10. Troubleshooting
10.2.2 Checkpoints w hen "485" LED does not blink
Error
Check items
Actions
"485" LED does not blink
Is the wiring (polarity) of the RS-485 port
Correct the wiring.
connector correct?
Is
the
RS-485
port
connector
firmly
Insert it securely.
inserted?
Are the contact pins of the RS-485 port
Crimp the contact pins again.
connector loose?
Is the termination resistor firmly connected?
Connect it securely.
10.2.3 Checkpoints w hen "RUN" LED does not blink
Error
"RUN" LED does not blink
Check items
Actions
Does the "RUN" LED remain on or off
Turn the power off and on again, then
instead of blinking?
rerun the program.
Is the setting of the body number wrong or
Verify the host program.
duplicated?
Set the correct body number.
(See 2.2 ④ for instructions.)
43
10. Troubleshooting
10.2.4 Checkpoints w hen input/output units do not w ork normally
Error
Check items
Actions
Input/output units do not work normally
Are the I/O connectors of the controller firmly
inserted?
Are the contact pins of input and output connectors
Crimp the contact pins.
correctly crimped?
Are there loose connections at the other end of the
Take the proper actions, such as
input and output ports?
tightening screws, to connect them
firmly.
Is the wiring correct?
Connect wires correctly.
Use an appropriate RC-410 command to turn on the
① If the voltage is normal, a probable
output port connected to the load to be checked.
cause is a failure in the load.
Is the voltage across the load correct?
Check the load.
RC-410
(General purpose output)
② If a voltage is not applied to the
load, the probable cause is a
failure in the output port.
+COM
-COM
Internal
circuit
Output port
Load
-
v
+
Use an appropriate RC-410 command to turn off the
① If the voltage is normal, a probable
output port connected to the load to be checked.
cause is a failure in the input port.
Is the voltage across the load correct?
Return the RC-410 to RORZE.
RC-410
(General purpose input)
Internal
circuit
10kΩ
COM
COM
Input port
Input device
5.1kΩ
+
44
Insert it securely.
V
-
② If a voltage is not applied to the
terminal, the probable cause is a
failure in the power supply or the
input device.
Check both of them.
10. Troubleshooting
10.2.5 Checkpoints w hen other symptoms are observed
Error
Other symptoms
Check items
Actions
Does external noise cause the controller
① See if the controller works properly
to malfunction?
when other devices that may be noise
sources are not in operation.
②See in "5. Wiring the system" to verify
the wiring again.
Wires that are too long and/or are not
separated at the input and output may
cause electrical noise.
Use a shielded and twisted pair as a
signal cable and separate the signal line
from the power lines to prevent noise.
③Insert a noise filter or ferrite core into a
possible noise source to reduce the
noise level.
Is the program correct?
If an error message displays, see in "21.
・Characters other than commands have
Table of Error Codes" to determine the
been transmitted.
・Parameter(s) is(are) not within the
allowable range.
error type and see "14. Description of
Communication Commands" to debug the
program.
・I/O terminals have not been assigned as
intended.
45
46
Software
Instruction Manual
< Software >
Communication Commands
47
11. About Communication Commands
11. About Comm unica tio n Comma nd s
Communication commands are character strings to control the RC-410 through the Link Master
RC-400 from a PC or other devices that have an RS-232C port.
RC-410 receives a command,
executes it, and sends back the run result through the Link Master RC-400.
Command Type
N a me
F u n ct i o n s
0 command
Home search
Home search related commands
1 command
High speed movement
2 command
Low speed movement
3 command
5 command
Position pulse
Stopping and changing speed
Moves at a high speed with a specified acc/dec
pattern number and distance (pulse number)
Moves at a low speed with a specified acc/dec
pattern number and distance (pulse number)
Position pulse related commands
Stops a move or changes a speed during a move
6 command
9 command
Position management
Status
Manages the current position
Status related commands
C command
D command
Input/output operation
Setting an input/output logic
Controls sensor I/Os and general-purpose I/O ports
Sets the I/O logic of sensors and I/O ports
E command
F command
Setting a mode
Flash me mory
Sets an operation mode
Flash me mory related commands
L command
Setting a low step pulse
Q command
ST ALL sensor
U command
User program
X command
Link Master related commands
Sets a low step pulse
Commands related to a stall detection function with a
ST ALL sensor
User program related commands (See "User Program
Commands" in Chapter 15 for details)
Link Master related commands (Refer to the
instruction manual of the RC-400 for details)
※ For details, see in "14. Description of Communication Commands".
48
12. Syntax of Communication Commands
12. Syntax of Communication Commands
■ Command Syntax
Each RC-410 command is comprised of the following elements:
Ex ample: & 3F LSD 1
① ②
, L[2] 
③ ④ ⑤
④ ⑥
De scription of the ex ample above
①: The character (26h) represents the beginning of a command.
The body number of the RC-410 is indicated with 2 digits, which are different to conventional
RC-2xx controllers.
T herefore, two kinds of starter code are used to identify the no. of digits in a
body number.
'$' or '#': One-digit body number
'&'
: T wo-digit body number
②: A body number specified by the rotary switch on the RC-410.
③: A command code
Each command consists of 3 characters.
Each character has the following meaning:
(1) 1st character: T he general classification of a command
(2) 2nd character: T he detailed classification of a command
(3) 3rd character: Represents the function of a command
'S' : Sets parameter values of a controller.
'D' : Gets parameter values from a controller.
'M' : Performs a move.
④: A command parameter
⑤: A separator between command parameters (2Ch)
⑥: A terminator of a command (0Dh)
Tab (09h) and space (20h) characters contained in a command string are ignored.
A command error
(Error code = 23h) will be returned if the length of a command string is more than 60 characters.
■ Reply syntax (when an individual [non-virtual] body number [00-77] is specified)
Each RC-410 reply is comprised of the following elements:
Ex ample: > & 3F CSD -000000050
① ② ③
④
⑤
, -000000050 
⑥
⑤
⑦
De scription of the ex ample above
①: The character (3Eh) represents the beginning of a reply.
②: The character (26h) indicates that the subsequent body number is two digits.
The body number of RC-4xx controllers is indicated with 2 digits, which are different to
conventional RC-2xx controllers.
T herefore, this code is used to identify the no. of digits in a body
number.
'$' or '#': One-digit body number
'&'
: T wo-digit body number
③: The body number specified by the rotary switch on the RC-410.
④: The command code that has caused this reply.
⑤: A reply parameter.
⑥: A separator between reply parameters (2Ch)
⑦: A terminator of a reply (0Dh)
49
12. Syntax of Communication Commands
If an error has occurred, a reply consists of the following elements:
Ex ample: > & 3F LSD @ 5F 
① ② ③
④
⑤ ⑥ ⑦
De scription of the ex ample above
①: The character (3Eh) represents the beginning of a reply.
②: The character (26h) indicates that the subsequent body number is two digits.
The body number of RC-4xx controllers is indicated with 2 digits, which are different to
conventional RC-2xx controllers.
T herefore, this code is used to identify the no. of digits in a body
number.
'$' or '#': One-digit body number
'&'
: T wo-digit body number
③: The body number specified by the rotary switch on the RC-410.
④: The command code that has caused this reply.
⑤: A code indicating that a command error has occurred.
⑥: An error code (can be omitted depending on the setting).
⑦: A terminator of a reply (0Dh).
■ Reply syntax (w hen a v irtual body number [80-9E] is specified)
A virtual body number can be used to specify multiple controllers collectively.
If the virtual body
number 80 consists of controller 00 and 01, the following reply syntax are applied.
Ex ample: > & 80 CED [ 00.01 : 12 , 1 ] [ 01. 02 : 13 , 1 ] 
① ② ③
④
⑤
⑥
⑦ ⑧ ⑨ ⑧⑤ ⑤
⑥
⑦ ⑧ ⑨⑧⑤ ⑩
De scription of the ex ample above
①: The character (3Eh) represents the beginning of a reply.
②: The character (26h) indicates that the subsequent body number is two digits.
The body number of RC-4xx controllers is indicated with 2 digits, which are different to
conventional RC-2xx controllers.
T herefore, this code is used to identify the no. of digits in a body
number.
'$' or '#': One-digit body number
'&'
: T wo-digit body number
③: The virtual body number specified by a command "XVS" sent to the RC-400.
④: The command code that has caused this reply.
⑤: A reply from each controller placed between "[" (5Bh) and "]" (5Dh).
⑥: The body number and motor number of the targeted controller.
⑦: A separator (3Ah) that divides a body number from a reply parameter.
⑧: A reply parameter.
⑨: A separator between reply parameters (2Ch).
⑩: A terminator of a reply (0Dh).
50
12. Syntax of Communication Commands
If an error has occurred, a reply consists of the following elements:
Ex ample: > & 80 CED @ [ 00.01 : @ 4A ] [ 01.02 : 13 , 1 ] 
① ② ③
④
⑤ ⑥
⑦
⑧ ⑤ ⑨ ⑥⑥
⑦
⑧ ⑩ ⑪ ⑩⑥ ⑫
De scription of the ex ample above
①: The character (3Eh) represents the beginning of a reply.
②: The character (26h) indicates that the subsequent body number is two digits.
The body number of RC-4xx controllers is indicated with 2 digits, which are different to
conventional RC-2xx controllers.
T herefore, this code is used to identify the no. of digits in a body
number.
'$' or '#': One-digit body number
'&'
: T wo-digit body number
③: The virtual body number specified by a command "XVS" sent to the RC-400.
④: The command code that has caused this reply.
⑤: A code indicating that a command error has occurred.
⑥: A reply from each controller placed between "[" (5Bh) and "]" (5Dh).
⑦: The body number and motor number of the targeted controller.
⑧: A separator (3Ah) that divides a body number from a reply parameter.
⑨: An error code (can be omitted depending on the setting).
⑩: A reply parameter.
⑪: A separator between reply parameters (2Ch).
⑫: A terminator of a reply (0Dh).
51
13. Motor control functions
13. Motor control functions
13.1 Operation mode
13.1.1 Overv iew
I/O Ma st er RC -41 0 h as fi ve op er ati on mo de s a s sho wn be lo w.
T he op era ti on mo de det er min es th e c ont ro lla bl e d riv er ty pe an d t he nu mbe r o f ava ila bl e b it s a s
gen era l- pur po se I/ Os.
Mod e
0
1
2
3
4
Desc rip tio n
Some p or ts a re us ed to co ntr o l o ne
Some p or ts a re us ed to co ntr o l two
Some p or ts a re us ed to co ntr o l o ne
Some p or ts a re us ed to co ntr o l two
Inp ut/o utp ut p or ts D 0-D 15 a re used
RD -1 xx d ri ve r a nd o the r po r ts ca n b e use d for a ny p ur pose .
RD -1 xx d ri ve r s a nd o the r po rts ca n be used fo r a ny p urpo se .
RD -3 xx d ri ve r a nd o the r po r ts ca n b e use d for a ny p ur pose .
RD -3 xx d ri ve r s a nd o the r po rts ca n be used fo r a ny p urpo se .
a s ge ner a l p urpo se I/Os .
13.1.2 Operation mode 0 (controlling one RD-1xx driv er)
T his i s a mod e f or co ntr ol lin g one R D-1 xx se ri es dri ve r.
T his mod e i s sel ect ed by s ett in g c o mman d "E AS " to par a mete r "0 ".
E xa mpl e: & &&&& &&
T his mod e h as th e fol low in g f ea tur es :
・ In put p ort s D 0-D 3 and D 5 a nd ou tp ut po rts D0 -D2 a re us ed as mo to r c on tro l port s.
Oth er po rts ar e u se d a s gen er al- pu rpo se I/ Os .
T he nu mb er of bi ts th at ca n b e use d as ge ner al in pu ts .. ... 1 1
T he nu mb er of bi ts th at ca n b e use d as ge ner al ou tp uts . .. 13
I/0
Inp ut
Outp ut
Na me
Pin No .
D0
D1
D2
D3
D5
D0
D1
D2
18
17
16
15
13
18
17
16
Ter mi na l na me fo r m otor co ntro lli ng
STAL L s e ns or fo r mo to r #1
Ho me s e ns or fo r mo to r #1
CW li mi t se nso r fo r mo tor # 1
CCW li mi t se nso r fo r mo to r # 1
EMS
Sta r t for mo to r # 1
Ro ta tio n dir ec tio n fo r mo to r #1 (CW whe n off)
Speed fo r mo to r #1 ( Hig h spee d whe n o ff)
・Co mma nd s tha t co ntr ol ge ne ral p ur pos e out pu ts (e .g ., "COS ") are mask ed a nd ca nn ot
mod ify t he va lue s of ou tpu t p or ts us ed fo r c on tro ll ing a mo to r.
・T he mo tor pos it ion is man age d by cou nt ing th e cl ock sig na l in put fro m t he d riv er t o t he
ter min al CL K1 ( moto r #1) .
・ A l ow st ep pu lse , whi ch de ter mi nes wh en de ce ler at ion sh ou ld be gin du ri ng a h ig h s pe ed
mov e, is sp ec ifi ed by th e co mma nd "LSS ". Se e "1 3.2 M oto r c on tro l met ho d" f or de tai ls .
・ Sta ll d et ect io n fu nc tio n i s ac tiv at ed a ft er s et tin g t he c o mman d "QS S " to co nfi gu re
par a me te rs fo r s tal l det ec tio n sli ts . St all d ete ct ion is d isa bl ed by de fa ult .
・Mo tor pos it ion are as a re man age d wi th a ma rke d de ci mal nu mbe r in t he r an ge o f -1 bil li on
to +1 b ill io n p ul ses .
52
13. Motor control functions
13.1.3 Operation mode 1 (controlling tw o RD-1xx driv ers)
T his i s a mod e f or co ntr ol lin g two R D-1 xx se ri es dri ve rs.
T his mod e i s sel ect ed by s ett in g c o mman d "E AS " to par a mete r "1 ".
E xa mpl e: & &&&& &&
T his mod e h as th e fol low in g f ea tur es :
・ In put p ort s D 0 - D 3 a nd D5 a nd ou tpu t por ts D0 - D2 ar e u se d a s mot or #1 c ont ro l p ort s
and in pu t p ort s D 8 - D 12 an d out pu t p ort s D8 - D 10 as moto r #2 co ntr ol po rts .
Oth er po rts ar e u se d a s gen er al- pu rpo se I/ Os .
T he nu mb er of bi ts th at ca n b e use d as ge ner al in pu ts .. ... . 7
T he nu mb er of bi ts th at ca n b e use d as ge ner al ou tp uts . .. 10
I/0
Inp ut
Outp ut
Na me
Pin No .
D0
D1
D2
D3
D5
D8
18
17
16
15
13
8
STA LL se nso r fo r m otor #1
Ho me s e ns or fo r mo to r #1
CW li mi t se nso r fo r mo tor # 1
CCW li mi t se nso r fo r mo to r # 1
EMS
STA LL se nso r fo r m otor #2
Te r mi na l nam e for mo to r c o ntro lli ng
D9
D10
D11
7
6
5
Ho me s e ns or fo r mo to r #2
CW li mi t se nso r fo r mo tor # 2
CCW li mi t se nso r fo r mo to r # 2
D0
D1
D2
D8
D9
D10
18
17
16
8
7
6
Sta r t for mo to r # 1
Ro ta tio n di rec tio n for mo to r #1 (CW whe n o ff)
Speed fo r m o to r #1 ( Hig h s peed whe n o ff)
Sta r t for mo to r # 2
Ro ta tio n di rec tio n for mo to r #2 (CW whe n o ff)
Speed fo r m o to r #2 ( Hig h s peed whe n o ff)
・Co mma nd s tha t co ntr ol g ene ral p ur pos e ou tpu ts (e .g. , "COS ") a re mask ed a nd ca nn ot
mod ify t he va lue s of ou tpu t p ort s use d for c ont ro lli ng a mot or.
・T he Mo tor po sit ion #1 i s mana ge d by c ou nti ng the clo ck s ig nal in put fro m th e d riv er t o t he
ter min al CL K1 an d Mot or po sit io n # 2 is ma nag ed by t he te r mi na l C LK2 .
・Two mot ors c an be co ntr ol led s i mu lta ne ous ly.
・ A low s tep p uls e, wh ich d ete r mine s whe n dec el era tio n sho ul d b eg in du rin g a h ig h s pe ed
mov e, is sp ec ifi ed by th e co mma nd "LSS ". Se e "1 3.2 M oto r c on tro l met ho d" f or det ai ls.
・ Sta ll d et ect io n f unc ti on i s a ct iva te d af ter se tti ng th e co mma nd "QS S" to co nfi gu re
para me ter s f or st all d ete ct ion s lits . St all d ete ct ion i s d is abl ed by d efa ul t.
・Mo tor p os iti on a rea s ar e man ag ed wi th a mas ked d ec i ma l nu mbe r in t he ra ng e of - 1 bil li on
to +1 b ill io n p ul ses .
53
13. Motor control functions
13.1.4 Operation mode 2 (controlling one RD-3xx driv er)
T his i s a mod e f or co ntr ol lin g one R D-3 xx se ri es dri ve r.
Wit h i npu t p or t D 4 c onn ect ed to th e G ROW te r mina l o f a RD -3 xx dri ver, a de ce ler at ion po in t
dur ing a hig h s pe ed mov e i s a ut o ma ti cal ly ca lcu la ted an d t he de cel er ati on is au to mat ica ll y
star te d.
T his mod e i s sel ect ed by s ett in g c o mman d "E AS " to par a mete r "2 ".
E xa mpl e: & &&&& &&
T his mod e h as th e fol low in g f ea tur es :
・ In put p ort s D 0-D 5 and o utp ut po rts D 0-D 2 are us ed as moto r con tr ol po rts .
Oth er po rts ar e u se d a s gen er al- pu rpo se I/ Os .
T he nu mb er of bi ts th at ca n b e use d as ge ner al in pu ts .. ... 1 0
T he nu mb er of bi ts th at ca n b e use d as ge ner al ou tp uts . .. 13
I/0
Inp ut
Outp ut
Na me
Pin No .
D0
D1
D2
18
17
16
STA LL se nso r fo r m otor #1
Ho me s e ns or fo r mo to r #1
CW li mi t se nso r fo r mo tor # 1
Te r mi na l nam e for mo to r c o ntro lli ng
D3
D4
D5
15
14
13
CCW li mi t se nso r fo r mo to r # 1
GROW
EMS
D0
D1
D2
18
17
16
Sta r t for mo to r # 1
Ro ta tio n di rec tio n for mo to r #1 (CW whe n o ff)
Speed fo r m o to r #1 ( Hig h s peed whe n o ff)
・Co mma nd s tha t co ntr ol ge ne ral p ur pos e out pu ts (e .g ., "COS ") are mask ed a nd ca nn ot
mod ify t he va lue s of ou tpu t p or ts us ed fo r c on tro ll ing a mo to r.
・T he mo tor pos it ion is man age d by cou nt ing th e cl ock sig na l in put fro m t he d riv er t o t he
ter min al CL K1 ( moto r #1) .
・ By moni to rin g a si gna l inp ut s tat us a t the G ROW t er min al , t he R C-4 10 a uto ma tic al ly
cal cul at es a dec el era ti on p oi nt d uri ng a hi gh spe ed mov e an d b egi ns the dec el era ti on.
A
low s te p pu lse , wh ic h ha d al rea dy s ta rte d a d ec ele ra tio n by the co mma nd "LS S " wi ll b e
ign ore d.
S ee "13 .2 Mo tor co nt rol meth od " fo r d et ail s.
・ Sta ll d et ect io n fu nc tio n i s ac tiv at ed a ft er s et tin g t he c o mman d "QS S " to co nfi gu re
par a me te rs fo r s tal l det ec tio n sli ts .
St all d ete ct ion is d isa bl ed by de fa ult .
・Mo tor pos it ion are as a re man age d wi th a ma rke d de ci mal nu mbe r in t he r an ge o f -1 bil li on
to +1 b ill io n p ul ses .
13.1.5 Operation mode 3 (controlling tw o RD-3xx driv ers)
T his i s a mod e f or co ntr ol lin g two R D-3 xx se ri es dri ve rs.
Wit h i np ut po rt D4 ( for moto r #1) a nd D1 2 (fo r mot or #2 ) con ne cte d to th e GRO W ter mi nal o f e ac h
RD- 3 xx dr ive r, a d ec ele ra tio n p oin t d ur ing a h ig h s pee d mov e is au to mat ic all y c al cul ate d a nd th e
dec ele ra tio n is au to mati ca lly s tar te d.
T his mod e i s sel ect ed by s ett in g c o mman d "E AS " to par a mete r "3 ".
E xa mpl e: & &&&& &
T his mod e h as th e fol low in g f ea tur es :
・ In put po rts D0 -D 5 an d o ut put po rts D0 -D 2 ar e u se d as mo to r # 1 co nt rol po rts an d i np ut
por ts D8 -D1 2 and o ut put p ort s D8- D1 0 a s mo tor # 2 c on tro l por ts .
as gen er al- pu rpo se I/ Os.
54
Ot her p ort s ar e u se d
13. Motor control functions
T he nu mb er of bi ts th at ca n b e use d as ge ner al in pu ts .. ... . 5
T he nu mb er of bi ts th at ca n b e use d as ge ner al ou tp uts . .. 10
I/0
Inp ut
Outp ut
Na me
Pin No .
Te r mi na l nam e for mo to r c o ntro lli ng
D0
D1
D2
D3
D4
D5
D8
D9
D10
D11
D12
D0
D1
D2
D8
D9
D10
18
17
16
15
14
13
8
7
6
5
4
18
17
16
8
7
6
STA LL se nso r fo r m otor #1
Ho me s e ns or fo r mo to r #1
CW li mi t se nso r fo r mo tor # 1
CCW li mi t se nso r fo r mo to r # 1
GROW
EMS
STA LL se nso r fo r m otor #2
Ho me s e ns or fo r mo to r #2
CW li mi t se nso r fo r mo tor # 2
CCW li mi t se nso r fo r mo to r # 2
GROW
Sta r t for mo to r # 1
Ro ta tio n di rec tio n for mo to r #1 (CW whe n o ff)
Speed fo r m o to r #1 ( Hig h s peed whe n o ff)
Sta r t for mo to r # 2
Ro ta tio n di rec tio n for mo to r #2 (CW whe n o ff)
Speed fo r m o to r #2 ( Hig h s peed whe n o ff)
・Co mma nd s tha t co ntr ol g ene ral p ur pos e ou tpu ts (e .g. , "COS ") a re mask ed a nd ca nn ot
mod ify t he va lue s of ou tpu t p ort s use d for c ont ro lli ng a mot or.
・T he Mo tor po sit ion #1 i s mana ge d by c ou nti ng the clo ck s ig nal in put fro m th e d riv er t o t he
ter min al CL K1 an d Mot or po sit io n # 2 is ma nag ed by t he te r mi na l C LK2 .
・Two mot ors c an be co ntr ol led s i mu lta ne ous ly.
・Wi th the in put po rts D4 an d D 12 c on nec te d t o e ach GR OW ter mi nal of th e d riv er s f or
mot or # 1 an d #2 r esp ec tiv ely, a de ce ler at ion poi nt d ur ing a hig h sp ee d mo ve i s
aut o ma ti cal ly ca lcu la ted an d t he de ce ler ati on is au to mat ic all y s tar ted f or eac h mot or.
A
low s te p pu lse , wh ic h ha d al rea dy s ta rte d a d ec ele ra tio n by the co mma nd "LS S " wi ll b e
ign ore d. S ee "13 .2 Mo tor co nt rol meth od " fo r d et ail s.
・ Sta ll d et ect io n fu nc tio n i s ac tiv at ed a ft er s et tin g t he c o mman d "QS S " to co nfi gu re
par a me te rs fo r s tal l det ec tio n sli ts . St all d ete ct ion is d isa bl ed by de fa ult .
・Mo tor pos it ion are as a re man age d wi th a ma rke d de ci mal nu mbe r in t he r an ge o f -1 bil li on
to +1 b ill io n p ul ses .
13.1.6 Operation mode 4 (All ports for general-purpose use)
T he I/ O port s (D0 -D 15) c an be us ed fo r all g ene ra l i npu t/ out pu t p ur pos es .
T his mod e i s sel ect ed by s ett in g c o mman d "E AS " to par a mete r "4 ".
E xa mpl e: & &&&& &&
T his mod e h as th e fol low in g f ea tur es :
・T he i npu t p or t D 0-D 15 an d o ut put po rt D0 -D1 5 c an be us ed for al l gen er al inp ut /ou tp ut
pur pos es .
T he nu mb er of bi ts th at ca n b e use d as ge ner al in pu ts .. ... .. . 1 6
T he nu mb er of bi ts th at ca n b e use d as ge ner al ou tp uts . ... .. 16
・ Co mma nd s fo r set ti ng po si tio ns c ann ot b e use d. ( An er ro r occ ur s whe n on e of t he
co mman ds is e xec ut ed. )
55
13. Motor control functions
13.2 Motor control method
13.2.1 T rapezoidal drive control
To control one or two stepping motors with an I/O Master RC-410, use a RORZE RD-1xx or RD-3xx
(built-in oscillator type) as a driver.
The speed of a stepping motor is controlled in trapezoidal
form as shown in the figure to the right.
Moving distance (pulses)
Speed
To control a stepping motor, the following parameters are
needed:
Low step pulse
High
①T he number of pulses to move ( moving distance).
②A high speed (pps) and a low speed (pps).
③Acceleration/deceleration time (ta) between a high
LOW
and a low speed.
④A low step pulse, which defines a position where a
motor should begin to decelerate as the number of a
remaining pulses to go before the motor stops.
ta
Time
Trapezoidal drive
In the above parameters, ② speed (pps) and ③ acceleration/deceleration time are determined by
settings on a driver.
For more information on adjusting these parameters, refer to the instruction
manual for each driver.
Moving distance (pulses) ① and a low step pulse ④ are determined by settings on the RC-410.
■ Mov ing distance (pulses)
To rotate a motor, issue a move command with a specified moving distance (pulses) to the RC-410.
The maxi mu m moving distance is 999,999,999 pulses.
The method of specifying a moving distance is different in a relative move and an absolute move
command. (Related to the home search move is excluded.)
・Relative move commands: "1+M", "1-M", "2+M", and "2-M"
These commands move a motor by specified pulses relative to the current position.
The rotation direction is decided by the name of a command.
Exa mple: &&&&&&&&&&&&&
Moves the position of motor #1 by 30,000
pulses in the CW direction at a high speed.
(For information on a "low step pulse", see
"Low step pulse" in the next section.)
・Absolute move commands: "1AM " and "2AM"
These commands move a motor to a specified position related to the current position
managed by RC-410.
T he rotation direction and the moving distance (pulses) are
automatically calculated.
Exa mple: &&&&&&&&&&&&&& 
Moves motor #1 to +30,000 pulse position at a
high speed.
Note: Limitations in absolute moves
Though the motor position of the RC-410 can be managed in the range of -1 billion
to +1 billion pulses, the maxi mu m moving distance is 999,999,999 pulses.
Therefore, if the moving distance from the current position to the specified position
exceeds this limit, a command error occurs.
If the moving distance is pre-defined in one of 2,048 position numbers, you can
indirectly specify the moving distance using the position number when you issue a
move command.
See "13.3 Position pulse" for details.
56
13. Motor control functions
■ Low step pulse
The position where a motor should begin to decelerate during a trapezoidal drive is defined by a low
step pulse as the number of remaining pulses to go before the motor stops.
You should specify a low step pulse based on the acceleration/deceleration time set on a driver, or
otherwise a motor will abruptly stop before it reaches a low speed or it will keep rotating at a low
speed for a long time before it stops.
You can define 31 kinds of low step pulses (Low step No. 0-30) for both motor #1 and motor #2.
If a high-speed move command "1+M", "1-M", or "1AM " is executed with a specified low step no., a
motor will begin to decelerate according to the low step pulse corresponding to the specified low step
No.
Exa mple: &&&LSS&&&[2],&&&&
&&&&&&&,&[2],&&&&&
Assigns a low step pulse of 1,000 pulses to low step no. 2.
Moves the motor #1 position by 30,000 pulses in the CW
direction.
A deceleration is performed according to the
low step pulse saved in the low step no. 2.
If a high-speed move command is executed without a specified low step number, the low step pulse
defined in the low step No. 30 will be used to decelerate.
Exa mple: &&&&&&&&&&&&&& 
Moves the motor #1 position to +30,000 pulse point at
high speed.
Deceleration will be performed according to the low step
pulse defined in the low step no. 30.
Note: ・Low step numbers other than 30 do not have a default value.
If a low step No. is used
before its value is defined, a command error occurs.
・ If a specified low step pulse is larger than half of the moving distance (pulses),
deceleration begins where the motor has reached a half of the moving distance.
13.2.2 Controlling RD-3xx series drivers
As described in "13.1 Operation mode", RC-410 has special modes for RD-3xx series drivers: modes 2
and 3.
The RD-3xx series driver has a "GROW OUT " terminal that outputs, during "ta" in the figure
"T rapezoidal drive", a signal indicating acceleration time.
T he RC-410 counts a moving pulse while
receiving this signal, and automatically calculates a low step pulse to perform deceleration.
Therefore a low step pulse is ignored in operation mode 2 or 3, even if a low step no. is specified with
a move command.
Except for the automatic detection of a low step pulse, the features in these
modes are the same as those of operation mode 0 and 1. (If you use the RD-3xx series driver and
need more information on "GROW OUT ", consult the instruction manual of the RD-3xx series driver.)
13.2.3 Controlling one or tw o motors
RC-410 has several operation modes in which one or two motors can be controlled at the same time.
To handle two motors, RC-410 has the following features:
・Parameters for controlling motors (e.g., a low step pulse) are defined separately for motor #1 and #2.
So when specifying a parameter, provide the value together with the targeted motor (#1, #2, or both).
Exa mple: &&&&&S&&&&&&&& 
Sets the current position of motor #1 to +10,000 pulses.
&&&&&S2&&&&&&& 
Sets the current position of motor #2 to +30,000 pulses.
In a mode handling one motor (i.e., in mode 0 or 2), the targeted motor is fixed as motor #1.
57
13. Motor control functions
・When you issue a move command, you also need to specify a targeted motor (#1, #2, or both).
Exa mple: &&&&&&&&&&&&&
Moves the position of motor #1 by 10,000 pulses in the
CW direction.
&&&&&&2&&&&&&
Moves the position of motor #2 by 30,000 pulses in the
CW direction.
Note: Note that the syntax of a co mmand that rotates two a xes si multaneously varies depending
on the command type.
See each command described in "14. Explanation of Communication Commands" for
details.
In a mode handling one motor (i.e., in mode 0 or 2), the targeted motor is fixed as motor #1.
・T he command "5 IS", which is used to stop a motor i mmediately, is the only exception that can be
executed without a specified motor to target.
T he command "5 IS" issued without specifying a
motor will stop all motors whether one or two motors are running.
・Commands that set/get the values of general purpose inputs/outputs (e.g., "COS") are irrelevant
to the targeted motor.
T hese commands set/get the values collectively.
T he command "COS",
which controls general-purpose outputs, cannot change the values of output ports used for
controlling motors.
・While sensors which control motors (i.e., ST ALL sensor, Home sensor, CW sensor, and CCW
sensor) are equipped for each motor, the EMS (Emergency Stop) terminal is common to both
motor #1 and #2.
When the signal is turned on, both motors are forced to stop.
13.2.4 Response w hen a move is completed
In conjunction with the Link Master RC-400, the RC-410 can send a response when a move is
completed.
T he figure below illustrates the process.
Sends a special reply when the move is completed*1
(Issuing the command "XRS" to a link master.)
Starts to move (Command "1" or "2")
Bit 0 of the controller status is set to 1.
Completes the move
Bit 0 of the controller status is cleared to 0.
The link master recognizes the change in the controller status.
The link master sends a special reply (a completion-of-move response).
Exa mple:
Command
&&&&&&&&&&&&&
*1: After receiving a command "XID", a Link Master
RC-400 will automatically performs the polling of all
the connected controllers.
When the link master recognizes some changes in
the controllers, it sends a special reply depending
on the setting.
For details, see the RC-400 instruction manual.
Moves motor #1 by 50,000 pulses in the CW direction at
high speed.
Starts to move.
>&&&&&&
・
・
Moving...
・
Special reply >&7D&&&[&&.&&:&&]  A move of motor #1 initiated by a command "1+M" sent to the
Ordinary reply
controller with a body No. of 00 has been successfully completed.
Note: When moving two axes simultaneously, the motor no. in the special reply will be “ 00”.
58
13. Motor control functions
13.3 Position pulse
13.3.1 What is a position pulse?
To execute a move command with a RC-410, you must specify a moving distance (the number of
pulses) and a low step no.
A position pulse refers to this moving distance.
There are two types of move: a relative move and an absolute move.
move, you specify a moving distance (pulse data).
a destination position (position data).
When you perform a relative
When you perform an absolute move, you specify
A position pulse can be used as both "pulse data" and
"position data" in a move command.
13.3.2 Specifying a position pulse
There are two ways to specify a moving distance: a direct and an indirect method.
Exa mple: In the case of specifying a moving distance directly
&001+M1,A[2],30000 
Moves the position of motor #1 by 30,000 pulses in the CW
direction.
Deceleration is performed according to the low step
pulse saved in low step No.2.
Exa mple: In the case of specifying a moving distance indirectly
&001+M1,A[1],P[12] 
Moves motor #1 in the CW direction by the pulses defined in
position pulse table No.12. Deceleration is performed according
to the low step pulse saved in the low step No.1.
Position pulse table
Position
number
0000
0001
0002
0003
0004
0003
2043
2044
2045
2046
2047
Position pulse
000050000
000087500
000005000
000037512
000005000
000050000
000000000
000000000
000000000
000000000
000000000
To indirectly specify a moving distance in a move co mmand, use
the position pulse table.
The table consists of position numbers and corresponding position
pulses, which represents up to 2048 pieces of position data for
each motor.
Data can be set by the command "3PS".
After executing the co mmand "FPS" to save data into the RC-410's
built-in flash me mory, the data is retained even if the power is
turned off.
It takes about 1.5 seconds to write the data.
The syntax of a position pulse in a move command is as follows:
・Position syntax
Position syntax is a syntax used to indirectly specify a moving
distance in a move command.
Use the following notation of moving data in each move command.
Syntax : P[ pn ]
pn
: Position number
Valid value for pn
Decimal : 0 - 2,047
‘+’
: Position index +1
‘-’
: Position index -1
For more information about the position index, see the next section.
59
13. Motor control functions
Exa mple: Moving the motor #1 position by 30,000 pulses in the CW direction
・Specifying a moving distance directly
&001+M1,30000
Moves by 30,000 pulses in the CW direction at a high speed.
(Deceleration is performed according to the low step pulse
saved in the low step No.30.)
・Specifying a moving distance indirectly
&003PS1,P[12],30000 
&001+M1,P[12] 
Sets the position No.12 for motor #1 to 30,000 pulses.
Moves the position in the CW direction at high speed by
pulses defined in the position pulse table No.12.
13.3.3 Position index
Instead of specifying a position number each time, you may want to set/get the data in the next
position number to the one you previously used.
In this case, you use a position index.
A position
index is defined for each motor separately.
Exa mple: T o set position pulse No.12 to No.15 for motor #1
&003IS1,12
Sets the position index for motor #1 to No.12.
&003PS1,P[+],10000
Sets the position pulse No.12 for motor #1 to 10,000 pulses.
After the command is executed, the position index is
incremented to 13.
&003PS1,P[+],20000
Sets the position pulse No.13.
&003PS1,P[+],30000
Sets the position pulse No.14.
&003PS1,P[+],40000
Sets the position pulse No.15.
Exa mple: T o move the position of motor #1 from position pulse No.15 to No.12
&003IS1,15
Sets the position index for motor #1 to No.15.
&001+M1,P[-]
Moves motor #1 in the CW direction by the pulses defined in
position pulse table No.15. After the command is executed,
&001+M1,P[-]
the position index is decremented to 14.
Moves by the no. of pulses defined in position pulse No.14.
&001+M1,P[-]
Moves by the no. of pulses defined in position pulse No.13.
&001+M1,P[-]
Moves by the no. of pulses defined in position pulse No.12.
As shown in the exa mples above, once a position index is defined by the command "3IS", you can
use/set a position pulse sequentially by simply specifying a symbol '+' or '-' as a position number.
60
13. Motor control functions
13.4 Home search
13.4.1 Overv iew
T he RC -4 10 ca n a ut o ma tic al ly lo cat e the h o me s ens or an d sea rc h f or th e h o me p os iti on .
Bef ore p erf or min g a "ho me se ar ch " wit h the R C-4 10 , y ou mu st sp eci fy th e fol lo win g par a mete rs .
・Ho me of fse t
:T he dis ta nce b etw ee n the h o me p os iti on a nd th e pos iti on w her e th e
ho me s en sor i s a cti va ted o n i ts CW s ide .
T he "h o me sea rch co mma nd " is use d to det ec t the ho me po si tio n
pre cis el y u si ng th e alg ori th m des cri be d bel ow .
T h e ho me off se t i s
spe cif ie d b y the c o mmand "0S S ".
E xa mpl e: & 3F0SS1,20
・Over-run pulse
Set s t he ho me of fs et to 20 ( pul ses ).
:T he di sta nc e to b e ov er- ru n fro m th e po si tio n wh er e the ho me se ns or i s
act iva te d a t its CW s ide .
Whe n a "ho me se ar ch " co mma nd is e xec ut ed, a mo to r r ev ers es it s
rot ati on di re cti on f ro m C W t o CC W, ac cor di ng to t he al gor it h m sh ow n i n
the fi gur e bel ow , a t t he po sit io n w her e an ove r- run pu ls e mov es awa y
fro m the p os iti on w her e th e ho me se ns or tu rn s on, on it s CW s ide .
T his al go rit h m ens ur es a pr eci se h o me po si tio n b eca us e th e p osi ti on i s
alw ays
de ter mi ned
fro m
t he C CW
sid e.
An o ver -r un p ul se i s
aut o ma ti cal ly de te r mi ned b y t he fo ll owi ng fo r mula .
Ove r-r un pu ls e = Ho me off se t X O ver -r un fac to r
T he ov er -ru n fac to r i s s pe cif ie d b y the c o mman d "0 BS ".
E xa mpl e: & 3F0BS1, 2
Set s t he ov er -ru n fac to r f or mo tor # 1
to 2 ( ti mes ).
T hen t he ov er -ru n pul se wi ll be 10 0 pul se s. (5 0 X 2 = 1 00)
Sensor status: ON
Home offset
CCW limit sensor
Over-run pulse
Home
sensor
CW lim it sensor
CCW direction
CW direction
Established home
Starting point of the hom e search
The current position is on the CCW limit sensor
13.4.2 Home search algorithms
T he be hav io r o f t he ho me sea rc h v ari es de pen di ng on th e moto r p os iti on wh en th e c o mman d i s
e xe cut ed :
Cas e - 1 : T he cu rre nt po si tio n is on th e CW si de of th e ho me sen sor .
Cas e - 2 : T he cu rre nt po si tio n is on th e ho me sen so r.
Cas e - 3 : T he cu rre nt po si tio n is on th e CCW s ide o f t he ho me se nso r.
Cas e - 4 : T he cu rre nt po si tio n is on th e CW li mit s ens or.
Cas e - 5 : T he cu rre nt po si tio n is on th e CCW l i mi t sen sor .
Cas e - 6 : T he cu rre nt po si tio n is on th e CW si de be yon d the C W l i mi t sen so r.
Cas e - 7 : T he cu rre nt po si tio n is on th e CCW s ide b eyo nd th e CCW li mi t s en sor .
61
13. Motor control functions
Sens or s tatus : ON
Hom e offs et
Hom e
s ens or
CCW lim it s ens or
CW lim it s ens or
CCW direction
CW direction
Starting point of the hom e s earch
Es tablis hed hom e
The curre nt position is on the CW side be yond the CW limit se nsor
Case - 1: T he current position is on the CW side of the home sensor
T he fo ll owi ng al go rit h m is ap pl ied t o c as e-1 d esc ri bed i n 1 3. 4.2 .
1: Mov es in t he CCW d ire ct ion a t l ow sp ee d.
2: A h o me o ff set p uls e mov es it fo rw ard a fte r the h o me s ens or is tu rn ed on , a nd th en st op s i t.
T he st op pin g poi nt be co mes th e ho me pos it ion .
Sensor status: ON
CCW limit sensor
Home sensor
CW lim it sensor
CCW direction
CW direction
Starting point of the home search
The current position is on the CCW side beyond the CCW limit sensor
Case - 2: T he current position is on the home sensor
T he fo ll owi ng al go rit h m is ap pl ied t o c as e-2 d esc ri bed i n 1 3. 4.2 .
1: Mov es in t he CW di rec ti on at lo w spe ed .
2: An ov er- ru n p ul se mov es it f orw ar d a ft er th e h o me s en sor is t urn ed of f, an d the n sto ps it .
3: Mov es in t he CCW d ire ct ion a t l ow sp ee d.
4: A h o me o ff set p uls e mov es it fo rw ard a fte r the h o me s ens or is tu rn ed on , a nd th en st op s i t.
T he st op pin g poi nt be co mes th e ho me pos it ion .
Sensor status: ON
Home offset
CCW limit sensor
Over-run pulse
Home
sensor
CW limit sensor
CCW direction
CW direction
Established home
Starting point of the home search
The curr ent position is on the home sensor
62
13. Motor control functions
Case - 3: T he current position is on the CCW side of the home sensor
T he fo ll owi ng al go rit h m is ap pl ied t o c as e-3 d esc ri bed i n 1 3. 4.2 .
1: Mov es in t he CCW d ire ct ion a t l ow sp ee d.
2: Sto ps af te r t he CC W l i mit se nso r is tu rne d on.
3: Mov es in t he CW di rec ti on at lo w spe ed .
4: Con ti nue s to mo ve af ter th e ho me sen so r i s tur ne d o n.
5: An ov er- ru n p ul se mov es it f orw ar d a ft er th e h o me s en sor is t urn ed of f, an d the n sto ps it .
6: Mov es in t he CCW d ire ct ion a t l ow sp ee d.
7: A h o me o ff set p uls e mov es it fo rw ard a fte r the h o me s ens or is tu rn ed on , a nd th en st op s i t.
T he st op pin g poi nt be co mes th e ho me pos it ion .
Sensor status: ON
Home offset
Over-run pulse
Home
sensor
CCW limit sensor
CW limit sensor
CCW direction
CW direction
Established home
Starting point of the home search
The current position is on the CCW side of the home sensor
Case - 4: T he current position is on the CW lim it sensor
T he fo ll owi ng al go rit h m is ap pl ied t o c as e-4 d esc ri bed i n 1 3. 4.2 .
1: Mov es in t he CCW d ire ct ion a t l ow sp ee d.
2: A h o me o ff set p uls e mov es it fo rw ard a fte r the h o me s ens or is tu rn ed on , a nd th en st op s i t.
T he st op pin g poi nt be co mes th e ho me pos it ion .
Sensor status: ON
Home offset
CCW limit sensor
Home
sensor
CW limit sensor
CCW direction
CW direction
Established home
Starting point of the home search
The current position is on the CW limit sensor
Case - 5: T he current position is on the CCW limit sensor
T he fo ll owi ng al go rit h m is ap pl ied t o c as e-5 d esc ri bed i n 1 3. 4.2 .
1: Mov es in t he CW di rec ti on at lo w spe ed .
2: Con ti nue s to mo ve af ter th e ho me sen so r i s tur ne d o n.
3: An ov er- ru n p ul se mov es it f orw ar d a ft er th e h o me s en sor is t urn ed of f, an d the n sto ps it .
4: Mov es in t he CCW d ire ct ion a t l ow sp ee d.
5: A h o me o ff set p uls e mov es it fo rw ard a fte r the h o me s ens or is tu rn ed on , a nd th en st op s i t.
T he st op pin g poi nt be co mes th e ho me pos it ion .
63
13. Motor control functions
Sensor status: ON
Home offset
CCW limit sensor
Over-run pulse
Home
sensor
CW lim it sensor
CCW direction
CW direction
Established home
Starting point of the hom e search
The curre nt position is on the CCW limit sensor
Case - 6: T he current position is on the CW side beyond the CW lim it sensor
T he fo ll owi ng al go rit h m is ap pl ied t o c as e-6 d esc ri bed i n 1 3. 4.2 .
1: Mov es in t he CCW d ire ct ion a t l ow sp ee d.
2: A h o me o ff set p uls e mov es it fo rw ard a fte r the h o me s ens or is tu rn ed on , a nd th en st op s i t.
T he st op pin g poi nt be co mes th e ho me pos it ion .
Sensor status: ON
Home offset
CCW lim it sensor
Home
sensor
CW limit sensor
CCW direction
CW direction
Established home
Starting point of the home search
The current position is on the CW side be yond the CW limit se nsor
Case - 7: T he current position is on the CCW side beyond the CCW limit sensor
In the s itu at ion d esc rib ed in c ase -7 in 1 3.4 .2 , t he RC -4 10 CA NNO T p er for m a h o me s ea rch .
Sensor status: ON
CCW lim it sensor
Home sensor
CW limit sensor
CCW direction
CW direction
Starting point of the home search
The current position is on the CCW side be yond the CCW limit sensor
13.4.3 "S top based on a home sensor" function
RC- 410 h as an a bil ity t o sto p a r un nin g mo tor i mme di ate ly af te r t he ho me se ns or tu rn s e it her o n
or off .
T his al low s you t o p er for m you r own h o me s ear ch pr oce du res .
Whe n y ou e xecu te a mov e co mma nd (e. g. , "2+M ") a ft er iss ui ng th e c o mman d "0 US " w it h
par a me te r '1 ' or '2 ', th e mot or wi ll be hav e as fol lo ws:
64
13. Motor control functions
・Wh en "0US " is se t to '1 '
T he mo to r wil l sto p i mmed iat el y w he n the R C-4 10 d ete cts t ha t t he h o me s ens or i s
tur ned on .
T h en b it 5 of th e co mpl et ion -o f- mov e fa ct or f la g ( "S top ba sed on a
ho me s en sor ") i s s et to 1 , w hi ch is ob ta ine d by th e c o mman d "9 MD ".
If the ho me se ns or is al rea dy tu rn ed on wh en a mov e c o mman d i s iss ue d, th e
mot or d oes no t st art to r un , an d bi t 5 of t he mot or c ond it ion fla g ( "S to p ba sed on a
ho me s en sor ") i s s et to 1 .
・Wh en "0US " is se t to '2 '
T he mo to r wil l sto p i mmed iat el y w he n the R C-4 10 d ete cts t ha t t he h o me s ens or i s
tur ned off .
T hen bit 5 of the co mpl eti on -of - move fac to r fl ag ( "S to p ba se d on a
ho me s en sor ") i s s et to 1 , w hi ch is ob ta ine d by th e c o mman d "9 MD ".
If t he ho me sen so r i s a lre ad y t ur ned of f w he n a mo ve co mma nd is iss ue d, th e
mot or d oes not s ta rt t o ru n, a nd bi t 5 o f th e co mpl et ion -o f- move fac to r fl ag ( "S to p
bas ed on a ho me se nso r ") is se t t o 1.
C AUT IO N:
・T his fu nct io n w ill b e d is abl ed wh en th e mot or st ops , w he the r the f act or th at ha s
for ced t he mo tor t o s to p i s t hi s f un cti on or n ot.
・T his fu nct io n c an not b e u se d t og eth er wi th ho me se arc h co mma nds s uch a s "0 0M "
and "0 QM ".
T he f unc ti on w il l be au to mat ica ll y di sa ble d w hen a h o me se ar ch
co mman d is e xecu te d.
・ No te t hat a mot or wi ll s top IMME D IAT E LY w hen t he s tat us o f a ho me se nso r
cha nge s, whe n i t i s be in g u sed at hi gh s pe ed.
T he s top pi ng p oi nt may va ry
dep end in g o n the l oad .
・Sample usage of "Stop based on a home sensor " f unct ion
T he fo llo wi ng ho me s ea rch pr oc ess is an e xa mple th at us es a "st op ba sed on a ho me
sen sor " fu nc tio n.
T he e xa mp le ass u me s t ha t th e s ta rti ng poi nt of ho me s ear ch is on t he CW sid e o f t he
ho me s en sor a nd a tar ge ted mo to r i s #1.
Ste p 1: M ov es i n th e CC W di rec ti on a t lo w sp ee d an d st ops whe n th e h o me sen so r
is tur ne d o n.
Ste p 2 : Mov es ag ai n b y 100 p uls es in th e CCW d ire ct ion , and t hen s top s it.
T he st op pin g poi nt be co mes th e ho me pos it ion .
Sensor status: ON
100 pulses
CCW limit sensor
Home
sensor
CW limit sensor
Starting point of
the home search
CCW direction
CW direction
Established home
Example of special home search
E xa mpl e: St ep 1
&000U S1,1
Con fig ur es pa ra met er s so t hat the mot or s top s wh en t he
ho me s en sor f or mo tor #1 i s t ur ned o n.
65
13. Motor control functions
&002-M 1,Z
Mov es in fin it ely in t he CC W d ir ect io n a t low s pee d.
T he mo to r s to ps wh en th e h o me s ens or is t urn ed on .
Not e: T his e xa mp le a ssu me s th at a cha ng e in the sta tu s of t he ho me se ns or i s th e on ly
fac tor t o s to p t he mo to r.
E xa mpl e: St ep 2
E xe cut es th e fol lo win g c o mman d aft er co mp let in g s te p 1 .
&002-M 1, 100
Mov es by 10 0 pul se s i n t he CW d ire ct ion a t l ow sp ee d.
E xa mpl e: St ep 3
Ini tia li ze ho me po sit ion a fte r co mpl eti ng st ep 2.
&006PS1
Cle ars t he po sit io n o f mot or #1 to 0 pu ls e.
&009CS1
66
Cle ars e rro rs in th e con tr oll er st at us fl ag fo r mot or #1.
13. Motor control functions
13.5 Stall detection
13.5.1 Overv iew
A s tep pi ng mot or us ua lly r ota te s i n s yn c w it h p uls es pr ov ide d by a d ri ver .
Ho we ver , it may b e
out of s ync w hen a mo to r s pee d is ab rup tl y c ha nge d or an e xce ssi ve lo ad is ap pl ied .
T he con di tio n u nde r w hic h t he rot at ion of a st ep pin g mot or i s o ut o f s ync wi th pul se s pr ov ide d b y
a dr iv er i s r ef err ed to as a "st al l".
T he R C-4 10 pr ovi de s a sta ll de tec ti on fea tu re a s d es cri be d
bel ow.
13.5.2 S tall detection w ith a ST ALL sensor
T o use a st al l d et ect io n f eat ur e, a sta ll de te cti on pl at e a nd a st all s ens or mu st be in st all ed .
・St all d ete ct ion p lat e
A p lat e tha t gen er ate s On/ Of f p eri od s f or st al l d et ect io n.
・St all s ens or
A s ens or th at co nv ert s the O n/O ff pe ri ods o f a s tal l det ec tio n pla te t o
an ele ct ric s ign al.
T he fo ll owi ng fi gur e sho ws e xa mple s of st all d ete ct ion s yst e ms .
< Stall detection on a rotation axis >
< Stall detection on a linear axis >
STALL sensor (This component moves in sync
with the rotation of a motor.)
Stall detection disc
Dual-shaft motor
ON
Stall detection plate
OFF
ON OFF
STALL sensor
Stall detection system
T he ou tpu t sig nal f ro m th e s ta ll sen so r i n t he ab ove s yst e m al ter na tes be tw een On a nd Off wh il e
the mo to r i s rot ati ng .
T he R C-4 10 c he cks t he ST ALL se ns or si gn al i n the cen te r pos it ion of th e On a nd O ff p eri od .
T heref or e, yo u mus t s pec if y t he fo ll owi ng pa ra met er s:
・On /Of f per io ds of th e sta ll de tec ti on pl ate
Spe cif ie s i n pul se s t he On /Of f per io d o f the s tal l det ec tio n pla te .
T his va lue de ter min es the pul se int er val bet we en c hec ks for a st all .
def ine d by the c o mman d "Q IS ".
T he v alu e is
D ete ct ion s are ac tu all y per fo r me d w it h a n i nt erv al of
hal f t he va lu e. (T he ch eck s a re do ne in t he ce nte r pos it ion o f b ot h O n and O ff pe rio d.)
E xa mpl e: & 3FQIS1, 400
Set s th e On /Of f pe ri od o f th e st all det ec tio n pl at e fo r
mot or #1 to 4 00.
: Point where a detection is performed
Home position
Starting point of a move
One period of
stall detection
Stall detection
plate: ON
Checkpoints for stall detection
67
13. Motor control functions
・ Ac tiv at ing a st all d ete ct ion f eat ur e
Spe cif y tha t a s ta ll de tec tio n wil l be pe rfo r med wi th a ST ALL se nso r.
Use th e co mma nd "QSS " to en ab le th e s ta ll de tec ti on fe atu re .
E xa mpl e: & 3FQSS1, 1
Det ect s for s tal lin g of mo tor # 1.
・Se ts th e i np ut lo gic (i .e . n or mal ly -op en or - clo se d) of a sta ll se ns or
Spe cif y the s ign al lo gic o f a s tal l sen so r.
Bef ore loc at ing th e ce nte r p osi tio n o f th e st al l de tec ti on p la te, the ou tpu t fr o m a ST ALL
sen sor ( at g ene ral i np ut D0 f or moto r #1 a nd D8 f or mo to r #2) mus t be ad jus te d to 1 by
iss uin g the c o mman d "D IS ".
E xa mpl e: & 3FD I S0,1
Des ign at es the ge ne ral -pu rp ose in pu t D 0 a s a "nor ma lly
clo sed " co nt act .
・Lo cat in g t he ce nt er po sit ion o f a s tal l det ec tio n pla te
Mov es it to t he ce nte r o f the O N p er iod o f t he st al l d et ect io n p la te.
T o use a st all de tec ti on f ea tur e, e xe cu te t he co mman d "0Q M " to lo cat e t he c en ter
pos iti on of t he ON p er iod of a s tal l se ns or pla te, an d d esi gn ate th e po si tio n a s th e h o me
pos iti on , a ft er e xecu tin g a h o me s ea rch c o mman d.
E xa mpl e: & 3F0QM 1
Mov es it to t he ce nt er po sit io n o f the s tal l det ec tio n pl ate
for mo to r # 1.
Aft er a st al l is d ete ct ed wi th t his f ea tur e, s ubs eq uen t mo ve c o mman ds wi ll r esu lt i n err or s (er ro r
cod e: @52) b eca us e p os iti on ing c ann ot be d on e p re cis el y.
T o c le ar th e e rr or st atu s, d o e it her o f
the fo ll owi ng st ep s:
・Pe rfo r m a ho me se arc h a nd lo ca te th e c en ter p osi ti on of a st all d ete cti on pl at e a ga in.
・E xecu te th e co mma nd "Q RS " to cl ea r t he st al l e rr or.
CAUTION
Ele ctr ic al noi se on t he wir in g o f a ST AL L sen so r may ac cid en tal ly ca use a ST AL L e rro r eve n i f a
sta ll ha s n ot ac tu all y o cc urr ed .
68
13. Motor control functions
13.6 Status
13.6.1 Overv iew
RC- 410 i nfo r ms u ser s of th e f ol low in g s ta tus :
・Co ntr ol ler s tat us
・Co mpl et ion -o f- move f act or
・Op era ti ona l sta tu s o f a u ser p rog ra m
Det ail s are d esc rib ed be lo w.
13.6.2 Controller status
A controller status consists of seven pieces of information to inform users about the status of the RC-410.
T o get a co nt rol le r s tat us , u se th e co mma nd "9CD ".
・Co mmu ni cat io n e rro r
: Se t t o 1 if a c o mmun ic ati on er ror oc cur s a t a n R S- 485 po rt du rin g
co mmun ic ati on .
・ST ALL e rro r
: Set to 1 if a ST ALL e rro r is de tec te d in a tar ge ted mot or , wh ich fo rce s
・ In iti al i za ti on err or
: S et to 1 if t he in iti al i za ti on da ta *1 is f ou nd to be i nva li d w he n t he p owe r
・Co mma nd er ro r
: S et to 1 if a co mma nd er ror o ccu rs .
・EM S e rr or
: Set to 1 if a n EM S si gna l, w hi ch f orc es t o th e mo to r to s to p, i s de te cte d
・Li mit e rro r
whi le th e t ar get ed mo tor i s r un nin g.
: S et t o 1 if th e CW o r CCW l i mit se ns or si gn als , wh ich f orc e th e mo tor t o
・Ou tpu t pul se st at us
sto p a re de te cte d whi le th e t ar get ed mo to r i s run ni ng.
: S et to 1 wh ile t he ta rge ted moto r is ru nni ng .
the mo to r t o sto p.
is tur ne d o n.
Iss uin g the c o mman d "9C S " c le ars a ll of th e abo ve st at us to 0 e xc ep t “ Ou tpu t pul se st at us” .
E xe cut in g th e c o mman d "9C S" cl ear s t he ST ALL err or bit , b ut i t d oes no t c lea r t he s ta ll c on dit io n
wit h t he co mma nd "QR D".
T o cle ar th is st all e rro r sta tu s, ei the r per fo r m a ho me s ea rch o r e xe cut e the c o mman d "Q RS ".
In o pe rat io n mode s 0 t o 3 , mot or #1 and #2 e ach ha ve th eir ow n con tr oll er st atu s.
In mod e 4 ,
whe re al l I/O t er mina ls ar e us ed fo r g en era l pur po se, b its r ep res ent in g a mot or co ndi ti on (M ovi ng ,
Li mit er ror , EMS er ro r, an d ST ALL er ror ) are a lwa ys 0.
*1
Fo r m or e i nfo rm ati o n ab o ut the i ni tia li za tio n d ata whe n p o we r is tur ned o n, see " 18 . De fa ult Va lue" .
69
13. Motor control functions
13.6.3 Completion-of-move factor
A co mpl et ion -o f- mov e fa ct or c ons is ts o f s i x k in ds o f i nfo r mati on tha t s how s u ser s t he r ea son wh y
a moto r has s top pe d.
T o o bta in a co mpl et ion -o f- mov e f ac tor , use t he co mma nd "9MD ".
T here ar e t wo co mpl et ion -o f- mov e f ac tor s for moto r #1 an d # 2.
・ST ALL e rro r
: S et to 1 if a ST ALL e rro r, wh ich f orc es a mo tor t o s to p i s det ect ed .
・CW li mi t e rro r
: S et to 1 i f a C W li mit se ns or si gna l is tu rn ed on w hil e a mot or is r un nin g
・CC W l i mi t err or
in the C W d ir ect ion .
: S et to 1 if a CCW li mi t s en sor si gn al is tu rn ed on wh ile a mo to r i s
・EM S e rr or
run nin g in th e C CW di rec ti on.
: S et to 1 if a n EMS s ign al , whi ch fo rc es th e mot or to s top , is de te cte d
・St op co mma nd
whi le a mot or is ru nn ing .
: S et to 1 if a mo tor is s top pe d b y a s to p c o mman d (i. e. "5 IS" or "5S S ").
・St op ba sed o n a h o me s ens or *1 :
Set t o 1 if a mo tor b eg ins to r ota te w ith the "s to p bas ed o n a h o me
sen sor " fun ct ion en abl ed and is for ce d to st op b ec aus e o f a c ha nge in
the ho me se ns or st atu s.
A c o mple ti on- of - mo ve f act or i s au to mat ica ll y cle ar ed to 0 whe n th e su bse qu ent mov e co mma nd i s
e xe cut ed .
Not e tha t a co mpl et ion -o f- mov e fac tor s ta ys at 0 w hi le th e mo tor i s ru nni ng .
T her ef ore , th e
co mman d "9 MD " doe s not r etu rn me an ing fu l i nf or mat ion d uri ng a mov e.
*1
Fo r mo re i nfo r ma tio n a bo ut a "s top b ase d o n a hom e se nso r" func tio n, s ee "13 .4 .3 S top b ase d o n a
hom e se nso r func ti o n" .
13.6.4 Running status of a user program
T he ru nn ing s tat us of a us er pr og ra m c ons is ts of si x kin ds of i nf or mati on th at c an be sh ow n t o a
use r.
T o o bt ain t he ru nni ng st atu s of a use r pro gr a m, u se th e c o mman d "U RD ".
・Ru nni ng st at us
: S et to 1 wh ile a us er pr ogr a m is r unn in g.
・ Ab ort ed by "UE S "
: Se t to 1 wh en a pr ogr a m i s t er min ate d be ca use th e co mma nd
"U ES " has b een e xec ut ed via a co mmu ni ca tio n lin e.
・ Ab ort ed by c o mman d e rro r
: Se t t o 1 if a co mma nd err or oc cur s w hi le a u ser pr og ra m is
run nin g.
・ Ab ort ed by b ran ch de st ina tio n err or :
Set to 1 if a br an ch de sti na tio n def in ed in a ju mp in str uc tio n
・ Ab ort ed by "EE D "
(e. g., "JM P ") is in val id .
: Se t t o 1 w he n a pro gr a m i s t er min ate d w it h th e u ser pr og ra m
co mman d "E ED ".
・ Ab ort ed by d upl ic ate d mov e c o mman ds :
Set to 1 if a mo ve c o mman d i s e xec ute d in a u ser pr ogr a m whi le
a move c o mman d i s bei ng e xecu te d v ia a co mmu ni cat io n l in e.
T he ru nni ng sta tu s o f a use r p ro gra m i s c lea re d to 0 whe n a st art co mma nd fo r t he use r p rog ra m
(co mma nd "URG ") i s e xe cu ted .
70
13. Motor control functions
13.7 Input/output port
13.7.1 Overv iew
RC- 410 h as fo ur ty pes of i npu t por t and t wo ty pes o f o ut put p ort a s s ho wn be low .
Inp ut po rts (T he n u mb ers o f d ed ica te d p or ts va ry de pen di ng on op er ati on mo de . * 1 )
・Se nso r inp ut s a nd GR OW in put f or mo tor c ont ro l ············ 11 ter mi nal s
For mo to r # 1
ST ALL, O RG, C W, CCW , GRO W
For mo to r # 2
ST ALL, O RG, C W, CCW , GRO W
Sha red b y b ot h mot ors
EMS
・Ge ner al- pu rpo se in pu ts ··················································· 16 ter mi nal s
D0 - D 15
・ In put s w it h a n int er rup t fun ct ion ······································ 2 t er min als
D14 an d D15
・Cl ock pu ls e i np uts ··························································· 2 t er min als
CLK 1 a nd CL K2
1
Out put p ort s (T he nu mber s of de dic at ed po rts v ary d epe nd ing o n o pe rat io n mod e. * )
・Ou tpu ts fo r c on tro ll ing moto rs ········································· 6 t er min als
For mo to r # 1
ST OP/ST ART , C W/C CW, S PEE D H/L
For mo to r # 2
ST OP/ST ART , C W/C CW, S PEE D H/L
・Ge ner al- pu rpo se ou tp uts ················································· 16 ter mi nal s
D0- D15
*1
: Fo r de tai ls abo ut a n op er ati o n mode , s ee "1 3.1 Ope ra tio n mod e" .
T he fo ll owi ng se cti on s d es cri be th e det ai ls of th e abo ve in pu t/o ut put p ort s.
13.7.2 S ensor inputs for motor control
RC- 410 h as el eve n sen sor i npu t por ts as s how n bel ow fo r mot or co ntr ol .
・ST ALL ( mot or #1 ) : S ens or in pu t f or st all d ete ct ion *1 .
・OR G ( mo tor # 1)
: S ens or in pu t i s use d to loc at e t he me ch ani ca l h o me i n ho me- sea rc h
pro ces s.
・CW ( mot or #1)
: S ens or in pu t f or an o ver -tr av el li mit i n t he CW d ire cti on .
・CC W ( mo tor #1 )
: S ens or in pu t f or an o ver -tr av el li mit i n t he CC W dir ect io n.
・GR OW ( moto r #1) : Inpu t for a si gn al fro m the G ROW O UT te r mi na l *2 on a RD- 3 xx d ri ver .
・ST ALL ( mot or #2 ) : S ens or in pu t f or st all d ete ct ion *1 .
・OR G ( mo tor # 2)
: S ens or in pu t i s use d to loc at e t he me ch ani ca l h o me i n ho me- sea rc h
・CW ( mo to r # 2)
: S ens or in pu t f or an o ver -tr av el li mit i n t he CW d ire cti on .
・CC W ( mo tor #2 )
: S ens or in pu t f or an o ver -tr av el li mit i n t he CC W dir ect io n.
pro ces s.
・GR OW ( moto r #2) : Inpu t for a si gn al fro m the G ROW O UT te r mi na l *2 on a RD- 3 xx d ri ver .
・EM S
: E mer ge ncy s top i npu t ( sh are d by mo tor # 1 a nd #2 )
*1
:Fo r de tai ls abo ut s ta ll de te c tio n, se e "13 .5 S ta ll d e tec tio n".
*2
:Fo r de tai ls abo ut a GROW OUT te r mi na l, s ee "13 .2.2 Co ntro lli ng RD -3 xx se rie s d ri ve rs" .
71
13. Motor control functions
Sen sor i npu ts fo r mot or co ntr ol ca n be ma nag ed wi th th e fol lo win g c o mman ds :
・Se tti ng th e inp ut lo gi c o f s en sor s ….… Sets the input logic (i.e., normally-open or -closed) of each sensor.
E xa mpl e: & &&& & &&&1
Set s t ha t t he ST AL L s en sor i npu t be no r ma ll y-c lo sed
con tac t. (T hi s c o mman d is al so us ed to c on fig ur e a
gen era l- pur po se in put .)
・Ge tti ng th e sta tu s o f a s ens or in pu t … G ets t he in put s tat us of e ach s ens or .
E xa mpl e: & &&C&& 1
Get s t he in put st at us of se nso r i np uts fo r c on tro ll ing
mot or #1 .
13.7.3 General-purpose input
T he up per mo unt ed co nne ct or ( D0 -D1 5) of th e RC -4 10 can be as sig ne d t o 1 6 ge ne ral -p urp os e
inp ut po rts .
Gen era l- pur po se in put s c an be mana ge d w it h t he fo ll owi ng co mma nd s:
・Setting a general-purpose input logic … Sp ec ifi es th e inp ut l ogi c (i. e. , n or mal ly- op en or - clo se d) of
E xa mpl e: & &&& & &&&1
eac h g en era l- pur po se in put .
Des ign at es D0 as a "nor ma lly -c los ed " co nta ct .
・Ge tti ng th e sta tu s o f gen er al- pur po se in put s … G et th e sta tu s o f gen er al- pur po se in put s.
E xa mpl e: & &&C& &
Get s t he st at us of ge ne ral -pu rp ose i npu ts .
13.7.4 Input ports w ith an interrupt function
T wo po rt s ( D1 4 a nd D1 5) at th e upp er co nn ect or of t he RC -41 0 can b e u se d a s int err up t t er min al s.
T hese in put p ort s c an be u sed t o c apt ur e t he cu rr ent moto r p os iti on wh en th e sta tu s o f t he po rt s
cha nge .
Inp ut po rts w ith a n i nt err upt f unc ti on ca n b e man ag ed wi th th e f ol low in g c o mman ds:
・Se tti ng a ge ner al -pu rp ose i npu t log ic … Set s the i npu t log ic (i .e ., no r ma ll y-o pe n o r -cl os ed) o f
eac h g en era l- pur po se in put .
E xa mpl e: & &&& & &1&& 1
Des ign at es D1 5 a s a "n or mall y- clo se d" c ont ac t.
・Ge tti ng th e sta tu s o f gen er al- pur po se in put s … G et s t he st at us of ge ne ral -p urp ose i npu ts .
E xa mpl e: & &&C& &
Get s t he st at us of ge ne ral -pu rp ose i npu ts .
1
・Co nfi gu rin g a c ap tur e p os iti on ………… Specifies a position no. * to store a position when an interrupt occurs.
E xa mpl e: & &&C& &1&& 1& 2& 
Spe cif ie s th at a p os iti on of mot or #1 be sto re d i n p osi ti on
No. 25 wh en an in te rru pt oc cur s at D1 5.
*1
:Fo r d etai ls ab o ut po siti o n numb er s , see " 13 .3 Po siti o n p ulse" .
・Se tti ng an i nte rr upt mo de …… …… ….. C onf ig ure s the t rig ge r o f an int er rup t.
E xa mpl e: & &&C& &1&& 1
An int er rup t occ ur s a t t he fa ll ing e dge o f D 15 in pu t.
・Se tti ng a va lid r ang e for in te rru pt …. . Specifies a pulse range where an interrupt is considered valid.
E xa mpl e: & &&C&&1&& & &&&&& An int er rup t is ef fe cti ve o nly i f a mot or po sit io n is
bet wee n -50 a nd 50 .
72
13. Motor control functions
13.7.5 Outputs for motor control
T he RC -4 10 ca n con tr ol RO RZE R D-1 xx o r R D- 3 xx s eri es d riv ers ( bu ilt -in o sc ill at or ty pe dr ive rs )
in ope ra tio n mod e 0-3 , w hi ch is sp ec ifi ed by a co mma nd "E AS".
Mot or co ntr ol si gn als ar e gen er ate d whe n a mov e c o mman d suc h as "1+ M " i s e xe cu ted .
In mod es i nte nd ed to c ont rol mot ors , out pu t por ts fo r mot or c ont ro l c an not b e man ip ula te d w it h
co mman ds us ed to c ont rol g ene ra l-p ur pos e out pu ts.
13.7.6 General-purpose output
T he low er mo unt ed co nne cto r ( D0 - D 15) of th e R C-4 10 can be as sig ne d t o 1 6 ge ne ral -p urp os e
out put p ort s.
Gen era l- pur po se ou tpu ts ca n b e man ag ed wi th th e f ol low in g c o mman ds :
・Se tti ng th e sta tu s o f gen er al- pur po se ou tpu ts
E xa mpl e: & &&C&&& &&2&
Set s t he st at us of a ge ner al- pu rpo se ou tp ut po rts .
13.7.7 Algorithm for the detection of changes in an input port
RC- 410 use s th e f oll ow ing alg or ith m to avo id adv ers e e ffe ct s of e le ctr ic al n ois e a nd d ete ct s
cha nge s in se nso r inp ut po rt an d g en era l- pur po se in put p ort c orr ec tly .
Start
Reads the status of inputs ports
every 1ms.
Yes
HL=High?
Increments CT (max.: MC)
CT=MC?
No
Decrements CT (min.: 0)
No
No
Yes
SL=Low?
HL: Input port level recognized by hardware.
SL: Input port level recognized by software.
CT: Counter
MC: Maximum value of the counter (specified by a command "DCS")
CT=0?
Yes
No
No
Yes
SL=High?
Yes
SL=High
SL=Low
End
・T he f ol low in g s te ps are e xec ut ed ev ery 1 ms.
・ If an in put le ve l r eco gn i ze d b y t he ha rdw ar e i s Hi gh , t he cou nt er is inc re men te d.
N ote th at th e
ma xi mu m val ue of th e cou nt er is no t mor e tha n the o ne sp eci fi ed by th e c o mman d "D CS ".
・ If an in put le vel re co gni ze d b y th e h ar dwa re is Lo w, t he co unt er is de cre me nte d.
N ote th at th e
min i mu m val ue is no t les s tha n 0.
・ If th e c ou nte r v al ue is its ma xi mu m a nd the i npu t l ev el rec og ni zed by th e s of twa re is Lo w, th e
lev el is mo di fie d t o Hig h.
・ If t he c oun te r val ue i s 0 an d the i np ut l eve l re cog ni zed b y th e so ftw ar e is Hi gh , th e lev el i s
mod ifi ed to L ow.
・Wh en a co mma nd a cq uir es an i np ut v al ue o f a por t, a n i npu t l eve l r eco gn i ze d b y th e so ft war e i s
ret urn ed af te r t he le vel i s p ro ces se d a cc ord in g t o the i npu t por t log ic.
73
13. Motor control functions
T his f ea tur e all ows y ou to ig no re un sta bl e a re as af fec te d b y ele ct ric al no ise .
Unstable area affected by noise
Counter is updated
Status
HI
Input level recognized by hardware
LOW
Counter value
0
1
2
3
2
1
2
1
0
0
1
2
3
4
5
5
5
HI
Input level recognized by software
LOW
1ms
Time (ms)
T his f ea tur e mak es a ti me del ay (a t lea st 1 ms mul ti pli ed by th e ma x c oun t) .
T he fe at ure c an be di sa ble d by set ti ng th e ma xi mu m cou nt er va lue t o 1 wi th th e co mma nd "DCS ".
In th is ca se , the i np ut va lu e is de te r mi ned b y an i npu t le vel r ec ogn i zed by t he h ard wa re an d th e
inp ut lo gic o f t he in pu t p ort .
T his f ea tur e can b e mani pu lat ed by t he fo llo wi ng co mma nd s:
・Se tti ng th e noi se ca nc el par a mete rs … Se t t he ma x. co un t u se d i n the n ois e c an cel f unc ti on.
E xa mpl e: & &&& C&1& &
Assigns 5 to the maximum count of general-purpose input bit 1.
E xa mpl e: & &&& C&1&&1 
Disables the noise cancel function of an EMS sensor.
13.7.8 Automatic output function w hen an error occurs
RC- 410 ca n c ha nge th e o utp ut le vel of a gen er al- pur po se out pu t p ort wh en an y o f th e f ol low in g
err ors o ccu r.
T his f eat ur e i s act iv ate d by th e c o mman d "C ES ".
・EM S e rr or
・Li mit e rro r ( CW or C CW)
・St all e rro r
T his f ea tur e all ow s you t o a ut o ma te p roc ed ure s to co ntr ol moto rs.
Fo r e xa mpl e, y ou ca n
aut o ma ti cal ly ap pl y a n e le ctr o magn et ic br ake w hen a st al l o cc urs .
・Automatic output when an error occurs … Se ts a pa rti cul ar ou tp ut po rt wh en an er ro r o cc urs .
E xa mpl e: & &&C& &1& && && 1 
Set s a g en era l- pur po se o ut put D7 to 1 wh en a st all er ror
occ urs i n mot or #1 .
・Di sab li ng th e a ut o ma tic o utp ut fe at ure w hen a n e rr or oc cur s
E xa mpl e: & &&C& &1& &
Dis abl es t he e rr or ou tp ut f unc ti on w hen a st all err or o cc urs
in mot or #1 .
・C l e a r i n g a n e r ro r o u t p u t p o r t … … Res et s th e out pu t po rt le ve l, wh ic h ha s bee n au to mat ic all y
E xa mpl e: & &&C& &1
74
set by t his f unc ti on, t o t he or igi na l v al ue.
Cle ars t he st atu s of an er ror o utp ut po rt fo r mot or #1 .
13. Motor control functions
13.8 Event response
13.8.1 Overv iew
RC- 410 ca n sen d a L ink M ast er a mes sa ge, w hic h i s cal le d a n "e ven t mes sa ge ", wh en th e
con tro ll er de tec ts so me ch ang es in c ert ai n c on dit io ns.
If t he co mma nd "XID " h as be en e xe cut ed fo r th e L in k Ma st er, a mes sag e p ub lis he d fr o m th e
con tro ll er is se nt to a PC a s a "s pec ial r epl y ". A re sp ons e tha t a Lin k Mas ter s en ds to a PC af te r
it rec ei ves a n e ve nt mes sa ge is ca ll ed an "ev ent r esp on se ".
If th e c o mman d "XID " h as no t bee n e xecu te d for t he Li nk M ast er , t he mess ag e pub li she d fro m th e
con tro ll er i s N OT sen t t o a PC . Se e "12 .7 .2 E ve nt res po nse " in the in str uc tio n man ual of th e
RC- 400 f or de tai ls.
13.8.2 T riggers for ev ent messages
RC- 410 s end s an ev ent mess age w hen i t d et ect s the f oll ow ing c han ge s:
・ A cha ng e f ro m 0 to 1 in a co nt rol le r s ta tus ( e xc ep t b it0 ).
・ A cha ng e f ro m 0 to 1 in a co mp let io n-o f- mov e fac tor .
・ A cha ng e f ro m 0 to 1 or v ice v ers a in th e l ev el of a sen so r i np ut.
・ A cha ng e f ro m 0 to 1 or v ice v ers a in th e l ev el of a ge ner al- pu rpo se in pu t.
RC- 410 c an ma sk th e u nn ece ssa ry st at us ch ang es by u sin g the c o mman d "EM S ".
・Se tti ng an ev en t mas k
: Spe ci fy a tri gg er fo r a n eve nt me ssa ge .
E xa mpl e: & &&&& &&&&&& &&&&& &&&&&
T he e ve nt r esp on se i s ma de w he n th e st atu s of
an EMS senso r or the s tatu s of a gen eral- purpo se
inp ut bi t0 ch ang es .
13.8.3 Configuring an event message
T o add t he fo llo wi ng st atu s i nf or mat ion t o a n eve nt me ss age , use t he co mma nd "ESS ".
・Co ntr ol ler s tat us
・Co mpl et ion -o f- move f act or
・T he s ta tus o f s en sor in pu ts
・T he s ta tus o f g en era l pur pos e inp ut s
・T he s ta tus o f g en era l pur pos e out pu ts
・Po sit io n
T he va lu es of th e abo ve in for ma tio n are s et up wh en a tr igg er fo r eve nt me ssa ge s i s det ec ted .
・Setting status types in an event response
E xa mpl e& & &&&&&&&& && 
: Specify the types of status to be added to an event message.
Add s a c o mp le tio n-o f- mov e f act or a nd t he sta tu s of
gen era l- pur po se in put s t o an ev ent mess ag e.
Aft er th e ab ove c o mman d is e xec ut ed, a n ev ent res po nse r et urn ed f ro m a l in k mas te r is se t up a s
fol low s:
Ex am ple : > & 7& X&D [ &&.&&&&&& &&& &&& &&&&] 
① ②
③
④
⑤
⑥
⑦
75
13. Motor control functions
The de sc rip ti on of the e x am ple sta te d o n the p re v ious page
①: T he c har ac ter ( 3Eh ) r ep res en ts th e b eg inn in g o f a r ep ly.
②: T he c har ac ter ( 26h ) i nd ica te s t ha t t he su bs equ en t b od y n u mber i s t wo di git s.
③: T he b ody n u mb er ( "7E ") s pe cif ic to e ven t res po nse s.
④: A c od e r ep res en tin g an eve nt re sp ons e.
⑤: T he b ody n u mb er an d mot or nu mbe r of a con tr oll er at w hic h an ev ent h as occ ur red .
⑥: Sta tu s d at a a dd ed to an e ven t res pon se .
⑦: A t er min at or co de of a rep ly (0 Dh ).
T o obt ai n t he cu rre nt va lue o f a ll st atu s con fi gur ed by th e co mma nd "E SS ", u se th e "ER D "
co mman d.
・Ge tti ng al l sta tu s : G et s t he cu rr ent v alu e of al l s ta tus c onf ig ure d b y the c o mman d "E SS ".
E xa mpl e: & &&&&D&
>&&&&& D&&& &&&& && &&&& 
76
14. Description of Communication Commands
14. Description of Communication Commands
14.1 Interpretation of communication commands
T he co mma nd t abl e.
LSD
■Syntax :
Getting a low step pulse
*1
Operation m ode
0-3
○
4
×
D uring
a m ove
Us er
Program
○
○
& ID LSD mt ,A[ ln ] 
Command syntax
Gets the low step pulse set in low step No.*2 ln for motor mt .
mt Target motor
'1'
ln Low step No.
'2'
Decimal
:Motor #2
:0 - 30
Low step pulse
P arameter syntax
:No.30
>& ID LSD lp 
lp Description of parameters
:Motor #1
If not specified ■Reply:
Command title
(Name and function of the command)
Reply syntax
8-digit decimal
:1 - 1,000,000
(Default: 5,000 for No.30 )
P arameter syntax
Undefined for other numbers.
■Error code:
■Example :
@40
The low step pulse has not been defined.
@69
Invalid operation mode.
& 3 F L S D 1
Gets the low step pulse set in low step No.30 for motor #1.
>&3FLSD00001000
The low step pulse of No.30 is 1,000 pulses.
& 3 F L S D 1, A [ 2 ] 
Gets the low step pulse set in low step No.2 for motor #1.
> &3 F L S D @ 
A command error has occurred because the low step pulse of
S ample of error code
E xample and its description
No.2 has not been defined.
: LSD1
■Sample user program
Executes the command "LSD".
RX buffer
Sample usage in a user
program
Run result (1,000)
Run result set to Result
buffer
■Prerequisite settings:
Command "LSS"
■Related topics:
Low step pulse
Low step No.
*1
*2
Not e: Sh ade d par a mete rs (
Prerequisite settings
A low step pulse defines the position where a motor should begin
to decelerate from the number of a remaining pulses to go before
the motor stops.
For more information about a low step pulse, see "13.2 Motor
control method".
In operation mode 2 and 3, low step pulses are ignored if they are
defined because a low step pulse is automatically calculated by a
RD-3xx series driver.
Related topics
Thirty one low step pulses can be set for both motor #1 and #2.
Low step numbers other than 30 do not have a default value.
If they are used, for example in a move command, before their
values are defined, a command error occurs.
) ar e n ot ma nd ato ry to s pec if y.
・ T he me an ing o f a t abl e to th e r igh t of ea ch co mma nd ti tl e i s as fo llo ws:
Operati on mo de
○ … Av ai lab le in th is /th es e mod e(s )
0-3
4
× … Un av ail ab le in th is/ th ese mode (s )
○
×
Duri ng
a mo ve
Us er
Program
○
○
During a move … Indicates whether the command can be executed while a motor is running.
User program …Indicates whether the command can be executed in a user program.
○ … Av ai lab le
× … Un av ail ab le
For de ta ils a bou t a u ser p rog ra m, se e "1 5. Us er Pr ogr a m Co mma nd ".
77
14. 0 command (Home search)
14.2 0 command – 14.15 U command
The following sections describe in detail each communication command used for the RC-410.
00M
■Syntax:
Operation mode
0-3
4
○
×
Home search
User
Program
×
○
& ID 00M mt 
Searches for the home position of motor mt at
mt
Target motor
■Reply:
> & ID 00M 
■Error code:
@50
@51
@55
■Example:
During
a move
low speed.
‘1’
:Motor #1
‘2’
:Motor #2
‘AL’
:Both motors
@69
The motor is running.
The EMS sensor is turned on.
Both the CW and CCW sensor are turned on at the same time.
Or both the Home and CW sensor are turned on at the same
time.
Invalid operation mode.
& 3 F0 0M 1 
> & 3 F 00 M 
Performs a home search for motor #1.
A home search has begun.
■Sample user program: 00M 1
Executes the command “00M".
RX buffer
No change
■Prerequisite settings: Command "0SS"
Specifies a home offset.
■Related topics:
For details about a home search, see "13.4 Home search".
If the completion-of-move function has been configured, a
completion-of-move response is sent when a motor stops.
04M
■Syntax:
Home search
Completion-of-move response
Home search compatible with RORZE RC-204
Operation mode
0-3
4
○
×
During
a move
User
Program
×
○
& ID 0 4M mt 
Performs the home search (compatible with RORZE RC-204) for motor mt .
The difference from the command "00M" is that the position after home searching is
established on the CW side of the home sensor according to the setting of the command
"0SS".
mt
78
Target motor
‘1’
:Motor #1
‘2’
:Motor #2
‘AL’
:Both motors
14. 0 command (Home search)
■Reply:
> & ID 04M 
■Error code:
@50
@51
@55
■Example:
@69
The motor is running.
The EMS sensor is turned on.
Both the CW and CCW sensor are turned on at the same time.
Or both the Home and CCW sensor are turned on at the same
time.
Invalid operation mode.
& 3 F0 4M 1 
> & 3 F 04 M 
Performs a home search (compatible with RC-204) for motor #1.
A home search has been begun.
■Sample user program: 04M 1
Executes the command “04M".
RX buffer
No change
■Prerequisite settings: Command "0SS"
Specifies a home offset.
■Related topics:
For details about a home search, see "13.4 Home search".
If the completion-of-move function has been configured, a
completion-of-move response is sent when a motor stops.
0BD
■Syntax:
Home search
Completion-of-move response
Operation mode
0-3
4
○
×
Getting an over-run factor
During
a move
User
Program
○
○
& ID 0 B D mt 
Gets the setting of an over-run factor for motor mt .
mt
■Reply:
Target motor
‘1’
:Motor #1
‘2’
:Motor #2
1-digit decimal
:0 - 5
> & ID 0B D ct 
ct
Over-run factor
(Default: 2)
■Error code:
@69
Invalid operation mode.
■Example:
& 3 F0 B D 1 
> & 3 F 0B D 2
Gets the setting of an over-run factor for motor #1.
Indicates that the over-run factor is 2.
■Sample user program: 0B D 1
RX buffer
Executes the command “0BD".
Run result (2)
■Prerequisite settings: None
■Related topics:
Over-run factor
For details about an over-run factor, see "13.4 Home search".
79
14. 0 command (Home search)
0BS
■Syntax:
Operation mode
0-3
4
○
×
Setting an over-run factor
During
a move
User
Program
○
○
& ID 0 B S mt , ct 
Sets the value of an over-run factor for motor mt .
mt
ct
Target motor
Over-run factor
‘1’
:Motor #1
‘2’
:Motor #2
‘AL’
:The same setting for both motors
Decimal
:0 - 5
(Default: 2)
■Reply:
> & ID 0B S 
■Error code:
@69
Invalid operation mode.
■Example:
& 3 F0 B S 1、 2 
> & 3 F 0B S 
Sets the over-run factor for motor #1 to 2.
■Sample user program: LD D0,2
0B S1 , D 0
RX buffer
Assigns 2 to data memory D0.
Executes the command “0BS".
No change
■Prerequisite settings: None
■Related topics:
0QM
■Syntax:
Over-run factor
For details about an over-run factor, see "13.4 Home search".
Locating the center position of a stall detection plate
Operation mode
0-3
4
○
×
During
a move
User
Program
×
○
& ID 0 QM mt 
Locates the center position of a stall detection plate for motor mt .
This command must be executed in order to detect a stall with a STALL sensor.
mt
Target motor
■Reply:
> & ID 0 QM 
■Error code:
@50
@51
@52
@55
@69
80
‘1’
:Motor #1
‘2’
:Motor #2
‘AL’
:Both motors
The motor is running.
EMS error
The stall sensor is turned off when the motor is about to rotate.
The CW or CCW sensor is turned on.
Invalid operation mode.
14. 0 command (Home search)
■Example:
& 3 F0 QM 1 
> & 3 F 0 QM 
■Sample user program: 0 QM 1
Locates the center position of a stall detection plate.
Executes the command “0QM".
RX buffer
No change
■Prerequisite settings: Command "QIS"
Specifies the ON/OFF period of the stall detection plate.
■Related topics:
For details about a home search, see "13.4 Home search".
For details about locating the center of a stall detection plate,
see "13.5 Stall detection".
In the process of locating the center position of a stall detection
plate, the noise canceling function for the stall sensor is
activated as if a "DCS" command has been executed with the
parameter of 3. For details about the noise canceling function,
see "13.7.7 Algorithm for the detection of changes in an input
port" and Command “DCS".
0RD
■Syntax:
Home search
Locating the center of
a stall detection plate
Suppressing a STALL sensor noise
Operation mode
0-3
4
○
×
Getting the retry counts of a home search
During
a move
User
Program
○
○
& ID 0R D mt 
Gets the retry counts of a home search for motor mt .
mt
■Reply:
Target motor
‘1’
:Motor #1
‘2’
:Motor #2
1-digit decimal
:0 - 9
> & ID 0R D dt 
dt
Retry count
(Default: 0)
■Error code:
@69
Invalid operation mode.
■Example:
& 3 F0R D 1 
> & 3 F 0R D 2 
Gets the retry count of a home search.
Indicates that the retry count of a home search is 2.
■Sample user program: 0R D 1
RX buffer
Executes the command “0RD".
Run result (2)
■Prerequisite settings: None
■Related topics:
Home search
For details about a home search, see "13.4 Home search".
81
14. 0 command (Home search)
0RS
Operation mode
0-3
4
○
×
Setting the retry counts of a home search
During
a move
User
Program
○
○
& ID 0R S mt , dt 
■Syntax:
Sets the retry counts of a home search for motor mt .
mt
dt
Target motor
Retry counts
‘1’
:Motor #1
‘2’
:Motor #2
‘AL’
:The same setting for both motors
Decimal
:0 - 9
(Default: 0)
■Reply:
> & ID 0R S
■Error code:
@69
Invalid operation mode.
■Example:
& 3 F0R S 1, 2
> & 3 F 0R S 
Assign 2 to the retry count for the home search of motor #1.
■Sample user program: LD D0,2
0R S 1, D 0
RX buffer
Assigns 2 to data memory D0.
Executes the command “0RS".
No change
■Prerequisite settings: None
■Related topics:
0SD
■Syntax:
Home search
For details about a home search, see "13.4 Home search".
Operation mode
0-3
4
○
×
Getting a home offset value
During
a move
User
Program
○
○
& ID 0SD mt 
Gets the setting of a home offset for motor mt .
mt
■Reply:
Target motor
‘1’
:Motor #1
‘2’
:Motor #2
5-digit decimal
:1 - 65535
> & ID 0 SD dt 
dt
Home offset
(Default: 10)
■Error code:
@69
Invalid operation mode.
■Example:
& 3 F0 SD 2 
> & 3 F 0SD 0 00 2 0 
Gets the setting of a home offset for motor #2.
Indicates that the home offset for motor #2 is 20.
82
14. 0 command (Home search)
■Sample user program: 0SD 1
Executes the command “0SD".
RX buffer
Run result (20)
■Prerequisite settings: None
■Related topics:
0SS
■Syntax:
Home offset
For details about a home offset, see "13.4 Home search".
Operation mode
0-3
4
○
×
Setting a home offset value
During
a move
User
Program
○
○
& ID 0S S mt , dt 
Sets a home offset for motor mt .
mt
dt
Target motor
Home offset
‘1’
:Motor #1
‘2’
:Motor #2
‘AL’
:The same setting for both motors
Decimal
:1 - 65535
(Default: 10)
■Reply:
> & ID 0 SS 
■Error code:
@69
Invalid operation mode.
■Example:
& 3 F0 S S 2, 2 0 
> & 3 F 0S S 
Assigns 20 to the home offset for motor #2.
■Sample user program: LD D0,20
0S S 1、 D 0
RX buffer
Assigns 20 to data memory D0.
Executes the command “0SS".
No change
■Prerequisite settings: None
■Related topics:
Home offset
For details about a home offset, see "13.4 Home search".
83
14. 0 command (Home search)
0UD
■Syntax:
Operation mode
0-3
4
○
×
Getting the status of the "stop based on a home sensor" function
During
a move
User
Program
○
○
& ID 0U D mt 
Gets about the status of the "stop based on a home sensor" function for motor mt .
mt
■Reply:
Target motor
‘1’
:Motor #1
‘2’
:Motor #2
>& ID 0U D dt 
dt
"Stop based on a home sensor" function
‘0’
‘1’
‘2’
One character
:The function is disabled (default).
:The motor is forced to stop when the home sensor turns on.
:The motor is forced to stop when the home sensor turns off.
■Error code:
@69
Invalid operation mode.
■Example:
& 3 F0 U D 1 
Gets the status of the function for motor #1.
> & 3 F 0U D 2
Indicates that the motor is forced to stop if the home sensor is
turned off while the motor is running.
■Sample user program: 0U D 1
RX buffer
Executes the command “0UD".
Run result (2)
■Prerequisite settings: None
■Related topics: "Stop based on a home sensor" function
84
See "13.4 Home search" for details.
14. 0 command (Home search)
0US
■Syntax:
Configures a "stop based on a home sensor" function
Operation mode
0-3
4
○
×
During
a move
User
Program
×
○
& ID 0U S mt , dt 
Configures a "stop based on a home sensor" function for motor mt .
mt
dt
Target motor
Setting
‘1’
:Motor #1
‘2’
:Motor #2
‘AL’
:The same setting for both motors
One character
‘0’
:Disables the function.
(Default)
‘1’
:The motor will be forced to stop when the home sensor turns on.
‘2’
:The motor will be forced to stop when the home sensor turns off.
■Reply:
> & ID 0U S 
■Error code:
@50
@69
The motor is running.
Invalid operation mode.
■Example:
& 3 F0 U S 1, 1 
Configures the function for motor #1.
Specifies that the motor should stop if the home sensor is turned
off while the motor is running.
> & 3 F 0U S
■Sample user program: 0U S1 , 1
RX buffer
Executes the command “0US".
No change
■Prerequisite settings: None
■Related topics: "Stop based on a home sensor" function
This allows you to perform your own home search algorithm.
The motor will stop its rotation when a home sensor is turned on
or off, if this function has been enabled with a parameter '1' or
'2'.
Note that this function will be disabled when the motor stops,
even if other factors than this function have caused the stop of
the motor.
See "13.4 Home search" for details.
85
14. 1 command (High speed move)
1+M
■Syntax:
Relative move in the CW direction at high speed
Operation mode
0-3
4
○
×
During
a move
User
Program
×
○
& ID 1+ M mt ,A[ ln ], ps 
Moves motor mt in the CW direction at high speed. The moving distance is specified by ps .
A position where the motor should start to decelerate is determined by a low step pulse
stored in the specified low step No. ln .
mt
ln
Target motor
Low step No.
*2
‘1’
:Motor #1
‘2’
:Motor #2
‘AL’
:Both motors
Decimal
:0 - 30
If not specified
:No.30
Do NOT specify this parameter if targeted
motor is 'AL' or the moving distance is 'Z'.
ps
Moving distance
Decimal
:1≦ps<1 billion
*1
Position syntax
:A Position
pulse
represented
using
a
position syntax.
‘Z’
:Unlimited move
(omitted)
:If the target motor is 'AL', you do not need to
specify this parameter.
suitable one.
Otherwise provide a
Moving data specified by a
command "1AS" is used when the parameter
is not provided.
Reverse rotation
‘R’
:If the target motor is 'AL', motor #2 will rotate
in the opposite direction (CCW).
■Reply:
> & ID 1+ M 
■Error code:
@50
@52
@5D
@69
@40
■Example:
& 3 F1 + M 1, 50 0 
> & 3 F 1+ M 
The motor is running.
@51
The EMS sensor is turned on.
A stall error has occurred.
@55
Limit error
Out of the valid range of position management.
Invalid operation mode.
The low step pulse corresponding to the specified No. is not defined.
& 3 F1 + M 2, A [ 1 ] , P [ 5 0] 
> & 3 F 1+ M 
& 3 F1 + M 1, P [ + ] 
> & 3 F 1+ M 
& 3 F1 + M A L, R 
> & 3 F 1+ M 
& 3 F1 + M 1, Z 
> & 3 F 1+ M 
86
Moves motor #1 by 500 pulses in the CW direction at a
high speed.
Deceleration is performed according to the low step
pulse saved in the low step No.30.
Moves motor #2 in the CW direction at high speed by
the pulses defined in the position pulse No.50.
Deceleration is performed according to the low step
pulse saved in the low step No.1.
Moves motor #1 in the CW direction at high speed by
the pulses designated by the position index.
The position index is incremented by 1 when the
command is completed.
Moves motor #1 in the CW direction and motor #2 in
the CCW direction simultaneously.
Data designated by the command "1AS" is used as a
moving distance and a low step pulse.
Moves motor #1 infinitely in the CW direction at high
speed.
14. 1 command (High speed move)
■Sample user program: LD D0,10000
LD D10,5
1+ M 1,A[ D 1 0] ,D0
RX buffer
Assigns 10,000 to data memory D0.
Assigns 5 to data memory D10.
Executes the command “1+M".
No change
■Prerequisite settings: Command "LSS"
Command "1AS"
Sets a low step pulse.
Configures parameters for controlling two motors simultaneously.
■Related topics: Moving speed
Moving speed is determined by settings on a driver.
For more information about a moving speed, see "13.2 Motor
control method".
Simultaneous move in both axes Use the command "1AS" to set a moving distance for each
motor before attempting to execute this command with target
motor of 'AL'.
Unlimited move
Once a motor is started to rotate by this command with an
"unlimited move" parameter, the motor will continue to run until a
motor-stop command (e.g. "5IS") is executed or a limit sensor in
the traveling direction is turned on.
Position syntax*1
For details about a position syntax, see "13.3 Position pulse".
Thirty one low step pulses can be set for both motor #1 and #2.
Low step No. *2
Low step numbers other than 30 do not have a default value.
If they are used before their values are defined, a command
error occurs.
In operation mode 2 and 3, low step pulses are ignored if they
are defined because a low step pulse is automatically calculated
by a RD-3xx series driver.
For more information about a low step pulse, see "13.2 Motor
control method".
Completion-of-move response If the completion-of-move function has been configured, a
completion-of-move response is sent when the motor stops.
Consult the instruction manual of the Link Master RC-400 for
details.
1-M
■Syntax:
Relative move in the CCW direction at high speed
Operation mode
0-3
4
○
×
During
a move
User
Program
×
○
& ID 1- M mt ,A[ ln ], ps 
Moves motor mt in the CCW direction at high speed. The moving distance is specified by ps .
A position where the motor should start to decelerate is determined by a low step pulse
stored in the specified low step No. ln .
mt
ln
Target motor
Low step No.
*2
‘1’
:Motor #1
‘2’
:Motor #2
‘AL’
:Both motors
Decimal
:0 - 30
If not specified
:No.30
Do NOT specify this parameter if target
motor is 'AL' or the moving distance is 'Z'.
87
14. 1 command (High speed move)
ps
Moving distance
Reverse rotation
■Reply:
> & ID 1- M 
■Error code:
@50
@52
@5D
@69
@40
■Example:
& 3 F1 - M 1, 50 0 
> & 3 F 1- M 
Decimal
:1≦ps<1 billion
Position syntax*1 :A Position pulse represented using a
position syntax.
‘Z’
:Unlimited move
(omitted)
:If the target motor is 'AL', you do not need to
specify this parameter. Otherwise provide a
suitable one. Moving data specified by the
command "1AS" is used when the parameter
is not provided.
‘R’
:If the target motor is 'AL', motor #2 will rotate
in the opposite direction (CW).
The motor is running.
@51
The EMS sensor is turned on.
A stall error has occurred.
@55
Limit error
Out of the valid range of position management.
Invalid operation mode.
The low step pulse corresponding to the specified No. is not defined.
& 3 F1 - M 2, A [ 1 ] , P [ 5 0] 
> & 3 F 1- M 
& 3 F1 - M 1, P [ + ] 
> & 3 F 1- M 
& 3 F1 - M A L 
> & 3 F 1- M 
& 3 F1 - M 1, Z 
> & 3 F 1- M 
■Sample user program: LD D0,10000
LD D10,5
1- M 1, A [ D 1 0] , D 0
RX buffer
■Prerequisite settings: Command "LSS"
Command "1AS"
■Related topics: Moving speed
Moves motor #1 by 500 pulses in the CCW direction at
high speed.
Deceleration is performed according to the low step
pulse saved in the low step No.30.
Moves motor #2 in the CCW direction at high speed by
the pulses defined in the position pulse No.50.
Deceleration is performed according to the low step
pulse saved in the low step No.1.
Moves motor #1 in the CCW direction at high speed by
the pulses designated by the position index.
The position index is incremented by 1 when the
command is completed.
Moves motor #1 and #2 in the CCW direction simultaneously.
Data designated by the command "1AS" is used as a
moving distance and a low step pulse.
Moves motor #1 infinitely in the CCW direction at high
speed.
Assigns 10,000 to data memory D0.
Assigns 5 to data memory D10.
Executes the command “1-M".
No change
Sets a low step pulse.
Configures parameters for controlling two motors simultaneously.
Moving speed is determined by settings on a driver.
For more information about a moving speed, see "13.2 Motor
control method".
Simultaneous move in both axes Use the command "1AS" to set a moving distance for each
motor before attempting to execute this command with target
motor of 'AL'.
Unlimited move
Once a motor is started to rotate by this command with an
"unlimited move" parameter, the motor will continue to run until a
motor-stop command (e.g. "5IS") is executed or a limit sensor in
the traveling direction is turned on.
88
14. 1 command (High speed move)
Position syntax*1
Low step No. *2
For details about a position syntax, see "13.3 Position pulse".
Thirty one low step pulses can be set for both motor #1 and #2.
Low step numbers other than 30 do not have a default value.
If they are used before their values are defined, a command
error occurs.
In operation mode 2 and 3, low step pulses are ignored if they
are defined because a low step pulse is automatically calculated
by a RD-3xx series driver.
For more information about a low step pulse, see "13.2 Motor
control method".
Completion-of-move response If the completion-of-move function has been configured, a
completion-of-move response is sent when a motor stops.
Consult the instruction manual of the Link Master RC-400 for
details.
1AD
Getting moving data and low step No. used
when two motors move simultaneously
■Syntax:
Operation mode
0-3
4
○
×
During
a move
User
Program
○
○
& ID 1A D mt 
Gets moving data and low step No. for motor
mt
to be used when a move command such
as "1AM" rotates two motors simultaneously.
mt
■Reply:
Target motor
‘1’
:Motor #1
‘2’
:Motor #2
> & ID 1A D A [ ln ], ps 
ps
Moving data
Signed 10-digit decimal :-1 billion<ps<+1 billion
ln
Low step No. *2
2-digit decimal
■Error code:
@69
■Example:
& 3 F1 A D 1 
(Default: 0)
:0 - 30
Invalid operation mode.
Gets moving data and low step No. for motor #1 to be used
when a move command rotates two motors simultaneously.
> & 3 F 1A D A [ 3 0] , + 00 0 05 0 00 0 
A 50,000 pulses is set as moving data and No.30 as a low step
number for motor #1.
■Sample user program: 1A D 1
RX buffer
Executes the command “1AD".
Run result (50,000)
※Moving data is stored in RX buffer.
■Prerequisite settings: Command "LSS"
Sets a low step pulse.
■Related topics:
This command returns a position pulse, instead of a position pulse
no., which is used as moving data when two motors run
simultaneously.
Once the command "1AS" is executed, the moving data remains
unchanged even if the corresponding position data is changed
by the command "3PS".
Moving data
89
14. 1 command (High speed move)
Position syntax*1
Low step No. *2
For details about a position syntax, see "13.3 Position pulse".
Thirty one low step pulses can be set for both motor #1 and #2.
In operation mode 2 and 3, low step pulses are ignored if they
are defined because a low step pulse is automatically calculated
by a RD-3xx series driver.
For more information about a low step pulse, see "13.2 Motor
control method".
Completion-of-move response If the completion-of-move function has been configured, a
completion-of-move response is sent when a motor stops.
Consult the instruction manual of the Link Master RC-400 for
details.
1AM
■Syntax:
Operation mode
0-3
4
○
×
Absolute move at high speed
During
a move
User
Program
×
○
& ID 1A M mt ,A[ ln ], ps 
Moves motor mt to the position of
ps
at high speed.
A position where the motor should start to decelerate is determined by a low step pulse
stored in the specified low step No. ln .
mt
ln
ps
Target motor
Low step No. *2
Position
‘1’
:Motor #1
‘2’
:Motor #2
‘AL’
:Both motors
Decimal
:0 - 30
If not specified
:No.30
Do NOT specify this parameter if the target
motor is 'AL'.
Decimal
:-1 billion<ps<+1 billion
Position syntax*1 :A Position pulse represented using a
position syntax.
(omitted)
:If the target motor is 'AL', do not specify this
parameter.
Otherwise provide a suitable
one. Moving data specified by the command
"1AS" is used when the parameter is not
provided.
■Reply:
> & ID 1A M 
■Error code:
@50
@52
@5D
@69
@40
■Example:
& 3 F1 A M 1 , 5 0 0 
> & 3 F 1A M 
90
The motor is running.
@51
The EMS sensor is turned on.
A stall error has occurred.
@55
Limit error
Out of the valid range of position management.
Invalid operation mode.
The low step pulse corresponding to the specified No. is not defined.
Moves motor #1 to the position of 500 pulses at a high
speed.
Deceleration is performed according to the low step
pulse saved in the low step No.30.
14. 1 command (High speed move)
& 3 F1 A M 1 , A [ 1] , P [ 5 0] 
> & 3 F 1 AM 
& 3 F1 A M 1 , P [ + ] 
> & 3 F 1A M 
& 3 F1 A M 2 , P [ - ] 
> & 3 F 1A M 
& 3 F1 A M A L
> & 3 F 1A M 
■Sample user program: LD D0,10000
LD D10,5
1 AM 1, D 0, A [ D 1 0]
RX buffer
■Prerequisite settings: Command "LSS"
Command "1AS"
Moves motor #1 at high speed to the position defined
in the position pulse No.50.
Deceleration is performed according to the low step
pulse saved in the low step No.1.
Moves motor #1 at high speed to the position
corresponding to the current position index.
The position index is incremented by 1 when the
command is completed.
Moves motor #2 at high speed to the position
corresponding to the current position index.
The position index is decremented by 1 when the
command is completed.
Starts moving motor #1 and #2 simultaneously to each
position specified by the command "1AS".
The deceleration of each motor is also performed
according to the low step pulses specified by the
command "1AS".
Assigns 10,000 to data memory D0.
Assigns 5 to data memory D10.
Executes the command “1AM".
No change
Sets a low step pulse.
Configures parameters for controlling two motors simultaneously.
■Related topics: Moving speed
Moving speed is determined by settings on a driver.
For more information about a moving speed, see "13.2 Motor
control method".
Limitations in absolute moves Though a motor position can be managed in the range of -1
billion to +1 billion pulses, the maximum moving distance at a
time is 999,999,999 pulses.
Therefore if a moving distance from the current position to the
destination exceeds this limit, a command error occurs.
Simultaneous move in both axes Use the command "1AS" to set a moving distance for each
motor before attempting to execute this command with target
motor of 'AL'.
Position syntax*1
For details about a position syntax, see "13.3 Position pulse".
Low step No. *2
Thirty one low step pulses can be set for both motor #1 and #2.
Low step numbers other than 30 do not have a default value.
If they are used before their values are defined, a command
error occurs.
In operation mode 2 and 3, low step pulses are ignored if they
are defined because a low step pulse is automatically calculated
by a RD-3xx series driver.
For more information about a low step pulse, see "13.2 Motor
control method".
Completion-of-move response If the completion-of-move function has been configured, a
completion-of-move response is sent when a motor stops.
Consult the instruction manual of the Link Master RC-400 for
details.
91
14. 1 command (High speed move)
1AS
Setting moving data and low step No. used
when two motors move simultaneously
■Syntax:
Operation mode
0-3
4
○
×
During
a move
User
Program
○
○
& ID 1 A S mt ,A[ ln ], ps 
Sets moving data ps and low step No.
ln
for motor
mt to be used when a move
command such as "1AM" rotates two motors simultaneously.
mt
Target motor
‘1’
‘2’
ps
Moving data
Decimal
:-1 billion<ps<+1 billion
(Default: 0)
Position syntax*1 :A Position pulse represented using
position syntax.
ln
Low step No. *2
■Reply:
> & ID 1A S 
■Error code:
@50
@69
■Example:
& 3 F1 A S 1, 1 00 0 0 
> & 3 F 1A S
Decimal
If not specified
& 3 F1 A S 1, A [ 1] , P [ 1 0] 
> & 3 F 1A S
& 3 F1 A S 2, A [ 1] , P [ 1 0] 
> & 3 F 1A S
RX buffer
■Prerequisite settings: Command "LSS"
■Related topics:
92
Moving data
a
:0 - 30
:No.30
The motor is running.
Invalid operation mode.
& 3 F1 A S 2, 3 00 0 
> & 3 F 1A S
■Sample user program: LD D0,10000
1A S1 , D 0
1A S2 , D 0
:Motor #1
:Motor #2
Assigns 10,000 pulses to moving data for motor #1 to
be used when two motors are rotated simultaneously.
No.30 is used as a low step number.
Assigns 3,000 pulses to moving data for motor #2 to
be used when two motors are rotated simultaneously.
No.30 is used as a low step number.
Assigns the position stored in position pulse No.10 for
motor #1 to moving data for motor #1 used in a
simultaneous move.
No.1 is used as a low step number.
Assigns the position stored in position pulse No.10 for
motor #2 to moving data for motor #2 used in a
simultaneous move.
No.1 is used as a low step number.
Assigns 10,000 to data memory D0.
Executes the command “1AS".
Executes the command “1AS".
No change
Sets a low step pulse.
This command sets a position pulse, instead of a position pulse
no., which is used as moving data when two motors runs
simultaneously.
Once the command "1AS" is executed, the moving data remains
unchanged even if the corresponding position data is changed
by the command "3PS".
Position syntax*1
For details about a position syntax, see "13.3 Position pulse".
Low step No. *2
Thirty one low step pulses can be set for both motor #1 and #2.
In operation mode 2 and 3, low step pulses are ignored if they
are defined because a low step pulse is automatically calculated
by a RD-3xx series driver.
For more information about a low step pulse, see "13.2 Motor
control method".
Completion-of-move response If the completion-of-move function has been configured, a
completion-of-move response is sent when a motor stops.
Consult the instruction manual of the Link Master RC-400 for
details.
14. 2 command (Low speed move)
2+M
■Syntax:
Relative move in the CW direction at low speed
Operation mode
0-3
4
○
×
During
a move
User
Program
×
○
& ID 2 + M mt , ps 
Moves motor mt in the CW direction at low speed.
mt
ps
Target motor
Moving distance
Reverse rotation
■Reply:
> & ID 2+ M 
■Error code:
@50
@52
@5D
@69
■Example:
& 3 F2 + M 1, 50 0 
> & 3 F 2+ M 
& 3 F2 + M 2, P [ 5 0] 
> & 3 F 2+ M 
& 3 F2 + M 1, P [ + ] 
> & 3 F 2+ M 
The moving distance is specified by
‘1’
:Motor #1
‘2’
:Motor #2
‘AL’
:Both motors
Decimal
:1≦ps<1 billion
ps .
Position syntax*1 :A Position pulse represented using a
position syntax.
‘Z’
:Unlimited move
(omitted)
:If the target motor is 'AL', you do not need to
specify this parameter. Otherwise provide a
suitable one. Moving data specified by the
command "1AS" is used when the parameter
is not provided.
‘R’
:If the target motor is 'AL', motor #2 will rotate
in the opposite direction (CCW).
The motor is running.
@51
The EMS Sensor is turned on.
A stall error has occurred.
@55
Limit error.
Out of the valid range of position management.
Invalid operation mode.
& 3 F2 + M A L, R 
> & 3 F 2+ M 
& 3 F2 + M 1, Z 
> & 3 F 2+ M 
■Sample user program: LD D0,10000
2+ M 1, D 0
RX buffer
Moves motor #1 by 500 pulses in the CW direction at low speed.
Moves motor #2 in the CW direction at low speed by the pulses
defined in the position pulse No.50.
Moves motor #1 in the CW direction at low speed by the pulses
designated by the position index.
The position index is incremented by 1 when the command is
completed.
Moves motor #1 in the CW direction and motor #2 in the CCW
direction simultaneously.
Data designated by the command "1AS" is used as a moving
distance.
Moves motor #1 infinitely in the CW direction at low speed.
Assigns 10,000 to data memory D0.
Executes the command “2+M".
No change
■Prerequisite settings: Command "1AS"
Configures parameters for controlling two motors simultaneously.
■Related topics: Moving speed
Moving speed is determined by settings on a driver.
For more information about a moving speed, see "13.2 Motor
control method".
93
14. 2 command (Low speed move)
Simultaneous move in both axes Use the command "1AS" to set a moving distance for each
motor before attempting to execute this command with target
motor of 'AL'.
Unlimited move
Once a motor is started to rotate by this command with an
"unlimited move" parameter, the motor will continue to run until a
motor-stop command (e.g. "5IS") is executed or a limit sensor in
the traveling direction is turned on.
Position syntax*1
For details about a position syntax, see "13.3 Position pulse".
Completion-of-move response If the completion-of-move function has been configured, a
completion-of-move response is sent when the motor stops.
Consult the instruction manual of the Link Master RC-400 for
details.
2-M
■Syntax:
Relative move in the CCW direction at low speed
Operation mode
0-3
4
○
×
During
a move
User
Program
×
○
& ID 2 - M mt , ps 
Moves motor mt in the CCW direction at low speed. The moving distance is specified by
mt
ps
Target motor
Moving distance
‘1’
:Motor #1
‘2’
:Motor #2
‘AL’
:Both motors
Decimal
:1≦ps<1 billion
*1
Position syntax
‘Z’
(omitted)
Reverse rotation
■Reply:
> & ID 2- M 
■Error code:
@50
@52
@5D
@69
■Example:
& 3F2-M1,500 
> &3F2-M 
& 3F2-M2,P[50] 
> &3F2-M 
& 3F2-M1,P[+] 
> &3F2-M 
:A Position pulse represented using a
position syntax.
:Unlimited move
:If the target motor is 'AL', you do not need to
specify this parameter. Otherwise provide a
suitable one. Moving data specified by the
command "1AS" is used when the parameter
is not provided.
:If the target motor is 'AL', motor #2 will rotate
in the opposite direction (CW).
The motor is running.
@51
The EMS Sensor is turned on.
A stall error has occurred.
@55
Limit error.
Out of the valid range of position management.
Invalid operation mode.
& 3F2-MAL 
> &3F2-M 
94
‘R’
ps .
Moves motor #1 by 500 pulses in the CCW direction at low speed.
Moves motor #2 in the CCW direction at low speed by the pulses
defined in the position pulse No.50.
Moves motor #1 in the CCW direction at low speed by the pulses
designated by the position index.
The position index is incremented by 1 when the command is completed.
Moves motor #1 and #2 in the CCW direction simultaneously.
Data designated by the command "1AS" is used as a moving distance.
14. 2 command (Low speed move)
& 3F2-M1,Z 
> &3F2-M 
■Sample user program: LD D0,10000
2- M 1, D 0
RX buffer
Moves motor #1 infinitely in the CCW direction at low speed.
Assigns 10,000 to data memory D0.
Executes the command “2-M".
No change
■Prerequisite settings: Command "1AS"
Configures parameters for controlling two motors simultaneously.
■Related topics: Moving speed
Moving speed is determined by settings on a driver.
For more information about a moving speed, see "13.2 Motor
control method".
Simultaneous move in both axes Use the command "1AS" to set a moving distance for each
motor before attempting to execute this command with target
motor of 'AL'.
Unlimited move
Once a motor is started to rotate by this command with an
"unlimited move" parameter, the motor will continue to run until a
motor-stop command (e.g. "5IS") is executed or a limit sensor in
the traveling direction is turned on.
Position syntax*1
For details about a position syntax, see "13.3 Position pulse".
Completion-of-move response If the completion-of-move function has been configured, a
completion-of-move response is sent when the motor stops.
Consult the instruction manual of the Link Master RC-400 for
details.
2AM
■Syntax:
Operation mode
0-3
4
○
×
Absolute move at low speed
During
a move
User
Program
×
○
& ID 2 A M mt , ps 
Moves motor mt to the position of ps at low speed.
mt
ps
Target motor
Position
‘1’
:Motor #1
‘2’
:Motor #2
‘AL’
:Both motors
Decimal
:-1 billion<ps<+1 billion
*1
Position syntax
(omitted)
■Reply:
> & ID 2A M 
■Error code:
@50
@52
@5D
@69
:A Position pulse represented using a
position syntax.
:If the target motor is 'AL', you do not need to
specify this parameter. Otherwise provide a
suitable one. Moving data specified by the
command "1AS" is used when the parameter
is not provided.
The motor is running.
@51
The EMS Sensor is turned on.
A stall error has occurred.
@55
Limit error.
Out of the valid range of position management.
Invalid operation mode.
95
14. 2 command (Low speed move)
■Example:
& 3 F2 A M 1 , 5 0 0 
> & 3 F 2A M 
& 3 F2 A M 1 , P [ 5 0] 
> & 3 F 2A M 
& 3 F2 A M 1 , P [ + ] 
> & 3 F 2A M 
& 3 F2 A M 2 , P [ - ] 
> & 3 F 2A M 
& 3 F2 A M A L
> & 3 F 2A M 
■Sample user program: LD D0,10000
LD D10,5
2A M 1, D 0
RX buffer
■Prerequisite settings: Command "1AS"
■Related topics:
96
Moves motor #1 to the position of 500 pulses at low speed.
Moves motor #1 at low speed to the position defined in the
position pulse No.50.
Moves motor #1 at low speed to the position corresponding to
the current position index.
The position index is incremented by 1 when the command is completed.
Moves motor #1 at low speed to the position corresponding to
the current position index.
The position index is decremented by 1 when the command is completed.
Starts moving motor #1 and #2 simultaneously to each position
specified by the command "1AS".
Assigns 10,000 to data memory D0.
Assigns 5 to data memory D10.
Executes the command “2AM".
No change
Configures parameters for controlling two motors simultaneously.
Limitations in absolute moves Though a motor position can be managed in the range of -1
billion to +1 billion pulses, the maximum moving distance at a
time is 999,999,999 pulses. Therefore if a moving distance
from the current position to the destination exceeds this limit, a
command error occurs.
Simultaneous move in both axes Use the command "1AS" to set a moving distance for each
motor before attempting to execute this command with target
motor of 'AL'.
Position syntax*1
For details about a position syntax, see "13.3 Position pulse".
Completion-of-move response If the completion-of-move function has been configured, a
completion-of-move response is sent when the motor stops.
Consult the instruction manual of the Link Master RC-400 for
details.
14. 3 command (Position pulse)
3+S
■Syntax:
Operation mode
0-3
4
○
×
Adding a position pulse*1
During
a move
User
Program
○
×
& ID 3 + S mt ,P [ ps ], dt 
Adds an immediate value dt to position pulse P[ ps ].
mt
ps
dt
Target motor
Position syntax
*2
Number to add
‘1’
:Motor #1
‘2’
:Motor #2
Decimal :Position No. (0 - 2,047)
‘+’
:The current value of the position index*3
The position index is incremented by
command is completed.
‘-’
:The current value of the position index*3
The position index is decremented by
command is completed.
is used.
1 when the
is used.
1 when the
Decimal :-1 billion≦dt<+1 billion
& ID 3 + S mt ,P [ ps ],P[ pd ]
Adds position pulse P[ pd ] to position pulse P[ ps ].
mt
pd
Target motor
*2
Position syntax
‘1’
:Motor #1
‘2’
:Motor #2
Decimal :Position No. (0 - 2,047)
‘+’
:The current value of the position index*3
The position index is incremented by
command is completed.
‘-’
:The current value of the position index*3
The position index is decremented by
command is completed.
is used.
1 when the
is used.
1 when the
■Reply:
> & ID 3+ S 
■Error code:
@4A
@69
■Example:
& 3 F3 + S 1, P [ 25 ] , 50 0 0 
> & 3 F 3+ S 
Adds 5,000 to position pulse No.25.
& 3 F3 + S 1, P [ 25 ] , P [ 0] 
> & 3 F 3+ S 
Adds position pulse No.0 to position pulse No.25.
& 3 F3 + S 1, P [ 25 ] , P [ + ] 
> & 3 F 3+ S 
Adds the position pulse indicated by the position index
to position pulse No.25.
The position index is incremented by 1 when the
command is completed.
Some parameter is invalid.
Invalid operation mode.
■Sample user program: Not available
■Prerequisite settings: None
■Related topics: Position pulse*1
Position syntax*2
Position index*3
For details about position pulse, see "13.3 Position pulse".
For details about position syntax, see "13.3 Position pulse".
For details about position index, see "13.3 Position pulse".
97
14. 3 command (Position pulse)
3-S
■Syntax:
Operation mode
0-3
4
○
×
Subtracting a position pulse*1
During
a move
User
Program
○
×
& ID 3 - S mt ,P [ ps ], dt 
Subtracts an immediate value dt from position pulse P[ ps ].
mt
ps
dt
Target motor
*2
Position syntax
Number to subtract
‘1’
:Motor #1
‘2’
:Motor #2
Decimal :Position No. (0 - 2,047)
‘+’
:The current value of the position index*3
The position index is incremented by
command is completed.
‘-’
:The current value of the position index*3
The position index is decremented by
command is completed.
is used.
1 when the
is used.
1 when the
Decimal :-1 billion≦dt<+1 billion
& ID 3 - S mt ,P [ ps ],P[ pd ]
Subtracts position pulse P [ pd ] from position pulse P [ ps ].
mt
pd
Target motor
*2
Position syntax
‘1’
:Motor #1
‘2’
:Motor #2
Decimal :Position No. (0 - 2,047)
‘+’
:The current value of the position index*3
The position index is incremented by
command is completed.
‘-’
:The current value of the position index*3
The position index is decremented by
command is completed.
is used.
1 when the
is used.
1 when the
■Reply:
> & ID 3- S 
■Error code:
@4A
@69
■Example:
& 3 F3 - S 1, P [ 25 ] , 50 0 0 
> & 3 F 3- S 
Subtracts 5,000 from position pulse No.25.
& 3 F3 - S 1, P [ 25 ] , P [ 0] 
> & 3 F 3- S 
Subtracts position pulse No.0 from position pulse No.25.
& 3 F3 - S 1, P [ 25 ] , P [ + ] 
> & 3 F 3- S 
Subtracts the position pulse indicated by the position
index from position pulse No.25.
The position index is incremented by 1 when the
command is completed.
Some parameter is invalid.
Invalid operation mode.
■Sample user program: Not available
■Prerequisite settings: None
■Related topics: Position pulse*1
Position syntax*2
Position index*3
98
For details about position pulse, see "13.3 Position pulse".
For details about position syntax, see "13.3 Position pulse".
For details about position index, see "13.3 Position pulse".
14. 3 command (Position pulse)
3*S
■Syntax:
Operation mode
0-3
4
○
×
Multiplying a position pulse*1
During
a move
User
Program
○
×
& ID 3 * S mt ,P [ ps ], dt 
Multiplies position pulse P [ ps ] by an immediate value dt .
mt
ps
dt
Target motor
*2
Position syntax
Number to multiply
‘1’
:Motor #1
‘2’
:Motor #2
Decimal :Position No. (0 - 2,047)
‘+’
:The current value of the position index*3
The position index is incremented by
command is completed.
‘-’
:The current value of the position index*3
The position index is decremented by
command is completed.
is used.
1 when the
is used.
1 when the
Decimal :-1 billion≦dt<+1 billion
& ID 3 * S mt ,P [ ps ],P[ pd ]
Multiplies position pulse P [ ps ] by position pulse P [ pd ].
mt
pd
Target motor
Position syntax
*2
‘1’
:Motor #1
‘2’
:Motor #2
Decimal :Position No. (0 - 2,047)
‘+’
:The current value of the position index*3
The position index is incremented by
command is completed.
‘-’
:The current value of the position index*3
The position index is decremented by
command is completed.
is used.
1 when the
is used.
1 when the
■Reply:
> & ID 3* S 
■Error code:
@4A
@69
■Example:
& 3 F3 * S 1, P [ 25 ] , 50 0 0 
> & 3 F 3* S 
Multiplies position pulse No.25 by 5,000.
& 3 F3 * S 1, P [ 25 ] , P [ 0] 
> & 3 F 3* S 
Multiplies position pulse No.25 by position pulse No.0.
& 3 F3 * S 1, P [ 25 ] , P [ + ] 
> & 3 F 3* S 
Multiplies position pulse No.25 by the position pulse
indicated by the position index.
The position index is incremented by 1 when the
command is completed.
Some parameter is invalid.
Invalid operation mode.
■Sample user program: Not available
■Prerequisite settings: None
■Related topics: Position pulse*1
Position syntax*2
Position index*3
For details about position pulse, see "13.3 Position pulse".
For details about position syntax, see "13.3 Position pulse".
For details about position index, see "13.3 Position pulse".
99
14. 3 command (Position pulse)
3/S
■Syntax:
Operation mode
0-3
4
○
×
Dividing a position pulse*1
During
a move
User
Program
○
×
& ID 3 / S mt ,P [ ps ], dt 
Divides position pulse P [ ps ] by an immediate value dt .
mt
ps
dt
Target motor
*2
Position syntax
Number to divide by
‘1’
:Motor #1
‘2’
:Motor #2
Decimal :Position No. (0 - 2,047)
‘+’
:The current value of the position index*3
The position index is incremented by
command is completed.
‘-’
:The current value of the position index*3
The position index is decremented by
command is completed.
is used.
1 when the
is used.
1 when the
Decimal :-1 billion≦dt<+1 billion
& ID 3 / S mt ,P [ ps ],P[ pd ]
Divides position pulse P [ ps ] by position pulse P [ pd ].
mt
pd
Target motor
*2
Position syntax
‘1’
:Motor #1
‘2’
:Motor #2
Decimal :Position No. (0 - 2,047)
‘+’
:The current value of the position index*3
The position index is incremented by
command is completed.
‘-’
:The current value of the position index*3
The position index is decremented by
command is completed.
is used.
1 when the
is used.
1 when the
■Reply:
> & ID 3/ S 
■Error code:
@4A
@69
■Example:
& 3 F3 / S 1, P [ 25 ] , 50 0 0 
> & 3 F 3/ S 
Divides position pulse No.25 by 5,000.
& 3 F3 / S 1, P [ 25 ] , P [ 0] 
> & 3 F 3/ S 
Divides position pulse No.25 by position pulse No.0.
& 3 F3 / S 1, P [ 25 ] , P [ + ] 
> & 3 F 3/ S 
Divides position pulse No.25 by the position pulse
indicated by the position index.
The position index is incremented by 1 when the
command is completed.
Some parameter is invalid.
Invalid operation mode.
■Sample user program: Not available
■Prerequisite settings: None
■Related topics: Position pulse*1
Position syntax*2
Position index*3
100
For details about position pulse, see "13.3 Position pulse".
For details about position syntax, see "13.3 Position pulse".
For details about position index, see "13.3 Position pulse".
14. 3 command (Position pulse)
3CS
■Syntax:
Operation mode
0-3
4
○
×
Clearing all position pulses
During
a move
User
Program
○
○
During
a move
User
Program
○
○
& ID 3C S mt 
Clears all position pulses for motor mt to 0.
mt
Target motor
‘1’
:Motor #1
‘2’
:Motor #2
‘AL’
:Both motors
■Reply:
> & ID 3C S 
■Error code:
@69
Invalid operation mode.
■Example:
& 3 F3 C S A L 
> & 3 F 3C S 
Clears all position pulses for motor #1 and #2.
■Sample user program: 3C S1
Executes the command “3CS".
RX buffer
No change
■Prerequisite settings: None
■Related topics: None
3ID
■Syntax:
Getting the position index*1
Operation mode
0-3
4
○
×
& ID 3I D mt 
Gets the value of the position index for motor mt .
This value is referred to when you
specify a position using "P[+]" or "P[-]" in the position syntax*2 .
mt
■Reply:
Target motor
‘1’
:Motor #1
‘2’
:Motor #2
4-digit decimal
:0 - 2,047
> & ID 3I D pi 
pi
Position index
(Default: 0)
■Error code:
@69
Invalid operation mode.
■Example:
& 3 F3 I D 1 
> & 3 F 3I D 00 5 0
Gets the value of the position index for motor #1.
Indicates that the position index is 50.
■Sample user program: 3I D 1
RX buffer
Executes the command “3ID".
Run result (50)
101
14. 3 command (Position pulse)
■Prerequisite settings: None
■Related topics: Position index*1
Position syntax*2
3IS
■Syntax:
For details about position index, see "13.3 Position pulse".
For details about position syntax, see "13.3 Position pulse".
Setting the position index*1
Operation mode
0-3
4
○
×
During
a move
User
Program
○
○
& ID 3I S mt , pi 
Sets the position index for motor mt
to pi .
This value is referred to when you specify a
position using "P[+]" or "P[-]" in the position syntax*2 .
mt
pi
Target motor
Position index
‘1’
:Motor #1
‘2’
:Motor #2
Decimal
:0 - 2,047
(Default: 0)
■Reply:
> & ID 3I S 
■Error code:
@69
Invalid operation mode.
■Example:
& 3 F3 I S 1, 5 0 
> & 3 F 3I S
Sets the position index for motor #1 to 50.
■Sample user program: LD D0,50
3I S1 , D 0
RX buffer
Assigns 50 to data memory D0.
Executes the command “3IS".
No change
■Prerequisite settings: None
■Related topics: Position index*1
Position syntax*2
102
For details about position index, see "13.3 Position pulse".
For details about position syntax, see "13.3 Position pulse".
14. 3 command (Position pulse)
3ND
■Syntax:
Getting a position pulse with a position number *1
& ID 3N D mt
Operation mode
0-3
4
○
×
pn
Target motor
Position syntax*2
‘1’
:Motor #1
‘2’
:Motor #2
○
×
pn .
Decimal :Position No. (0 - 2,047)
‘+’
‘-’
■Reply:
User
Program
,P[ pn ]
Gets a position pulse for motor mt corresponding to a position number
mt
During
a move
:The current value of the position index*3
The position index is incremented by
command is completed.
:The current value of the position index*3
The position index is decremented by
command is completed.
is used.
1 when the
is used.
1 when the
> & ID 3N D P [ pn ] , pp 
pn
Position syntax
4-digit decimal
pp
Position pulse
Signed 10-digit decimal :-1 billion<pp<+1 billion
:Position No. (0 - 2,047)
■Error code:
@69
■Example:
& 3 F3 N D 1 , P [ 50 ] 
Gets the value of the position pulse No.50.
>&3F3NDP[0050],+000005000 
The value of the position pulse No.50 is 5,000.
Invalid operation mode.
& 3 F3 N D 1 , P [ + ] 
Gets the position pulse corresponding to the current
position index for motor #1.
The position index is incremented by 1 when the
command is completed.
>&3F3NDP[0051],+000010000 
The current position index is 51 and the corresponding
value is 10,000.
■Sample user program: Not available
■Prerequisite settings: None
■Related topics: Position pulse*1
Position syntax*2
Position index*3
For details about position pulse, see "13.3 Position pulse".
For details about position syntax, see "13.3 Position pulse".
For details about position index, see "13.3 Position pulse".
103
14. 3 command (Position pulse)
3PD
■Syntax:
Getting a position pulse*1
Operation mode
0-3
4
○
×
User
Program
○
○
& ID 3P D mt ,P[ pn ] 
Gets a position pulse for motor mt corresponding to a position number
mt
pn
Target motor
Position syntax*2
‘1’
:Motor #1
‘2’
:Motor #2
pn .
Decimal :Position No. (0 - 2,047)
‘+’
‘-’
■Reply:
During
a move
:The current value of the position index*3
The position index is incremented by
command is completed.
:The current value of the position index*3
The position index is decremented by
command is completed.
is used.
1 when the
is used.
1 when the
> & ID 3P D pp 
pp
Position pulse
Signed 10-digit decimal :-1 billion<pp<+1 billion
■Error code:
@69
■Example:
& 3 F3 P D 1 , P [ 50 ] 
> & 3 F 3P D + 0 00 0 10 0 00 
Gets the value of the position pulse No.50.
The value of the position pulse No.50 is 10,000.
& 3 F3 P D 1 , P [ + ] 
Gets the position pulse corresponding to the current
position index for motor #1.
The position index is incremented by 1 when the
command is completed.
The value of the position pulse is 5,000.
Invalid operation mode.
> & 3 F 3P D + 0 00 0 05 0 00 
& 3 F3 P D 2 , P [ - ] 
> & 3 F 3P D - 0 00 0 00 5 00 
■Sample user program: 3P D 1 , P [ 5 0]
RX buffer
Gets the position pulse corresponding to the current
position index for motor #2.
The position index is decremented by 1 when the
command is completed.
The value of the position pulse is -500.
Executes the command “3PD".
Run result (500)
■Prerequisite settings: None
■Related topics: Position pulse*1
Position syntax*2
Position index*3
104
For details about position pulse, see "13.3 Position pulse".
For details about position syntax, see "13.3 Position pulse".
For details about position index, see "13.3 Position pulse".
14. 3 command (Position pulse)
3PS
■Syntax:
Operation mode
0-3
4
○
×
Setting a position pulse*1
During
a move
User
Program
○
○
& ID 3P S mt ,P[ pn ] , pp 
Sets pp
mt
pn
to the position pulse corresponding to the position No.
Target motor
Position syntax*2
‘1’
:Motor #1
‘2’
:Motor #2
Decimal :Position No. (0 - 2,047)
‘+’
‘-’
pp
Position pulse
pn for motor mt .
:The current value of the position index*3
The position index is incremented by
command is completed.
:The current value of the position index*3
The position index is decremented by
command is completed.
is used.
1 when the
is used.
1 when the
Decimal :-1 billion<pp<+1 billion
If not specified, the current position of the target motor is used.
■Reply:
> & ID 3P S 
■Error code:
@69
■Example:
& 3 F3 P S 1, P [ 5 0] , 5 0 00 
> & 3 F 3P S
Assigns 5,000 to the position pulse No.50 for motor #1.
& 3 F3 P S 2, P [ 5 0] 
> & 3 F 3P S
Assigns the value of the current position to the position
pulse No.50 for motor #2.
& 3 F3 P S 1, P [ + ] , 5 0 0 
> & 3 F 3P S
Assigns 500 to the position pulse corresponding to the
current position index for motor #1.
The position index is incremented by 1 when the
command is completed.
& 3 F3 P S 2, P [ - ] , 5 0 0 
> & 3 F 3P S
Assigns 500 to the position pulse corresponding to the
current position index for motor #2.
The position index is decremented by 1 when the
command is completed.
■Sample user program: LD D3,50000
3P S1, P [ 10 ] , D 3
RX buffer
Invalid operation mode.
Assigns 50,000 to data memory D3.
Executes the command “3PS".
No change
■Prerequisite settings: None
■Related topics: Position pulse*1
Position syntax*2
Position index*3
For details about position pulse, see "13.3 Position pulse".
For details about position syntax, see "13.3 Position pulse".
For details about position index, see "13.3 Position pulse".
105
14. 5 command (Stop and speed change)
5AS
■Syntax:
Operation mode
0-3
4
○
×
Changing to high speed while moving
During
a move
User
Program
○
○
& ID 5A S mt 
Changes the speed of motor mt to high speed while the motor is doing an unlimited move
by the commands "1+M", "1-M", "2+M", or "2-M".
mt
Target motor
‘1’
:Motor #1
‘2’
:Motor #2
■Reply:
> & ID 5A S 
■Error code:
@56
@69
The motor is not in an unlimited move.
Invalid operation mode.
■Example:
&3F 2+M 111
>&3F 2+M
Moves motor #1 infinitely in the CW direction at low speed.
& 3 F5 A S 1 
> & 3 F 5A S
Changes the motor speed to high speed while the motor is
running.
■Sample user program: 5AS1
Executes the command “5AS".
RX buffer
No change
■Prerequisite settings: None
■Related topics: Moving speed
Unlimited move
Note
5DS
■Syntax:
Moving speed is determined by settings on a driver.
For more information about moving speed, see "13.2 Motor
control method".
Once a motor is started to rotate by this command with an
"unlimited move" parameter, the motor will continue to run until a
motor-stop command (e.g. "5IS") is executed or a limit sensor in
the traveling direction is turned on.
This command cannot be executed in a home search process.
Changing to a low speed while moving
Operation mode
0-3
4
○
×
User
Program
○
○
& ID 5D S mt 
Changes the speed of motor
mt to low speed while the motor is doing an unlimited move
by the commands "1+M", "1-M", "2+M", or "2-M".
mt
Target motor
■Reply:
> & ID 5D S
■Error code:
@56
@69
106
During
a move
‘1’
:Motor #1
‘2’
:Motor #2
The motor is not in an unlimited move.
Invalid operation mode.
14. 5 command (Stop and speed change)
■Example:
&3F 1-M 111
>&3F 1-M
Moves motor #1 infinitely in the CCW direction at high speed.
& 3 F5D S 1 
> & 3 F 5D S 
Changes the motor speed to low speed while the motor is
running.
■Sample user program: 5D S 1
Executes the command “5DS".
RX buffer
No change
■Prerequisite settings: None
■Related topics: Moving speed
Unlimited move
Note
5IS
Moving speed is determined by settings on a driver.
For more information about moving speed, see "13.2 Motor
control method".
Once a motor is started to rotate by this command with an
"unlimited move" parameter, the motor will continue to run until a
motor-stop command (e.g. "5IS") is executed or a limit sensor in
the traveling direction is turned on.
This command cannot be executed in a home search process.
Operation mode
0-3
4
○
×
Immediate stop
■Syntax:
During
a move
User
Program
○
○
& ID 5I S mt 
Immediately stops motor mt that is running.
If two motors are running and
immediately.
mt
mt is not specified, the both motors are forced to stop
If one motor is running, the motor is forced to stop.
Target motor
‘1’
:Motor #1
‘2’
:Motor #2
‘AL’
:Both motors
If not specified
:Both motors
■Reply:
> & ID 5I S 
■Error code:
@69
Invalid operation mode.
■Example:
& 3 F5 I S 1 
> & 3 F 5I S
Immediately stops a running motor.
■Sample user program: 5I S
RX buffer
Executes the command “5IS".
No change
■Prerequisite settings: None
■Related topics:
Completion-of-move response If the completion-of-move function has been configured, a
completion-of-move response is sent when a motor stops.
Completion-of-move factor If a motor is forced to stop by this command, Bit 4 of the
completion-of-move factor is set.
107
14. 5 command (Stop and speed change)
5SS
Operation mode
0-3
4
○
×
Stop after deceleration
■Syntax:
During
a move
User
Program
○
○
& ID 5S S mt 1L[ ln ]
Stops running motor mt after deceleration.
The deceleration period is determined by a low step number ln .
mt
ln
Target motor
Low step No. *1
‘1’
:Motor #1
‘2’
:Motor #2
‘AL’
:Both motors
Decimal
:0 - 30
If not specified, the number specified in a move command that
began the move is used.
■Reply:
> & ID 5 SS 
■Error code:
@40
@69
■Example:
& 3 F5 S S 1
> & 3 F 5S S 
■Sample user program: 5S S
RX buffer
■Prerequisite settings: Command "LSS"
■Related topics:
108
The low step pulse corresponding to the specified number is not
defined.
Invalid operation mode.
Stops a running motor #1 after deceleration.
Executes the command “5SS".
No change
Sets a low step pulse.
Completion-of-move response If the completion-of-move function has been configured, a
completion-of-move response is sent when a motor stops.
Completion-of-move factor If a motor is forced to stop by this command, Bit 4 of the
completion-of-move factor is set.
Low step No. *1
Thirty one low step pulses can be set for both motor #1 and #2 .
Low step numbers other than 30 do not have a default value. If
they are used before their values are defined, a command error
occurs.
For more information about a low step pulse, see "13.2 Motor
control method".
14. 6 command (Position management)
6PD
■Syntax:
Operation mode
0-3
4
○
×
Getting a current position
During
a move
User
Program
○
○
& ID 6P D mt 
Gets the current position of a motor mt .
mt
■Reply:
Target motor
‘1’
:Motor #1
‘2’
:Motor #2
> & ID 6P D ps 
ps
The current position Signed 10-digit decimal :-1 billion<ps<+1 billion
■Error code:
@69
■Example:
& 3F6P D 1
> & 3F6P D + 000 050 000 
■Sample user program: 6P D 1
RX buffer
Invalid operation mode.
Gets the current position of motor #1.
The current position is 50,000.
Executes the command “6PD".
Run result (50,000)
■Prerequisite settings: None
■Related topics:
None
109
14. 6 command (Position management)
6PS
■Syntax:
Operation mode
0-3
4
○
×
Setting a current position
& ID 6P S mt , pc 
Changes the current position of a motor mt to
pc .
If pc is not specified, the current position is cleared to 0.
mt
pc
Target motor
Position
‘1’
:Motor #1
‘2’
:Motor #2
‘AL’
:Both motors
Decimal
:-1 billion<pc<+1 billion
If not specified
:0
■Reply:
> & ID 6P S
■Error code:
@50
@69
The motor is running.
Invalid operation mode.
■Example:
& 3F6P S1
> & 3F6P S
Clears the current position of motor #1 to 0.
& 3F6P S1, 500 0
> & 3F6P S
Sets the current position of motor #1 to 5,000.
■Sample user program: LD D0,5000
6P SD 0
RX buffer
■Prerequisite settings: None
■Related topics:
110
None
Sets D0 to 5,000.
Executes the command “6PS".
No change
During
a move
User
Program
×
○
14. 9 command (Status)
9CD
Getting a controller status*1
■Syntax:
Operation mode
0-3
4
○
○
During
a move
User
Program
○
○
& ID 9 CD mt , bt 
Gets the controller status for motor mt .
If no bit is specified, all of the status are collectively reported in a hexadecimal value.
mt
Target motor
‘1’
:Motor #1
‘2’
:Motor #2
‘AL’
:The logical OR of the status for motor #1 and #2.
(omitted) :Do NOT specify this parameter in operation mode 4.
In other modes, specify a suitable one.
bt
■Reply:
Bit to check
Decimal
:0 - 7
> & ID 9 CD st 
st
The status of the target motor
If a particular bit was specified,
If no bit was specified,
Decimal
:0, 1
2-digit hexadecimal :H00 - HFF
st
b7
b6
b5
b4
b3
b2
b1
b0
0: Stopped, 1: Running
0: Normal, 1: Limit error
0: Normal, 1: EMS error
0: Normal, 1: Command error
0: Normal, 1: Initialization error
Unassigned
0: Normal, 1: STALL error
0: Normal, 1: Communication error
■Error code:
@69
Invalid operation mode.
■Example:
& 3 F9 CD 1, 0
> & 3 F 9CD 0 
Checks if motor #1 is running.
The motor is stopped.
& 3 F9 CD 1
> & 3 F 9CD H 0 1 
Gets the controller status collectively.
The motor is running and no error has occurred.
■Sample user program: 9CD 1
RX buffer
Executes the command “9CD".
Run result (01)
■Prerequisite settings: None
■Related topics:
Controller status*1
Operation mode
Clearing a STALL error
Note
The controller status for motor #1 and #2 are managed
separately.
For details about controller status, see "13.6 Status".
Bits representing motor conditions (i.e., Running, Limit error,
EMS error, and STALL error) are always 0 (zero) in mode 4 (all
general-purpose I/Os).
For details about operation modes, see "13.1 Operation mode".
The STALL error bit is cleared only if a home search is
performed or the command "QRS" is executed.
Once a bit in the controller status is set to 1, the bit remains 1
until the command "9CS" is executed.
111
14. 9 command (Status)
9CS
■Syntax:
Operation mode
0-3
4
○
○
Clearing a controller status
During
a move
User
Program
○
○
& ID 9C S mt 
mt except bits representing a running
Clears all of the controller status bits for motor
status (bit 0), a message (bit 5), or a STALL error (bit 6).
mt
Target motor
‘1’
:Motor #1
‘2’
:Motor #2
‘AL’
:Both motors
(omitted)
:Do NOT specify this parameter in operation
mode 4.
In other modes, specify a suitable
one.
7
6, 5
4
3
2
1
0
0: Normal, 1:
0: Normal, 1:
0: Normal, 1:
0: Normal, 1:
0: Normal, 1:
Limit error
EMS error
Command error
Initialization error
Communication error
■Reply:
> & ID 9 C S
■Error code:
@69
Invalid operation mode.
■Example:
& 3 F9 C SA L
> & 3 F 9C S 
Clears the controller status for motor #1 and #2.
■Sample user program: 9C S 1
RX buffer
Executes the command “9CS".
No change
■Prerequisite settings: None
■Related topics:
Controller status
Clearing a STALL error
Note
112
The controller status for motor #1 and #2 are managed
separately.
For details about controller status, see "13.6 Status".
The STALL error bit is cleared only if a home search is
performed or the command "QRS" is executed.
Once a bit in the controller status is set to 1, the bit remains 1
until the command "9CS" is executed.
14. 9 command (Status)
9MD
Getting the completion-of-move factor
■Syntax:
Operation mode
0-3
4
○
×
During
a move
User
Program
○
○
& ID 9M D mt , bt 
Gets the completion-of-move factor for motor
mt .
If no bit is specified, all of the completion-of-move factors are collectively reported in a
hexadecimal value.
mt
bt
■Reply:
Target motor
Bit to check
‘1’
:Motor #1
‘2’
:Motor #2
Decimal
:0 - 5
> & ID 9M D mc 
mc
The completion-of-move factor of the target motor
If a particular bit was specified, Decimal
:0 - 1
2-digit hexadecimal :H00 - H3F
If no bit was specified,
(Default: 0)
(Default: H00)
mc
b7, b6
b5
b4
b3
b2
b1
b0
0: Normal, 1: Stopped because of a STALL error
0: Normal, 1: Stopped because of a CW limit error
0: Normal, 1: Stopped because of a CCW limit error
0: Normal, 1: Stopped because of an EMS error
0: Normal, 1: Stopped because of a stop command
0: Normal, 1: Stopped based on a home sensor
Unassigned
■Error code:
@69
Invalid operation mode.
■Example:
& 3 F9 M D 1 
> & 3 F 9M D H 00 
Gets a completion-of-move factor.
The motor is not stopped because of an error.
■Sample user program: 9M D 1
Executes the command “9MD".
RX buffer
Run result (00)
■Prerequisite settings: None
■Related topics:
9VD
■Syntax:
Completion-of-move factor
The completion-of-move factor is cleared when a subsequent
move command is executed.
Note
The completion-of-move factor is cleared to 0 while a motor is
running. So it is useless to query the completion-of-move
factor when a motor is not stopped.
"Stop based on a home sensor" function See "13.4 Home search" for details.
Operation mode
0-3
4
○
○
Getting version info or a message
During
a move
User
Program
○
×
& ID 9V D cn 
Gets information about the controller version or a user comment.
cn
User comment No. Decimal
:1 - 7
If not specified, version information is returned.
113
14. 9 command (Status)
■Reply:
> & ID 9V D sv 
sv
String
If
cn is not specified, version information is returned.
“RC-410 Ver XXXX. XX by RORZE(20XX-XX-XX)”
If cn is specified, a user comment is returned.
■Error code:
None
■Example:
& 3 F9 V D 
Gets the version information of the controlling software in the
controller.
> & 3 F 9V D R C- 41 0 V e r X X X X . X X b y R OR Z E ( 2 0X X - X X - X X ) 
& 3 F9 V D 2 
Gets the character string of the user comment No. 2.
> & 3 F 9V D Se r i al N o . 00 0 00 1 52 
■Sample user program: Not available
■Prerequisite settings: None
■Related topics: None
9VS
■Syntax:
Operation mode
0-3
4
○
○
Setting a user comment
During
a move
User
Program
○
×
& ID 9V S cn , sv 
Sets a user comment. If the command "FIS" is executed after a user comment is set, the
comment is stored in the flash memory and will not be lost if the power is turned off.
cn
User comment No.
Decimal
:1 - 7
sv
User comment string
String
:Up to 40 one-byte characters
(except '>' and '&').
■Reply:
> & ID 9 V S 
■Error code:
None
■Example:
& 3 F9 V S 2, Se r i al N o . 0 00 0 01 52 
> & 3 F 9V S
■Sample user program: Not available
■Prerequisite settings: None
■Related topics: None
114
Sets a user comment No. 2.
14. C command (Input/output port)
CAD
Operation mode
0-3
4
○
×
Getting parameters used in storing a position
upon a change in an interrupt input port*1
During
a move
User
Program
○
○
& ID C A D bn 
■Syntax:
Gets the motor number and position number *2 used in storing position data when the status of
interrupt input port
bn
bn changes.
Interrupt input port No. Decimal
:14 → interrupt input port D14
15 → interrupt input port D15
■Reply:
> & ID C A D mt , pn 
mt
pn
Target motor
Position No.
‘1’
:Motor #1
‘2’
:Motor #2
4-digit decimal
:0 - 2,047
(Default: 2,046 for D14)
(Default: 2,047 for D15)
■Error code:
None
■Example:
& 3FCAD15 
> & 3FCAD1,0025 
■Sample user program: LD D0,15
CA D D 0
RX buffer
■Prerequisite settings: Command "CPS"
■Related topics:
Interrupt input port *1
Position No. *2
CAS
■Syntax:
Gets the motor number and position number used in storing
position data when the status of interrupt input D15 changes.
The position of motor #1 will be stored in position No.25.
Assigns 15 to data memory D0.
Executes the command “CAD".
Run result (25)
※Position No. is stored in RX buffer.
Configures an interrupt input port.
For details about interrupt input ports, see "13.7 Input/output
port".
The position data of motor #1 and #2 will be stored into the
position number for motor #1 and #2, respectively, as specified
by the "CAS" command.
For details about position number, see "13.3 Position pulse".
Setting parameters used in storing a position
upon a change in an interrupt input port*1
Operation mode
0-3
4
○
×
During
a move
User
Program
○
○
& ID CA S bn , mt , pn 
Sets the motor number and a position number*2 used in storing position data when the
status of interrupt input bn changes.
115
14. C command (Input/output port)
bn
Interrupt input port No. Decimal
:14 → interrupt input port D14
15 → interrupt input port D15
mt
pn
Target motor
Position No.
‘1’
:Motor #1
‘2’
:Motor #2
Decimal
:0 - 2,047
(Default)
(Default: 2,046 for D14)
(Default: 2,047 for D15)
■Reply:
> & ID C A S 
■Error code:
None
■Example:
& 3 FC A S 1 5, 1, 25 
> & 3 F CA S
■Sample user program: LD D0,15
LD D10,25
CA SD 0 , 1 , D 1 0
RX buffer
Sets parameters so that the position of motor #1 will be
stored into position No.25 when the status of interrupt input D15
changes.
Assigns 15 to data memory D0.
Assigns 25 to data memory D10.
Executes the command “CAS".
No change
■Prerequisite settings: None
■Related topics:
Interrupt input port *1
Position No. *2
CBS
■Syntax:
For details about interrupt input ports, see "13.7 Input/output
port".
The position data of motor #1 and #2 will be stored into the
position number for motor #1 and #2, respectively, as specified
by the "CAS" command.
For details about position number, see "13.3 Position pulse".
Outputting a one-shot pulse to a general output
Operation mode
0-3
4
○
○
During
a move
User
Program
○
○
& ID CB S bt , tm 
Inverts the current output signal at a specified general-purpose output bit for a specified time
period.
bt
Bit to invert
Decimal
:0 - 15
tm
Output period
Decimal
:1≦tm<1 billion (ms)
■Reply:
> & ID C B S 
■Error Code:
@69
Attempted to invert a motor-controlling bit.*1
■Example:
& 3 FC B S7, 1 00 0 
> & 3 F CB S 
Inverts the status of general output bit 7 for 1 second.
116
14. C command (Input/output port)
■Sample user program: LD
D0,200
CB S1 , D 0
Assigns 200 to data memory D0.
Executes the command “CBS".
RX buffer
None
■Prerequisite settings: None
■Related topics:
Limitations in output*1
A one-shot pulse cannot be applied to output ports used for
controlling motors in such a mode that one or two motors are
controlled. In addition to that, you cannot output a one-shot
pulse to output ports specified by the command "CES". If you
attempt to do so, a command error will occur.
A bit whose output is currently inverted cannot be specified in a
"CBS" parameter. If the command "COS" is executed for a bit
that is currently inverted, the command overrides the current
status and the one-shot function is inactivated.
For details about operation modes, see "13.1 Operation mode".
Operation mode
CED
■Syntax:
Getting parameters for error output function *1
Operation mode
0-3
4
○
×
During
a move
User
Program
○
×
& ID CE D mt , er 
Gets a general output port and the value of output data that are used in an error output
function when an error of
mt
er
er
Target motor
Error factor
in motor
mt occurs.
‘1’
:Motor #1
‘2’
:Motor #2
One character
:‘E’ → EMS error
‘L’ → Limit error (CW or CCW)
‘S’ → STALL error
‘A’ → Any of the above errors
■Reply:
> & ID CE D bt , dt 
bt
Output port
Decimal
:3 - 7, 11 - 15
dt
Output data
Decimal
:0 or 1
If bt , dt are not returned, an error output function is disabled.
(Default)
■Error code:
@69
Invalid operation mode.
■Example:
& 3 FC E D 1 , E 
Gets parameters of an error output function used when an EMS
error occurs in motor #1.
Indicates that general output D2 will be set to 1.
> & 3 F CE D 2, 1
& 3 FC E D 1, A 
> & 3 F CE D 
Gets parameters of an error output function used when any of
the errors occurs.
An error output function is disabled.
117
14. C command (Input/output port)
■Sample user program: Not available
■Prerequisite settings: None
■Related topics:
CES
Error output function*1
For details about an error output function, see "13.7 Input/output
port".
Setting parameters for error output function *1
■Syntax:
Operation mode
0-3
4
○
×
During
a move
User
Program
○
○
& ID CE S mt , er , bt , dt 
Specifies that the status of general output port bt be set to dt when an error of type
occurs in motor
mt
er
er
mt .
Target motor
Error factor
‘1’
:Motor #1
‘2’
:Motor #2
One character
:‘E’ → EMS error
‘L’ → Limit error (CW or CCW)
‘S’ → STALL error
‘A’ → Any of the above errors
bt
Output port*2
Decimal
:3 - 7, 11 - 15
dt
Output data
Decimal
:0 or 1
If bt , dt are not specified, an error output function is disabled.
■Reply:
> & ID CE S 
■Error code:
@67
@69
■Example:
(Default)
Attempt to reconfigure an output port.
Or attempt to configure an output port dedicated to controlling a
motor.
Invalid operation mode.
& 3FCES1,E,2,1 
> & 3 F CE S
Sets general output D2 to 1 if an EMS error occurs in motor #1.
& 3 FC E S 1, A 
> & 3 F CE S
Disables an error output function that is effective for any error in
motor #1.
■Sample user program: LD D1,2
LD D2,1
CE S1 , E , D 1, D 2
RX buffer
Assigns 2 to data memory D1.
Assigns 1 to data memory D2.
Executes the command “CES".
No change
■Prerequisite settings: None
■Related topics:
118
Error output function*1
For details about an error output function, see "13.7 Input/output
port".
14. C command (Input/output port)
Output port*2
CID
■Syntax:
Output ports that may be used for controlling motors, which are
D0, D1, D2, D8, D9, and D10, cannot be specified as a target
port in this command, whether the numbers of motors you
control is one or two (i.e., in mode 0, 1, 2, or 3). The same
output port cannot be shared by multiple error factors (EMS,
Limit, STALL, ALL).
Operation mode
0-3
4
○
○
Getting the status of input ports used for
motor controlling and general purpose
During
a move
User
Program
○
○
& ID CI D bt 
Gets the status of input ports used for motor control and general purposes.
If no bit is specified, the values of all bits are collectively reported.
bt
Bit to check
Decimal
:0 - 15
If not specified, a hex value representing all bits is returned.
bt
15 14 13 12 11 10 9
8
7
6
5
4
3
2
1
0
General input 0 (STALL for motor #1)
General input 1 (Home sensor for motor #1)
General input 2 (CW limit sensor for motor #1)
General input 3 (CCW limit sensor for motor #1)
General input 4 (GROW for motor #1)
General input 5 (EMS)
General input 6
General input 7
General input 8 (STALL for motor #2)
General input 9 (Home sensor for motor #2)
General input 10 (CW limit sensor for motor #2)
General input 11 (CCW limit sensor for motor #2)
General input 12 (GROW for motor #2)
General input 13
General input 14
General input 15
■Reply:
> & ID C I D dt 
dt
Data
If a particular bit was specified,
Decimal
:0 or 1
4-digit hexadecimal :H0000 - HFFFF
If no bit was specified,
The returned data is affected by the setting of command "DIS (Setting input logic)”.
■Error code:
None
■Example:
& 3 FC I D 5 
> & 3 F CI D 1
Gets the status of bit 5 in the input port.
Bit 5 in the input port is 1.
& 3 FC I D 
> & 3 F CI D H 0 03 C 
Gets the status of the input port.
The status of the input port is H003C.
119
14. C command (Input/output port)
■Sample user program: CI D
Executes the command “CID".
RX buffer
Run result (H003C)
■Prerequisite settings: None
■Related topics:
CLD
■Syntax:
Input port
Whether a bit in the input port is used as a motor-controlling bit
or general-purpose bit depends on the operation mode.
For details about input ports, see "13.7 Input/output port".
Getting the status of sensors (motor-controlling inputs)
Operation mode
0-3
4
○
×
During
a move
User
Program
○
○
& ID C LD mt , bt 
Gets the status of several sensors for motor mt .
If no bit is specified, the status of all sensors for
Target motor
mt
Bit to check
bt
mt are collectively reported.
‘1’
:Motor #1
‘2’
:Motor #2
Decimal
:0 - 5
If not specified, a hexadecimal value representing all bits is
returned.
b7
b6
b5
b4
bt
b3
b2
b1
b0
The status of a STALL sensor
The status of a Home sensor
The status of a CW sensor
The status of a CCW sensor
The status of a GROW input
The status of an EMS sensor
Unassigned
Unassigned
■Reply:
> & ID C LD dt 
dt
Data
If a particular bit was specified,
Decimal
:0 or 1
If no bit was specified,
2-digit hexadecimal :H00 - H3F
The returned data is affected by the setting of command "DIS (Setting input logic)".
■Error code:
@69
Invalid operation mode.
■Example:
& 3 FC LD 1, 5
> & 3 F CLD 0 
Gets the status of an EMS sensor.
The status of the EMS sensor is 0.
& 3 FC LD 1
> & 3 F CLD H 0 A 
Gets the status of all sensors collectively.
The status of the CCW and Home sensor is 1.
The status of other sensors are 0.
120
14. C command (Input/output port)
■Sample user program: CLD 1
■Related topics:
Executes the command “CLD".
RX buffer
Run result (H0C)
Input port
Whether a bit in the input port is used as a motor-controlling bit
or general-purpose bit depends on the operation mode.
For details about input ports, see "13.7 Input/output port".
The status of sensors returned by this command corresponds to
that of the motor-controlling bits returned by the command
"CID".
The EMS terminal (pin No.13) is shared by motor #1 and #2.
The same value is returned whether a target motor is #1 or #2.
The command returns 0 (zero) as the status of the GROW input
when the current operation mode is other than 3 or 4, which is
used with RD-3xx series drivers.
Command "CID"
EMS and GROW input
COD
■Syntax:
Getting the status of output ports used for
motor controlling and general purpose
Operation mode
0-3
○
4
○
During
a move
User
Program
○
○
& ID C OD bt 
Gets the status of output ports used for motor control and general purposes.
If no bit is specified, the values of all bits are collectively reported.
bt
Bit to check
Decimal
:0 - 15
If not specified, a hexadecimal value representing all bits is returned.
■Reply:
> & ID C OD dt 
dt
Data
If a particular bit was specified, Decimal
:0 or 1
4-digit Hexadecimal :H0000 - HFFFF
If no bit was specified,
■Error code:
None
■Example:
& 3 FC OD 1 
> & 3 F C OD 1 
Gets the status of bit 1 in the output port.
The status of the output port is 1.
& 3 FC OD 
> & 3 F C OD H 00 3D 
Gets the status of all output ports.
The status of the output port is H003D.
■Sample user program: C OD
RX buffer
Executes the command “COD".
Run result (H003D)
■Prerequisite settings: None
■Related topics:
Output port
Whether a bit in the output port is used as a motor-controlling bit
or general-purpose bit depends on the operation mode.
For details about input ports, see "13.7 Input/output port".
121
14. C command (Input/output port)
COS
■Syntax:
Setting the general-purpose output port
Operation mode
0-3
4
○
○
During
a move
User
Program
○
○
& ID C O S bt , dt 
Sets the status of the general-purpose output port.
If no bit is specified, the values of all bits are collectively set.
Motor-controlling bits, which are assigned by a particular operation mode, cannot be changed
manually.
bt
Bit to set
Decimal
:0 - 15
If not specified, all bits are collectively set with a hexadecimal value.
dt
Data
If a particular bit is specified, Decimal
:0 or 1
(Default: 0)
If no bit is specified,
:H0000 - HFFFF
(Default: H0000)
Hexadecimal
■Reply:
> & ID C O S 
■Error code:
None
■Example:
& 3FCOS7,1 
> &3FCOS
Assigns 1 to bit 7 in the general output port.
& 3FCOSH003D 
> & 3FCOS 
Assigns H003D to the general-purpose output port.
■Sample user program: LD D0,H003D
C OSD 0
RX buffer
Assigns H003D to data memory D0.
Executes the command “COS".
No change
■Prerequisite settings: None
■Related topics:
CPD
■Syntax:
Output port
Whether a bit in the output port is used as a motor-controlling bit
or general-purpose bit depends on the operation mode.
For details about input ports, see "13.7 Input/output port".
Getting the configuration of an interrupt mode*1
Operation mode
0-3
4
○
×
During
a move
User
Program
○
○
& ID CP D bt 
Gets an operation*3 when the status of the interrupt input port specified by bt changes*2.
bt
■Reply:
Interrupt input port
Decimal :14 or 15
> & ID CP D md 
md
Interrupt mode
Decimal :0 → Interrupt is disabled.
(Default)
1 → Position data is stored into a memory on a falling edge*4.
2 → Position data is stored into a memory on a rising edge*5.
122
14. C command (Input/output port)
■Error code:
@69
Invalid operation mode.
■Example:
& 3 FC P D 1 5 
> & 3 F CP D 2
Gets the interrupt mode at general input D15.
Position data will be stored on a rising edge.
& 3 FC P D 1 4 
> & 3 F CP D 0
Gets the interrupt mode at general input D14.
Interrupt is disabled and no action is taken.
■Sample user program: LD D0,15
CP D D 0
RX buffer
Run result (2)
■Prerequisite settings: Command "CAS"
Command "CSS"
Command "DIS"
■Related topics:
Interrupt mode *1
Status change*2
Operation *3
Falling edge *4
Rising edge*5
CPS
■Syntax:
Assigns 15 to data memory D0.
Executes the command “CPD".
Sets parameters used to store a position when the status
changes.
Sets the valid position range for interrupt.
Sets the input logic.
For details about interrupt mode, see "13.7 Input/output port".
Because a status change is determined according to data that
can be obtained by the command "CID", the decision is affected
by the settings of command "DIS".
The setting configured by the command "CPD" is valid for only
ONE subsequent move command (i.e., command 1 or 2). Issue
the command each time you want to use this position-storing
function.
A change from 1 to 0 in a data value obtained by the command "CID".
A change from 0 to 1 in a data value obtained by the command "CID".
Configuring an interrupt mode*1
Operation mode
0-3
4
○
×
During
a move
User
Program
×
○
& ID CP S bt , md 
Specifies an action*3 by md , to be taken when the status of an interrupt input
bt is
changed *2.
bt
Interrupt input port
Decimal :14 or 15
md
Interrupt mode
Decimal :0 → 0 → Disables an interrupt.
(Default)
1 → Position data be stored into a memory on a falling edge*4.
2 → Position data be stored into a memory on a rising edge*5.
■Reply:
> & ID CP S 
■Error code:
@50
@69
The motor is running.
Invalid operation mode.
123
14. C command (Input/output port)
■Example:
& 3 FC P S 1 5, 2
> & 3 F CP S
Instructs that a position be stored at the rising edge of general
interrupt input D15.
& 3 FC P S 1 5, 0
> & 3 F CP S
Disables the interrupt input function at general input D15.
■Sample user program: LD D0,15
LD D1,1
CP SD0, D 1
RX buffer
No change
■Prerequisite settings: Command "CAS"
Command "CSS"
Command "DIS"
■Related topics:
Interrupt mode *1
Status change*2
Operation *3
Storing position data
Falling edge *4
Rising edge*5
CRD
■Syntax:
Assigns 15 to data memory D0.
Assigns 1 to data memory D1.
Executes the command “CPS".
Sets parameters used to store the position where the status
changes.
Sets the valid position range for interrupt.
Sets the input logic.
For details about interrupt mode, see "13.7 Input/output port".
Because a status change is determined according to data that
can be obtained by the command "CID", the decision is affected
by the settings of command "DIS".
The setting configured by this command is valid for only ONE
subsequent move command (i.e., command 1 or 2). Issue the
command each time you want to use this position-storing
function.
Before using this command, issue the command "CAS" to
specify which motor position should be stored to what position
number.
A change from 1 to 0 in a data value obtained by the command "CID".
A change from 0 to 1 in a data value obtained by the command "CID".
Operation mode
0-3
4
○
×
Getting the status of the error output*1
During
a move
User
Program
○
○
& ID CR D mt , er 
Gets the status of the error output for motor
mt .
If no error factor is specified, the error
output for all of the error factor is reported in hexadecimal value.
mt
er
■Reply:
Error factor
‘1’
:Motor #1
‘2’
:Motor #2
One character
:‘E’ → EMS error
‘L’ → Limit error (CW or CCW)
‘S’ → STALL error
‘A’ → Any of the above errors
If not specified, a hexadecimal value representing all error
factors is returned.
> & ID CR D st 
st
124
Target motor
The status of the error output for the target motor.
14. C command (Input/output port)
If an error factor was specified,
Decimal
If no error factor was specified,
Hex
:0 → No error has occurred.
1 → The error has occurred.
:H0 - HF
b3
b2
st
b1
b0
All errors
EMS error
Limit error
STALL error
■Error code:
@69
Invalid operation mode.
■Example:
& 3 FCR D 1, E 
> & 3 F CR D 1 
Gets the status of the EMS error output for motor #1.
An output based on an EMS error is set.
& 3 FCR D 1 
> & 3 F CR D H 4
Collectively gets the status of all error factors for motor #1.
An output based on a limit error is set.
■Sample user program: CR D 1
Executes the command “CRD".
RX buffer
Run result (H4)
■Prerequisite settings: None
■Related topics:
CRS
■Syntax:
Error output status*1
For details about the status of an error output, see "13.7
Input/output port".
Clearing the status of the error output*1
Operation mode
0-3
4
○
×
During
a move
User
Program
○
○
& ID CR S mt 
Clears the status of error outputs for motor mt and inverts the output value of the general
output bits.
mt
Each error cannot be cleared individually.
Target motor
‘1’
:Motor #1
‘2’
:Motor #2
‘AL’
:Clearing both motors
■Reply:
> & ID CR S 
■Error code:
@69
Invalid operation mode.
■Example:
& 3 FCR SA L 
> & 3 F CR S
Clears each status of the error output for motor #1 and #2.
■Sample user program: CR S A L
RX buffer
Executes the command “CRS".
No change
125
14. C command (Input/output port)
■Prerequisite settings: None
■Related topics:
CSD
■Syntax:
Error output status*1
For details about the status of an error output, see "13.7
Input/output port".
Operation mode
0-3
4
○
×
Getting the valid position range for interrupt *1
User
Program
○
×
& ID C SD bt 
Gets the range where an interrupt at an input port specified by
bt
■Reply:
During
a move
Interrupt input port
Decimal
bt is effective.
:14 or 15
> & ID C SD ps , pe 
ps
Start position of the interrupt range
Signed 10-digit decimal :-1 billion<ps<+1 billion
pe
End position of the interrupt range
Signed 10-digit decimal :-1 billion<pe<+1 billion
If
ps
position.
, pe
are not returned, the interrupt function is always active in any
(Default)
■Error code:
@69
■Example:
& 3 FC SD 14 
Gets the position range where the interrupt input D14 is active.
> & 3 F C SD - 00 0 00 00 5 0, + 0 00 0 00 0 50 
The valid range is from -50 to +50.
& 3 FC SD 14 
> & 3 F C SD 
Invalid operation mode.
Gets the position range where the interrupt input D14 is active.
The interrupt function is always active in any position.
■Sample user program: Not available
■Prerequisite settings: 'C' command
'D' command
■Related topics:
126
Sets parameters for the interrupt function.
Sets the input logic.
Position range where interrupt is valid *1 For details about a valid interrupt range, see "13.7 Input/output
port".
Note
Though settings configured by the command "CPS" is effective
only once, the settings of this command is valid until they are
over-written by the same command with different parameters.
14. C command (Input/output port)
CSS
■Syntax:
Setting the valid position range for interrupt *1
Operation mode
0-3
4
○
×
During
a move
User
Program
×
○
& ID C SS bt , ps , pe 
Specifies that an interrupt input function for
bt be valid only between
ps and pe .
bt
Interrupt input port
Decimal
:14 or 15
ps
Start position of the interrupt range
Decimal
:-1 billion<ps<+1 billion
pe
End position of the interrupt range
Decimal
:-1 billion<pe<+1 billion
If ps , pe are not specified, the interrupt function will be always active in any
position.
(Default)
If ps ≧ pe , a command error (@4A) occurs.
■Reply:
> & ID C S S
■Error code:
@50
@69
■Example:
& 3FCSS14,-50,50 Specifies the valid position range of the interrupt input D14 as
> & 3 F C SS 
between -50 and +50.
& 3 FC S S 15 
> & 3 F C SS 
■Sample user program: LD D0,14
LD D1,-50
LD D2,50
CS SD0, D1, D 2
RX buffer
■Prerequisite settings: "C" command
"D" command
■Related topics:
The motor is running.
Invalid operation mode.
Activates the interrupt input function with general input D15 at
any position.
Assigns 14 to data memory D0.
Assigns -50 to data memory D1.
Assigns 50 to data memory D2.
Executes the command “CSS".
No change
Sets parameters for the interrupt function.
Sets the input logic.
Position range where interrupt is valid *1 For details about a valid interrupt range, see "13.7 Input/output
port".
Note
Though settings configured by the command "CPS" is effective
only once, the settings of this command is valid until they are
over-written by the same command with different parameters.
127
14. D command (Setting an input/output logic)
DCD
Getting the maximum counts parameter used in a noise cancel
function *1 for motor controlling and general-purpose inputs
Operation mode
0-3
4
○
○
During
a move
User
Program
○
×
& ID D CD bt 
■Syntax:
Gets the maximum counts parameter used in a noise cancel function for motor controlling
and general-purpose inputs.
bt
Bit to check
Decimal
:0 - 15
bt
15 14 13 12 11 10 9
8
7
6
5
4
3
2
1
0
General input 0 (STALL sensor for motor #1)
General input 1 (Home sensor for motor #1)
General input 2 (CW limit sensor for motor #1)
General input 3 (CCW limit sensor for motor #1)
General input 4 (GROW for motor #1)
General input 5 (EMS)
General input 6
General input 7
General input 8 (STALL sensor for motor #2)
General input 9 (Home sensor for motor #2)
General input 10 (CW limit sensor for motor #2)
General input 11 (CCW limit sensor for motor #2)
General input 12 (GROW for motor #2)
General input 13
General input 14
General input 15
■Reply:
> & ID D CD ct 
ct
Count
3-digit decimal
:2 - 99
1 (Default)
■Error code:
None
■Example:
& 3 FD CD 1 4
> & 3 FD CD 0 0 5
& 3 FD CD 3 
> & 3 FD CD 0 0 1
Maximum value
A noise cancel function is disabled.
Gets the maximum counts of a noise cancel function for
general input 14.
The maximum value of the noise cancel count is 5.
Gets the maximum counts of a noise cancel function for
general input 3.
A noise cancel function for general input 3 is disabled.
■Sample user program: Not available
■Prerequisite settings: None
■Related topics:
128
Noise cancel*1
For details about a noise cancel function, see "13.7 Input/output
port".
14. D command (Setting an input/output logic)
DCS
Setting the maximum counts parameter used in a noise cancel
function *1 for motor controlling and general-purpose inputs
■Syntax:
Operation mode
0-3
4
○
○
During
a move
User
Program
○
×
& ID D CS bt , ct 
Sets the maximum counts parameter used in a noise cancel function for motor controlling and
general-purpose inputs.
bt
ct
Bit to set
Count
Decimal
:0 - 15
If not specified
:The same value is set for all bits.
Decimal
:2 - 99
Maximum count
1 (Default)
Disables a noise cancel function.
bt
15 14 13 12 11 10 9
8
7
6
5
4
3
2
1
0
General input 0 (STALL sensor for motor #1)
General input 1 (Home sensor for motor #1)
General input 2 (CW limit sensor for motor #1)
General input 3 (CCW limit sensor for motor #1)
General input 4 (GROW for motor #1)
General input 5 (EMS)
General input 6
General input 7
General input 8 (STALL sensor for motor #2)
General input 9 (Home sensor for motor #2)
General input 10 (CW limit sensor for motor #2)
General input 11 (CCW limit sensor for motor #2)
General input 12 (GROW for motor #2)
General input 13
General input 14
General input 15
■Reply:
> & ID D C S
■Error code:
None
■Example:
& 3 FD C S 14 , 5 
> & 3 FD C S
Assigns 5 to the maximum counts used in a noise cancel
function for general input 14.
& 3 FD C S 1 
> & 3 FD C S
Disables a noise cancel function for all input ports.
■Sample user program: Not available
■Prerequisite settings: None
■Related topics:
Noise cancel*1
Input port
For details about a noise cancel function, see "13.7 Input/output
port".
Whether a bit in the input port is used as a motor-controlling bit
or general-purpose bit depends on the operation mode.
129
14. D command (Setting an input/output logic)
DID
Operation mode
0-3
4
○
○
Getting an input logic for motor-control and
general-purpose inputs
■Syntax:
During
a move
User
Program
○
○
& ID D I D bt 
Getting an input logic (i.e., normally-open or -closed) for motor-control and general-purpose
inputs. If no bit is specified, the values of all bits are collectively reported.
bt
Bit to check
Decimal
:0 - 15
If not specified
:A hex value representing all bits is returned.
> & ID D I D dt 
■Reply:
dt
Data
If a particular bit was specified,
If no bit was specified,
Decimal
4-digit hex
:0 or 1
:H0000 - HFFFF
(Default: 0)
(Default: H0000)
dt
15 14 13 12 11 10 9
8
7
6
5
4
3
2
1
0
General input 0; 0: normally-open, 1: normally-closed
General input 1; 0: normally-open, 1: normally-closed
General input 2; 0: normally-open, 1: normally-closed
General input 3; 0: normally-open, 1: normally-closed
General input 4; 0: normally-open, 1: normally-closed
General input 5; 0: normally-open, 1: normally-closed
General input 6; 0: normally-open, 1: normally-closed
General input 7; 0: normally-open, 1: normally-closed
General input 8; 0: normally-open, 1: normally-closed
General input 9; 0: normally-open, 1: normally-closed
General input 10; 0: normally-open, 1: normally-closed
General input 11; 0: normally-open, 1: normally-closed
General input 12; 0: normally-open, 1: normally-closed
General input 13; 0: normally-open, 1: normally-closed
General input 14; 0: normally-open, 1: normally-closed
General input 15; 0: normally-open, 1: normally-closed
■Error code:
None
■Example:
& 3 FD I D 1
> & 3 FD I D 0 
Gets the input logic of bit 1 in the general input port.
General input bit 1 is normally-open.
& 3 FD I D 
> & 3 FD I D H 0 0 3F 
Gets the input logic of the general input port.
General input bit 0 to 5 are normally-closed and bit 6 to 15
normally-open.
■Sample user program: D I D
RX buffer
Executes the command “DID".
Run result (H32F)
■Prerequisite settings: None
■Related topics:
130
Input port
Whether a bit in the input port is used as a motor-controlling bit
or general-purpose bit depends on the operation mode.
For details about input ports, see "13.7 Input/output port".
14. D command (Setting an input/output logic)
DIS
Setting an input logic for motor-control and
general-purpose inputs
■Syntax:
& ID D I S bt ,
Operation mode
0-3
4
○
○
During
a move
User
Program
○
○
dt 
Sets an input logic (i.e., normally-open or -closed) for motor-control and general-purpose
inputs. The settings of this command affects values obtained by the command "CID".
If no bit is specified, the parameters for all bits are collectively set.
bt
dt
Bit to set
Decimal
:0 - 15
If not specified
:All bits are collectively set with a hex value.
Data
If a particular bit is specified, Decimal :0 - 1
If no bit is specified,
Hex
:H0000 - HFFFF
(Default: 0)
(Default: H0000)
dt
15 14 13 12 11 10 9
8
7
6
5
4
3
2
1
0
General input 0; 0: normally-open, 1: normally-closed
General input 1; 0: normally-open, 1: normally-closed
General input 2; 0: normally-open, 1: normally-closed
General input 3; 0: normally-open, 1: normally-closed
General input 4; 0: normally-open, 1: normally-closed
General input 5; 0: normally-open, 1: normally-closed
General input 6; 0: normally-open, 1: normally-closed
General input 7; 0: normally-open, 1: normally-closed
General input 8; 0: normally-open, 1: normally-closed
General input 9; 0: normally-open, 1: normally-closed
General input 10; 0: normally-open, 1: normally-closed
General input 11; 0: normally-open, 1: normally-closed
General input 12; 0: normally-open, 1: normally-closed
General input 13; 0: normally-open, 1: normally-closed
General input 14; 0: normally-open, 1: normally-closed
General input 15; 0: normally-open, 1: normally-closed
■Reply:
> & ID D I S
■Error code:
None
■Example:
& 3 FD I S1 , 0 
> & 3 FD I S 
Designates general input bit 1 as a normally-open type.
& 3 FD I SH 3F
> & 3 FD I S 
Sets general input bit 0 - 5 to normally-closed bits and bit 6 - 15
to normally-open bits.
■Sample user program: LD D0,H3F
D I SD 0
RX buffer
Assigns H3F to data memory D0.
Executes the command “DIS".
No change
■Prerequisite settings: None
■Related topics:
General Input port
For details about general input ports, see "13.7 Input/output
port".
131
14. E command (Setting modes)
EAD
■Syntax:
Operation mode
0-3
4
○
○
Getting an operation mode
During
a move
User
Program
○
○
& ID E A D 
Gets an operation mode.
■Reply:
> & ID E A D md 
md
Operation mode
One character
Ope. mode
Drivers to be controlled
‘0’
‘1’
‘2’
‘3’
‘4’
One RD-1xx series driver
Two RD-1xx series drivers
One RD-3xx series driver
Two RD-3xx series drivers
None (All I/Os)
■Error code:
None
■Example:
& 3 FE A D 
> & 3 FE A D 0 
‘0’ - ‘4’
(Default: 0)
Available
general inputs
11
7
10
5
16
Available
general outputs
13
10
13
10
16
Gets an operation mode.
The mode is for controlling one RD-1xx series driver.
Eleven input bits and thirteen output bits are available for
general-purpose use.
Other bits are used for controlling
motors.
■Sample user program: E A D
Executes the command “EAD".
RX buffer
Run result (0)
■Prerequisite settings: None
■Related topics:
EAS
■Syntax:
Operation mode
For details about operation modes, see "13.1 Operation mode".
Operation mode
0-3
4
○
○
Setting an operation mode
During
a move
User
Program
○
○
& ID E A S md 
Sets an operation mode. The mode determines the driver type and the number of available
bits for general-purpose use.
md
Operation mode
Ope. mode
Drivers to be controlled
‘0’
‘1’
‘2’
‘3’
‘4’
One RD-1xx series driver
Two RD-1xx series drivers
One RD-3xx series driver
Two RD-3xx series drivers
None (All I/Os)
■Reply:
> & ID E A S 
■Error code:
None
132
One character
‘0’ - ‘4’
(Default: 0)
Available
general inputs
11
7
10
5
16
Available
general outputs
13
10
13
10
16
14. E command (Setting modes)
■Example:
& 3 FE A S4 
> & 3 FE A S 
Sets the operation mode to 4 (All I/Os can be used for general
purpose).
■Sample user program: LD D0,0
E A SD 0
Assigns 0 to data memory D0.
Executes the command “EAS".
RX buffer
No change
■Prerequisite settings: None
■Related topics:
EMD
■Syntax:
Operation mode
For details about operation modes, see "13.1 Operation mode".
Getting an event mask*1
Operation mode
0-3
4
○
×
During
a move
User
Program
○
×
& ID E M D mt 
Gets the status of an event mask controlling the creation of event messages*2 for motor mt .
mt
■Reply:
Target motor
> & ID E M D C: cm
‘1’
:Motor #1
‘2’
:Motor #2
,M: mm
,S: sm ,I: im 
cm
Controller status
2-digit hexadecimal
:H00 - HFE
mm
Completion-of-move factor
2-digit hexadecimal
:H00 - H1F
sm
Sensor inputs
2-digit hexadecimal
:H00 - H3F
im
General inputs
4-digit hexadecimal
:H0000 - HFFFF
If a bit in the event mask is set to 1 and the status of the corresponding bit is changed, an
event message is generated.
As for the controller status*3 and the completion-of-move factor, if the corresponding bit is
changed from 0 to 1, an event message is created.
As for the sensor inputs and the general-purpose inputs, a bit change both from 0 to 1 and
from 1 to 0 creates an event message.
■Error code:
@69
■Example:
& 3 FE M D 1
Invalid operation mode.
Gets the event mask for motor #1 belonging to a controller with
the body number of 3F.
> & 3 FE M D C: H 0 6, M : H 00 , S : H 00 , I : H 0 00 1 
Changes in Limit or EMS error bit in the controller status or
changes in the general input 0 trigger a transmission of an event
message.
■Prerequisite settings: None
133
14. E command (Setting modes)
■Related topics:
Event mask*1
*
Event message 2
Controller status*3
Note
EMS
■Syntax:
For details about event masks, see "13.8 Event response".
For details about event messages, see "13.8 Event response".
The bit 0 in a controller status, which represents a moving status,
cannot create an event response.
To create an event message, you must issue the command
"XID" to the link master in advance.
Setting an event mask*1
& ID E M S mt ,C: cm
Operation mode
0-3
4
○
×
, M: mm
cm
Target motor
Controller status
User
Program
×
×
, S: sm , I: im 
Sets an event mask controlling the creation of event messages *2 for motor
mt
During
a move
mt .
‘1’
:Motor #1
‘2’
:Motor #2
2-digit hexadecimal
:H00 - HFE
Not mandatory. The low-order 1 bit cannot be changed.
mm
Completion-of-move factor
2-digit hexadecimal
:H00 - H1F
Not mandatory. Only the low-order 5 bits can be changed.
sm
Sensor inputs
2-digit hexadecimal
:H00 - H3F
Not mandatory. Only the low-order 6 bits can be changed.
im
General inputs
4-digit hexadecimal
:H0000 - HFFFF
Not mandatory. Only the low-order 10 bits can be changed.
If no setting is specified to an item, the item will be masked.
If a bit in the event mask is set to 1 and the status of the corresponding bit is changed, an
event message is generated.
As for the controller status*3 and the completion-of-move factor, if the corresponding bit is
changed from 0 to 1, an event message is created.
As for the sensor inputs and the general-purpose inputs, a bit change both from 0 to 1 and
from 1 to 0 creates an event message.
■Reply:
> & 3 FE M S 
■Error code:
@50
@69
■Example:
& 3FEMS1,C:H06,I:H0001 
> & 3 FE M S 
The motor is running.
Invalid operation mode.
Sets the event mask for a controller with the body number
of 3F, so that changes in Limit or EMS error bit in the
controller status or changes in the general input 0
trigger a transmission of an event message.
■Prerequisite settings: None
■Related topics:
Event mask*1
Event message*2
Controller status*3
Note
134
For details about event masks, see "13.8 Event response".
For details about event messages, see "13.8 Event response".
The bit 0 in a controller status, which represents a moving status,
cannot create an event response.
To create an event message, you must issue the command
"XID" to the link master in advance.
14. E command (Setting modes)
ERD
■Syntax:
Getting all status of an event response
Operation mode
0-3
4
○
×
During
a move
User
Program
○
×
& ID E R D mt 
Gets the current value of all status of motor mt configured by the command "ESS".
mt
■Reply:
Target motor
‘1’
:Motor #1
‘2’
:Motor #2
> & ID E R D cd : dt , cd : dt ...
cd
dt
Status type
Status
One character
‘C’
‘M’
‘S’
‘I’
‘O ’
‘P’
:Controller status
:Completion-of-move factor
:Sensor inputs
:General purpose inputs
:General purpose outputs
:Position
Position
:Decimal
Others
:Hexadecimal
■Error code:
@69
■Example:
& 3 FE R D 1
Gets the current value of all status configured by the command "ESS".
> &3FERDC:H00,M:H00,S:H00,I:H0013,O:H0000,P+000015000 
Invalid operation mode.
■Prerequisite settings: Command "ESS"
Sets status types in event response.
■Related topics: None
ESD
■Syntax:
Getting status types in an event response
During
a move
User
Program
○
×
& ID E SD mt 
Gets what status be included in an event response for motor
mt
■Reply:
Operation mode
0-3
4
○
×
Target motor
‘1’
:Motor #1
‘2’
:Motor #2
mt .
> & ID E SD cd , cd ...
cd
Status type
One character
‘C’
‘M’
‘S’
‘I’
‘O ’
‘P’
:Controller status
:Completion-of-move factor
:Sensor inputs
:General purpose inputs
:General purpose outputs
:Position
135
14. E command (Setting modes)
■Error code:
@69
Invalid operation mode.
■Example:
& 3 FE SD 1 
> & 3 FE SD C, I , P 
Gets what status be included in an event response.
Gets an event response consists of a controller status, a general
input status, and a motor position.
■Prerequisite settings: None
■Related topics:
ESS
■Syntax:
Event response
Note
For details about event responses, see "13.8 Event response".
To create an event message, you must issue the command
"XID" to the link master in advance.
Setting status types in an event response
Operation mode
0-3
4
○
×
During
a move
User
Program
×
×
& ID E SS mt , cd , cd ...
Specifies what status be included in an event response for motor mt .
mt
cd
Target motor
Status type
‘1’
:Motor #1
‘2’
:Motor #2
One character
‘C’
‘M’
‘S’
‘I’
‘O ’
‘P’
:Controller status
:Completion-of-move factor
:Sensor inputs
:General purpose inputs
:General purpose outputs
:Position
■Reply:
> & ID E S S 
■Error code:
@50
@69
The motor is running.
Invalid operation mode.
■Example:
& 3FESS1,C,I,P 
> & 3 FE S S
Specifies that an event response consists of a controller status,
a general input status, and a motor position.
■Prerequisite settings: None
■Related topics:
136
Event response
Note
For details about event responses, see "13.8 Event response".
To create an event message, you must issue the command
"XID" to the link master in advance.
14. F command (Flash memory)
FES
Operation mode
0-3
4
○
○
Clearing the flash memory
During
a move
User
Program
×
×
& ID FE S md 
■Syntax:
Clears data specified by
md
md
Data type
from the flash memory.
“Posp”
“Init”
“Upgm”
:Position pulse
:Initialization data used upon power-up
:User program
■Reply:
> & ID FE S 
■Error code:
@50
The motor is running.
■Example:
& 3 FF E S P o s p 
> & 3 F FE S
Clears position pulse data from the flash memory.
& 3 FF E S I n i t 
> & 3 F FE S
Clears initialization data used upon power-up from the flash
memory.
& 3 FF E S U p gm 
> & 3 F FE S
Clears user program data from the flash memory.
■Sample user program: Not available
■Prerequisite settings: None
■Related topics:
Position pulse
Initialization data
User program
Execution time for the command
FIS
■Syntax:
For details about position pulse, see "13.3 Position pulse".
For details about initialization data, see "18. Default Value".
For details about user programs, see "15. User Program
Command".
It takes about 1.5 seconds to execute the command "FES".
Operation mode
0-3
4
○
○
Writing initialization data
During
a move
User
Program
×
×
& ID FI S 
Writes initialization data used on power-up into the flash memory.
■Reply:
> & ID FI S 
■Error code:
@50
The motor is running.
■Example:
& 3 FF I S 
> & 3 F FI S 
Writes initialization data used on power-up into the flash memory.
■Sample user program: Not available
137
14. F command (Flash memory)
■Prerequisite settings: None
■Related topics:
FPD
Initialization data
Execution time for the command
For details about initialization data, see "18. Default Value".
It takes about 1.5 seconds to execute the command "FIS".
Reading position pulses
■Syntax:
Operation mode
0-3
4
○
○
During
a move
User
Program
×
×
& ID FP D 
Reads position pulse data from the flash memory.
■Reply:
> & ID FP D 
■Error code:
@50
The motor is running.
■Example:
& 3 FF P D 
> & 3 F FP D 
Reads position pulse data from the flash memory.
■Sample user program: Not available
■Prerequisite settings: None
■Related topics:
FPS
Position pulse
Execution time for the command
For details about position pulse, see "13.3 Position pulse".
It takes about 1.5 seconds to execute the command "FPD".
Operation mode
0-3
4
○
○
Writing position pulses
■Syntax:
During
a move
User
Program
×
×
& ID FP S
Writes position pulse data into the flash memory.
■Reply:
> & ID FP S 
■Error code:
@50
The motor is running.
■Example:
& 3 FF P S 
> & 3 F FP S
Writes position pulse data into the flash memory.
■Sample user program: Not available
■Prerequisite settings: None
■Related topics:
138
Position pulse
Execution time for the command
For details about position pulse, see "13.3 Position pulse".
It takes about 1.5 seconds to execute the command "FPS".
14. F command (Flash memory)
FUD
Reading a user program
Operation mode
0-3
4
○
○
During
a move
User
Program
×
×
& ID FU D 
■Syntax:
Reads a user program from the flash memory.
■Reply:
> & ID FU D 
■Error code:
@50
The motor is running.
■Example:
& 3 FF U D 
> & 3 F FU D 
Reads a user program from the flash memory.
■Sample user program: Not available
■Prerequisite settings: None
■Related topics:
User program
Execution time for the command
FUS
For details about user programs, see "15. User Program
Command".
It takes about 1.5 seconds to execute the command "FUD".
Operation mode
0-3
4
○
○
Writing a user program
■Syntax:
During
a move
User
Program
×
×
& ID FU S
Writes a user program into the flash memory.
■Reply:
> & ID FU S 
■Error code:
@50
The motor is running.
■Example:
& 3 FF U S 
> & 3 F FU S
Writes a user program into the flash memory.
■Sample user program: Not available
■Prerequisite settings: None
■Related topics:
User program
Execution time for the command
For details about user programs, see "15. User Program
Command".
It takes about 1.5 seconds to execute the command "FUS".
139
14. L command (Setting of low step pulse)
LSD
Operation mode
0-3
4
○
×
Getting a low step pulse*1
■Syntax:
User
Program
○
○
& ID LSD mt ,A[ ln ]
Gets the low step pulse set in low step No.*2
mt
ln
■Reply:
During
a move
Target motor
Low step No.
ln for motor mt .
‘1‘
:Motor #1
‘2‘
:Motor #2
Decimal
:0-30
If not specified
:No.30
8-digit decimal
:1 - 1,000,000
> & ID L SD lp 
lp
Low step pulse
(Default: 5,000 for No.30)
Undefined for other numbers.
■Error code:
@40
@69
■Example:
& 3 FL SD 1 
Gets the low step pulse set in low step No.30 for motor #1.
>&3FLSD00001000  The low step pulse of No.30 is 1,000 pulses.
& 3 FL SD 1, A [ 2] 
>&3FLSD3
■Sample user program: LSD 1
RX buffer
The low step pulse has not been defined.
Invalid operation mode.
Gets the low step pulse set in low step No.2 for motor #1.
A command error has occurred because the low step pulse of
No.2 has not been defined.
Executes the command "LSD".
Run result (1,000)
■Prerequisite settings: Command "LSS"
■Related topics:
Low step pulse *1
Low step No. *2
140
A low step pulse defines the position where a motor should
begin to decelerate from the number of a remaining pulses to go
before the motor stops.
For more information about a low step pulse, see "13.2 Motor
control method".
In operation mode 2 and 3, low step pulses are ignored if they
are defined because a low step pulse is automatically calculated
by a RD-3xx series driver.
Thirty one low step pulses can be set for both motor #1 and #2.
Low step numbers other than 30 do not have a default value.
If they are used, for example in a move command, before their
values are defined, a command error occurs.
14. L command (Setting of low step pulse)
LSS
Operation mode
0-3
4
○
×
Setting a low step pulse*1
■Syntax:
During
a move
User
Program
×
○
& ID LS S mt ,A[ ln ], lp 
Sets lp , as a low step pulse, to low step No. ln
mt
Target motor
*2
for motor
mt .
‘1‘
:Motor #1
‘2‘
:Motor #2
‘AL‘
:The same value is assigned to both motors
#1 and #2.
ln
lp
Low step No.
Low step pulse
Decimal
:0 - 30
If not specified
:No.30
Decimal
:1 - 1,000,000
(Default: 5,000 for No.30)
Undefined for other numbers.
■Reply:
> & ID L SS 
■Error code:
@50
@69
■Example:
&3FLSS1,1000 
>&3FLSS 
Assigns 1,000 pulses as a low step pulse to low step
No.30 for motor #1.
&3FLSSAL,A[2],2000 
>&3FLSS 
Assigns 2,000 pulses as a low step pulse to low step
No.2 of both motor #1 and #2.
■Sample user program: LD D0,50
LS S 1, D 0
RX buffer
The motor is running.
Invalid operation mode.
Assigns 50 to data memory D0.
Executes the command "LSS".
No change
■Prerequisite settings: None
■Related topics:
Low step pulse *1
Low step No. *2
A low step pulse defines the position where a motor should
begin to decelerate from the number of a remaining pulses to go
before the motor stops.
For more information about a low step pulse, see "13.2 Motor
control method".
In operation mode 2 and 3, low step pulses are ignored if they
are defined because a low step pulse is automatically calculated
by a RD-3xx series driver.
Thirty one low step pulses can be set for both motor #1 and #2.
Low step numbers other than 30 do not have a default value.
If they are used, for example in a move command, before their
values are defined, a command error occurs.
141
14. Q command (STALL sensor)
QID
Getting the interval period of a stall detection
Operation mode
0-3
4
○
×
During
a move
User
Program
○
○
& ID QI D mt 
■Syntax:
Gets the On/Off period of a stall detection plate for motor mt .
mt
■Reply:
Target motor
‘1’
:Motor #1
‘2’
:Motor #2
5-digit decimal
:32 - 65,535
> & ID QI D dt 
dt
Period of stall plate
(Default: 2,048)
■Error code:
@69
Invalid operation mode.
■Example:
& 3 F QI D 1
> & 3 F QI D 0 01 0 0 
Gets the On/Off period of a stall detection plate.
The On/Off period of the stall detection plate has been set to 100.
■Sample user program: QI D 1
Executes the command “QID".
RX buffer
Run result (100)
■Prerequisite settings: None
■Related topics:
QIS
■Syntax:
Stall detection
Be sure to set the On/Off period of a stall detection plate before
beginning to detect a stall.
For details about a stall detection, see "13.5 Stall detection".
Setting the interval period of a stall detection
Operation mode
0-3
4
○
×
During
a move
User
Program
○
○
& ID QI S mt , dt 
Sets dt to the On/Off period of a stall detection plate for motor mt .
mt
dt
Target motor
Period of stall plate
‘1’
:Motor #1
‘2’
:Motor #2
‘AL’
:The same value is applied to both motors
Decimal
:32 - 65,535
(Default: 2,048)
■Reply:
> & ID QI S 
■Error code:
@69
Invalid operation mode.
■Example:
& 3 F QI S1 , 2 5 00 
> & 3 F QI S 
Assigns 2,500 to the On/Off period of a stall detection plate for
motor #1.
142
14. Q command (STALL sensor)
■Sample user program: LD D0,1000
QI S1 , D 0
RX buffer
Assigns 1,000 to data memory D0.
Executes the command “QIS".
No change
■Prerequisite settings: None
■Related topics:
QRD
■Syntax:
Stall detection
Be sure to set the On/Off period of a stall detection plate before
beginning to detect a stall.
For details about a stall detection, see "13.5 Stall detection".
During
a move
User
Program
○
○
& ID QR D mt 
Gets whether a stall error has occurred in motor
mt
■Reply:
Operation mode
0-3
4
○
×
Getting a stall error status
Target motor
mt .
‘1’
:Motor #1
‘2’
:Motor #2
‘AL’
:Either motor #1 or #2
> & ID QR D er 
er
STALL ERROR
One character
‘0’
:No STALL error has occurred.
‘1’
:A STALL error has occurred.
■Error code:
@69
Invalid operation mode.
■Example:
& 3 F QR D 1 
> & 3 F QR D 0
Gets about an occurrence of a stall error in motor #1.
No STALL error has occurred.
■Sample user program: QR D 1
RX buffer
Executes the command “QRD".
Run result (0)
■Prerequisite settings: None
■Related topics:
Stall detection
Be sure to set the On/Off period of a stall detection plate before
beginning to detect a stall.
For details about a stall detection, see "13.5 Stall detection".
143
14. Q command (STALL sensor)
QRS
■Syntax:
Operation mode
0-3
4
○
×
Clearing a stall detection status
During
a move
User
Program
○
○
& ID QR S mt 
Clears the status of a stall error in motor mt .
mt
Target motor
‘1’
:Motor #1
‘2’
:Motor #2
‘AL’
:Both motors
■Reply:
> & ID QR S 
■Error code:
@69
Invalid operation mode.
■Example:
& 3 F QR S 1 
> & 3 F QR S
Clears the status of a stall error in motor #1.
■Sample user program: QR S1
Executes the command “QRS".
RX buffer
No change
■Prerequisite settings: None
■Related topics:
QSD
■Syntax:
Stall detection
For details about a stall detection, see "13.5 Stall detection".
Getting whether a stall detection function is enabled
Operation mode
0-3
4
○
×
During
a move
User
Program
○
○
& ID QSD mt 
Gets whether a stall detection function for motor mt is enabled.
mt
■Reply:
Target motor
‘1’
:Motor #1
‘2’
:Motor #2
> & ID Q SD md 
md
Stall detection mode
One character
‘0’
‘1’
:The function is disabled.
:The function is enabled.
(Default)
■Error code:
@69
Invalid operation mode.
■Example:
& 3 F QSD 1 
> & 3 F Q SD 1 
Gets whether a stall detection function is enabled in motor #1.
The function is activated.
144
14. Q command (STALL sensor)
■Sample user program: Q SD 1
Executes the command “QSD".
RX buffer
■Prerequisite settings:
■Related topics:
QSS
■Syntax:
Run result (1)
None
Stall detection
For details about a stall detection, see "13.5 Stall detection".
Enabling/disabling a stall detection function
Operation mode
0-3
4
○
×
During
a move
User
Program
×
○
& ID QS S mt , md 
Enables or disables the stall detection function for motor mt .
mt
md
Target motor
Stall detection
‘1’
:Motor #1
‘2’
:Motor #2
‘AL’
:Both motors
One character
‘0’
‘1’
:Deactivates the function.
:Activates the function.
(Default)
■Reply:
> & ID Q S S
■Error code:
@69
Invalid operation mode.
■Example:
& 3 F QS S 1, 1
> & 3 F Q SS 
Enables the stall detection function for motor #1.
■Sample user program: LD D0,1
Q SS 1, D 0
RX buffer
Assigns 1 to data memory D0.
Executes the command “QSS".
No change
■Prerequisite settings: None
■Related topics:
Stall detection
For details about a stall detection, see "13.5 Stall detection".
145
14. U command (User program)
UAD
■Syntax:
Getting the setting of the auto-start function
Operation mode
0-3
4
○
○
During
a move
User
Program
○
×
& ID U A D 
Gets the setting of the auto-start function.
■Reply:
> & ID U A D md 
md
Auto-start
One character
‘0’
‘1’
■Error code:
None
■Example:
& 3 FU A D 
> & 3 FU A D 1 
:The auto-start function is disabled.
:The function is enabled.
(Default)
Gets the setting of the auto-start function.
Indicates that the auto-start function is enabled.
■Sample user program: Not available
■Prerequisite settings: User program
■Related topics:
User program
Auto-start function
UAS
■Syntax:
For details about user programs, see "15. User Program
Commands".
If the auto-start function is enabled, a stored user program is
executed from address 0 upon the power-up.
Configuring the auto-start function
Operation mode
0-3
4
○
○
During
a move
User
Program
○
×
& ID U A S md 
Specifies the setting of the auto-start function.
md
Auto-start
One character
‘0’
‘1’
■Reply:
> & ID U A S 
■Error code:
None
■Example:
& 3 FU A S 1
> & 3 FU A S 
:Disables the auto-start function.
:Enables the auto-start function.
(Default)
Enables the auto-start function for a user program.
■Sample user program: Not available
■Prerequisite settings: User program
■Related topics:
146
User program
For details about user programs, see "15. User Program
Commands".
14. U command (User program)
Auto-start function
Writing to the flash memory
UBD
■Syntax:
If the auto-start function is enabled, a stored user program is
executed from address 0 upon power-up.
Before actually using the auto-start function, you must save your
user program and the setting of the auto-start function in the
flash memory.
To write your user program to the flash memory, use the
command "FUS". To write the setting of the auto-start function,
use the command "FIS".
Operation mode
0-3
4
○
○
Getting the number of available steps
During
a move
User
Program
○
×
& ID U B D 
Gets the number of available steps left in the user program area in RAM.
■Reply:
> & ID U B D st 
st
Step count
■Error code:
None
■Example:
& 3 FU B D 
> & 3 FU B D 0 1 53 4 
5-digit decimal
:0 - 6,039
Gets the number of available steps in the user program area.
You have still 1,534 steps available for your user program.
■Sample user program: Not available
■Prerequisite settings: None
■Related topics:
User program
Step count
UCS
■Syntax:
For details about user programs, see "15. User Program
Commands".
For details about step count, see "15. User Program Command".
Operation mode
0-3
4
○
○
Clearing RAM area
During
a move
User
Program
×
×
& ID U C S
Clears a user program area in the RAM.
■Reply:
> & ID U C S 
■Error code:
@50
@5A
The motor is running.
A user program is running.
■Example:
& 3 FU CS 
> & 3 FU C S
Clears a user program area in the RAM.
147
14. U command (User program)
■Sample user program: Not available
■Prerequisite settings: None
■Related topics:
User program
During a move
UDD
■Syntax:
For details about user programs, see "15. User Program
Commands".
This command cannot be executed when one or two motors are
running.
Operation mode
0-3
4
○
○
Getting the value of a user memory
During
a move
User
Program
○
×
& ID U D D H mm 
Gets the value of a user memory (variable) used in the user program.
H
If specified, the data will be returned in hex format.
If not specified, the data will be returned in decimal format.
mm
■Reply:
User memory to check
Dn: Data memory (D0 - D199)
A number between -1 billion and +1 billion
Cn: Counter (C0 - C29)
A number between 0 and 10 million
Tn: Timer (T0 - T29)
A number between 0 and 10 million
> & ID U D D dt 
dt
Data
H00000000 - HFFFFFFFF
-1 billion - +1 billion
('H' plus 8-digit hex number),
if the value is returned in hexadecimal format.
(10-digit [including a sign] decimal value),
if the value is returned in decimal format.
■Error code:
None
■Example:
& 3 FU D D C1 0 
> & 3 FU D D + 0 0 00 0 00 9 9 
Gets the value of counter C10 used in the user program.
The current value of the counter is 99.
& 3 FU D D H D 0 
> & 3 FU D D H 0 00 0 00 F F 
Gets the value of data memory D0 in hex format.
The current value of data memory D0 is FF.
■Sample user program: Not available
■Prerequisite settings: None
■Related topics:
User program
User memory
Limitations on data memory
148
For details about user
Commands".
For details about user
Commands".
A value assigned in hex
user program command
decimal format.
programs, see "15. User Program
memories, see "15. User Program
format by the command "UDS" or the
"LD" may not be read successfully in
14. U command (User program)
UDS
■Syntax:
Modifying a user memory
& ID U D S mm
Operation mode
0-3
4
○
○
During
a move
User
Program
○
×
, dt 
Modifies the variable data of the user memory in a user program.
mm
User memory to set
Dn: Data memory (D0 - D199)
Cn: Counter (C0 - C29)
Tn: Timer (T0 - T29)
dt
Data to assign
If mm is a data memory and
dt is represented in decimal format, dt must be from -1 billion to +1 billion.
dt is represented in hex format, dt must be from H0 to HFFFFFFF.
If mm is a counter or a timer,
dt must be from 0 to 10 million (in decimal format).
■Reply:
> & ID U D S 
■Error code:
None
■Example:
& 3 FU D SC 1 0, 99 
> & 3 FU D S 
Assigns 99 to counter C10 used in a user program.
& 3 FU D SH D 0, H F F
> & 3 FU D S 
Assigns FF to data memory D0.
■Sample user program: Not available
■Prerequisite settings: None
■Related topics:
User program
User memory
For details about user programs, see "15. User Program
Commands".
When a user program is running, changes of user memories with
this command may lead to the unexpected results depending on
the contents of your user program. Pay careful attention if you
change user memories.
For details about user memories, see "15. User Program
Commands".
149
14. U command (User program)
UED
■Syntax:
Getting the last address (on the RAM)
Operation mode
0-3
4
○
○
During
a move
User
Program
○
×
& ID U E D 
Gets the last address of the user program currently loaded on the RAM.
■Reply:
> & ID U E D ad 
ad
Address
■Error code:
None
■Example:
& 3 FU E D 
> & 3 FU E D 0 05 3 4 
5-digit decimal
Gets the last address of the user program.
The last address of the user program is 00534.
■Sample user program: Not available
■Prerequisite settings: None
■Related topics:
User program
Address
UES
■Syntax:
For details about user programs, see "15. User Program
Commands".
For details about an address, see "15. User Program
Commands".
Aborting the user program
Operation mode
0-3
4
○
○
During
a move
User
Program
○
×
& ID U E S op 
Aborts the user program.
op
Abort option
One character
‘0’
:Immediately stops any running motors and terminates
the user program.
‘1’
:Stops any running motors with deceleration and
terminates a user program.
If not specified, the user program is terminated without stopping
any motors.
■Reply:
> & ID U E S 
■Error code:
None
■Example:
& 3 FU E S 
> & 3 FU E S 
Aborts a user program.
■Sample user program: Not available
■Prerequisite settings: User program
■Related topics:
User program
Completion factor
150
For details about user programs, see "15. User Program
Commands".
Bit 1 in the completion factor of the user program is set to 1
when this command is executed.
14. U command (User program)
UND
Operation mode
0-3
4
○
○
Getting the execution address
During
a move
User
Program
○
×
& ID U N D 
■Syntax:
Gets the current execution address of the user program.
If the user program is stopped, the address where the user program is stopped is returned.
> & ID U N D dt 
■Reply:
dt
Execution address 5-digit decimal
■Error code:
None
■Example:
& 3 FU N D 
> & 3 FU N D 0 0 12 5 
Gets the current execution address of the user program.
The current execution address of the user program is 125.
■Sample user program: Not available
■Prerequisite settings: User program
■Related topics:
User program
For details about user programs, see "15. User Program
Commands".
For details about an address, see "15. User Program
Commands".
Address
UPD
■Syntax:
Getting a user program command with address
Operation mode
0-3
4
○
○
During
a move
User
Program
○
×
& ID U P D ls 
Gets the contents of a command line specified by ls (either an address or a label) together
with the address number.
ls
Label or address
‘*’ Label
Up to 13 characters
:A label name in the user program.
Address
Decimal
:0 – 6,038
If not specified, the next address to the one used with a previously executed
command "UPD" or "UWD".
■Reply:
■Error code:
> & ID U P D ad
, cd 
ad
Address
5-digit decimal
cd
The registered user program command
Up to 32 characters
@5B
The specified address does not exit or a user program has not
been created.
151
14. U command (User program)
■Example:
& 3 FU P D * T S
> & 3 FU P D 00511,*TS
Gets the contents corresponding to a label of "TS".
The contents of address 511 is a label "*TS".
& 3 FU P D 51 2 
> &3FUPD00512,WAT5 
Gets the contents of address 512.
The contents of address 512 is the user program
command "WAT 5".
Gets the contents of the next address to the address
used with a previously executed command "UPD" or
"UWD".
The contents of address 513 is the user program
command "END".
& 3 FU P D 
> &3FUPD00513,END 
■Sample user program: Not available
■Prerequisite settings: None
■Related topics:
Command "UWD"
The command "UPD" consists of the command "UWD" returns
plus the corresponding address.
For details about user programs, see "15. User Program
Commands".
For details about addresses, see "15. User Program
Commands".
User program
Address
URD
■Syntax:
Getting the run status of the user program
Operation mode
0-3
4
○
○
During
a move
User
Program
○
×
& ID U R D 
Gets the completion factor of the user program.
■Reply:
> & ID U R D st 
st
Completion factor 2-digit hexadecimal
:H00 - HFF
st
b7
b6
b5
b4
b3
b2
b1
b0
0: Normal, 1: Active
0: Normal, 1: Aborted by the command "UES"
0: Normal, 1: Aborted by a command error
0: Normal, 1: Aborted by a branch destination error
0: Normal, 1: Aborted by the command "EED"
0: Normal, 1: Aborted by an error during a move
Unassigned
0: Normal run, 1: Step run
■Error code:
None
■Example:
& 3 FU R D 
> & 3 FU R D H 0 0 
152
Gets the completion factor of the user program.
The user program is successfully finished.
14. U command (User program)
■Sample user program: Not available
■Prerequisite settings: User program
■Related topics:
URG
■Syntax:
User program
For details about user programs, see "15. User Program
Commands".
Starting to run a user program
Operation mode
0-3
4
○
○
During
a move
User
Program
○
×
& ID U R G ls 
Executes a user program from a specified label or address.
ls
Label or address to execute from
‘*’ Label
Up to 13 characters
:A label name in the user program.
Address
Decimal
:0 – 6,038
If not specified, the user program starts from the beginning.
■Reply:
> & ID U R G 
■Error code:
@5A
@5B
A user program is running.
The specified address does not exit or a user program has not
been created.
■Example:
& 3 FU R G * S T 1 
> & 3 FU R G 
Executes a user program from label "ST1".
& 3 FU R G 1 25 
> & 3 FU R G 
Starts a user program from address 125.
■Sample user program: Not available
■Prerequisite settings: User program
■Related topics:
User program
Address
For details about user programs, see "15. User Program
Commands".
For details about addresses, see "15. User Program
Commands".
153
14. U command (User program)
USG
■Syntax:
Operation mode
0-3
4
○
○
Executing one address
During
a move
User
Program
○
×
& ID U SG ls 
Executes one address in the user program.
ls
Label or address to execute
‘*’ Label
Up to 13 characters
:A label name in the user program
A command in the next address to the label will be executed.
Address
Decimal
:0 - 6,038
If not specified, a command in the address that is obtained by the command "UND" is
executed.
■Reply:
> & ID U SG 
■Error code:
@5A
@5B
A user program is running.
The specified address does not exit or a user program has not
been created.
■Example:
& 3 FU SG * ST 1 
> & 3 FU SG 
A command in the next address to label "ST1" in the user
program is executed.
& 3 FU SG 
> & 3 FU SG 
If the command "UND" is return 100, a command in address 100
is executed.
■Sample user program: Not available
■Prerequisite settings: User program
■Related topics:
User program
Execution address
Completion factor
154
For details about user programs, see "15. User Program
Commands".
After the command "USG" is executed, an address that might be
obtained by the command "UND" is moved one step forward.
If an address specified by the command "USG" is a label, the
next address to the label is executed.
If an address specified by this command is executed and some
error occurs, the error will be recorded in the completion factor.
14. U command (User program)
UWD
■Syntax:
Getting a user program command
Operation mode
0-3
4
○
○
During
a move
User
Program
○
×
& ID U W D ls 
Gets the user program command at a label or address specified by
ls
ls .
Label or address
‘*’ Label
Up to 13 characters
:A label name in the user program
Address
Decimal
:0 - 6,038
If not specified, the next address to the one used with a previously executed
command "UPD" or "UWD".
■Reply:
> & ID U W D cd 
cd
The registered user program command
Up to 32 characters
If no command is registered at the specified address, the following data is returned:
> & ID U W D 
■Error code:
@5B
The specified address does not exit or a user program has not
been created.
■Example:
& 3 FUWD*TS 
> & 3FUWD*TS 
Gets the contents corresponding to a label of "TS".
The address consists of a label "*TS".
& 3 FU W D 51 2 
> & 3 FU W D W A T 5 
Gets the contents of address 512.
The address 512 is the user program command "WAT 5".
& 3 FU W D 
Gets the contents at the next address to the address used with a
previously executed command "UPD" or "UWD".
The address 513 is the user program command "END".
> & 3 FU W D E N D 
& 3 FU W D 
> & 3 FU W D 
Gets the contents at the next address to the address used with a
previously executed command "UPD" or "UWD".
No user program command is registered at the address in
question.
■Sample user program: Not available
■Prerequisite settings: None
■Related topics:
Command "UPD"
User program
The command "UPD" consists of the command "UWD" returns
plus the corresponding address.
For details about user programs, see "15. User Program
Commands".
155
14. U command (User program)
UWS
■Syntax:
Registering a user program command
Operation mode
0-3
4
○
○
During
a move
User
Program
×
×
& ID U W S cd 
Registers a user program command
cd
User program command
cd
to the user program area in RAM.
Up to 32 characters
As for labels, the maximum length of characters is 13.
■Reply:
> & ID U W S 
■Error code:
@50
@5A
@5B
The motor has been running.
A user program is running.
Insufficient space in the user program area.
■Example:
& 3 FU W S0 0M 1 
> & 3 FU W S 
Registers the command "00M1" to the user program area.
■Sample user program: Not available
■Prerequisite settings: None
■Related topics:
User program
Address
During a move
Writing to the flash memory
156
For details about user programs, see "15. User Program
Commands".
Multiple commands are sequentially registered in the user
program area according to the order in which the commands for
each user program command are executed.
For details about addresses, see "15. User Program
Commands".
This command cannot be executed when one or two motors are
running.
To keep your user program after the power is off, you must store
it in the flash memory.
To do so, use the command "FUS" to write the program in RAM
to the flash memory.
Software
Instruction Manual
< Software >
User Program Commands
157
15. User Program Commands
15. User Program Commands
15.1 Overview of user program commands
U s e r p r o g r a ms a l l o w y o u t o r e g i s t e r a s e r i e s o f m u l t i p l e c o m m a n d a c t i o n s a n d t o
run th ro ugh w hol e pro ce dur e w it h a s ing le co mma nd .
Co mman d T yp e
Dat a t ra nsf er co mma nd
Set co mma nd
Ari th met ic op era tio n co mma nd
Log ica l ope ra tio n co mman d
Bra nch c o mman d
Con dit io nal b ran ch co mma nd
Wai t c o mman d
Dat a s hi ft co mma nd
Co mmun ic ati on co mma nd
T er min at ion o f a p rog ra m
Co mman d Na me
LD
T MS
CT S
SET
RST
BST
INC
DEC
ADD
SUB
MUL
D IV
AND
OR
JMP
C AL
RET
JCP
JMG
JON
JOF
JBT
JER
EED
W AT
RSL
RSR
Loa d
T imer se t
Cou nte r set
Set
Res et
Bit se t
Inc re men t b y 1
Dec re men t b y 1
Add iti on
Sub tra ct ion
Mul tip li cat io n
Div isi on
And
Or
Ju mp
Cal l
Ret urn
Ju mp C o mpar e
Ju mp M es sag e
Ju mp O n
Ju mp O ff
Ju mp B it
Ju mp E rr or
Err or En d
Wai t
Rot ate L eft
Rot ate R igh t
SDC
SDD
END
Sen d c ha rac te r
Sen d d at a
End
※Se e "1 6. De tai ls of Us er pr og ra m c o mman ds " for d eta ils .
158
15. User Program Commands
15.2 Creating a user program
15.2.1 Overv iew of commands
Use r p ro gra ms al low y ou to re gi ste r a s er ies o f mult ip le co mma nd ac ti ons a nd to
run th ro ugh w hol e pro ce dur e w it h a s ing le co mma nd .
Use r p ro gra ms ha ve th e f ol low in g f ea tur es :
・Mo st of th e co mma nds e xec ute d wit h a P C via a co mmu ni ca tio n l in e c an be u sed i n u se r
pro gra ms .
・T he f ol low in g g ro ups of u ser c o mman ds ar e p ro vid ed :
T ransf er , s et , a rit h meti c ope ra tio n, ro ta tio n of da ta, b ran ch (j u mp ), lo gi cal o per at ion , dat a shi ft ,
co mmun ic ati on , a nd wa it.
・Fo r t e mpor ar y s tor ag e, th e f ol low in g v ar iab le s ( me mor ies ) are p rov id ed:
32- bit d ata me mo ri es, co un ter s, ti me rs, me mo ry fl ag s ( On or Of f) , 3 2- bit r esu lt bu ff er, i nde x
me mori es ( IX and IY ), cu rr ent p osi ti on me mor y (PP ), mo tor - movi ng fl ag (MT ) , a nd mo re.
・T he u se r me mory ha s a ma xi mu m of 6, 039 s tep s and a llo ws yo u to sto re co mp lic at ed pr ogr a ms.
・T he a ut o-s ta rt fu nct ion c an au to mat ica ll y s ta rt th e u se r p ro gra m o n pow er -up a nd al low s the
con tro ll er to pe rf or m a st and -a lon e ope ra tio n.
T he ref or e, th e c on tro lle r can b e c on tro ll ed by a
PLC or I/Os .
15.2.2 Commands used for manipulating a user program
You ca n cre at e a u ser p rog ra m a nd st ore i t, us ing c o mmun ica ti on co mma nds .
T he ta bl e b el ow sh ows co mmu ni ca tio n co mma nds u sed i n h an dli ng us er pr ogr a ms:
Co mman d
URG
USG
URD
UND
UES
UWS
UWD
UPD
UCS
UBD
UED
U AD
U AS
UDD
UDS
FUS
FUD
Des cri pt ion o f f un cti on
E xe cut es a us er pr ogr a m.
E xe cut es on e add re ss in a use r pro gr a m.
Get s t he ru n sta tu s ( co mpl eti on fa ct or) o f a u ser p rog ra m.
Get s t he cu rr ent e xec uti on ad dr ess o f a u ser p rog ra m.
Abo rts a us er pr og ra m.
Reg ist er s a c o mmand o f a u ser p rog ra m
Get s t he us er pr og ra m co mma nd a t t he sp ec ifi ed ad dr ess .
Get s a c o mman d i n a u ser p rog ra m t og eth er wi th it s add re ss.
Cle ars a us er pr ogr a m ar ea in t he R AM.
Get s t he nu mb er of av ail ab le st eps i n a u ser p rog ra m.
Get s t he la st ad dr ess o f t he us er pr ogr a m.
Get s t he se tt ing o f t he au to -st art f unc ti on.
Con fig ur es th e a ut o-s tar t fun ct ion f or a use r pro gr a m.
Get s t he cu rr ent v alu e of the u ser me mo ry .
Cha nge s the c urr en t v al ue of th e u se r me mory .
Wri tes a us er pr ogr a m to t he fl ash me mo ry .
Rea ds th e u se r p ro gra m i n the f las h me mor y.
Not e: Se e "1 4. De scr ipt io n o f Co mmu nic at ion c o mman ds ", "15. 2 Cre at ing a us er pr og ra m", a nd
"1 6. De tai ls of Us er pr og ra m c o mman ds " for d eta il s.
159
15. User Program Commands
15.2.3 Commands used in a user program
A u ser p rog ra m c an in clu de th e fol lo win g co mma nds :
■ Com m unica ti on com m ands
You ca n use al l co mma nds d esc ri bed in "14 . Des cr ipt io n o f C o mmun ic ati on Co mma nd s", unl es s
"N ot av ail ab le " i s not ed in t he "Sa mpl e o f use r pro gr a m" s ec tio n.
T he b eh avi or o f a c o mmuni ca tio n co mma nd dif fe rs a cco rd ing to wh et her the co mma nd i s
e xe cut ed th rou gh a c o mmun ica ti on lin e o r i n a us er pro gr a m.
T he beh av ior di ffe rs in th e
fol low in g p oi nt:
・ Whe n a c o mman d i s e xec ute d i n a u se r pr og ra m, n o re pl y is re tur ne d to th e PC af ter th e
fun cti on is p erf or med .
If the c o mman d i s one o f t he co mma nd s tha t wou ld re tu rn th e r un re su lt to t he PC , f or e xa mple
"9 CD ", th e res ult i s n ot se nt to t he PC bu t is st ore d in a me mory c all ed "Re sul t buf fe r ( R X) ".
Not e: A re su lt b uf fer (R X) is a me mor y f or sto ri ng a re su lt.
S ee "15. 2. 5 Va ri abl es ( me mo rie s)
use d i n a u se r p ro gra m" f or de tai ls .
■ Use r p rog ram c om m ands
Use r p rog ra m c o mman ds, wh ic h h an dle co nd iti on al ju mps , o per at ion s, an d o th er pro ce sse s, ar e
spe cia ll y de sig ne d fo r th e us er pro gra ms .
T h ey c an not be e xec ut ed v ia a co mmu nic at ion li ne b y
an upp er le ve r P C.
For mor e in for mat io n ab out the use r pr og ra m co mma nds , se e "16 . De tai ls o f Us er p rog ra m
co mman ds " an d "2 0. T ab le of U ser P rog ra m C o mman ds ".
■ Labe ls
Lab els a re cha ra cte r str in gs use d as th e r efe re nce s of br anc h d es tin at ion s for co nd iti on al an d
unc ond it ion al ju mp s i n t he us er pr og ra m.
You ca n use 5 00 la bel s.
* la bel
L ab els wi th th e sa me na me can no t b e reg is ter ed .
la be l: Lab el na me
A la bel ca n co ns ist of up to 1 3 c har ac ter s.
All ow abl e c har ac ter s a re
alp han u meri c o ne -by te ch ara ct ers an d a o ne- by te '_'. La bel s a re st ore d as
add res s in t he us er p rog ra m j us t as in t he c ase o f us er co mma nd s, t he la be ls
the mse lv es do n ot hin g. If a la bel i s a de sti na tio n of a b ran ch c o mmand , th e ne xt
add res s to th e l ab el is e xecu te d w he n t he co mma nd i s p ro ces se d.
< Sa mpl e c od e >
JMP *ST 1
Ju mps to an a ddr es s n e xt t o "* ST 1".
15.2.4 Memory area and steps of a user program
A us er pr og ra m is s tor ed in th e R AM .
fol low in g i te ms:
T he me mo ry ar ea in th e R AM is ma nag ed wi th th e
■ Ste ps
A s tep i s the mini mu m u ni t f or ma na gin g a u se r pro gra m.
ma xi mu m o f 6,0 39 st eps .
dep end in g on t he l eng th o f th e co mma nd.
is 3.
T he ar ea f or a use r pro gr a m co nsi st s
T h e s te p c oun t nee de d f or ea ch use r pro gra m co mma nd var ie s
T he ave rag e no . of s te ps n ece ss ary f or o ne c o mman d
See "2 0. T ab le o f Us er Pro gra m C o mmand s " fo r de ta ils abo ut an e xac t st ep c ou nt f or e ac h
co mman d.
T o in qu ire how man y av ail ab le s tep s ar e le ft i n th e us er p ro gra m ar ea , us e the co mma nd "UB D "
via a co mmu ni cat io n l in e.
in dec i mal fo r ma t.
160
A st ep co un t a nd a n a dd res s obt ai ned b y c o mman ds ar e rep re sen te d
15. User Program Commands
■ Addre s s
An ad dre ss i s us ed to ind ic ate h ow many co mman ds a re r egi st ere d in t ota l in a use r pr ogr a m o r
how ma ny co mma nd s are re gi ste re d b ef ore a pa rt icu la r c o mman d.
For e xa mp le , "T o ru n the us er pr ogr a m fr o m ad dre ss 52 " mea ns "T o run t he use r p ro gra m f ro m
the 5 2nd c o mman d fro m th e t op ". An a dd res s and a s te p c ou nt ob ta ine d by co mma nd s ar e
rep res en ted i n d ec i ma l f or mat .
15.2.5 Variables (memories) used in a user program
In a use r pro gr a m, v ar iab le s ( me mor ie s) ca n be us ed fo r sto ri ng da ta te mp ora ri ly in o per at ion o r
bra nch p roc es s. RC -4 10 pr ovi de s t he fo ll owi ng da ta me mo rie s.
■ Data m e m ory
200 va ri abl es (D 0 - D 199 )
Dat a r an ge: - 1 b il lio n < da ta < +1 bi lli on
T hese v ar iab le s a re u se d i n ma th op era ti on p ro ces se s. T hey ca n a lso be us ed a s p ar a me te rs
in co mmu nic at ion co mma nd s.
< Sa mpl e c od e >
LD
D1, 100 00
Ass ign s 10, 00 0 t o dat a me mory D 1.
3PS 1,P [0] ,D 1
Set s t he po si tio n No. 0 to th e v alu e sto re d i n D1.
("3PS " is a co mmu ni cat io n c o mman d. )
■ Coun te r
C0 - C 29
Dat a r an ge: 0 - 9, 999 ,9 99
T hese ar e v ar iab le s e xcl us ive ly us ed fo r up or do wn co un ter s.
Use a c o mman d "CT S " t o set c ou nte rs . T o i ncr e ment o r de cre me nt co un ter s, u se "IN C" or
"D EC ", re sp ect ive ly .
■ Tim e r
T 0 - T 29
Dat a r an ge: 0 - 9, 999 ,9 99 (re so lut io n: 0. 1 s ec ond s)
T hese ar e v ar iab le s d ed ica te d t o the u se of ti me rs. Onc e a t i mer is se t by th e co mma nd
"T MS ", th e t i mer is dec re men te d b y 1 e ver y 0 .1 se co nds . A ti mer va lue o f 0 me an s t hat t he
ti mer is up .
■ Me m ory flag
M0 - M 19 9
Dat a r an ge: O n o r Off
T he val ue of the se me mor ies ar e l i mi te d to se t t he m to On or Off . T hey are us ua lly us ed as
fla gs r ep res en tin g I/ O s tat us , et c. T o mani pu lat e t hes e fl ag s, u se the co mma nd "S ET " t o s et
the m t o On an d "R S" to r ese t to Of f.
■ Re sult bu ffe r
RX
Dat a r an ge: - 1 b il lio n < da ta < +1 bi lli on
T his i s a s pe cia l me mory t o h ol d a r epl y whe n a c o mman d tha t r et urn s a r ep ly is e xec ute d.
Whe n u si ng R X bu ff er, n ote th at :
・No va lue i s s to red i n R X buf fe r w he n a c o mman d i s e xe cut ed vi a a c o mmun ic ati on li ne .
Onl y c o mman ds e xec ute d i n a u se r p ro gra m set a va lu e.
・Da ta in R X bu ff er ho lds u nti l a s ub seq ue nt co mma nd th at re tur ns a re ply i s e xe cut ed in a us er
pro gra m.
・ As fo r s o me c o mmun ic ati on co mma nd s, no v alu e i s sto re d i n R X bu ffe r eve n if th ey re tur n a
rep ly.
See "R X bu ff er " fie ld of ea ch co mma nd d esc ri pti on in "14 . Des cri pt ion o f C o mmun ic ati on
co mman ds " to se e if dat a is st ore d in R X bu ff er.
161
15. User Program Commands
■ Inpu t/ out put p ort
Gen era l inp ut ( ID0 - ID1 5) an d gen er al ou tpu t (OD 0 - O D1 5)
Bel ow is a l ist o f me mor y fl ags u sed f or g ett in g the s ta tus o f th e g en era l po rts a nd s ens or s or
set tin g the s tat us of t he ou tpu t por ts.
T hese fl ags a re as sig ne d a s f ol low s:
ID0
ID1
ID2
ID3
ID4
ID5
ID6
ID7
ID8
ID9
ID1 0
ID1 1
ID1 2
ID1 3
ID1 4
ID1 5
Inp ut po rt
Gen era l
Gen era l
Gen era l
Gen era l
Gen era l
Gen era l
Gen era l
Gen era l
Gen era l
Gen era l
Gen era l
Gen era l
Gen era l
Gen era l
Gen era l
Gen era l
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
OD0
OD1
OD2
OD3
OD4
OD5
OD6
OD7
OD8
OD9
OD1 0
OD1 1
OD1 2
OD1 3
OD1 4
OD1 5
Out put p ort
Gen era l
Gen era l
Gen era l
Gen era l
Gen era l
Gen era l
Gen era l
Gen era l
Gen era l
Gen era l
Gen era l
Gen era l
Gen era l
Gen era l
Gen era l
Gen era l
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
■ Inde x m em ory
IX、 IY
Dat a r an ge: 0 - 19 9
IX and IY c an re pl ace t he fo llo win g nu mbe r i n (1) - (3 ).
(1) T he nu mbe rs of da ta me mor y D0 - D19 9 (0 - 199 ).
(2) T he nu mbe rs of co unt er s ( 0 - 2 9) , t i mers ( 0 - 2 9), an d me mor y f la gs (0 - 19 9).
(3) T he nu mbe rs of in put /o utp ut po rt s ( 0 - 1 5) .
Eac h i te m i s e xp res se d a s fol lo ws:
D IX, C IX, T IX, M IX, ID IX, OD IX
D IY , C IY , T IY , M IY, ID IY , OD IY
E xa mpl e: In t he ca se of "D10 "
Nor mal n ota ti on
:D1 0
Ind e x no tat io n
:D IX ( af ter a ssi gni ng 10 t o IX)
D IY (a ft er as sig nin g 10 to IY )
■ Re fe re nce me m ory
PP, MT
T hey are used in conditional branch commands. You cannot manually modify the values.
PP1
: R epr es ent s the c urr ent p osi ti on of mo to r # 1.
PP2
: R epr es ent s the c urr ent p osi ti on of mo to r # 2.
MT 1
: Indi ca tes w het he r moto r #1 is ru nn ing .
MT 2
: Indi ca tes w het he r moto r #2 is ru nn ing .
T he fu nc tio n of MT x f lag i s t he sa me as b it0 ( Run ni ng) o f t he co mma nd "9C D".
162
15. User Program Commands
15.2.6 Registering and executing a user program
■ To re g iste r a use r pro gr am
Whe n you r eg ist er y our t he p rog ra m to th e co ntr ol ler , yo u sen d ON E co mma nd li ne i n the u se r
pro gra m a t a t i me i nst ea d o f sen din g the w hol e p ro gra m in one l ot. T o reg is ter a us er pr ogr a m,
fol low t he in str uct io ns be low .
・ Is sue a co mma nd "UC S" t o c le ar th e u se r p ro gra m are a bef ore s end in g a u ser p rog ra m.
E xa mpl e: Co mma nd
&&&& &&
Rep ly
>&&&& &&
If the re is n o u se r p rog ra m s av ed in th e use r pro gr a m ar ea, y ou do no t n ee d t o cle ar th e me mor y.
But it i s a g ood p rac tic e to e xecu te th is co mma nd b efo re st ar tin g to reg is ter a pr og ra m.
・Sa ve ea ch co mma nd in to th e u se r p ro gra m are a usi ng a co mma nd "UWS ".
E xa mpl e: Co mma nd
&&&&& &&& &&
Rep ly
>&&&&& &
Co mman d
&&&&& &&&& &&&&&
Registers a command "1+M10000" in address 1.
Rep ly
>&&&&& &
Co mman d
&&&&& &J ON &M M& &
Registers a command "JON MT,+0" in address 2.
Rep ly
>&&&&& &
Co mman d
&&&&& &&N& 
Reg ist er s a c o mmand "EN D " i n add re ss 3.
Rep ly
>&&&&& &
Aft er th e abo ve e xa mpl e i s fi nis he d, ea ch co mma nd i s reg is ter ed i n t he u ser p rog ra m are a as
fol low s:
Add res s
Co mman d
0
E AS0
1
1+M1 00 00
2
JO N MT 1 ,+0
3
EN D
Not e: An add re ss ind e x de ter mi nin g w her e t o r eg ist er a c o mman d i s c le are d t o 0 wh en th e
co mman d "U CS " is e xe cu ted , and is i ncr e ment ed by 1 ea ch ti me the co mma nd "UW S" i s
e xe cut ed . T h e ad dr ess in de x, w hi ch i nd ica te s t he a dd res s w he re t he ne xt c o mman d i s t o
be reg is ter ed , c an be o bta in ed by th e c o mman d "U ED ".
You mus t wri te a n "EN D" sta te men t at t he e nd poi nt o f th e pr ogr a m i n or de r to r un i t
suc ces sf ull y. T he "END " co mma nd c an be re gi ste re d i n a s man y pla ce s a s nee de d.
■ To r un a use r pr ogr am
Use th e co mma nd "U RG " to ru n a r eg ist er ed us er pr ogr a m.
・T o ru n the u ser p rog ra m f ro m a ddr es s 0
E xa mpl e: Co mma nd
&&&&&& 
Rep ly
>&&&&& & 
・T o ru n the u ser p rog ra m f ro m a sp ec ifi ed la be l
E xa mpl e: Co mma nd
&&&&&& & &M &
Executes the progra m fro m the address ne xt to label
Rep ly
>&&&&& & 
"ST 1". For details about labels, see "15.2.3 Commands
used in a user program".
・T o ru n the u ser p rog ra m f ro m a sp ec ifi ed ad dr ess
E xa mpl e: Co mma nd
&&&&&& &&
E xe cut es th e pro gr a m fro m add re ss 40 .
Rep ly
>&&&&& & 
If the c o mman d "U SG " i s use d, a si ngl e co mma nd li ne is e xecu te d.
・T o ru n a c o mman d in the n e xt p osi ti on to a sp eci fi ed la bel
E xa mpl e: Co mma nd
&&&& &&& &M&
Executes a command at the next address to label "ST1".
Rep ly
>&&&& && 
・T o ru n a s in gle c o mmand a t a s pec if ied a ddr es s
E xa mpl e: Co mma nd
&&&& && &&
E xe cut es th e co mma nd at ad dre ss 40 .
Rep ly
>&&&& && 
・T o ru n the c o mman d a t t he ad dr ess t hat c an be ob ta ine d by th e c o mman d "U ND "
E xa mpl e: Co mma nd
&&&& && 
Rep ly
>&&&& && 
163
15. User Program Commands
■ Re adin g t he co nte nt s o f a u se r p ro gram
Co mman d in a use r pro gra m can b e r ea d o ne by o ne in th e sa me man ne r a s i n reg is tra ti on.
Use th e co mma nd "U WD " to ge t a c o mman d of a spe ci fie d add re ss.
・T o ge t a r eg ist er ed co mma nd at a sp eci fi ed ad dre ss
E xa mpl e: Co mma nd
&&&&&& &
Get s t he co nt ent s of ad dre ss 0.
Rep ly
>&&&&& &&& & & Add res s 0 i s the c o mmand "E AS1 ".
・ T o ge t t he co nt ent s o f the n e xt ad dr ess t o t he ad dre ss us ed wi th a pre vi ous ly e xecu te d
co mman d "U WD " or "UPD ".
E xa mpl e: Co mma nd
&&&&&& 
If the p rev io us ad dre ss is 0, t he co nte nt s o f
add res s 1 i s ret ur ned .
Rep ly
>&&&&& &&&& &
T he ad dr ess c ons is ts of th e c o mman d "0 0M 1".
If y ou is sue t he "U PD ", bo th ad dre ss es and i ts
con ten ts ar e ret ur ned .
■ Flow ch art f or run ni ng a use r pro gr am
START
NO
Home search
finished?
YES
Run a communication
command
Is Input D0 Off?
NO
YES
Run a user program.
■ Erro r in a use r pro gram
Whe n a co mma nd err or occ urs du rin g th e e xec uti on o f a u se r pr ogr a m, th e pr ogr a m i s te r mina te d
at tha t po int . A co mma nd e rro r in a us er pr og ra m h as no th ing t o do wi th a co mma nd er ro r
cau sed b y a c o mman d e xe cut ed vi a a c o mmun ic ati on li ne .
If a co mma nd se nt vi a a
co mmun ic ati on l in e ca us es a co mma nd e rr or, a us er pro gr a m i s ne ve r te r mina te d. T he r unn in g
sta tus o f a u ser p rog ra m c an be ob ta ine d by th e c o mman d "U RD ".
E xa mpl e: Co mma nd &&&&&& 
Rep ly
>&&&&& &
st:
00h
01h
02h
04h
08h
10h
20h
80h
164
st

Co mple ti on fa cto r 2- dig it he xa dec i mal va lue
T he us er pr og ra m is s ucc es sfu ll y f in ish ed .
T he us er pr og ra m is r unn in g.
Abo rte d by th e u se r p ro gra m c o mman d "U ES ".
Abo rte d bec au se of a co mma nd er ror .
Abo rte d bec au se no co mma nd e xis ts at a br anc h des ti nat io n.
Abo rte d by th e u se r p ro gra m c o mman d "E ED ".
Aborted because a move command was attempted to run while a motor was running.
Co mple te d a o ne- st ep e xecu tio n.
15. User Program Commands
T he co mma nd "UN D" c an be us ed to i nqu ir e w he re th e c ur ren t add res s is be ing e xec ut ed or th e
add res s whe re th e use r pro gra m sto pp ed wh en th e p ro gra m fin is hed .
E xa mpl e: Co mma nd
Rep ly
&&&&N& 
>&&&& N&&&&>> 
If the u ser p rog ra m h as be en ab ort ed be ca use o f s o me e rr ors , thi s rep ly in dic at es th at th e e rr or
occ urr ed at a ddr es s 3 2.
■ Stor in g a u se r p rog ram i n t he fl as h m e m ory
Bec aus e a us er p rog ra m is in it ial ly r egi st ere d in a u ser pro gra m ar ea i n the R AM , ins te ad o f a
non -vo la til e me mor y, th e pr ogr a m w ill b e los t wh en th e po wer i s tu rne d of f. T o re tai n th e
pro gra m aft er th e pow er is tu rn ed of f, yo u mus t c op y t he pr og ra m t o t he bu ilt -i n f la sh me mor y.
T o do so , u se th e co mma nd "F US " to wr it e t he us er pr og ra m in R AM to th e fla sh me mo ry.
E xa mpl e: Co mma nd
Rep ly
&&&&& &
>&&&&& &
A u ser p rog ra m s tor ed in t he fl ash me mo ry is a uto ma tic all y loa de d t o the u ser p rog ra m a re a i n
the R AM whe n the p owe r i s tur ne d o n.
T o ma nu all y c opy the pr ogr a m s av ed i n th e fl as h me mo ry t o th e us er p ro gra m a rea in t he R AM ,
use t he co mma nd "F UD ". T his co mman d ov erw ri tes t he u ser p ro gra m pr evi ou sly l oa ded i n th e
R AM . No te th at a use r p ro gra m can no t b e e xe cu ted d ire ct ly fr o m the f las h me mor y.
■ Auto -s tar t f un cti on
Aut o-s ta rt fu nct io n i s a f eat ur e t ha t a ll ows a us er pr og ra m t o s tar t aut o mati ca lly w hen t he po wer
of the c ont ro lle r is tur ne d o n. W it h t hi s f un cti on , y ou ca n per for m a s ta nd- al one o per at ion , whi ch
mea ns th at yo u c an co nt rol mo to rs wi th on ly I/ Os.
Not e: St and -a lon e mea ns th at th e c on tro ll er is se pa rat ed fr o m th e hos t and th at it c ont ro ls mo tor s
by its el f.
T o ena bl e t he au to -st ar t f unc ti on, f oll ow th e pro ce dur e bel ow .
① C rea te a us er pr ogr a m to ru n in a sta nd -al on e mod e a nd th en do wn loa d the pr og ra m u sin g the
co mmun ic ati on co mma nd "UW S".
② E xec ut e t he co mma nd "FU S" t o w ri te th e r eg ist er ed pr ogr a m to th e fla sh me mo ry.
③ E xec ut e t he co mma nd "U AS" t o e na ble t he au to- st art f unc ti on.
E xa mpl e: Co mma nd &&&&& &&
Ena ble s the a uto -s tar t fun cti on .
Rep ly
>&&&& &&
④ U se th e c o mman d "F IS " to st ore t he se tti ng fo r the a uto -s tar t f un cti on in to th e fla sh me mo ry.
E xa mpl e: Co mma nd &&&&& &
Wri tes t he se tti ng to th e fla sh me mo ry.
Rep ly
>&&&&& &
Not e: O nl y is su ing th e c o mman d "U AS" is no t en ou gh t o a ct iva te the au to- st art fu nct io n. T o
act iva te th e f un cti on , y ou mu st use th e co mma nd "F IS " to st ore th e set ti ng for t he fun ct ion
int o t he fla sh me mor y. W he n t his co mma nd is e xec ute d, da ta in th e R AM oth er th an the
set tin g of th e a ut o-s ta rt fun ct ion i s a ls o s to red i nto t he fl ash me mo ry.
165
15. User Program Commands
15.2.7 S ample user programs
Sam ple u se r p rog ram # 1
Add re ss
0
Com m and
COS H0
De scri pt ion (N o. in t he fl ow cha rt be low )
T urns of f a ll of t he ge ner al ou tpu t por ts . ( ①)
1
00M 1
Per for ms a ho me se arc h. (② )
2
JON MT 1,+0
Rep eat s add re ss 2 if mot or #1 i s mov ing .
3
SET OD 4
Pr oc eed s to th e n e xt
co mman d aft er th e ho me s ea rch i s c o mple te d. (③ )
T urns on ge ne ral o utp ut D4 .
T h is in for ms an e xte rn al ci rcu it th at
a h o me s ear ch is f ini she d. (④ )
4
JOF ID 6,+0
Repeats address 4 if general input D6 is off.
Proceeds to the next
co mman d whe n the p ort is t urn ed on ( 1). ( ⑤)
5
RST OD 4
T urns of f g en era l out pu t D 4. (⑥ )
6
1 AM 1,2 50 0
Sta rts t o r un mo to r # 1 a t hig h spe ed to wa rds t he po sit io n o f 250 0
pul ses . (⑦)
7
JOF MT 1,+3
Ju mps to th e 3rd n e xt a ddr ess ( i.e . add re ss 10 ) i f the moto r is
sto ppe d. (⑧ )
8
JOF ID 6,+4
Ju mps to ad dr ess 1 2 i f g en era l inp ut D6 i s o ff (w hi le th e mot or is
run nin g) . ( ⑨)
9
JMP -2
Ju mps to th e 2nd p rev io us add re ss (i .e. a ddr es s 7 ). (⑩ )
10
SET OD 5
T urns on ge ne ral o utp ut D5 .
11
END
E xi ts th e u se r p ro gra m. (T he ne xt ad dre ss is n ot e xecu te d.) (⑫ )
12
5 IS
Sto ps th e mot or i mmed iat el y. (⑬)
13
SET OD 6
T urns on ge ne ral o utp ut D6 .
14
END
T h is in for ms an e xte rn al ci rcu it th at
a move i s f in ish ed . ( ⑪)
T h is in for ms an e xte rn al ci rcu it th at
the mo ve is a bor te d. (⑭)
E xi ts th e u se r p ro gra m. (⑮ )
Flowchart (Sample user program #1)
START
①
Turns off all of the
general output ports
②
Starts a home search
⑥
Turns off output D4
⑦
Moves to the position of
2,500 pulses
NO
Move finished?
⑧
NO
YES
Home search finished?
NO
③
YES
Input D6 Off?
⑨,⑩
YES
④
Turns on output D4
⑬
Immediately stop the
motor
⑭
Turns on output D6
⑪
NO
Input D6 Off?
Turns on output D5
⑤
YES
166
⑫,⑮
END
15. User Program Commands
Sam ple u se r p rog ram # 2
Add re ss Com m and
*** * P ro gra m 1 * *** *
De scri pt ion
0
*T EST 1
Lab el
1
SET OD 5
T urns on ou tp ut po rt D5
2
1 AM 1,5 00 0
Starts to run motor #1 at high speed towards the position of 5000 pulses.
3
JON MT 1,+0
Rep eat s thi s co mma nd if mo tor # 1 i s run ni ng.
4
W AT 5
Wai ts fo r 0 .5 se co nds .
5
RST OD 5
T urns of f o ut put p ort D 5.
6
END
*** * P ro gra m 2 * *** *
7
*T EST 2
Lab el
8
SET OD 5
T urns on ou tp ut po rt D5 .
9
1 AM 1,1 00 00
Starts to run motor #1 at high speed towards the position of 10000 pulses.
10
JON MT 1,+0
Rep eat s thi s co mma nd if mo tor # 1 i s run ni ng.
11
W AT 5
Wai ts fo r 0 .5 se co nds .
12
RST OD 5
T urns of f o ut put p ort D 5.
13
END
*** * P ro gra m 3 * *** *
14
*T EST 3
Lab el
15
SET OD 5
T urns on ou tp ut po rt D5 .
16
1 AM 1,1 50 00
Starts to run motor #1 at high speed towards the position of 15000 pulses.
17
JON MT 1,+0
Rep eat s thi s co mma nd if mo tor # 1 i s run ni ng.
18
W AT 5
Wai ts fo r 0 .5 se co nds .
19
RST OD 5
T urns of f o ut put p ort D 5.
20
END
If a c o mman d "U RG " or "URG *T EST 1 " is is sue d, Pr og ra m 1 (a dd res s 0 t o 6) is e xec ute d.
T he co mma nd "UR G *T E ST 2" e xec ute s Pro gr a m 2 (ad dr ess 7 to 13 ).
Pro gra m 3 ( ad dre ss 14 to 2 0) is e xec ute d by th e c o mman d "U RG *T EST 3 ".
167
16. Details of User Program Commands
ADD(Addition)
■Syntax:
Addition of data to data memory (variable)
AD D dm , dt
Adds data dt to dm .
dm
dt
D n
Data memory
IX, IY
Index memory
( n = Decimal
:0 - 199)
Data to add
If dm
is D n ,
Data
Decimal
Hexadecimal
D n
Data memory
RX
Result buffer
If dm
:-1 billion<dt<+1 billion
:H0 - HFFFFFFF
is IX or IY,
Data
Decimal
:0 - 199
D n
Data memory
RX
Result buffer
■Sample user program: ADD D0,1000
ADD D0,D10
Adds 1,000 to data memory D0.
Adds data memory D10 to data memory D0.
■Related topics:
For details about user programs, see "15.2 Creating a user
program".
An overflow in this command’s operation result is not taken into
account.
If an overflow has occurred, the value of the data memory is
indefinite.
However, if the result of an index memory operation is out of the
valid range (0 - 199), a command error occurs.
User program
Overflow of data
168
16. Details of User Program Commands
AND(And)
■Syntax:
Logical AND of data memory (variable) or memory flag
A N D dm , dt
Sets dm
dm
dt
to the logical AND of dm
and dt .
D n
Data memory
( n = Decimal
:0 - 199)
M n
Memory flag
( n = Decimal
:0 - 199)
Data to calculate
If dm
is D n , dt must be one of the following items.
Data
Decimal
Hexadecimal
D n
Data memory
If dm
:-1 billion<dt<+1 billion
:H0 - HFFFFFFF
is M n , dt must be one of the following items.
M n
Memory flag
ID n
General input
( n = Decimal
:0 - 15)
OD n
General output
( n = Decimal
:0 - 15)
T n
Timer
( n = Decimal
:0 - 29)
ON when the timer is counting
OFF when the timer is up
C n
Counter
( n = Decimal
:0 - 29)
ON if the counter value is other than 0
OFF if the counter value is 0
MT1, MT2
Motor run flag
ON if the motor is running
OFF if the motor is stopped
■Sample user program: SET M0
AND M0,ID0
AND M0,MT1
JON M0,*STP
Sets memory flag M0 to ON.
Calculates a logical AND of M0 and general input ID0.
Calculates a logical AND of M0 and MT1 (motor run flag).
Jumps to label "*STP" if M0 is ON (i.e. if the motor is running
and input D0 is ON).
■Related topics:
For details about user programs, see "15.2 Creating a user
program".
Memory flags are memories that hold the value of either ON or
OFF. You can use them as flags that represent information
such as the status of an I/O.
User program
Memory flag
169
16. Details of User Program Commands
BST(Bit Set)
■Syntax:
Changing the contents of data memory (variable)
B ST D n
, bit , dt
Sets bit bit in data memory D n to dt .
n
Data memory No. Decimal
:0 - 199
bit
Bit to set
Decimal
:0 - 31
Hexadecimal
:H0 - H1F
Decimal
:0 or 1
dt
Data
■Sample user program: BST D0,2,1
Assigns 1 to bit 2 of data memory D0.
■Related topics:
For details about user programs, see "15.2 Creating a user
program".
See "15.2.5 Variables (memories) used in a user program".
User program
Data memory
CAL(Call)
■Syntax:
Subroutine call
CA L jp
Calls a subroutine with a label of jp .
Subroutine calls can be nested up to 16.
jp
‘*’ Label
Label : String, up to 13 characters
Valid characters for labels are alphanumeric 1-byte characters and a
1-byte '_'.
(0 - 9, a - z, A – Z, ‘_')
■Sample user program: CAL*TEST
SET M0
*TEST
:
RET
■Related topics:
User program
Subroutine call
170
Calls a subroutine with a label of "*TEST".
This line is executed after the subroutine is finished by the
"RET " command.
Subroutine label
Finishes the subroutine "*TEST" and Jumps to the next address
with the "CAL *TEST" command that called this subroutine.
For details about user programs, see "15.2 Creating a user
program".
A subroutine called by the command "CAL" must have the
command "RET" in the last line.
A subroutine is started by the command "CAL" and ended by the
"RET ". After the "RET" command is executed, the next address
to the "CAL" command is processed.
A subroutine call in a subroutine can be nested up to 16.
16. Details of User Program Commands
CTS(Counter Set)
■Syntax:
Setting a counter
CT S C n , dt
Sets counter C n to dt .
n
Counter No.
Decimal
:0 - 29
dt
Counter value
Decimal
:0≦dt<10 million
■Sample user program: CTS C1,10
JOF ID1,*ST1
DEC C1
JON C1,-2
Sets counter C1 to 10.
Jumps to label "*ST1" if general input D1 is OFF.
Decrements counter C1 by 1.
Jumps to the 2nd previous address ("JOF ID1,*ST1") if counter
C1 is other than 0 or jumps to the next address if C1 is 0.
■Related topics:
For details about user programs, see "15.2 Creating a user
program".
A counter value can be incremented or decremented by a user
command "INC" or "DEC", respectively.
A branch control with a counter can be done with a user
command "JCP", "JON", or "JOF".
User program
Counter value
DEC(Decrement)
■Syntax:
Decrementing a data memory (variable) or counter by 1
D E C dm
Decrements
dm
D n
dm
by 1.
Data memory
( n = Decimal
:0 - 199)
C n
Counter
( n = Decimal
:0 - 29)
IX, IY
Index memory
■Sample user program: CTS C10,100
DEC C10
Sets counter C1 to 100.
Decrements counter C10 by 1.
■Related topics:
For details about user programs, see "15.2 Creating a user
program".
This command performs no operation if a specified dm is 0 or
negative (in the case of data memory).
See "15.2.5 Variables (memories) used in a user program".
User program
Limitations in decrement
Data memory
171
16. Details of User Program Commands
DIV(Division)
■Syntax:
Dividing a data memory (variable)
D I V dm
Divides
dm
dt
, dt
dm
by dt .
D n
Data memory
IX, IY
Index memory
( n = Decimal
:0 - 199)
Data to calculate
If dm
is D n ,
Data
Decimal
Hexadecimal
D n
Data memory
RX
Result buffer
If dm
:-1 billion<dt<+1 billion
:H0 - HFFFFFFF
is IX or IY,
Data
Decimal
:0 - 199
D n
Data memory
RX
Result buffer
■Sample user program: DIV D1,2
DIV D1,D5
Divides data memory D1 by 2.
Divides data memory D1 by D5.
■Related topics:
For details about user programs, see "15.2 Creating a user
program".
An overflow in this command’s operation result is not taken into
account.
If an overflow has occurred, the value of the data memory is
indefinite.
However, if the result of an index memory operation is out of the
valid range (0 - 199), a command error occurs.
You cannot divide a value by 0. If you attempt to do so, a
command error occurs.
User program
Overflow of data
EED(Error End)
■Syntax:
Terminating a program because of a status error
E E D mt
Terminates the user program if any of the error bits (1, 2, 6, and 7), which might be obtained
by the command "9CD", is 1 when this command is executed.
mt
Target motor
‘1’
:Motor #1
‘2’
:Motor #2
‘AL’
:The logical OR of the status for motor #1 and #2.
Bit to check in the status error flag
Bit 1
:Limit error
Bit 6
:Stall error
172
Bit 2
Bit 7
:EMS error
:Communication error
16. Details of User Program Commands
■Sample user program: EED 1
Terminates the user program, if any of the error bits (1, 2, 6, and
7) of motor #1 status is 1.
Proceeds to the next address if there is no error.
■Related topics:
For details about user programs, see "15.2 Creating a user
program".
The command "EED" terminates the user program if there are
some errors WHEN the command is executed.
Note that the command does NOT abort the user program
automatically when an error occurs.
To clear the controller status to 0, use the communication
command "9CS".
If the user program is terminated by this command, bit 4 of the
completion factor of a user program is set to 1 (Aborted by
"EED").
This command cannot be used in mode 4 (ALL I/Os).
User program
Error End
Clearing errors
Completion factor
Limitations
END(End)
■Syntax:
Terminating a user program
END
Terminates the user program.
■Sample user program: END
■Related topics:
User program
For details about user programs, see "15.2 Creating a user
program".
The completion factor of a user program is set to 00h (i.e.
successfully finished) only when this command is executed in
the user program.
Completion factor
INC(Increment)
■Syntax:
Incrementing a data memory (variable) or counter by 1
I N C dm
Increments
dm
dm
by 1.
D n
Data memory
( n = Decimal
:0 - 199)
C n
Counter
( n = Decimal
:0 - 29)
IX, IY
Index memory
■Sample user program: CTS C1,0
INC C1
Sets counter C1 to 0.
Increments counter C1 by 1.
■Related topics:
User program
For details about user programs, see "15.2 Creating a user
program".
Limitations in incrementing
If dm
is already at the maximum value when this command is
executed, the command performs no operation and proceeds to
Data memory
the next address.
See "15.2.5 Variables (memories) used in a user program".
173
16. Details of User Program Commands
JBT(Jump Bit)
■Syntax:
Branch based on a specified bit of a data memory (variable)
J B T D n , bit , dt , jp
Jumps to a specified address if bit of data memory D n is dt .
n
Data memory No. Decimal
:0 - 199
bit
Bit to check
Decimal
:0 - 31
Hexadecimal
:H0 - H1F
Decimal
:0 or 1
dt
Data
jp
Branch destination address
‘*’ Label
Label jump
Label : String, up to 13 characters
Valid characters for labels are alphanumeric 1-byte
characters and a 1-byte '_'.
(0 - 9, a - z, A – Z, ‘_')
Jumps to an address next to a label in the user program.
‘+’ Number
Relative jump
Number : 0 - 199
Jumps to the Number th next address from the current
address (the address of this command).
‘-’ Number
Relative jump
Number : 1 - 199
Jumps to the Number th previous address from the current
address (the address of this command).
■Sample user program: JBT D5,12,1,*St1
Jumps to an address next to label "*St1", if bit 12 of data memory
D5 is 1. Otherwise, proceeds to the next address.
■Related topics:
For details about user programs, see "15.2 Creating a user
program".
See "15.2.5 Variables (memories) used in a user program".
User program
Data memory
174
16. Details of User Program Commands
JCP(Jump Compare)
■Syntax:
J CP dm
sn
Branch based on a comparison between data memory
(variable) and specified data
dt , jp
Jumps based on a comparison between data memory dm and data
dm
D n
Data memory
( n = Decimal
:0 - 199)
C n
Counter
( n = Decimal
:0 - 29)
T n
Timer
( n = Decimal
:0 - 29)
RX
Result buffer
PP1, PP2
The current position
sn
Comparison operator ‘<’, ‘>’, ‘=’
dt
Data for comparison
jp
Data
Decimal
Hexadecimal
D n
Data memory
C n
Counter
T n
Timer
:-1 billion<dt<+1 billion
:H0 - HFFFFFFF
Branch destination address
‘*’ Label
Label jump
Label : String, up to 13 characters
Valid characters for labels are alphanumeric 1-byte
characters and a 1-byte '_'.
(0 - 9, a - z, A – Z, ‘_')
Jumps to an address next to a label in the user program.
‘+’ Number
Relative jump
Number : 0 - 199
Jumps to the Number th next address from the current
address (the address of this command).
‘-’ Number
Relative jump
Number : 1 - 199
Jumps to the Number th previous address from the current
address (the address of this command).
■Sample user program: JCP D0>1000,*ST1
JCP PP1<0,+5
■Related topics:
dt .
User program
Data memory
Jumps to an address next to label "*St1", if data memory D0
is larger than 1,000. Otherwise, proceeds to the next address.
Jumps to the 5th next address, if the current position of motor #1
is below than 0. Otherwise, proceeds to the next address.
For details about user programs, see "15.2 Creating a user
program".
See "15.2.5 Variables (memories) used in a user program".
175
16. Details of User Program Commands
JER(Jump Error)
■Syntax:
Branch based on an error bit in the status
J E R mt , bt , jp
Jumps to a specified address if error bit bt in a motor status, which can be obtained by the
command "9CD", is 1.
In cases where no bit is specified, the program jumps to a specified address if any of the
error bits (i.e. 1, 2, 6, and 7) is 1.
mt
bt
Target motor
Status bit
‘1’
:Motor #1
‘2’
:Motor #2
‘AL’
:The logical OR of the statuses for motor #1 and #2.
1, 2, 6, or 7
‘1’
:Limit error.
‘2’
:EMS ERROR
‘6’
:Stall error
‘7’
:Communication error
If not specified
:any of the above
jp
Branch destination address
‘*’ Label
Label jump
Label : String, up to 13 characters
Valid characters for labels are alphanumeric 1-byte
characters and a 1-byte '_'.
(0 - 9, a - z, A – Z, ‘_')
Jumps to an address next to a label in the user program.
‘+’ Number
Relative jump
Number : 0 - 199
Jumps to the Number th next address from the current
address (the address of this command).
‘-’ Number
Relative jump
Number : 1 - 199
Jumps to the Number th previous address from the current
address (the address of this command).
■Sample user program: JER AL,*Error
JER 1,6,*Stall
■Related topics:
User program
Clearing errors
176
Jumps to an address next to label "*Error", if any bit (among
1, 2, 6, and 7) of the status for motor #1 or #2 is 1. Otherwise,
proceeds to the next address.
Jumps to an address next to label "*Stall", if the stall error bit for
motor #1 is 1.
For details about user programs, see "15.2 Creating a user
program".
To clear the controller status to 0, use the communication
command "9CS".
16. Details of User Program Commands
JMG(Jump Message)
■Syntax:
Branches based on the transmission
message with the PC
of the
J M G jp
Branches while the PC is transmitting the message of the user program command "SDC" or
"SDD".
jp
Branch destination address
‘*’ Label
Label jump
Label : String, up to 13 characters
Valid characters for labels are alphanumeric 1-byte
characters and a 1-byte '_'.
(0 - 9, a - z, A – Z, ‘_')
Jumps to an address next to a label in the user program.
‘+’ Number
Relative jump
Number : 0 - 199
Jumps to the Number th next address from the current
address (the address of this command).
‘-’ Number
Relative jump
Number : 1 - 199
Jumps to the Number th previous address from the current
address (the address of this command).
■Sample user program: SDC D0=
JMG +0
SDD D0
JMG +0
Sends a message "D0=" to the PC.
Waits until a message is transmitted to the PC.
Transmits the value of the data memory D0 to the PC.
Waits until a message is transmitted to the PC.
■Related topics:
For details about user programs, see "15.2 Creating a user
program".
To execute the command "JMG", the Link Master command
"XID" must be executed, and polling must be in process.
User program
Setting of a Link Master
177
16. Details of User Program Commands
JMP(Jump)
■Syntax:
Unconditional jump
J M P jp
Jumps to the address specified by
jp
Branch destination address
‘*’ Label
Label jump
Label : String, up to 13 characters
Valid characters for labels are alphanumeric 1-byte
characters and a 1-byte '_'.
(0 - 9, a - z, A – Z, ‘_')
Jumps to an address next to a label in the user program.
‘+’ Number
Relative jump
Number : 0 - 199
Jumps to the Number th next address from the current
address (the address of this command).
‘-’ Number
Relative jump
Number : 1 - 199
Jumps to the Number th previous address from the current
address (the address of this command).
■Sample user program: JMP*STEP_1
:
*STEP_1
LD D0,1000
■Related topics:
178
jp .
User program
Jumps to an address next to label "*STEP_1".
The program continues to run at this line after jumping to label
"*STEP_1".
For details about user programs, see "15.2 Creating a user
program".
16. Details of User Program Commands
JOF(Jump Off)
■Syntax:
Jump performed if memory flag or general I/O status is OFF(0)
J O F mm
, jp
Jumps to a specified address if memory flag mm is Off (0).
mm
M n
Memory flag
( n = Decimal
:0 - 199)
ID n
General input
( n = Decimal
:0 - 15)
OD n
General output
( n = Decimal
:0 - 15)
T n
Timer
( n = Decimal
:0 - 29)
Jumps if the timer has been up.
C n
Counter
MT1, MT2
Motor run flag
( n = Decimal
:0 - 29)
Jumps if the counter value is 0.
Jumps if the motor is stopped.
jp
Branch destination address
‘*’ Label
Label jump
Label : String, up to 13 characters
Valid characters for labels are alphanumeric 1-byte
characters and a 1-byte '_'.
(0 - 9, a - z, A – Z, ‘_')
Jumps to an address next to a label in the user program.
‘+’ Number
Relative jump
Number : 0 - 199
Jumps to the Number th next address from the current
address (the address of this command).
‘-’ Number
Relative jump
Number : 1 - 199
Jumps to the Number th previous address from the current
address (the address of this command).
■Sample user program: JOF ID5,*ST5
JOF T10,*Time_up
■Related topics:
User program
Memory flag
Jumps to an address next to label "*ST5", if general input ID5
is Off. Otherwise, proceeds to the next address.
Jumps to an address next to label "*Time_up", if timer T10 has
been up.
For details about user programs, see "15.2 Creating a user
program".
Memory flags are memories that hold the value of either ON or
OFF. You can use them as flags that represent information
such as the status of an I/O.
179
16. Details of User Program Commands
JON(Jump On)
■Syntax:
Jump performed if memory flag or general I/O status is ON(1)
J ON mm , jp
Jumps to a specified address if memory flag mm is ON (1).
mm
M n
Memory flag
( n = Decimal
:0 - 199)
ID n
General input
( n = Decimal
:0 - 15)
OD n
General output
( n = Decimal
:0 - 15)
T n
Timer
( n = Decimal
:0 - 29)
Jumps if the timer is counting.
C n
Counter
MT1, MT2
Motor run flag
( n = Decimal
:0 - 29)
Jumps if the counter value is other than 0.
Jumps if the motor is running.
jp
Branch destination address
‘*’ Label
Label jump
Label : String, up to 13 characters
Valid characters for labels are alphanumeric 1-byte
characters and a 1-byte '_'.
(0 - 9, a - z, A – Z, ‘_')
Jumps to an address next to a label in the user program.
‘+’ Number
Relative jump
Number : 0 - 199
Jumps to the Number th next address from the current
address (the address of this command).
‘-’ Number
Relative jump
Number : 1 - 199
Jumps to the Number th previous address from the current
address (the address of this command).
■Sample user program: JON M3,*Error1
JON T2,-3
■Related topics:
User program
Memory flag
180
Jumps to an address next to label "*Error1", if memory flag
M3 is ON. Otherwise, proceeds to the next address.
Jumps to the 3rd previous address if timer T2 is counting.
For details about user programs, see "15.2 Creating a user
program".
Memory flags are memories that hold the value of either ON or
OFF. You can use them as flags that represent information
such as the status of an I/O.
16. Details of User Program Commands
LD(Load)
■Syntax:
Setting a data memory (variable)
LD dm
, dt
Sets data memory dm
dm
dt
to data dt .
D n
Data memory
( n = Decimal
:0 - 199)
M n
Memory flag
( n = Decimal
:0 - 199)
OD n
General output
( n = Decimal
:0 - 15)
IX, IY
Index memory
Data to assign
In the case where
dm is D n .
Data
Decimal
:-1 billion<dt<+1 billion
Hexadecimal
:H0 - HFFFFFFF
D n
Data memory
( n = Decimal
:0 - 199)
C n
Counter
( n = Decimal
:0 - 29)
RX
Result buffer
IX, IY
Copies the contents of index memory
I D n , bt
The values of general input I D n - I D n+bt are copied to
Bit 0 - Bit bt of D n . ( n = 0 - 15, bt = 0 - H1F(31))
OD n , bt
The values of general output OD n - OD n+bt are copied
to Bit 0 - Bit bt of D n . ( n = 0 - 15, bt = 0 - H1F(31))
M n , bt
The values (0 or 1) of memory flag M n - M n+bt are copied
to Bit 0 - Bit bt of D n . ( n = 0 - 199, bt = 0 - H1F(31))
If dm
is M n ,
D n , bt
The values of Bit 0 - Bit bt of D n are copied to memory
flag M n
If dm
- M n+bt . ( bt = 0 - H1F(31))
is OD n ,
D n , bt
The values of Bit 0 - Bit bt of D n are assigned to general
output OD n - OD n+bt . ( bt = 0 - H1F(31))
181
16. Details of User Program Commands
If dm
is IX or IY,
Data
Decimal
D n
Data memory
:0 - 199
■Sample user program: LD D0,10000
6PD
LD D100,RX
Assigns 10000 to data memory D0.
Gets the current position into result buffer RX.
Copies the value of result buffer RX to data memory D100.
■Related topics:
For details about user programs, see "15.2 Creating a user
program".
See "15.2.5 Variables (memories) used in a user program".
User program
Data memory
MUL(Multiplication)
■Syntax:
M U L dm
, dt
Multiplies dm
dm
dt
Multiplying a data memory (variable)
by dt .
D n
Data memory
IX, IY
Index memory
( n = Decimal
:0 - 199)
Data to calculate
If dm
is D n ,
Data
Decimal
Hexadecimal
D n
Data memory
RX
Result buffer
If dm
:-1 billion<dt<+1 billion
:H0 - HFFFFFFF
is IX or IY,
Data
Decimal
D n
Data memory
RX
Result buffer
:0 - 199
■Sample user program: MUL D1,10
MUL D1,D5
Multiplies data memory D1 by 10.
Multiplies data memory D1 by D5.
■Related topics:
For details about user programs, see "15.2 Creating a user
program".
An overflow in this command’s operation result is not taken into
account.
If an overflow has occurred, the value of the data memory is
indefinite.
However, if the result of an index memory operation is out of the
valid range (0 - 199), a command error occurs.
User program
Overflow of data
182
16. Details of User Program Commands
OR(Or)
■Syntax:
Logical OR of a data memory (variable) or memory flag
OR dm
, dt
Sets dm
dm
dt
to the logical OR of dm
and dt .
D n
Data memory
( n = Decimal
:0 - 199)
M n
Memory flag
( n = Decimal
:0 - 199)
Data to calculate
If dm
is D n , dt must be one of the following items.
Data
Decimal
Hexadecimal
D n
Data memory
If dm
:-1 billion<dt<+1 billion
:H0 - HFFFFFFF
is M n , dt must be one of the following items.
M n
Memory flag
ID n
General input
( n = Decimal
:0 - 15)
OD n
General output
( n = Decimal
:0 - 15)
T n
Timer
( n = Decimal
:0 - 29)
ON when the timer is counting
OFF when the timer is up
C n
Counter
( n = Decimal
:0 - 29)
ON if the counter value is other than 0
OFF if the counter value is 0
MT1, MT2
Motor run flag
ON if the motor is running
OFF if the motor is stopped
■Sample user program: RST M0
OR M0,ID0
OR M0,ID2
JON M0,*STP1
Sets memory flag M0 to OFF.
Calculates a logical OR of M0 and general input ID0.
Calculates a logical OR of M0 and general input ID2.
Jumps to label "*STP" if M0 is ON (i.e. ID0 and/or ID2 are/is
ON).
■Related topics:
For details about user programs, see "15.2 Creating a user
program".
Memory flags are memories that hold the value of either ON or
OFF. You can use them as flags that represent information
such as the status of an I/O.
User program
Memory flag
183
16. Details of User Program Commands
RET(Return)
■Syntax:
Return from a subroutine
RET
Finishes a subroutine and Jumps to the next address to the user command "CAL" that called
the subroutine.
■Sample user program: CAL*TEST
SET M0
Calls a subroutine with a label of "*TEST".
This line is executed after the subroutine is finished by the
"RET " command.
Subroutine label
*TEST
:
RET
■Related topics:
Finishes the subroutine "*TEST" and Jumps to the next address
of the "CAL *TEST" command that called this subroutine.
User program
For details about user programs, see "15.2 Creating a user
program".
A subroutine called by the command "CAL" must have the
command "RET" in the last line.
If the command "RET" is executed without performing the
command "CAL", a command error occurs.
Subroutine call
RSL(Rotate Left)
■Syntax:
Left rotation of a data memory
R SLD n
Rotates data memory D n to the left by 1 bit.
n
Data memory No.
Decimal
:0 - 199
M SB
B31
LS B
B30
・・ ・・
B1
B0
■Sample user program: LD D12,HA0AAAAAA
RSL D12
Sets data memory D12 to A0AA AAAAh.
Rotates data memory D12 to the left by 1 bit.
After the operation, D12 becomes 4155 5555h in hex format.
■Related topics:
For details about user programs, see "15.2 Creating a user
program".
184
User program
16. Details of User Program Commands
RSR(Rotate Right)
■Syntax:
Right rotation of a data memory
R SR D n
Rotates data memory D n to the right by 1 bit.
n
Data memory No.
Decimal
:0 - 199
M SB
B31
L SB
B30
・ ・・ ・
B1
B0
■Sample user program: LD D13,H50555555
RSR D13
Sets data memory D13 to 5055 5555h.
Rotates data memory D13 to the right by 1 bit.
After the operation, D13 becomes A82A AAAAh in hex.
■Related topics:
For details about user programs, see "15.2 Creating a user
program".
User program
RST(Reset)
■Syntax:
Clearing a memory flag or general output port to OFF (0)
R ST mm
Resets memory flag mm to OFF (0).
mm
M n
:Memory flag
( n = Decimal 0 - 199)
OD n
:General output
( n = Decimal 0 - 15 )
■Sample user program: RST M10
RST OD2
Resets memory flag M10 to OFF (0).
Resets general output OD2 to OFF (0).
■Related topics:
For details about user programs, see "15.2 Creating a user
program".
Memory flags are memories that hold the value of either ON or
OFF. You can use them as flags that represent information
such as the status of an I/O.
User program
Memory flag
185
16. Details of User Program Commands
SDC(Send character)
■Syntax:
Sending a message to the PC
SD C mg
Sends a message mg to the PC.
mg Message string
■Sample user program: *ERROR
Label (For example, the address of this label is called when an
error occurs.)
Sends a message "ERROR!!" to the PC.
SDC ERROR!!
■Related topics:
User program
Setting of a Link Master
Continual transmission
of a message
SDD(Send data)
■Syntax:
Up to 16 one-byte characters of any kind.
For details about user programs, see "15.2 Creating a user
program".
To send a message to the PC, the Link Master command "XID"
must be executed, and polling must be in process.
When two or more commands "SDC" or " SDD" are executed,
execute the user program command "JMG" whenever a
message is transmitted to the PC, and transmit the second
message after transmitting the first message to the PC.
Sending the contents of a data memory to the PC
SD D H dm
Sends the contents of data memory dm
H
dm
to the PC as a message.
If specified, data is sent as a character string in hexadecimal format.
If not specified, data is sent as a character string in decimal format.
D n
Data memory
( n = Decimal
:0 - 199)
T n
Timer
( n = Decimal
:0 - 29 )
C n
Counter
( n = Decimal
:0 - 29 )
■Sample user program: SDD C10
Sends the value of counter C10 to the PC as a decimal value.
■Related topics:
For details about user programs, see "15.2 Creating a user
program".
The string format of a message is the same as that of the
communication command "UDD".
To send a message to the PC, the Link Master command "XID"
must be executed, and polling must be in process.
When two or more commands "SDC" or " SDD" are executed,
execute the user program command "JMG" whenever a
message is transmitted to the PC, and transmit the second
message after transmitting the first message to the PC.
User program
Message format
Setting of a Link Master
Continual transmission
of a message
186
16. Details of User Program Commands
SET(Set)
■Syntax:
Setting a memory flag or general output port to ON (1)
SE T mm
Sets memory flag mm to ON (1).
mm
M n
Memory flag
( n = Decimal
:0 - 199)
OD n
General output
( n = Decimal
:0 - 15 )
■Sample user program: SET M100
SET OD1
Sets memory flag M100 to ON (1).
Sets general output OD1 to ON (1).
■Related topics:
For details about user programs, see "15.2 Creating a user
program".
Memory flags are memories that hold the value of either ON or
OFF. You can use them as flags that represent information
such as the status of an I/O.
User program
Memory flag
SUB(Subtraction)
■Syntax:
Subtracting specified data from a data memory (variable)
SU B dm , dt
Subtracts data dt from dm .
dm
dt
D n
Data memory
IX, IY
Index memory
( n = Decimal
:0 - 199)
Data to calculate
If dm
is D n ,
Data
Decimal
Hexadecimal
D n
Data memory
RX
Result buffer
If dm
is IX or IY,
Data
Decimal
D n
Data memory
RX
Result buffer
■Sample user program: SUB D0,1000
SUB D0,D10
:-1 billion<dt<+1 billion
:H0 - HFFFFFFF
:0 - 199
Subtracts 1,000 from data memory D0.
Subtracts data memory D10 from data memory D0.
187
16. Details of User Program Commands
■Related topics:
User program
For details about user programs, see "15.2 Creating a user
program".
An overflow in this command’s operation result is not taken into
account.
If an overflow has occurred, the value of the data memory is
indefinite.
However, if the result of an index memory operation is out of the
valid range (0 - 199), a command error occurs.
Overflow of data
TMS(Timer Set)
■Syntax:
Setting and starting a timer
T M S T n , dt
Sets timer T n to dt .
n
Timer No.
Decimal
:0 - 29
dt
Timer count
Decimal
:0≦dt<10 million (unit: 100msec)
D n
:Data memory ( n = Decimal
:0 – 199)
■Sample user program: TMS T0,100
JON ID1,* ST1
JON T0,-1
:
Sets timer T0 to 100 (10 seconds).
Jumps to label "*ST1" if general input D1 is ON.
Performs the previous address ("JON ID1, *ST1") if timer T0 is
counting.
■Related topics:
For details about user programs, see "15.2 Creating a user
program".
If a timer count becomes 0 after a decrementation of the value,
the timer stops.
A branch control with a timer can be done with a user command
"JCP", "JON", or "JOF".
User program
Expiration of a timer
WAT(Wait)
■Syntax:
Wait
W A T dt
Stays in this command line for a specified period ( dt ), and then proceeds to the next
address.
dt
Timer count
Decimal
:0≦dt<10 million (unit: 100msec)
■Sample user program: 1AM10000
JON MT1,+0
WAT30
Moves motor #1 to the position of 10,000 pulses.
This address is repeatedly performed while the motor #1 is running.
Stays in this address for 3 seconds, and then proceeds to the
next address.
■Related topics:
For details about user programs, see "15.2 Creating a user
program".
188
User program
Appendix
Instruction Manual
< Appendix >
Sample programs
190 -
Default Value
200 -
Table of Communication Commands
202 -
Table of User Program Commands
212 -
Table of Error Codes
216 -
Optional Accessories
218 -
Index
219 -
189
17. Sample programs
17. Sample programs
17.1 Programming Note
・Flow control in communication
Although the RC-400 and a PC use a communication protocol that conforms to RS-232C, they
actually utilize only two signals: RXD and T XD.
Therefore, special features such as "prevention of
buffer overflow" function, which are usually provided by an RT S, CT S, DSR, and DTR signal, must
be programmed by a user.
Note that a command must be sent to a RC-410 after a reply to the previous command is returned
from a RC-410 as shown in the sample programs.
< Sample communications >
Controller
RC-410
PC
&3F00M1
・・・ Performs a home search.
>&3F00M
・・・ ACK
>&7D00M[3F.01:00]
・・・ Completion-of-move
・Program for sending commands
Be sure to use the correct format when sending commands to the RC-410.
describes typical codes.
T he following table
However, the handling of CR (carriage return) and LF (line feed) varies
depending on the setting of a reply format.
See "XRS command" in an instruction manual of
RC-400 for details.
No
1
2
3
4
Sample code
PRINT
PRINT
PRINT
PRINT
○
×
#1,“ &3F9CD” ;CHR$(&HD);
#1,“ &3F9CD” ;CHR$(&HD)
#1,“ &3F9CD”
#1,“ &3F9CD” ;
:Valid command
N88Basic
Propriety
○
×
×
×
Transmitted characters
&3F9CD CR
&3F9CD CR CR LF
&3F9CD CR LF
&3F9CD
:Invalid command
CR
:Carriage return
ASC II code: 13(HEX 0DH)
LF
:Line feed
ASC II code: 10(HEX 0 AH)
Valid commands are marked by "○".
190
Quick Basic
Transmitted
Propriety
characters
○
&3F9CD CR
×
&3F9CD CR CR
○
&3F9CD CR
×
&3F9CD
T he RC-410 treats other commands as invalid commands.
17. Sample programs
17.2 Sample program in BASIC for one motor in mode 0
17.2.1 Sample connection
The following figure illustrates a sample configuration where a RC-410 controls a stepping motor
driver in operation mode 0.
In operation mode 0, one RD-1xx series driver is controlled.
If necessary, you can use a stall detection plate.
detection".
For details about a stall detection, see "13.5 Stall
T o set the operation mode to 0, use the command "E AS0".
< Block Diagram >
Stall detection
plate
Stepping motor
CCW
CW
Stall detection
sensor
CCW LS
CW LS
ORG LS
Emergency stop
RD-1xx Driver
I/O Master
RC-410
Link Master
RC-400
17.2.2 Sample program
The following program is designed to be used in the block diagram above.
The body number of the RC-410 is assumed to be "00" in this program.
Before running this program, set the body number switch on the front of the controller to "00".
< Sample operation >
① Home search
② Locates the center of the
stall detection plate.
③ Moves to the position of
2,000 pulses.
④ Returns to the home position
Repeats the procedures from step ③,
after the home return in ⑥ is finished.
⑤ Moves to the position of
1,000 pulses.
⑥ Returns to the home position
If an error (e.g. a limit error) occurs in the RC-410 during the operation of the program, error info is
displayed on the screen, and the program is terminated.
191
17. Sample programs
' Sample program in Quick Basic
' A sa mple program for controlling a motor with a RC-400 and a RC-410 (body number: 00)
'
' Caution:
・Before powering up the system, set the rotary switch on the RC-400 to 2 (transfer
'
rate: 9600 bps) and set the rotary switch on the RC-410 to 00.
・If you replace
'
'
part with
part and insert a line number at the beginning of
each line, you can run this program under N88BAS IC.
'
CLS
'Clears the screen.
'Opens the COM port.
OPEN "COM1:9600,N,8,1" FOR RANDOM AS #1
'OPEN "COM1:N81NN" AS #1
'
CR$ = CHR$(13)
'Carriage return(CR)
CNT % = 0
'Repeat count
'
MAIN:
'*MAIN
D$ = ""
'Variable to hold a communication command
READ D$
'Reads a command.
WHILE D$ < > "END"
'If D& is not "END", performs the following loop.
CMMD$ = D$ + CR$
'A co mmand sent to a RC-4xx series.
PRINT " - "; CMMD$
'Prints on the screen.
PRINT #1, CMMD$;
'Sends the command to the controller.
GOSUB RECEIVE
'Waits for a reply. *RECEIVE
PRINT OUT OU$
'Displays the reply from the controller.
'
IF MID$(OUT OU$, 8, 1) = "@" T HEN PRINT "<Command Error>": END
'
'A check routine for a move and an error.
IF MID$(CMMD$, 6, 1) = "M" T HEN GOTO ST R1 ELSE GOT O EXIT 1
'*ST R1,
*EXIT 1
'Waits for a completion-of-move response *ST R1
ST R1:
GOSUB RECEIVE
'Waits for the response. *RECEIVE
ST = VAL(MID$(OUT OU$, 15, 2))
'Move-completion factor
IF ST = &H1 T HEN PRINT "<Stall Error>":
END
IF ST = &H2 T HEN PRINT "<CW Limit error>": END
IF ST = &H4 T HEN PRINT "<CCW Limit error>": END
IF ST = &H8 T HEN PRINT "<EMS error>": END
IF ST = &HA T HEN PRINT "<Stop command>": END
EXIT1:
'*EXIT 1
READ D$
WEND
CNT % = CNT% + 1
'Incre ments the repeat count
PRINT "times "; CNT %
'Displays the repeat count on the screen.
RESTORE DOUSA
'Specifies a DAT A statement to read *DOUSA
GOT O MAIN
'Returns to MAIN: *MAIN
'
192
17. Sample programs
'Processing received data
RECEIVE:
'*RECEIVE
RCV = 0
'A flag indicating a received CR
OUT OU$ = ""
'String variable to hold a response
WHILE RCV = 0
'Performs the loop until receiving a CR
WHILE LOC (1) = 0
'Loop until receiving a reply (#1)
WEND
N$ = INPUT $(LOC (1), #1)
'Stores a received reply (#1)
LN = LEN(N$)
'T he length of the received string
FOR J = 1 T O LN
'Checks if a CR is included.
IF MID$(N$, J, 1) = CR$ T HEN RCV = 1
NEXT J
OUT OU$ = OUT OU$ + N$
'Stores a reply string
WEND
RET URN
'
'Commands to be sent to the RC-400
DAT A "&7FXID"
:'Scanning for connected controllers
DAT A "&7FXRS M1"
:'Specifies that a response is returned when a motor comes to a stop.
:'Commands to be sent to a RC-410 with a body number of 00.
DAT A "&00EAS0"
:'Sets an operation mode.
DAT A "&00QIS1,500"
:'ON/OFF period of the stall detection plate: 500 pulses
DAT A "&0000M1"
:'Home search
DAT A "&00QSS1,1"
:'Activates a stall detection function
DAT A "&000QM1"
:'Locates the center of a stall detection plate
DOUSA:
DAT A "&001+M1,2000"
:'Commands to be repeated *DOUSA
:'Moves by 2,000 pulses in the CW direction at a high speed
DAT A "&001‐M1,2000"
:'Moves by 2,000 pulses in the CCW direction at a high speed
DAT A "&001+M1,1000"
:'Moves by 1,000 pulses in the CW direction at a high speed
DAT A "&001‐M1,1000"
:'Moves by 1,000 pulses in the CCW direction at a high speed
DAT A END
193
17. Sample programs
17.3 Sample program in BASIC for controlling motors in mode 1
17.3.1 Sample connection
The following figure illustrates a sample configuration where a RC-410 controls two stepping
motor drivers in operation mode 1.
controlled.
In operation mode 1, two RD-1xx series drivers are
See "13.5 Stall detection" for details about stall detection.
mode to 1, use the command "EAS1".
< Block Diagram >
Stall detection
plate
Stepping motor
CCW
CW
Stall detection
sensor
CCW LS
CW LS
ORG LS
Emergency stop
RD-1xx Driver
I/O Master
RC-410
194
Link Master
RC-400
T o set the operation
17. Sample programs
17.3.2 Sample program
The following program is designed to be used in the block diagram shown in the previous page.
The body number of the RC-410 is assumed to be "00" in this program.
Before running this
program, set the body number switch on the front of the controller to "00".
< Sample operation >
① Home search
② Moves to the position of
2,000 pulses.
③ Returns to the home position
Repeats the procedures from step ②,
after the home return in ⑤ is finished.
④ Moves to the position of
1,000 pulses.
⑤ Returns to the home position
If an error (e.g. a limit error) occurs in the RC-410 during the operation of the program, error info is
displayed on the screen and the program is terminated.
< Sample program >
The difference between the sample program for operation mode 1 and the one for mode 0 is only in
the commands to be sent, as shown below.
Replace all of the DAT A lines in the mode 0 sample
with the following data.
DAT A "&7FXID"
:'Scanning for connected controllers
DAT A "&7FXRS M1"
:'Specifies that a response be returned when a motor comes to a stop.
DAT A "&00EAS1"
:'Sets an operation mode
:'Commands to be sent to a RC-410 with a body number of 00.
DAT A "&00LSS AL, A[0],500"
:'Setting a low step pulse
DAT A "&0000MAL"
:'Home search
DAT A "&00QSSAL,1"
:'Enables a stall detection function
DAT A "&00QIS AL,500"
:'Specify the interval period of the stall detection plate
DAT A "&000QMAL"
:'Locates the center of a stall detection plate
DOUSA:
:'Commands to be repeated *DOUSA
DAT A “ &001AS1,A[0],2000”
DAT A “ &001AS2,A[0],2000”
DAT A "&001+MAL"
:'Moves by 2,000 pulses in the CW direction at a high speed.
DAT A "&001‐MAL"
:'Moves by 2,000 pulses in the CCW direction at a high speed.
DAT A “ &001AS1,A[0],1000”
DAT A “ &001AS2,A[0],1000”
DAT A "&001+MAL"
:'Moves by 1,000 pulses in the CW direction at a high speed.
DAT A "&001‐MAL"
:'Moves by 1,000 pulses in the CCW direction at a high speed.
DAT A END
195
17. Sample programs
17.4 Sample program in BASIC for one motor in mode 2
17.4.1 Sample connection
The following figure illustrates a sample configuration where a RC-410 controls a stepping
motor driver in operation mode 2.
In operation mode 2, one RD-3xx series driver is controlled.
If necessary, you can use a stall detection plate.
stall detection.
See "13.5 Stall detection" for details about
T o set the operation mode to 2, use the command "EAS2".
< Block Diagram >
Stall detection
plate
Stepping motor
CCW
CW
Stall detection
sensor
CCW LS
CW LS
ORG LS
Emergency stop
RD-3xx Driver
I/O Master
RC-410
Link Master
RC-400
17.4.2 Sample program
The following program is designed to be used in the block diagram above.
The body number of the RC-410 is assumed to be "00" in this program.
Before running this program, set the body number switch on the front of the controller to "00".
< Sample operation >
① Home search
② Locates the center of the
stall detection plate.
③ Moves to the position of
2,000 pulses.
④ Returns to the home position
Repeats the procedures from step ③,
after the home return in ⑥ is finished.
⑤ Moves to the position of
1,000 pulses.
⑥ Returns to the home position
If an error (e.g. a limit error) occurs in the RC-410 during the operation of the program, error info is
displayed on the screen and the program is terminated.
196
17. Sample programs
< Sample program >
The difference between the sample program for operation mode 2 and the one for mode 0 is only in
the commands to be sent, as shown below.
Replace all of the "D AT A" lines in the mode 0 sample
with the following data.
'Commands to be sent to the RC-400
DAT A "&7FXID"
:'Scanning for connected controllers
DAT A "&7FXRS M1"
:'Specifies that a response be returned when a motor comes to a stop
:'Commands to be sent to a RC-410 with a body number of 00.
DAT A "&00EAS2"
:'Sets an operation mode
DAT A "&00QIS1,500"
:'Sets the ON/OFF period of the stall detection plate to 500 pulses.
DAT A "&0000M1"
:'Home search
DAT A "&00QSS1"
:'Activates a stall detection function
DAT A "&000QM1"
:'Locates the center of a stall detection plate
'
DOUSA:
:'Commands to be repeated *DOUSA
DAT A "&001+M1,2000"
:'Moves by 2,000 pulses in the CW direction at a high speed
DAT A "&001‐M1,2000"
:'Moves by 2,000 pulses in the CCW direction at a high speed
DAT A "&001+M1,1000"
:'Moves by 1,000 pulses in the CW direction at a high speed
DAT A "&001‐M1,1000"
:'Moves by 1,000 pulses in the CCW direction at a high speed
DAT A END
197
17. Sample programs
17.5 Sample program in BASIC for tow motors in mode 3
17.5.1 Sample connection
The following figure illustrates a sample configuration where a RC-410 controls stepping motor
drivers in operation mode 3.
In operation mode 3, two RD-3xx series drivers are controlled.
If necessary, you can use stall detection plates.
stall detection.
See "13.5 Stall detection" for details about
T o set the operation mode to 3, use the command "EAS3".
< Block Diagram >
Stall detection
plate
Stepping motor
CCW
CW
Stall detection
sensor
CCW LS
CW LS
ORG LS
Emergency stop
RD-3xx Driver
I/O Master
RC-410
Link Master
RC-400
17.5.2 Sample program
The following program is designed to be used in the block diagram above.
The body number of the RC-410 is assumed to be "00" in this program.
Before running this program, set the body number switch on the front of the controller to "00".
< Sample operation >
① Home search
② Locates the center of the
stall detection plate.
③ Moves to the position of
2,000 pulses.
④ Returns to the home position
Repeats the procedures from step ③,
after the home return in ⑥ is finished.
⑤ Moves to the position of
1,000 pulses.
⑥ Returns to the home position
If an error (e.g. a limit error) occurs in the RC-410 during the operation of the program, error info is
displayed on the screen and the program is terminated.
198
17. Sample programs
< Sample program >
The difference between the sample program for operation mode 3 and the one for mode 0 is only in
the commands to be sent, as shown below.
Replace all of the DAT A lines in the mode 0 sample
with the following data.
'Commands to be sent to the RC-400
DAT A "&7FXID"
:'Scanning for connected controllers
DAT A "&7FXRS M1"
:'Specifies that a response be returned when a motor comes to a stop.
:'Commands to be sent to a RC-410 with a body number of 00.
DAT A "&00EAS3"
:'Sets an operation mode
DAT A "&00LSSAL, A[0],500"
:'Setting a low step pulse
DAT A "&0000MAL"
:'Home search
DAT A "&00QSSAL,1"
:'Enables a stall detection function
DAT A "&00QIS AL,500"
:'Specify the interval period of the stall detection plate
DAT A "&000QMAL"
:'Locates the center of a stall detection plate
'
DOUSA:
:'Commands to be repeated *DOUSA
DAT A "&001AS 1, A[0],2000"
:'Sets moving data for motor #1
DAT A "&001AS 2, A[0],2000"
:'Sets moving data for motor #2
DAT A "&001+M AL"
:'Moves by 2,000 pulses in the CW direction at a high speed
DAT A "&001-M AL"
:'Moves by 2,000 pulses in the CCW direction at a high speed
DAT A "&001AS 1, A[0],1000"
:'Sets moving data for motor #1
DAT A "&001AS 2, A[0],1000"
:'Sets moving data for motor #2
DAT A "&001+M AL"
:'Moves by 1,000 pulses in the CW direction at a high speed
DAT A "&001-M AL"
:'Moves by 1,000 pulses in the CCW direction at a high speed
DAT A END
199
18. Default Value
18. Default Value
The default values for the parameters of the RC-410 commands can be stored in the flash me mory by
the command "FIS".
Because stored values are automatically read out from the flash memory upon
the power-up, you do not need to manually set those parameters once you have issued the command
to store the data in the flash memory.
As for parameters that are not stored in the me mory, the
following default values are used.
Command
0BS 1, 2
0RS 1, 2
0SS 1, 2
1AS
*1
1, 2
3IS 1, 2
9VD
9VD 1 - 7
CAS 14
CAS 15
CES 1, E, L, S, A
CES 2, E, L, S, A
COS 0 - 15
CPS 14, 15
CSS 14, 15
DCS 0 - 15
DIS 0 - 15
EAS
LSS (A[30])
LSS 1, 2
A[0 - 29]
QIS 1, 2
QSS
UAS
*1
1, 2
Description
Default value
Over-run factor in home searching
2
Retry count of home search
0
Home offset
10
Moving data and low step pulse used in dual A[30]
motor drive
0
Position index
0
Version info of a RC-410
RC-410 Ver xxxx.xx
byRORZE (20xx-xx- xx)
User comment
Data area for storing position on interrupt
Data area for storing position on interrupt
Error output function
Error output function
The status (ON/OFF) of the general output ports
Interrupt mode
Valid position range for interrupt
Noise cancel count
The signal logic of the general input ports
Operation mode
Low step pulse
Low step pulse
Not assigned
1, 2046
1, 2047
Disabled
Disabled
0
0
Unlimited
1
0
0
5000
Not assigned
Specifying the interval period of the
detection plate.
A stall detection function with a stall sensor
Auto-start function
0
0
stall 2048
T he notation of "1, 2" appended to each command represents a targeted motor.
The parameters of those commands are set for motor #1 and #2 separately.
To clear data stored by the command "FIS", e xecute the command "FES Init".
Once the setting has been cleared, the default values shown in the above table are read out when
powered up again.
It takes about 1.5 seconds to execute a command "F IS" or "FES Init".
200
18. Default Value
When the command "FPS" is executed, the position pulses for motor #1 and #2 are stored in the flash
me mory and read out automatically upon each power-up.
Command
Description
FPS 1, 2
Position pulse
P[0 - 2047]
Default value
+000000000
To clear data stored by the command "FPS", execute the command "FES Posp".
Once the position
pulse data has been cleared, the default values shown in the above table are read out when powered
up again.
It takes about 1.5 seconds to execute a command "FPS" or "FES Posp".
When the command "FUS" is e xecuted, the user program is stored in the flash me mory and read out
automatically when powered up again.
To clear the program stored by the command "FUS", execute the command "FES Upgm".
It takes about 1.5 seconds to execute a command "FUS" or "FES Upgm".
201
19. Table of Communication Commands
19. Table of Communication Commands
■ Manual convention
Ⅰ) Communication command
①
No.
②
Command
Command parameter
Function
Ⅱ) Reply to the command
③
④
Reply
Reply
parameter
Description of the parameters
used in ② and ④.
Description of parameters
Related
page
Low speed move
mt, Pd
7
Relative move in the
CW direction at low
speed
mt
2+M
2+M
None
2-M
None
2AM
None
mt, Z
mt, R
mt, Pd
8
Relative move in the
CCW direction at low
speed
mt
2-M
mt, Z
mt, R
9
Absolute move at low
speed
2AM
mt, Pd
mt: 1, 2, or AL
1: Motor #1
2: Motor #2
AL: Both motors
Pd: dt, P[n1], P[+], P[-]
(If not specified, data defined by
the command "1AS" is used.
If target motor is 'AL', you do not
need to specify this parameter.
Otherwise provide a suitable one.)
(dt: 1≦dt<1 billion [pulse] )
(n1: 0 - 2,047)
Z: Unlimited move
R: If target motor is 'AL', motor #2 will
rotate in the opposite direction.
93
94
mt: 1, 2, or AL
1: Motor #1
2: Motor #2
AL: Both motors
select any of them
Ⅰ) Command Syntax
A command consists of an '&' plus a body number, the command itself (①), (a) command
parameter(s) (②), and  .
Exa mple: &001+M1,A[18],10000 
(* )
Ⅱ) T he syntax of a reply to a command
A reply to a command consists of an '>&' plus a body number, the reply itself (③), (a) reply
parameter(s) (④), and  .
Exa mple: >&001+M 
(*) T hough it is not necessary to place a ' , ' between a command and a command parameter, you
need to insert a ' , ' between command parameters.
■ Symbols in the Table of Communication Commands
dt
: Immediate value in decimal or hex for mat
Exa mple: Decimal
Hex
:1024
:H400
mt
: Target motor (mt= 1, 2, or AL, where AL represents both motor #1 and #2.)
A[n]
: Low step pulse data stored in low step No. n (n= 0 - 30)
P[n]
: A position pulse stored in position No. n (n= 0 - 2,047)
P[+]
: A position pulse pointed by the position index
P[-]
: A position pulse pointed by the position index
T he position index is incremented by 1 when the command is processed.
T he position index is decremented by 1 when the command is processed.
202
19. Table of Communication Commands
19 .1 Ba si c I n str u c ti o n s
< A c ti o n C o m m a n d s >
※ In an actual code, each command is prefixed with a string "&xx" and each reply with ">&xx", where "xx" is a body number (00-77h).
No.
Function
Command
Command
parameter
Re p l y
Reply
parameter
00M
mt
00M
None
Description of parameters
Related
page
Home search
1
2
3
Home search
Home search
(compatible with
RORZE RC-204)
Locating the ce nter
position of a stall
detection p late
04M
mt
04M
None
0QM
mt
0QM
None
78
mt: 1, 2, or AL
1: Motor #1
2: Motor #2
AL: Both motors
78
80
High speed move
mt, A[n1],
Pd
4
Relative move in the
CW direction at high
speed
mt, Pd
1+M
mt
1+M
None
1-M
None
mt, Z
mt, R
mt, A[n1],
Pd
5
Relative move in the
CCW direction at high
speed
mt, Pd
1-M
mt
mt, Z
mt, R
mt, A[n1],
Pd
mt, A[n1]
6
Absolute move at high
speed
1AM
1AM
None
mt, Pd
mt
mt: 1, 2, or AL
1: Motor #1
2: Motor #2
AL: Both motors
n1: 0 - 30 (Default: 30. Do NOT
specify this parameter, if target
motor is 'AL' or the mo ving
distance is 'Z'.)
Pd: dt, P[n2], P[+ ], P[- ]
( If not specified, data defined by
the comma nd "1AS" is used.
If target motor is 'AL', you do not
need to specify this parameter.
Other wise provide a suitable o ne.)
(dt: 1≦dt<1 billion [p ulse] )
(n2: 0 - 2,047)
Z: Unlimited move
R: If target motor is 'AL', motor #2 will
rotate in the opposite direction.
mt: 1, 2, or AL
1: Motor #1
2: Motor #2
AL: Both motors
n1: 0 - 30 (Default: 30. Do NOT
specify this parameter, if target
motor is 'AL' or the mo ving
distance is 'Z'.)
Pd: dt, P[n2], P[+ ], P[- ]
( If not specified, data defined by
the comma nd "1AS" is used.
If target motor is 'AL', you do not
need to specify this parameter.
Other wise provide a suitable o ne.)
(dt: -1 billion<dt<+1 billion )
(n2: 0 - 2,047)
86
87
90
Low speed mo ve
mt, Pd
7
Relative move in the
CW direction at lo w
speed
Mt
2+M
2+M
None
2-M
None
mt, Z
mt, R
mt, Pd
8
Relative move in the
CCW direction at lo w
speed
mt
2-M
mt, Z
mt, R
mt: 1, 2, or AL
1: Motor #1
2: Motor #2
AL: Both motors
Pd: dt, P[n1], P[+ ], P[- ]
( If not specified, data defined by
the comma nd "1AS" is used.
If target motor is 'AL', you do not
need to specify this parameter.
Other wise provide a suitable o ne.)
(dt: 1≦dt<1 billion [p ulse] )
(n1: 0 - 2,047)
Z: Unlimited move
R: If target motor is 'AL', motor #2 will
rotate in the opposite direction.
93
94
203
19. Table of Communication Commands
No.
Function
Command
Command
parameter
Re p l y
Reply
parameter
mt, Pd
9
Absolute move at low
speed
2AM
2AM
None
mt
Description of parameters
Related
page
mt: 1, 2, or AL
1: Motor #1
2: Motor #2
AL: Both motors
Pd: dt, P[n1], P[+ ], P[- ]
( If not specified, data defined by
the comma nd "1AS" is used.
If target motor is 'AL', you do not
need to specify this parameter.
Other wise provide a suitable o ne.)
(dt: -1 billion<dt<+1 billion )
(n1: 0 - 2,047)
95
Stopping and cha nging speed
10
Immediate stop
5IS
mt
5IS
None
11
Stop after
deceleration
5SS
mt, A[n1]
5SS
None
mt: 1, 2, or AL (If not specified, ‘AL’ is use d.)
1: Motor #1
2: Motor #2
AL: Both motors
mt: 1, 2, or AL
1: Motor #1
2: Motor #2
AL: Both motors
n1: 0 - 30
( If not specified, the
number specified in the move
command that began this mo ve is
used.)
107
108
Position management
12
Getting a c urre nt
position
6PD
mt
6PD
dt
13
Setting a cur rent
position
6PS
mt, dt
6PS
None
mt: 1 or 2
1: Motor #1
2: Motor #2
dt: -1 billion<dt<+1 billion
mt: 1, 2, or AL
1: Motor #1
2: Motor #2
AL: Both motors
dt: -1 billion<dt<+1 billion (0, if not
specified)
109
110
Status
mt: 1, 2, or AL (In operation mode 4,
do NOT specify this parameter.
In other modes, be s ure to
specify a suitable one .)
1: Motor #1
2: Motor #2
AL: The logical OR o f the statuses
for motor #1 a nd #2
bit: 0 - 7 (All bit, if not specified)
dt: 0 or 1 (H00 - HFF, if bit is not
specified)
mt: 1, 2, or AL (In operation mode 4,
do NOT specify this parameter.
In other modes, be s ure to
specify a suitable one .)
1: Motor #1
2: Motor #2
AL: Both motors
mt: 1 or 2
1: Motor #1
2: Motor #2
bit: 0 - 5 (All bit, if not specified)
dt: 0 or 1 ( H00 - H3F if bit is not
specified)
14
Getting a co ntro ller
status
9CD
mt, bit
9CD
dt
15
Clearing a co ntroller
status
9CS
mt
9CS
None
16
Getting the completion9MD
of-move factor
mt, bit
9MD
dt
17
Outputting a one-shot
pulse to a general
CBS
output
bit, dt
CBS
None
bit: 0 - 15
dt: 1≦dt<1 billion [ms]
116
dt
bit: 0 - 15 (Whole input port, if not
specified)
dt: 0 or 1 ( H0000 - HFFFF, if bit is
not specified).
The setting of the comma nd "DIS",
which determi nes an inp ut logic,
affects returned data.
119
111
112
113
Inp ut/o utp ut operation
18
204
Getting the sta tus of
input ports used for
motor controlli ng
and general purpose
CID
bit
CID
19. Table of Communication Commands
No.
19
20
21
Function
Getting the status o f
sensors
(motor-controlli ng
inputs)
Getting the sta tus of
output ports used for
motor controlli ng
and general purpose
Setting the generalpurpose outp ut port
Command
Command
parameter
Re p l y
Reply
parameter
CLD
mt, bit
CLD
dt
COD
bit
COD
dt
COS
bit, dt
COS
None
22
Getting the status o f
an error o utp ut
CRD
mt, c hr
CRD
dt
23
Clearing the status
of an er ror o utput
CRS
mt
CRS
None
Description of parameters
Related
page
mt: 1 or 2
1: Motor #1
2: Motor #2
bit: 0 - 5 (All sensors, If not specified)
dt: 0 orb 1 (H00 - H3F, if bit is not
specified).
The setting of command "DIS",
which deter mines an inp ut logic,
affects returned data.
120
bit: 0 - 15 (W hole o utp ut port, if not
specified)
dt: 0 or 1 ( H0000 - HFFFF, if bit is
not specified)
mt: 1 or 2
1: Motor #1
2: Motor #2
chr: Error factor (Either an E, L, S, or A)
( If not specified, a he xadecimal
value
representing
all
error
factors is returned.)
‘ E ’: EMS error
‘ L ’: Limit error (CW or CCW)
‘ S ’: STALL error
‘ A ’: All of the above errors are
retur ned
dt: The status of the error o utp ut
① If an error factor is specified:
0: No error has occ urred.
1: An er ror has occurred.
② If no error factor is specified: H0 - HF
mt: 1, 2, or AL
1: Motor #1
2: Motor #2
AL: Both motors
121
122
124
125
Flash memor y
str: Data type string
“Posp” : Position p ulse
“ Init”
: Initialization data on power-up
“Upgm” : User program
24
Clearing the flas h
memory
FES
str
FES
None
25
Writing initialization
data
FIS
None
FIS
None
137
26
Reading position pulses
FPD
None
FPD
None
138
27
Writing position pulses
FPS
None
FPS
None
138
28
Reading a user program
FUD
None
FUD
None
139
29
Writing a user program
FUS
None
FUS
None
139
137
205
19. Table of Communication Commands
< Set/Get commands >
※ In an actual code, each command is prefixed with a string "&xx" and each reply with ">&xx", where "xx" is a body number (00-77h).
No.
Function
Command
Command
parameter
Re p l y
Reply
parameter
Description of parameters
Related
page
Home search
30
Getting a n o ver-r un
factor
0BD
mt
0BD
dt
31
Setting a n o ver-r un
factor
0BS
mt, dt
0BS
None
32
Getting a home offset
value
0SD
mt
0SD
dt
33
Setting a home offset
value
0SS
mt, dt
0SS
None
mt: 1 or 2
1: Motor #1
2: Motor #2
dt: 0 - 5 (Default: 2)
mt: 1, 2, or AL
1: Motor #1
2: Motor #2
AL: The same value for both motor
#1 and #2
dt: 0 - 5 (Default: 2)
mt: 1 or 2
1: Motor #1
2: Motor #2
dt: 1 - 65,535 (Default: 20)
mt: 1, 2, or AL
1: Motor #1
2: Motor #2
AL: The same value for both motor
#1 and #2
dt: 1 - 65,535 (Default: 20)
79
80
82
83
High speed move
34
Getting mo ving data
and low step No.
used when two motors
move simulta neously
35
Setting movi ng data
and low step No.
used when two motors
move simulta neously
1AD
mt
1AD
A[n1],dt
1AS
None
mt, A[n1],
Pd
1AS
mt, Pd
mt: 1 or 2
1: Motor #1
2: Motor #2
n1: 0 - 30
dt: -1 billion<dt<+1 billion [p ulse]
mt: 1 or 2
1: Motor #1
2: Motor #2
n1: 0 - 30 (No.30, if not specified)
Pd: dt, P[n2], P[+ ], P[- ]
(dt: -1 billion<dt<+1 billion [pulse] )
(n2: 0 - 2,047)
89
92
Position p ulse
36
37
38
39
Adding a position pulse
Subtracting a position
pulse
Multiplyi ng a position
pulse
Dividing a position
pulse
3+S
mt, Pd, dt
3+S
None
3-S
mt, Pd, dt
3-S
None
3*S
mt, Pd, dt
3*S
None
3/S
mt, Pd, dt
3/S
None
40
Clearing all position
pulses
3CS
mt
3CS
None
41
Getting a position index
3ID
mt
3ID
dt
42
Setting a position index
3IS
mt, dt
3IS
None
43
Getting a position pulse
with a position number
3ND
mt, Pd
3ND
P[n],dt
44
Getting a position pulse
3PD
mt, Pd
3PD
dt
mt, Pd, dt
45
Setting a position pulse
3PS
3PS
mt, Pd
206
None
mt: 1 or 2
1: Motor #1
2: Motor #2
Pd: P[n], P[+], P[-]
n: 0 - 2,047
dt: -1 billion<dt<+1 billion
mt: 1, 2, or AL
1: Motor #1
2: Motor #2
AL: Both motors
mt: 1 or 2
1: Motor #1
2: Motor #2
dt: 0 - 2,047
mt: 1 or 2
1: Motor #1
2: Motor #2
Pd: P[n], P[+], P[-]
n: 0 - 2,047
dt: -1 billion<dt<+1 billion
mt: 1 or 2
1: Motor #1
2: Motor #2
Pd: P[n], P[+], P[-]
n: 0 - 2,047
dt: -1 billion< dt< +1 billion ( If no t
specified, the cur rent position of
the target motor is used.)
97
98
99
100
101
101
102
103
104
105
19. Table of Communication Commands
No.
Function
Command
Command
parameter
Re p l y
Reply
parameter
DID
bit
DID
dt
DIS
bit, dt
DIS
None
Description of parameters
Related
page
Inp ut logic
46
47
Getting an inp ut logic
for motor-co ntro l and
general-purpose
inputs
Setting a n i nput logic
for motor-co ntro l and
general-purpose
inputs
bit: 0 - 15 (Whole input, if not specified)
dt: 0 or 1 (H0000 - HFFFF, if bit is
not specified.
Default: H0000)
130
131
Modes
48
Getting a n operation
mode
EAD
None
EAD
chr
49
Setting a n operation
mode
EAS
chr
EAS
None
chr: 0 - 4
0: One RD-1 xx series driver
1: Two RD-1xx series drivers
2: One RD-3 xx series driver
3: Two RD-3xx series drivers
4: All ports are used as general I/Os
132
132
Setting of a low step pulse
50
51
Getting a low s tep
pulse
Setting a low step
pulse
LSD
LSS
mt, A[n]
mt, A[n], dt
LSD
LSS
dt
mt: 1 or 2
1: Motor #1
2: Motor #2
n: 0 - 30 (No.30, if no t specified)
dt: 1 - 1,000,000 (Default: 5,000 for
No.30. Undefined for other number)
140
None
mt: 1, 2, or AL
1: Motor #1
2: Motor #2
AL: The same value is assigned to
both motor #1 and #2.
n: 0 - 30 (No.30, if no t specified)
dt: 1 - 1,000,000 (Default: 5,000 for
No.30. Undefined for other number.)
141
STALL sensor
52
Getting the i nter val
period of a stall
detection
QID
mt
QID
dt
53
Setting the inter val
period of a stall
detection
QIS
mt,dt
QIS
None
54
Getting a sta ll er ror
status
QRD
mt
QRD
chr
55
Clearing a stall
detection status
QRS
mt
QRS
None
56
57
Getting whe ther
a stall detection
function is enabled
Enabling/disabling
a stall detection
function
QSD
QSS
mt
mt, c hr
QSD
QSS
mt: 1, 2, or AL
1: Motor #1
2: Motor #2
dt: 32 - 65,535 [p ulse]
(Default: 2,048)
mt: 1, 2, or AL
1: Motor #1
2: Motor #2
AL: The same value is assigned to
both motor #1 and #2.
dt: 32 - 65,535 [p ulse]
(Default: 2,048)
mt: 1, 2, or AL
1: Motor #1
2: Motor #2
AL: Motor #1 or #2
chr: 0 or 1
0: No STALL error has occ urred.
1: An STALL error has occurred.
mt: 1, 2, or AL
1: Motor #1
2: Motor #2
AL: The sta tus o f both motor #1
and #2 are cleared.
142
142
143
144
chr
mt: 1, 2, or AL
1: Motor #1
2: Motor #2
chr: 0 or 1
0: Stall detection is deactivated. (Default)
1: Stall detection is activated.
144
None
mt: 1, 2, or AL
1: Motor #1
2: Motor #2
AL: The same va lue is assigned to
both motor #1 and #2.
chr: 0 or 1
0: Deactivates stall detection. (Default)
1: Activates stall detection.
145
207
19. Table of Communication Commands
19 .2 E x te n d e d c om m a n d s
< A c ti o n C o m m a n d s >
※ In an actual code, each command is prefixed with a string "&xx" and each reply with ">&xx", where "xx" is a body number (00-77h).
Command
Command
parameter
Re p l y
Reply
parameter
04M
mt
04M
None
5AS
mt
5AS
None
5DS
mt
5DS
None
mt: 1 or 2
1: Motor #1
2: Motor #2
4
Getting the number
of available steps
UBD
None
UBD
dt
dt: 0 - 6,039 [s tep]
5
Clearing RAM area
UCS
None
UCS
None
No.
Function
Description of parameters
Related
page
Home search
1
Home search
(compatible with RC-204)
mt: 1, 2, or AL
1: Motor #1
2: Motor #2
AL: Both motors
78
Stopping and cha nging speed
2
3
Changing to
speed while
Changing to
speed while
high
mo ving
low
mo ving
106
106
User program
HDn
HCn
6
Getting the value of
a user memor y
HTn
UDD
UDS
None
UED
dt
dt: The last address (5-digit decimal)
150
dt: 0 or 1
0: Immediately s tops (a) running
motor(s) a nd terminates the use r
program.
1: Stops (a) running motor(s) with
deceleration a nd then terminate s
the user program.
( If dt is not specified, the use r
program is terminated witho ut
stopping (a) motor(s) .)
150
Dn, dt
UDS
Cn, dt
Tn, dt
8
Getting the last
Address
(on the RAM)
UED
None
9
Aborting the user
program
UES
dt
UES
None
10
Getting the
executio n address
UND
None
UND
dt
UPD
dt2,str2
str1
11
Getting a user
program command
with address
UPD
dt1
208
147
H: If specified, data will be retur ned
in hex for mat. If not, the data
will be retur ned in decimal
format.
(User memor y)
Dn: Data memor y (D0 - D199)
Cn: Counter (C0 - C29)
Tn: Timer ( T0 - T29)
dt: User memo ry data
( In he xadecimal format)
dt: H00000000 - HFFFFFFFF
( In decimal format)
-1 billion<dt<+1 billion
(User memor y)
Dn: Data memor y (D0 - D199)
Cn: Counter (C0 - C29)
Tn: Timer ( T0 - T29)
dt: Data to assign
(Whe n specified with "Dn, dt")
① -1 billion<dt<+1 billion
in decimal format
② dt: H0 – HFFFFFFF
in he x format
(When specified with "Cn, dt" or "Tn, dt")
dt: 0 - 10 million, in decimal format
dt
Tn
Modifyi ng a user
memory
147
UDD
Dn
Cn
7
(5-digit decimal)
dt: The e xecution address
(5-digit decimal)
str1: A label name in the user program
str1 = '*' + 'Label name
(up to 13 characters)'
dt1: Address (0 - 6,038).
If not specified, the ne xt address
to the o ne used with a pre viously
executed command "UPD" or
"UWD" is used.
dt2: Address (5-digit decimal)
str2: Registered user program command
(up to 32 characters) .
148
149
151
151
19. Table of Communication Commands
No.
Function
Command
Command
parameter
Re p l y
Reply
parameter
12
Getting the run status
of the user program
URD
None
URD
dt
str
13
Starting to r un a user
program
URG
URG
None
USG
None
UWD
str2
UWS
None
dt
str
14
Executing one address
USG
dt
str1
15
Getting a user
program command
UWD
dt
16
Registering a user
program command
UWS
str
Description of parameters
dt: Completion factor H00 - HFF
str: A label name indicating the start
point to r un
str = '*' + 'Label name
(up to 13 characters)'
dt: Address where a n e xecution
should begin (0 - 6,038).
If no address is specified, the
executio n begins at the top o f the
program.
str: A label name to e xecute ( The ne xt
address to the label is actua lly
executed)
str = '*' + 'Label name
(up to 13 characters)'
dt: Address to exec ute (0 - 6,038).
If no address is specified, the
address that can be obtained b y
the comma nd "UND" will be
executed.
str1: A label name in the user program
str1 = '*' + 'Label name
(up to 13 characters)'
dt: Address (0 - 6,038).
If not specified, the ne xt address
to the o ne used with a pre viously
executed command "UPD" or
"UWD" is used.
str2: Registered user program command
(up to 32 characters)
str: User program comma nd
(up to 32 characters)
Related
page
152
153
154
155
156
< S e t/ G e t co m m a n d s >
※ In an actual code, each command is prefixed with a string "&xx" and each reply with ">&xx", where "xx" is a body number (00-77h).
No.
Function
Command
Command
parameter
Re p l y
Reply
parameter
Description of parameters
Related
page
Home search
17
Getting the retr y
counts of a home
search
0RD
mt
0RD
dt
18
Setting the retr y
counts of a home
search
0RS
mt, dt
0RS
None
19
Getting the sta tus of
a "stop based on a
home sensor"
function
0UD
mt
0UD
chr
20
Configuring a "stop
based on a home
sensor" function
0US
mt, c hr
0US
None
mt: 1 or 2
1: Motor #1
2: Motor #2
dt: 0 - 9 (Default: 0)
mt: 1, 2, or AL
1: Motor #1
2: Motor #2
AL: The same value for both motor
#1 and #2
dt: 0 - 9 (Default: 0)
mt: 1 or 2
1: Motor #1
2: Motor #2
chr: 0 - 2
0: The function is disabled.
1: The motor will stop when Home
sensor tur ns o n.
2: The motor will stop when Home
sensor tur ns off.
mt: 1, 2, or AL
1: Motor #1
2: Motor #2
AL: The same value for both motor
#1 and #2
chr: 0 - 2
0: Disables the function. (default)
1: Stops the mo tor whe n Home
sensor tur ns o n.
2: Stops the mo tor whe n Home
sensor tur ns off.
81
82
84
85
209
19. Table of Communication Commands
No.
Function
Command
Command
parameter
Re p l y
Reply
parameter
Description of parameters
Related
page
Status
21
Getting version i nfo
or a message
9VD
dt
9VD
str
22
Setting a user
comment
9VS
dt, str
9VS
None
CAD
bit
CAD
mt,dt
CAS
bit, m t, dt
CAS
None
dt: 1 – 7
(If not specified, version info is returned.)
str: If dt is specified, the user
comment is retur ned.
Otherwise version info is returned.
dt: 1 - 7 ( User comment No.)
str: User comme nt
(up to 40 one-b yte c haracters
except '>' a nd '&')
113
114
Inp ut/o utp ut operation
23
24
Getting parameters for
storing position data
in an interrupt function
Setting parameters for
storing position data
in an interrupt function
mt: 1 or 2
1: Motor #1
2: Motor #2
bit: 14 or 15
dt: 0 – 2,047
mt: 1 or 2
1: Motor #1
2: Motor #2
chr: Error factor (Either an E, L, S, or A)
‘ E ’: EMS error
‘ L ’: Limit error (CW or CCW)
‘ S ’: STALL error
‘ A ’: All of the above errors
bit: Output port 3 - 7, 11 - 15
dt: Outp ut data 0 or 1
If no bit or dt is retur ned, the error
output
func tion
is
disabled
(default).
115
115
25
Getting parameters
for an error output
function
CED
mt, c hr
CED
bit,dt
26
Setting parameters
for an error o utp ut
function
CES
mt, c hr, bit,
dt
CES
None
27
Getting the
configuration of a n
interr upt mode
CPD
bit
CPD
dt
28
Configuring a n
interr upt mode
CPS
bit, dt
CPS
None
29
Getting the va lid
position range for
interr upt
CSD
bit
CSD
dt1,dt2
30
Setting the valid
position range for
interr upt
CSS
bit, dt1, dt2
CSS
None
DCD
bit
DCD
dt
DCS
bit, dt
DCS
None
EMD
C:dt1,
M:dt2,
S:dt3,
I:dt4
mt: 1 or 2
1: Motor #1
2: Motor #2
C: Controller status (dt1: H00 - HFE)
M: Co mpletion-of-move factor (dt2: H00 - H 1F)
S: Sensor input (dt3: H00 - H3F)
I: General input (dt4: H0000 - HFFFF)
133
None
mt: 1 or 2
1: Motor #1
2: Motor #2
C: Controller status (dt1: H00 - HFE)
M: Co mpletion-of-move factor (dt2: H00 - H 1F)
S: Sensor input (dt3: H00 - H3F)
I: General input (dt4: H0000 - HFFFF)
(※If no setting for a bit is specified,
the corresponding e ve nt to the bit is
masked.)
134
bit: 14 or 15
dt: 0 - 2 ( Interr upt mode)
0: Interr upt is disabled. (default)
1: Stores position upo n a falling
edge.
2: Stores position upon a rising
edge.
bit: 14 or 15
dt1: Interrupt start -1 billion<dt1<+1 billion
dt2: Interrupt end -1 billion<dt2<+1 billion
If no range is specified, the
interr upt function is effective at
any position. (Defa ult)
"dt1≧dt2" causes a comma nd error.
117
118
122
123
126
127
Inp ut logic
31
32
Getting the maxim um
counts of a noise
cancel function
Setting the ma ximum
counts of a noise
cancel function
bit: 0 - 15
dt: 1 - 99. '1' means the noise cancel
function is disabled. (Default)
128
129
Modes
33
34
210
Getting a n e vent
mask
Setting a n e ve nt
mask
EMD
EMS
mt
mt,
C:dt1,
M:dt2,
S:dt3,
I:dt4
EMS
19. Table of Communication Commands
No.
35
Function
Getting all status of
an e vent response
Command
ERD
Command
parameter
mt
Re p l y
ERD
Reply
parameter
C:dt1,
M:dt2,
S:dt3,
I:dt4,
O:dt5,
P:dt6
36
Getting status types
in an e ve nt response
ESD
mt
ESD
C, M, S,
I, O, P
37
Setting sta tus types
in an e ve nt response
ESS
mt, C, M,
S, I, O, P
ESS
None
UAD
None
UAD
chr
UAS
chr
UAS
None
Description of parameters
Related
page
mt: 1 or 2
1: Motor #1
2: Motor #2
C: Controller status (dt1: H00 - HFE)
M: Co mpletion-of-move factor (dt2: H00 - H1F)
S: Sensor input (dt3: H00 - H3F)
I: General input (dt4: H0000 - HFFFF)
O: General output (dt5: H0000 - HFFF F)
P: Position (-1 billion<dt6<+1 billion)
135
C: Controller status
M: Completion-of- move factor
S: Sensor input
I: Ge neral input
O: Ge neral outp ut
P: Position
mt: 1 or 2
1: Motor #1
2: Motor #2
C: Controller status
M: Completion-of- move factor
S: Sensor input
I: Ge neral input
O: Ge neral outp ut
P: Position
(※ Any of the above can be omitted.)
135
136
User program
38
39
Getting the setting of
the auto-start function
Configuring the
auto-start function
chr: 0 or 1
0: The auto-start function is disabled.
1: The auto-start function is enabled.
146
146
211
20. Table of User program Commands
20. Table of User Program Commands
■ T erms and notation in this table
Step count
:Memor y units cons umed whe n a user comma nd is registered in a user program.
Yo u can c heck how ma ny available s teps are left i n the user p rogram area b y issuing the
communication command "UBD".
Dn
:Data memory (D0 - D199)
-1 billion<Dn<+1 billion
Cn
:Counter (C0 - C29)
A value betwee n 0 a nd 9,999,999
Tn
:Timer ( T0 - T29)
A value betwee n 0 a nd 9,999,999
Mn
:Memory flag (M0 - M199)
On or Off
ID n, Odn :General-purpose input/output port
ID0
ID1
ID2
ID3
ID4
ID5
ID6
ID7
ID8
ID9
ID10
ID11
ID12
ID13
ID14
ID15
dt
Inp ut por t
General
General
General
General
General
General
General
General
General
General
General
General
General
General
General
General
:Immediate va lue i n decimal or he xadecimal for mat
Example: Decimal va lue
Hex va lue
RX
Outp ut port
OD0
Genera 0
OD1
General 1
OD2
General 2
OD3
General 3
OD4
General 4
OD5
General 5
OD6
General 6
OD7
General 7
OD8
General 8
OD9
General 9
OD10
General 10
OD11
General 11
OD12
General 12
OD13
General 13
OD14
General 14
OD15
General 15
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
:Result b uffer
:1024
:H400
-1 billion<RX<+1 billion
When a com mand that retur ns a value (e.g . "6PD") is e xecuted in the user program, the retur n
value is temporarily stored in this buffer.
IX, IY
:Inde x me mory
The value of
'n' (0 - 199) in D n a nd M n,
'n' (0-29) i n Cn and Tn,
and 'n' (0-15) in IDn and ODn
can be replaced by IX or IY.
The n D n, Tn, Mn, ID n, a nd OD n can be represented as follows :
DIX, C IX, TIX, M IX, ID IX, OD IX
DIY, C IY, TIY, M IY, ID IY, OD IY
PP1, 2
:The c urre nt position data
PP1 for motor #1,
PP2 for motor #2
MT1, 2
:Motor r un flag
MT1 for motor #1,
MT2 for motor #2
Note)
All of these memories (data memor y Dn, counter C n, e tc.) are co llective ly called user memories.
For details about user memories, see "15.2.5 Variables (memories) used in a user program".
212
20. Table of User program Commands
< Basic Commands >
No
Name
Command
Parameter
Description of function
Note
Steps
Page
3
181
3
188
3
171
2
187
2
185
1
173
1
171
3
169
3
183
3
178
5
175
3
180
3
179
3
170
Trans fer-of-data comma nds
1
Load
LD
Dn, dt
Dn, Dn′
Dn, Cn
Dn ← dt
Dn ← Dn′
Dn ← Cn
dt: -1 billion<dt<+1 billion
Tn, dt
Tn, Dn
Cn, dt
Cn, Dn
Mn
Odn
Mn
ODn
Tn ← dt
Tn ← Dn
Cn ← dt
Cn ← Dn
Mn ← ON
ODn ← ON
Mn ← OFF
ODn ← OF F
dt: 0 - 9,999,999
Timer value: dt×100msec
dt: 0 - 9,999,999
Set comma nds
2
Timer Set
T MS
3
Counter Set
CT S
4
Set
SET
5
Reset
RST
6
Increment
INC
7
Decrement
DEC
Arithmetic operation com mands
Cn
Dn
Cn
Dn
Cn
Dn
Cn
Dn
←
←
←
←
Cn
Dn
Cn
Dn
Dn, dt
Dn, Dn′
Mn, xx
Dn
Dn
Mn
Dn
Dn
Mn
← Dn
← Dn
← Mn
← Dn
← Dn
← Mn
+1
+1
-1
-1
Logical operation comma nds
8
9
And
(Logical A ND)
Or
(Logical OR)
AND
OR
Dn, dt
Dn, Dn′
Mn, xx
∩
∩
∩
∪
∪
∪
dt
Dn′
xx
dt
Sn′
xx
xx: IDn, ODn, Mn, Tn, Cn, MT
dt: 0≦dt<1 billion
Tn : ON i f tim er is cou n tin g
Cn : ON i f co un te r is n o t 0
MT: ON i f a m o to r is run n in g
Branch comma nds
10
Jump
JMP
*label
±n
Unconditional jump to *label.
Relative jump to ±n th next address.
11
Jump
Compare
JCP
xx=yy, *label
xx>yy, *label
xx<yy, *label
Jumps if xx = yy.
Jumps if xx > yy.
Jumps if xx < yy.
12
Jump On
JO N
xx, *label
Jumps if xx is ON.
13
Jump Off
JOF
xx, *label
Jumps if xx is OFF .
14
Call
CAL
*label
Calls a subroutine
15
Return
RET
None
Returns from a subroutine
1
184
16
End
END
None
Terminates a user program.
1
173
dt
Waits for (dtX100) msec.
2
188
*label: Up to 13 one-byte characters
Max. value of n: 199
xx: Dn, Cn, T n, PP (c urrent pos ition)
yy: Dn, Cn, T n, dt
dt: 0≦dt<1 billion
*label: Up to 13 one-byte characters
xx: IDn, ODn, Mn, Tn, Cn, MT
dt: 0≦dt<1 billion
*label: Up to 13 one-byte characters
Tn : ON i f tim er is cou n tin g
Cn : ON i f co un te r is n o t 0
MT: ON i f a m o to r is run n in g
*label: Up to 13 one-byte characters
Wait comma nds
17
Wait
WAT
dt: 0 - 9,999,999
213
20. Table of User program Commands
< Extended Commands >
No
Name
Command
Parameter
Description of function
Note
Steps
Page
2
181
2
170
3
168
3
187
3
182
3
172
1
173
1
171
Trans fer-of-data comma nds
1
Load
LD
Dn, Mn, dt
Dn, Xn, dt
Dn, ODn, dt
Mn, Dn, dt
ODn, Dn, dt
Eac h bit (0 - dt ) of D n ← M n - M (n +dt )
IX, dt
IX, Dn
IY, dt
IY, Dn
Dn, IX
Dn, IY
IX ← dt
IX ← Dn
IY ← dt
IY ← Dn
Dn ← IX
Dn ← IY
dt: 0 - 199
Dn, bit, dt
E ac h bit (0 - dt ) of Dn ← 1(or 0)
dt: 0 - 31
Dn, dt
Dn, Dn′
Dn ← Dn + dt
Dn ← Dn + Dn′
dt: -1 billion<dt<+1 billion
in decimal format
dt: H0 - HF FF FFF F
in hex format
IX,
IX,
IY,
IY,
IX
IX
IY
IY
Eac h bit (0 - dt ) of D n ← I dn - I D (n+ dt )
Eac h bit (0 - dt ) of D n ← Odn - OD (n+dt )
dt: 0 - H1F(31)
M n - M (n +dt ) ← Eac h bit (0 - dt ) of D n
Odn - OD (n+dt) ← Eac h bit (0 - dt ) of D n
Set comma nds
2
Bit Set
BST
Arithmetic operation com mands
3
4
5
6
Addition
Subtraction
M ul ti pli cati on
Division
ADD
SUB
MUL
DIV
7
Increment
INC
8
Decrement
DEC
dt
Dn
dt
Dn
←
←
←
←
IX
IX
IY
IY
+
+
+
+
dt
Dn
dt
Dn
Dn, dt
Dn, Dn′
Dn ← Dn - dt
Dn ← Dn - Dn′
IX,
IX,
IY,
IY,
IX
IX
IY
IY
dt
Dn
dt
Dn
←
←
←
←
IX
IX
IY
IY
-
dt
Dn
dt
Dn
Dn, dt
Dn, Dn′
Dn ← Dn × dt
Dn ← Dn × Dn′
IX,
IX,
IY,
IY,
IX
IX
IY
IY
dt
Dn
dt
Dn
←
←
←
←
IX
IX
IY
IY
×
×
×
×
dt
Dn
dt
Dn
Dn, dt
Dn, Dn′
Dn ← Dn / dt
Dn ← Dn / Dn′
IX,
IX,
IY,
IY,
IX
IY
IX
IY
IX
IX
IY
IY
IX
IY
IX
IY
dt
Dn
dt
Dn
←
←
←
←
←
←
←
←
IX
IX
IY
IY
IX
IY
IX
IY
/ dt
/ Dn
/ dt
/ Dn
+1
+1
-1
-1
dt: 0 - 199
dt: -1 billion<dt<+1 billion
in decimal format
dt: H0 - HF FF FFF F
in hex format
dt: 0 - 199
dt: -1 billion<dt<+1 billion
in decimal format
dt: H0 - HF FF FFF F
in hex format
dt: 0 - 199
dt: -1 billion<dt<+1 billion
in decimal format
dt: H0 - HF FF FFF F
in hex format
dt: 0 - 199
Data Shift
9
Rotate Left
RSL
Dn
Rotates Dn to the left by 1 bit.
bit31
bit0
2
184
10
Rotate Right
RSR
Dn
Rotates Dn to the right by 1 bit.
bit31
bit0
2
185
Dn, bit, dt, *label
Jumps if a specified bit of
Dn is dt.
bit: 0 - 1F(31)
dt :0 or 1
4
174
mt, *label
Jumps if any error bit is ON.
bit1 Limit error
bit2 EMS INP UT
bit6 Stall error
bit7 Communication error
mt: motor #1 or #2.
3
176
Branch comma nds
11
Jump Bit
JBT
12
Jump Error
JER
mt, bit, *label
Jumps if a specified error bit
is ON.
13
Jump
Message
JMG
*label
±n
Branches based on the
transmission of the
message with the PC
*1
3
177
mt
T erminates the user program
if any of the error bits of
command "9CD" is ON.
bit1 Limit error
bit2 EMS INP UT
bit6 Stall error
bit7 Communication error
mt: motor #1 or #2.
1
172
14
214
Error End
EED
20. Table of User program Commands
No
Name
Command
Parameter
Description of function
Note
Steps
Page
Communication comma nds
15
16
*1
Send C haract er
Send data
SDC
dt
Sends dt.
Up to 16 ASCII characters
*1
3
186
SDD
Dn
HDn
Tn
HT n
Cn
HCn
Sends Dn in deci mal format (AS CII).
S e nds D n i n hex for m at (A S CII).
Sends Tn i n deci mal format (A S CII).
S e nds T n i n h ex for m at (A S CII).
Sends Cn in deci mal format (AS CII).
S e nds C n i n hex for m at (A S CII).
*1
2
186
To use these commands, you must issue a Link Master command " XID" to enable a user program message function in advance.
215
21. Table of Error Codes
21. Table of Error Codes
Error code
216
Type
Description
0x10
System error
One possible cause is a hardware error.
Contact us.
0x11
System error
One possible cause is a hardware error.
Contact us.
0x12
System error
One possible cause is a hardware error.
Contact us.
0x13
System error
One possible cause is a hardware error.
Contact us.
0x14
System error
One possible cause is a hardware error.
Contact us.
0x15
System error
One possible cause is a hardware error.
Contact us.
0x16
System error
One possible cause is a hardware error.
Contact us.
0x17
System error
One possible cause is a hardware error.
Contact us.
0x40
Command er ror
A low step p ulse has not been defined.
0x49
Command er ror
Invalid comma nd code.
0x4A
Command er ror
Invalid comma nd parameter.
0x4B
Communication error
Checksum error in a comma nd received from the RC-400.
0x4C
Command er ror
Attempted to r un a comma nd while a comma nd belo nging to the
same group is being e xec uted.
0x4D
Communication error
Failed to cha nge the trans fer rate of RS-485 port.
0x50
Command er ror
Attempted to r un a comma nd that ca nnot be e xecuted while a motor
is r unning .
0x51
Command er ror
Attempted to r un a mo ve comma nd while the EMS se nsor is active.
0x52
Command er ror
Attempted to r un a mo ve comma nd while a sta ll error has occur red.
0x54
Command er ror
The inter val of sta ll detection has not been specified.
0x55
Command er ror
Attempted to r un a mo ve comma nd while a CW or CCW limit error
has occur red.
0x56
Command er ror
Attempted to r un a c hange-speed command (i.e. "5AS" or "5DS")
while the motor is stopped.
0x5A
Command er ror
A user program has alread y been s tarted.
0x5B
Command er ror
A specified address in the user program is missing.
0x5D
Command er ror
A command parameter is out of va lid range.
0x5E
Command er ror
A moving distance is beyo nd 1 billion pulses.
0x66
Command er ror
After an error that was defined with the comma nd "CES" (error
output) occ urred, the error o utp ut has not been cleared.
0x67
Command er ror
Attempted to re-set a parameter that has been already specified.
21. Table of Error Codes
Error code
Type
Description
0x68
System error
One possible cause is a hardware error.
0x69
Command er ror
Invalid operation mode.
0x6F
Command er ror
The specified motor does not exist.
Contact us.
217
22. Optional Accessories
22. Optional Accessories
■ I/O Cables
■ Power Supply Cable ■ Communication Cable
Socket with flat cable
Model:RCC-26P□□□LC
↓
Socket with discrete wires
Model:RCB-26P□□□LC
↓
Length (cm):50, 100, 200, 300
Length (cm):50, 100, 200, 300
Flat cable (26 conductors)
with a single-sided socket
Discrete wire (AWG#24, BLUE,
26 pcs.) with a single-sided
socket ×1
×1
Coding pin ×1
■ Connectors
Socket with discrete wires
(for Power Supply)
Model:RCM-2P□□□L
↓
Socket with discrete wires
(for RS-485)
Model:RCM-4P□□□L
↓
Length (cm):50, 100, 200, 300
Length (cm):50, 100, 200, 300
Discrete wire (AWG#20, BLACK,
ORANGE, each 1 pc.) with a
single-sided MOLEX socket
(2 pins) ×1
Discrete wire (AWG#24, BLUE,
4 pcs.) with a single-sided
MOLEX socket (4 pins) ×1
Coding pin ×1
( Manufactured by OMRON )
Socket for flat cable
Model:RCF-26PC
Socket for discrete wires
(for AWG#24)
Model:RCR-26PC
Strain relief ×1
Semi cover ×1
Socket ×1
Socket ×1
Coding pin ×1
Coding pin ×1
■ Repair parts
Accessories for RC-410, 420
Model:RC4-ACC2
Contact for MOLEX socket
Model:RC4-ACC3
MOLEX socket (2・4 pins)
each 1 pc.
Contact ×50
Contact ×10
■ Tools
■ Attachment
Hand Crimper for
MOLEX connectors
Model:TOOL-57189-5000
Hand Crimper for
flat-cable connectors
Model:TOOL-901500
Hand Crimper for
Spacer for DIN rail
discrete-wire connectors Model:AESC-SA-406B
Model:TOOL-XY2B-7006 This is used when RC-4 series
Necessary when connecting
MOLEX sockets with discretewires.
Necessary when connecting
sockets with flat-cable.
Necessary when connecting
sockets with discrete-wires.
218
controllers are installed on
a DIN rail at intervals of
5mm.
A absolute move at high peed.................................................90
23. Index
B
0 00M ..........................................................................................78
1
2
3
5
6
9
04M ..........................................................................................78
0BD ..........................................................................................79
0BS...........................................................................................80
0QM .........................................................................................80
0RD ..........................................................................................81
0RS ..........................................................................................82
0SD ..........................................................................................82
0SS...........................................................................................83
0UD ..........................................................................................84
0US ..........................................................................................85
1+M ..........................................................................................86
1AD ..........................................................................................89
1AM..........................................................................................90
1AS...........................................................................................92
1-M ...........................................................................................87
2+M ..........................................................................................93
2AM..........................................................................................95
2-M ...........................................................................................94
3*S ...........................................................................................99
3/S ......................................................................................... 100
3+S...........................................................................................97
3CS ....................................................................................... 101
3ID ......................................................................................... 101
3IS ......................................................................................... 102
3ND ....................................................................................... 103
3PD ....................................................................................... 104
3PS........................................................................................ 105
3-S............................................................................................98
5AS........................................................................................ 106
5DS ....................................................................................... 106
5IS ......................................................................................... 107
5SS........................................................................................ 108
6PD ....................................................................................... 109
6PS........................................................................................ 110
9CD....................................................................................... 111
9CS ....................................................................................... 112
9MD....................................................................................... 113
9VD ....................................................................................... 113
9VS........................................................................................ 114
C
D
E
absolute move at low speed ................................................95
ADD .......................................................................................168
addition..................................................................................168
AND .......................................................................................169
and (logical and) ..................................................................169
auto-start function................................................................165
auto-start function, get the status......................................146
auto-start function, set the status ......................................146
bit set .....................................................................................170
body number...........................................................................11
BST........................................................................................170
CAD .......................................................................................115
CAL........................................................................................170
call..........................................................................................170
CAS........................................................................................115
CBS........................................................................................116
CED .......................................................................................117
CES........................................................................................118
changing to high speed while moving ..............................106
changing to low speed while moving ................................106
CID .........................................................................................119
CLD........................................................................................120
COD.......................................................................................121
command code.......................................................................49
command parameter .............................................................49
communication commands ..................................................77
completion-of-move factor, get ..........................................113
controller status......................................................................69
controller status, clear .........................................................112
controller status, get............................................................111
COS .......................................................................................122
counter set ............................................................................171
CPD .......................................................................................122
CPS........................................................................................123
CRD .......................................................................................124
CRS .......................................................................................125
CSD .......................................................................................126
CSS........................................................................................127
CTS........................................................................................171
current position, get.............................................................109
current position, set.............................................................110
data memory.........................................................................161
DCD.......................................................................................128
DCS .......................................................................................129
DEC .......................................................................................171
decrement.............................................................................171
DID .........................................................................................130
DIS .........................................................................................131
distributed control system.......................................................2
DIV .........................................................................................172
division...................................................................................172
down counters ......................................................................161
EAD........................................................................................132
EAS........................................................................................132
EED........................................................................................172
EMD.......................................................................................133
EMS .......................................................................................134
END .......................................................................................173
End.........................................................................................173
219
ERD.......................................................................................135
error end ...............................................................................172
error output function, set ....................................................118
error output, clear the status .............................................125
error output, get the status ................................................124
ESD.......................................................................................135
ESS .......................................................................................136
event mask ............................................................................. 75
event mask, get ...................................................................133
event mask, set ...................................................................134
event message ...................................................................... 75
event response ...................................................................... 75
event response, get all status ...........................................135
event response, get status types ......................................135
event response, set status types ......................................136
execution address, get .......................................................151
F FES........................................................................................137
FIS .........................................................................................137
flash memory ............................................................48,59,165
flash memory, clear ............................................................137
FPD .......................................................................................138
FPS........................................................................................138
FUD .......................................................................................139
FUS .......................................................................................139
G general purpose input......................................................12,72
general purpose output ...................................................13,73
general-purpose output port, set ......................................122
H home offset, get..................................................................... 82
home offset, set..................................................................... 83
home search .......................................................................... 78
home search compatible with RORZE RC-204................ 78
home sensor .......................................................................... 61
I immediate stop ....................................................................107
INC ........................................................................................173
increment..............................................................................173
Incrementing counter ..........................................................161
index memory ......................................................................162
initialization data, write .......................................................137
input logic for motor-control and general-purpose inputs,
get..........................................................................................130
input logic for motor-control and general-purpose inputs,
set..........................................................................................131
input port................................................................................. 12
interrupt mode, configure ...................................................123
interrupt mode, get..............................................................122
J JBT ........................................................................................174
JCP........................................................................................175
JER........................................................................................176
JMG.......................................................................................177
JMP .......................................................................................178
JOF........................................................................................179
JON .......................................................................................180
jump.......................................................................................178
jump bit .................................................................................174
jump compare ......................................................................175
jump error .............................................................................176
jump message .....................................................................177
jump off .................................................................................179
jump on .................................................................................180
L label.......................................................................................160
220
M
N
O
P
Q
last address (on the RAM), get ......................................... 150
LD.......................................................................................... 181
load........................................................................................ 181
locked.......................................................................................21
low step pulse, get.............................................................. 140
low step pulse, set .............................................................. 141
LSD ....................................................................................... 140
LSS........................................................................................ 141
maximum counts parameter used in a noise cancel
function for motor controlling and general-purpose input,
get.......................................................................................... 128
maximum counts parameter used in a noise cancel
function for motor controlling and general-purpose input,
set.......................................................................................... 129
memory flag ..................................................................159,161
motor-moving flag ............................................................... 159
moving data and low step No. used when two motors
move simultaneously, get .....................................................89
moving data and low step No. used when two motors
move simultaneously, set. ....................................................92
MUL....................................................................................... 182
multiplication ........................................................................ 182
number of available steps, get.......................................... 147
one address, execute ......................................................... 154
operation mode ......................................................................52
operation mode, get............................................................ 132
operation mode, set............................................................ 132
OR ......................................................................................... 183
or (logical or) ........................................................................ 183
output port .........................................................................13,71
outputting a one-shot pulse to a general output ............ 116
over-run factor, get ................................................................79
over-run factor, set.................................................................80
optional accessories ........................................................... 218
over-run pulse.........................................................................61
parameter ................................................................................77
parameters for error output function, get ........................ 117
parameters used to store a position when an interrupt
input port changes, get ...................................................... 115
parameters used to store a position when an interrupt
input port changes, get ...................................................... 115
photo-coupler isolation............................................................4
pin assignment .......................................................................12
position index..........................................................................60
position index, get............................................................... 101
position index, set ............................................................... 102
position pulse with a position number, get...................... 103
position pulse, add.................................................................97
position pulse, divide .......................................................... 100
position pulse, get............................................................... 104
position pulse, multiply..........................................................99
position pulse, set ............................................................... 105
position pulse, subtract .........................................................98
position pulses, clear .......................................................... 101
position pulses, read .......................................................... 138
position pulses, write .......................................................... 138
protocol......................................................................................8
QID ........................................................................................ 142
QIS ........................................................................................ 142
QRD ...................................................................................... 143
QRS ...................................................................................... 144
QSD ...................................................................................... 144
QSS....................................................................................... 145
R RAM area, clear .................................................................. 147
relative move in the CCW direction at high speed ...........87
relative move in the CCW direction at low speed .............94
relative move in the CW direction at high speed ..............86
relative move in the CW direction at low speed ................93
reply parameter ......................................................................49
reset ...................................................................................... 185
result buffer ...................................................................159,161
RET ....................................................................................... 184
retry counts of a home search, get .....................................81
retry counts of a home search, set......................................82
return..................................................................................... 184
rotate left .............................................................................. 184
rotate right ............................................................................ 185
RS-232C port..........................................................................48
RS-485 port.......................................................................11,19
RSL ....................................................................................... 184
RSR....................................................................................... 185
RST ....................................................................................... 185
rush current.............................................................................20
S SDC....................................................................................... 186
SDD....................................................................................... 186
send character..................................................................... 186
send data.............................................................................. 186
SET ....................................................................................... 187
set.......................................................................................... 187
stall detection function, enable ......................................... 145
stall detection function, get................................................ 144
stall detection plate ................................................................67
stall detection plate, locate the center position .................80
stall detection status, clear ................................................ 144
stall detection, activate..........................................................68
stall detection, get the interval period .............................. 142
stall detection, set the interval period .............................. 142
stall error status, get........................................................... 143
stand-alone control ..................................................................3
status .......................................................................................69
status of input ports used for motor control and general
purpose, get......................................................................... 119
status of output ports used for motor control and general
purpose, get......................................................................... 121
status related commands .....................................................48
stop after deceleration........................................................ 108
"stop based on a home sensor" function, configure .........85
"stop based on a home sensor" function, get....................84
SUB....................................................................................... 187
subtraction............................................................................ 187
T timer set................................................................................ 188
TMS....................................................................................... 188
troubleshooting .......................................................................40
U UAD....................................................................................... 146
UAS....................................................................................... 146
UBD....................................................................................... 147
UCS....................................................................................... 147
UDD ...................................................................................... 148
UDS....................................................................................... 149
UED....................................................................................... 150
UES........................................................................................150
UND .......................................................................................151
UPD .......................................................................................151
URD .......................................................................................152
URG.......................................................................................153
user comment, set...............................................................114
user memory, get.................................................................148
user memory, modify...........................................................149
user program command with address, get ......................151
user program command, get..............................................155
user program command, register ......................................156
user program commands ...................................................158
user program, abort.............................................................150
user program, get the run status .......................................152
user program, read ..............................................................139
user program, execute ........................................................153
user program, write .............................................................139
USG .......................................................................................154
UWD ......................................................................................155
UWS.......................................................................................156
V valid position range for interrupt, get ................................126
valid position range for interrupt, set ................................127
variables (memory)......................................................159,161
version info or a message, get ..........................................113
W wait.........................................................................................188
WAT.......................................................................................188
221
RORZE CORPORATION
◆Head Office (Japan)
1588 Michinoue, Kannabe-cho, Fukayasu-gun, Hiroshima
720-2104, Japan
Phone: +81-84-960-0001
Fax:
+81-84-960-0200
E-mail address: [email protected]
Home page address: http://www.rorze.com
*All RORZE products come with a 24-month guarantee.
*Specifications and products are subject to change without any obligation on the part of the manufacturer.
RCD 020508