Q173CPU (N) /Q172CPU (N) Motion Controller (SV13/SV22) Programming Manual (Motion SFC)
Q173CPU (N) /Q172CPU (N) Motion Controller (SV13/SV22) Programming Manual (Motion SFC)
Q173CPU (N) /Q172CPU (N) Motion Controller (SV13/SV22) Programming Manual (Motion SFC)
-Q172CPU
-Q173CPU
-Q172CPUN
-Q173CPUN
SAFETY PRECAUTIONS
(Please read these instructions before using this equipment.)
Before using this product, please read this manual and the relevant manuals introduced in this manual
carefully and pay full attention to safety to handle the product correctly.
These precautions apply only to this product. Refer to the Q173CPU(N)/Q172CPU(N) Users manual for a
description of the Motion controller safety precautions.
In this manual, the safety instructions are ranked as "DANGER" and "CAUTION".
Please save this manual to make it accessible when required and always forward it to the end user.
A-1
For Safe Operations
1. Prevention of electric shocks
DANGER
Never open the front case or terminal covers while the power is ON or the unit is running, as this
may lead to electric shocks.
Never run the unit with the front case or terminal cover removed. The high voltage terminal and
charged sections will be exposed and may lead to electric shocks.
Never open the front case or terminal cover at times other than wiring work or periodic
inspections even if the power is OFF. The insides of the Motion controller and servo amplifier are
charged and may lead to electric shocks.
Completely turn off the externally supplied power used in the system before mounting or
removing the module, performing wiring work, or inspections. Failing to do so may lead to electric
shocks.
When performing wiring work or inspections, turn the power OFF, wait at least ten minutes, and
then check the voltage with a tester, etc. Failing to do so may lead to electric shocks.
Be sure to ground the Motion controller, servo amplifier and servomotor. (Ground resistance :
100 or less) Do not ground commonly with other devices.
The wiring work and inspections must be done by a qualified technician.
Wire the units after installing the Motion controller, servo amplifier and servomotor. Failing to do
so may lead to electric shocks or damage.
Never operate the switches with wet hands, as this may lead to electric shocks.
Do not damage, apply excessive stress, place heavy things on or sandwich the cables, as this
may lead to electric shocks.
Do not touch the Motion controller, servo amplifier or servomotor terminal blocks while the power
is ON, as this may lead to electric shocks.
Do not touch the built-in power supply, built-in grounding or signal wires of the Motion controller
and servo amplifier, as this may lead to electric shocks.
A-2
3. For injury prevention
CAUTION
Do not apply a voltage other than that specified in the instruction manual on any terminal.
Doing so may lead to destruction or damage.
Do not mistake the terminal connections, as this may lead to destruction or damage.
Do not mistake the polarity ( + / - ), as this may lead to destruction or damage.
Do not touch the heat radiating fins of controller or servo amplifier, regenerative resistor and
servomotor, etc., while the power is ON and for a short time after the power is turned OFF. In this
timing, these parts become very hot and may lead to burns.
Always turn the power OFF before touching the servomotor shaft or coupled machines, as these
parts may lead to injuries.
Do not go near the machine during test operations or during operations such as teaching.
Doing so may lead to injuries.
4. Various precautions
Strictly observe the following precautions.
Mistaken handling of the unit may lead to faults, injuries or electric shocks.
(1) System structure
CAUTION
Always install a leakage breaker on the Motion controller and servo amplifier power source.
If installation of an electromagnetic contactor for power shut off during an error, etc., is specified in
the instruction manual for the servo amplifier, etc., always install the electromagnetic contactor.
Install the emergency stop circuit externally so that the operation can be stopped immediately and
the power shut off.
Use the Motion controller, servo amplifier, servomotor and regenerative resistor with the correct
combinations listed in the instruction manual. Other combinations may lead to fire or faults.
Use the Motion controller, base unit and motion module with the correct combinations listed in the
instruction manual. Other combinations may lead to faults.
If safety standards (ex., robot safety rules, etc.,) apply to the system using the Motion controller,
servo amplifier and servomotor, make sure that the safety standards are satisfied.
Construct a safety circuit externally of the Motion controller or servo amplifier if the abnormal
operation of the Motion controller or servo amplifier differ from the safety directive operation in the
system.
In systems where coasting of the servomotor will be a problem during the forced stop, emergency
stop, servo OFF or power supply OFF, use dynamic brakes.
Make sure that the system considers the coasting amount even when using dynamic brakes.
In systems where perpendicular shaft dropping may be a problem during the forced stop,
emergency stop, servo OFF or power supply OFF, use both dynamic brakes and electromagnetic
brakes.
A-3
CAUTION
The dynamic brakes must be used only on errors that cause the forced stop, emergency stop, or
servo OFF. These brakes must not be used for normal braking.
The brakes (electromagnetic brakes) assembled into the servomotor are for holding applications,
and must not be used for normal braking.
The system must have a mechanical allowance so that the machine itself can stop even if the
stroke limits switch is passed through at the max. speed.
Use wires and cables that have a wire diameter, heat resistance and bending resistance
compatible with the system.
Use wires and cables within the length of the range described in the instruction manual.
The ratings and characteristics of the parts (other than Motion controller, servo amplifier and
servomotor) used in a system must be compatible with the Motion controller, servo amplifier and
servomotor.
Install a cover on the shaft so that the rotary parts of the servomotor are not touched during
operation.
There may be some cases where holding by the electromagnetic brakes is not possible due to the
life or mechanical structure (when the ball screw and servomotor are connected with a timing belt,
etc.). Install a stopping device to ensure safety on the machine side.
A-4
CAUTION
Set the sequence function program capacity setting, device capacity, latch validity range, I/O
assignment setting, and validity of continuous operation during error detection to values that are
compatible with the system application. The protective functions may not function if the settings
are incorrect.
Some devices used in the program have fixed applications, so use these with the conditions
specified in the instruction manual.
The input devices and data registers assigned to the link will hold the data previous to when
communication is terminated by an error, etc. Thus, an error correspondence interlock program
specified in the instruction manual must be used.
Use the interlock program specified in the intelligent function module's instruction manual for the
program corresponding to the intelligent function module.
A-5
CAUTION
Always install the servomotor with reduction gears in the designated direction. Failing to do so
may lead to oil leaks.
Store and use the unit in the following environmental conditions.
Conditions
Environment
Motion controller/Servo amplifier Servomotor
Ambient 0°C to +40°C (With no freezing)
According to each instruction manual.
temperature (32°F to +104°F)
80% RH or less
Ambient humidity According to each instruction manual.
(With no dew condensation)
Storage -20°C to +65°C
According to each instruction manual.
temperature (-4°F to +149°F)
Indoors (where not subject to direct sunlight).
Atmosphere
No corrosive gases, flammable gases, oil mist or dust must exist
Altitude 1000m (3280.84ft.) or less above sea level
Vibration According to each instruction manual
When coupling with the synchronous encoder or servomotor shaft end, do not apply impact such
as by hitting with a hammer. Doing so may lead to detector damage.
Do not apply a load larger than the tolerable load onto the synchronous encoder and servomotor
shaft. Doing so may lead to shaft breakage.
When not using the module for a long time, disconnect the power line from the Motion controller
or servo amplifier.
Place the Motion controller and servo amplifier in static electricity preventing vinyl bags and store.
When storing for a long time, please contact with our sales representative.
Also, execute a trial operation.
A-6
(4) Wiring
CAUTION
Correctly and securely wire the wires. Reconfirm the connections for mistakes and the terminal
screws for tightness after wiring. Failing to do so may lead to run away of the servomotor.
After wiring, install the protective covers such as the terminal covers to the original positions.
Do not install a phase advancing capacitor, surge absorber or radio noise filter (option FR-BIF)
on the output side of the servo amplifier.
Correctly connect the output side (terminal U, V, W) and ground. Incorrect connections will lead
the servomotor to operate abnormally.
Do not connect a commercial power supply to the servomotor, as this may lead to trouble.
Do not mistake the direction of the surge absorbing diode
installed on the DC relay for the control signal output of brake Servo amplifier
signals, etc. Incorrect installation may lead to signals not being VIN
output when trouble occurs or the protective functions not (24VDC)
A-7
(6) Usage methods
CAUTION
Immediately turn OFF the power if smoke, abnormal sounds or odors are emitted from the
Motion controller, servo amplifier or servomotor.
Always execute a test operation before starting actual operations after the program or
parameters have been changed or after maintenance and inspection.
Do not attempt to disassemble and repair the units excluding a qualified technician whom our
company recognized.
Do not make any modifications to the unit.
Keep the effect or electromagnetic obstacles to a minimum by installing a noise filter or by using
wire shields, etc. Electromagnetic obstacles may affect the electronic devices used near the
Motion controller or servo amplifier.
When using the CE Mark-compliant equipment, refer to the "EMC Installation Guidelines" (data
number IB(NA)-67339) for the Motion controllers and refer to the corresponding EMC guideline
information for the servo amplifiers, inverters and other equipment.
Use the units with the following conditions.
Item Conditions
Input power According to each instruction manual.
Input frequency According to each instruction manual.
Tolerable momentary power failure According to each instruction manual.
Servomotor
RA1 EMG
Electromagnetic
brakes
24VDC
If an error occurs, remove the cause, secure the safety and then resume operation after alarm
release.
The unit may suddenly resume operation after a power failure is restored, so do not go near the
machine. (Design the machine so that personal safety can be ensured even if the machine
restarts suddenly.)
A-8
(8) Maintenance, inspection and part replacement
CAUTION
Perform the daily and periodic inspections according to the instruction manual.
Perform maintenance and inspection after backing up the program and parameters for the Motion
controller and servo amplifier.
Do not place fingers or hands in the clearance when opening or closing any opening.
Periodically replace consumable parts such as batteries according to the instruction manual.
Do not touch the lead sections such as ICs or the connector contacts.
Before touching the module, always touch grounded metal, etc. to discharge static electricity from
human body. Failure to do so may cause the module to fail or malfunction.
Do not directly touch the module's conductive parts and electronic components.
Touching them could cause an operation failure or give damage to the module.
Do not place the Motion controller or servo amplifier on metal that may cause a power leakage
or wood, plastic or vinyl that may cause static electricity buildup.
Do not perform a megger test (insulation resistance measurement) during inspection.
When replacing the Motion controller or servo amplifier, always set the new module settings
correctly.
When the Motion controller or absolute value motor has been replaced, carry out a home
position return operation using one of the following methods, otherwise position displacement
could occur.
1) After writing the servo data to the Motion controller using programming software, switch on the
power again, then perform a home position return operation.
2) Using the backup function of the programming software, load the data backed up before
replacement.
After maintenance and inspections are completed, confirm that the position detection of the
absolute position detector function is correct.
Do not drop or impact the battery installed to the module.
Doing so may damage the battery, causing battery liquid to leak in the battery. Do not use the
dropped or impacted battery, but dispose of it.
Do not short circuit, charge, overheat, incinerate or disassemble the batteries.
The electrolytic capacitor will generate gas during a fault, so do not place your face near the
Motion controller or servo amplifier.
The electrolytic capacitor and fan will deteriorate. Periodically replace these to prevent secondary
damage from faults. Replacements can be made by our sales representative.
Lock the control panel and prevent access to those who are not certified to handle or install
electric equipment.
Do not burn or break a module and servo amplifier. Doing so may cause a toxic gas.
A-9
(9) About processing of waste
When you discard Motion controller, servo amplifier, a battery (primary battery) and other option
articles, please follow the law of each country (area).
CAUTION
This product is not designed or manufactured to be used in equipment or systems in situations
that can affect or endanger human life.
When considering this product for operation in special applications such as machinery or systems
used in passenger transportation, medical, aerospace, atomic power, electric power, or
submarine repeating applications, please contact your nearest Mitsubishi sales representative.
Although this product was manufactured under conditions of strict quality control, you are strongly
advised to install safety devices to forestall serious accidents when it is used in facilities where a
breakdown in the product is likely to cause a serious accident.
A - 10
REVISIONS
The manual number is given on the bottom left of the back cover.
Print Date Manual Number Revision
Jun., 2002 IB(NA)-0300042-A First edition
Feb., 2004 IB(NA)-0300042-B [Addition model]
Q173CPUN-T/Q172CPUN-T, A31TU-D3K13/A31TU-DNK13,
Q172EX-S1, Q173PX-S1, Q00CPU, Q01CPU, 64AD, Q68ADV, Q68ADI,
Q62DA, Q64DA, Q68DAV, Q68DAI, Q170TUD3CBL3M,
Q170TUDNCBL3M, Q170TUDNCBL03M-A, Q170TUTM, A31TUD3TM,
FR-V5 0- , Software for SV43
[Addition function]
For WindowsXP, Home position return function, ROM operation function,
Online change function
[Additional correction/partial correction]
Safety precautions, About processing of waste, Startup slow of the
Multiple CPU system, User file list, Error code list, etc.
[partial correction]
Mar., 2006 IB(NA)-0300042-C [Addition model]
Q62P, Q172EX-S2, Q172EX-S3, Q170ENC
[Addition function]
Cam axis command signal, Smoothing clutch complete signal, Gain
changing signal, Real mode axis information register, Motion SFC
instruction "FMOV", Bit device setting by Motion SFC instruction, Security
function
[Additional correction/partial correction]
Safety precautions, User file list, Error code list, Warranty, Manual model
code (1CT781 1XB781), etc.
Apr., 2010 IB(NA)-0300042-D [Additional correction/partial correction]
Safety precautions, "1.6.1 I/O No. for I/O modules and intelligent function
modules", Warranty
This manual confers no industrial property rights or any rights of any other kind, nor does it confer any patent
licenses. Mitsubishi Electric Corporation cannot be held responsible for any problems involving industrial property
rights which may occur as a result of using the contents noted in this manual.
A - 11
INTRODUCTION
CONTENTS
1. OVERVIEW 1- 1 to 1-96
1.1 Overview................................................................................................................................................... 1- 1
1.2 Features ................................................................................................................................................... 1- 3
1.2.1 Features of Motion CPU ................................................................................................................... 1- 3
1.2.2 Basic specifications of Q173CPU(N)/Q172CPU(N)......................................................................... 1- 6
1.2.3 Operation control/transition control specifications ........................................................................... 1- 9
1.2.4 Differences between Q173CPU(N)/Q172CPU(N)and A173UHCPU/A172SHCPUN.................... 1-13
1.2.5 Positioning dedicated devices/special relays/special registers ....................................................... 1-15
1.3 Hardware Configuration ........................................................................................................................... 1-55
1.3.1 Motion system configuration ............................................................................................................. 1-55
1.3.2 Q173CPU(N) System overall configuration...................................................................................... 1-61
1.3.3 Q172CPU(N) System overall configuration...................................................................................... 1-63
1.3.4 Software packages............................................................................................................................ 1-65
1.3.5 Restrictions on motion systems........................................................................................................ 1-69
1.4 Multiple CPU System ............................................................................................................................... 1-71
1.4.1 Overview............................................................................................................................................ 1-71
1.4.2 Installation of PLC CPU and Motion CPU ........................................................................................ 1-72
1.4.3 Precautions for using Q series I/O modules and intelligent function modules................................ 1-73
1.4.4 Modules subject to installation restrictions ....................................................................................... 1-74
1.4.5 Processing time of the Multiple CPU system ................................................................................... 1-75
1.4.6 How to reset the Multiple CPU system............................................................................................. 1-76
1.4.7 Processing at a CPU DOWN error occurrence by a PLC CPU or Q173CPU(N)/Q172CPU(N).... 1-77
1.5 System Settings ....................................................................................................................................... 1-80
1.5.1 System data settings......................................................................................................................... 1-80
1.5.2 Common system parameters ........................................................................................................... 1-81
1.5.3 Individual parameters........................................................................................................................ 1-87
1.6 Assignment of I/O No............................................................................................................................... 1-92
1.6.1 I/O No. for I/O modules and intelligent function modules ................................................................ 1-92
1.6.2 I/O No. of PLC CPU and Q173CPU(N)/Q172CPU(N)..................................................................... 1-95
1.6.3 Setting I/O No. ................................................................................................................................... 1-96
A - 12
3. COMMUNICATION BETWEEN THE PLC CPU AND THE MOTION CPU IN
THE MULTIPLE CPU SYSTEM 3- 1 to 3-26
A - 13
6.9.2 Selective branch, selective coupling................................................................................................. 6-19
6.9.3 Parallel branch, parallel coupling...................................................................................................... 6-20
6.10 Y/N Transitions....................................................................................................................................... 6-22
6.11 Motion SFC Comments ......................................................................................................................... 6-26
A - 14
7.8 Bit Device Statuses .................................................................................................................................. 7-46
7.8.1 ON (Normally open contact) : (None) ............................................................................................... 7-46
7.8.2 OFF (Normally closed contact) : !..................................................................................................... 7-47
7.9 Bit Device Controls................................................................................................................................... 7-48
7.9.1 Device set : SET................................................................................................................................ 7-48
7.9.2 Device reset : RST ............................................................................................................................ 7-50
7.9.3 Device output : DOUT ....................................................................................................................... 7-52
7.9.4 Device input : DIN ............................................................................................................................. 7-53
7.9.5 Bit device output : OUT .................................................................................................................... 7-54
7.10 Logical Operations ................................................................................................................................. 7-56
7.10.1 Logical acknowledgement : (None) ................................................................................................ 7-56
7.10.2 Logical negation : ! .......................................................................................................................... 7-57
7.10.3 Logical AND : * ................................................................................................................................ 7-58
7.10.4 Logical OR : +.................................................................................................................................. 7-59
7.11 Comparison Operations......................................................................................................................... 7-60
7.11.1 Equal to : == .................................................................................................................................... 7-60
7.11.2 Not equal to : != ............................................................................................................................... 7-61
7.11.3 Less than : <.................................................................................................................................... 7-62
7.11.4 Less than or equal to : <= ............................................................................................................... 7-63
7.11.5 More than : > ................................................................................................................................... 7-64
7.11.6 More than or equal to : >=............................................................................................................... 7-65
7.12 Motion-Dedicated Functions(CHGV, CHGT) ........................................................................................ 7-66
7.12.1 Speed change request : CHGV ...................................................................................................... 7-66
7.12.2 Torque limit value change request : CHGT.................................................................................... 7-72
7.13 Other Instructions................................................................................................................................... 7-74
7.13.1 Event task enable : EI ..................................................................................................................... 7-74
7.13.2 Event task disable : DI .................................................................................................................... 7-75
7.13.3 No operation : NOP......................................................................................................................... 7-76
7.13.4 Block transfer : BMOV .................................................................................................................... 7-77
7.13.5 Same data block transfer : FMOV .................................................................................................. 7-80
7.13.6 Write device data to shared CPU memory of the self CPU : MULTW .......................................... 7-82
7.13.7 Read device data from shared CPU memory of the other CPU: MULTR..................................... 7-85
7.13.8 Write device data to intelligent function module/special function module : TO............................. 7-88
7.13.9 Read device data from intelligent function module/special function module : FROM .................. 7-91
7.13.10 Time to wait : TIME ....................................................................................................................... 7-94
7.14 Comment Statement : //......................................................................................................................... 7-96
8. TRANSITION PROGRAMS 8- 1 to 8- 2
A - 15
9.5 Programming Instructions........................................................................................................................ 9-22
9.5.1 Cancel • start ..................................................................................................................................... 9-22
9.5.2 Indirect designation using motion devices........................................................................................ 9-22
A - 17
About Manuals
Related Manuals
A - 18
(2) PLC
Manual Number
Manual Name
(Model Code)
QCPU User's Manual (Hardware Design, Maintenance and Inspection)
This manual explains the specifications of the QCPU modules, power supply modules, base units,
SH-080483ENG
extension cables, memory card battery, and the maintenance/inspection for the system, trouble shooting,
(13JR73)
error codes and others.
(Optional)
A - 19
MEMO
A - 20
1 OVERVIEW
1. OVERVIEW
1.1 Overview 1
This programming manual describes the Motion SFC program and Multiple CPU
system of the operating system software packages "SW6RN-SV13Q ", "SW6RN-
SV22Q " for Motion CPU module(Q173CPU(N)/Q172CPU(N)).
In this manual, the following abbreviations are used.
Generic term/Abbreviation Description
Q173CPU(N)/Q172CPU(N) or Q173CPUN/Q172CPUN/Q173CPUN-T/Q172CPUN-T/Q173CPU/Q172CPU
Motion CPU (module) Motion CPU module
Q172LX Servo external signals interface module/
Q172LX/Q172EX/Q173PX (Note-1)
Q172EX(-S1/-S2/-S3) Serial absolute synchronous encoder interface module /
or Motion module
Q173PX(-S1) Manual pulse generator interface module
MR-H-BN Servo amplifier model MR-H BN
MR-J2 -B Servo amplifier model MR-J2S- B/MR-J2M-B/MR-J2- B/MR-J2-03B5
General name for "Servo amplifier model MR-H BN/MR-J2S- B/MR-J2M-B/
AMP or Servo amplifier
MR-J2- B/MR-J2-03B5, Vector inverter FREQROL-V500 series"
QCPU, PLC CPU
Qn(H)CPU
or PLC CPU module
Multiple CPU system
Abbreviation for "Multiple PLC system of the Q series"
or Motion system
Abbreviation for "CPU No.n (n= 1 to 4) of the CPU module for the Multiple CPU
CPUn
system"
Programming software package General name for "MT Developer" and "GX Developer"
Operating system software General name for "SW RN-SV Q "
Operating system software for conveyor assembly use (Motion SFC) :
SV13
SW6RN-SV13Q
Operating system software for automatic machinery use (Motion SFC) :
SV22
SW6RN-SV22Q
MT Developer Abbreviation for Integrated start-up support software package "MT Developer"
1-1
1 OVERVIEW
REMARK
For information about the each module, design method for program and parameter,
refer to the following manuals relevant to each module.
Item Reference Manual
Motion CPU module/Motion unit Q173CPU(N)/Q172CPU(N) User’s Manual
PLC CPU, peripheral devices for PLC program design, I/O
Manual relevant to each module
modules and intelligent function module
Operation method for MT Developer Help of each software
• Design method for positioning control
program in the real mode Q173CPU(N)/Q172CPU(N) Motion controller
SV13/SV22
• Design method for positioning control (SV13/SV22) Programming Manual (REAL MODE)
parameter
SV22 • Design method for mechanical system Q173CPU(N)/Q172CPU(N) Motion controller (SV22)
(Virtual mode) program Programming Manual (VIRTUAL MODE)
1-2
1 OVERVIEW
1.2 Features
The Motion CPU and Multiple CPU system have the following features.
(b) The Motion CPU and PLC CPU are selected flexibly, and the Multiple CPU
system up to 4 CPU modules can be realized.
The Motion CPU module for the number of axis to be used can be selected.
Q173CPU(N) : Up to 32 axes
Q172CPU(N) : Up to 8 axes
The PLC CPU module for the program capacity to be used can be selected.
(One or more PLC CPU is necessary with the Multiple CPU system.)
Q00CPU : 8k steps
Q01CPU : 14k steps
Q02CPU, Q02HCPU : 28k steps
Q06HCPU : 60k steps
Q12HCPU : 124k steps
Q25HCPU : 252k steps
(c) The device data of other CPU can be used as the device data of self CPU
because the Multiple CPU automatic refresh may do automatically data
giving and receiving between each CPU of the Multiple CPU system.
(d) The device data access of the Motion CPU and the Motion SFC program
start can be executed from PLC CPU by the Motion dedicated PLC
instruction.
(b) Since transition conditions are judged with Motion CPU side and positioning
starts, there is not dispersion in the response time influenced by PLC scan
time.
1-3
1 OVERVIEW
(c) High speed and high response processing is realizable with the step
processing method (only active steps) of Motion SFC.
(d) Not only positioning control but also numerical operations, device SET/RST,
etc. can be processed with Motion CPU side, making via PLC CPU is
unnecessary and a tact time can be shortened.
(g) Motion SFC program that responds and executes it at high speed for
interrupt input from external source can be set.
(h) Motion SFC program executed in the fixed cycle (0.88ms, 1.77ms, 3.55ms,
7.11ms, 14.2ms) by synchronizing to the Motion operation cycle can be set.
(b) High speed PLC control is possible by the Q series PLC CPU.
(For LD instruction)
Q02HCPU, Q06HCPU, Q12HCPU, Q25HCPU : 0.034[µs]
Q02CPU : 0.079[µs]
Q00CPU : 0.16[µs]
Q01CPU : 0.10[µs]
(4) Connection between the Motion controller and servo amplifier with
high speed serial communication by SSCNET
High speed serial communication by SSCNET connect between the Motion
controller and servo amplifier, and batch control the charge of servo parameter,
servo monitor and test operation, etc.
It is also realised reduce the number of wires.
(5) The operating system software package for your application needs
By installing the operating system software for applications in the internal flash
memory of the Motion CPU, the Motion controller suitable for the machine can be
realized.
And, it also can correspond with the function improvement of the software
package.
(a) Conveyor assembly use (SV13)
Offer liner interpolation, circular interpolation, helical interpolation, constant-
speed control, speed control, fixed-pitch feed and etc. by the dedicated
servo instruction. Ideal for use in conveyors and assembly machines.
1-4
1 OVERVIEW
1-5
1 OVERVIEW
1-6
1 OVERVIEW
1-7
1 OVERVIEW
1-8
1 OVERVIEW
1-9
1 OVERVIEW
1 - 10
1 OVERVIEW
= Substitution =
(D) (S) 4 — 7.4.1
+ Addition (S1)+(S2) 4 — 7.4.2
- Subtraction (S1)-(S2) 4 — 7.4.3
Binary operation
* Multiplication (S1)*(S2) 4 — 7.4.4
/ Division (S1)/(S2) 4 — 7.4.5
% Remainder (S1)%(S2) 4 — 7.4.6
~ Bit inversion (complement) ~(S) 2 — 7.5.1
& Bit logical AND (S1)&(S2) 4 — 7.5.2
| Bit logical OR (S1)|(S2) 4 — 7.5.3
Bit operation
^ Bit exclusive OR (S1)^(S2) 4 — 7.5.4
>> Bit right shift (S1)>>(S2) 4 — 7.5.5
<< Bit left shift (S1)<<(S2) 4 — 7.5.6
Sign - Sign inversion (complement of 2) -(S) 2 — 7.5.7
SIN Sine SIN(S) 2 — 7.6.1
COS Cosine COS(S) 2 — 7.6.2
TAN Tangent TAN(S) 2 — 7.6.3
ASIN Arcsine ASIN(S) 2 — 7.6.4
ACOS Arccosine ACOS(S) 2 — 7.6.5
ATAN Arctangent ATAN(S) 2 — 7.6.6
SQRT Square root SQRT(S) 2 — 7.6.7
Standard function LN Natural logarithm LN(S) 2 — 7.6.8
EXP Exponential operation EXP(S) 2 — 7.6.9
ABS Absolute value ABS(S) 2 — 7.6.10
RND Round-off RND(S) 2 — 7.6.11
FIX Round-down FIX(S) 2 — 7.6.12
FUP Round-up FUP(S) 2 — 7.6.13
BIN BCD BIN conversion BIN(S) 2 — 7.6.14
BCD BIN BCD conversion BCD(S) 2 — 7.6.15
SHORT Convert into 16-bit integer type (signed) SHORT(S) 2 — 7.7.1
USHORT Convert into 16-bit integer type (unsigned) USHORT(S) 2 — 7.7.2
LONG Convert into 32-bit integer type (signed) LONG(S) 2 — 7.7.3
Type conversion ULONG Convert into 32-bit integer type (unsigned) ULONG(S) 2 — 7.7.4
Regard as signed data and convert into 64-
FLOAT FLOAT(S) 2 — 7.7.5
bit floating point type
Regard as unsigned data and convert into
UFLOAT UFLOAT(S) 2 — 7.7.6
64-bit floating point type
(None) ON (normally open contact) (S) 2 7.8.1
Bit device status
! OFF (normally closed contact) !(S) 2 7.8.2
SET(D) 3 —
SET Device set SET(D)= (conditional 7.9.1
4 —
expression)
RST(D) 3 —
RST Device reset RST(D)=(conditional 7.9.2
Bit device control 4 —
expression)
DOUT Device output DOUT(D),(S) 4 — 7.9.3
DIN Device input DIN(D),(S) 4 — 7.9.4
OUT(D)=(conditional
OUT Bit device output 4 — 7.9.5
expression)
1 - 11
1 OVERVIEW
: Usable —: Unusable
1 - 12
1 OVERVIEW
Programming tool IBM PC/AT, A31TU-D PC9800 series, IBM PC/AT, A30TU, A31TU
Peripheral devices I/F USB/RS-232/SSCNET RS-422/SSCNET
Proximity dog type(2 types), Count type(3 types),
Data set type(2 types), Dog cradle type,
Proximity dog type, count type,
Home position return function Stopper type(2 types), Limit switch conbined type
data set type 1
(Home position return retry function provided,
Home position shift function provided)
Manual pulse generator operation
Possible to connect 3 modules
function Possible to connect
Syncronous encoder operation Possible to connect Possible to connect Possible to connect 1 module
function 12 modules 8 modules 4 modules
Limit switch output function Output points : 32points, watch data : motion control data/word device
Number of SSCNET Interfaces
(Included SSCNET interface 1CH to 5CH (Note-1) 2CH 4CH 2CH
the parsonal computer)
Up to 64 slots
Number of motion slots 8 slots 2 slots
(Up to 7 extension bases of the Q series)
Q172LX : 4 modules Q172LX : 1 module
Number of Motion related modules Q172EX : 6 modules Q172EX : 4 modules A172SENC : 4 modules A172SENC : 1 module
Q173PX : 4 modules (Note-2) Q173PX : 3 modules (Note-2)
Normal task Executed in motion main cycle
Fixed Executed in fixed cycle Executed in fixed cycle
Execute specification
Event task cycle (0.88ms, 1.77ms, 3.55ms, 7.11ms, 14.2ms) (1.77ms, 3.55ms, 7.11ms, 14.2ms)
(Execution External Executed when input on is set among interrupt Executed when input on is set among
Motion SFC
1 - 13
1 OVERVIEW
Devices
Counter coils (CC) — 1024 points 256 points
(internal
motion Special relays (M) 256 points
CPU only) Data registers (D) 8192 points 1024 points
1 - 14
1 OVERVIEW
Overall configuration
SV13 SV22
M3136 Special relay allocated device M3136 Special relay allocated device
(Command signal) (Command signal)
to (64 points) to (64 points)
M3200 M3200 Axis command signal
Axis command signal (20 points 32 axes)
to (20 points 32 axes) to Real mode……Each axis
Virtual mode….Output module
M3840 M3840 Unusable (Note-1)
to (160 points)
M4000 Virtual servomotor axis status (Note-1,2)
(20 points 32 axes)
User device to
to (Mechanical system setting axis only)
(960 points)
M4640 Synchronous encoder axis
to status (Note-2) (4 points 12 axes)
M4688
to Unusable (Note-1)
M4799 M4799
1 - 15
1 OVERVIEW
Overall configuration(Continued)
SV13 SV22
1 - 16
1 OVERVIEW
MEMO
1 - 17
1 OVERVIEW
1 - 18
1 OVERVIEW
1 - 19
1 OVERVIEW
1 - 20
1 OVERVIEW
1 - 21
1 OVERVIEW
1 - 22
1 OVERVIEW
M4005 + 20n
Unusable
M4006 + 20n
M4008 + 20n
M4009 + 20n
M4010 + 20n
M4011 + 20n
M4012 + 20n
M4014 + 20n
M4015 + 20n
M4016 + 20n
M4017 + 20n
M4018 + 20n
1 - 23
1 OVERVIEW
1 - 24
1 OVERVIEW
1 - 25
1 OVERVIEW
1 - 26
1 OVERVIEW
1 - 27
1 OVERVIEW
1 - 28
1 OVERVIEW
1 - 29
1 OVERVIEW
Command
Main signal
M2000 PLC ready flag M2000 PLC ready flag M3072
cycle (Note-1)
M2036 M2036
Unusable Unusable — — —
M2037 M2037
At debug
Status
M2038 Motion SFC debugging flag M2038 Motion SFC debugging flag mode
signal
transition
Immedi- Status
M2039 Motion SFC error detection flag M2039 Motion SFC error detection flag ate signal
Command
Speed switching point specified Speed switcing point specified signal
M2040 M2040 At start M3073
flag flag (Note-1)
Operation Status
M2041 System setting error flag M2041 System setting error flag cycle signal
Operation
M2042 All axes servo ON command M2042 All axes servo ON command M3074
cycle Command
signal
At virtual (Note-1)
Real mode/virtual mode
M2043 M2043 mode M3075
switching request transition
Real mode/virtual mode
M2044 M2044
Unusable switching status
At virtual
Real mode/virtual mode mode
M2045 M2045 transition
Status
switching error detection flag signal
M2046 M2046 Out-of-sync warning
Operation
M2047 Motion slot fault detection flag M2047 Motion slot fault detection flag cycle
Command
JOG operation simultaneous start JOG operation simultaneous start Main signal
M2048 M2048 M3076
command command cycle (Note-1)
Operation Status
M2049 All axes servo ON accept flag M2049 All axes servo ON accept flag cycle signal
1 - 30
1 OVERVIEW
Operation Status
M2054 Operation cycle over flag M2054 Operation cycle over flag cycle signal
M2055 M2055
to Unusable to Unusable — — —
M2060 M2060
M2093 M2093
to Unusable — — —
M2100
M2113
to Unusable — — —
M2127 M2127
to to to status
Main shaft (Note-6)
M2222 side
to Unusable Output
axis 32 Auxiliary input
M2223 side
M2224
to Unusable — — —
M2239 M2239
M2272 M2272
to Unusable to Unusable — — —
M2319 M2319
1 - 31
1 OVERVIEW
CAUTION
The data executed later becomes effective when the same device is executed simultaneously
in the Motion SFC and PLC program.
1 - 32
1 OVERVIEW
Operation
M2332 External forced stop input flag M9076
cycle
Manual pulse generator axis setting
M2333 M9077
error flag
Error Status signal
M2334 TEST mode request error flag occurrence M9078
M2349
to Unusable — — — —
M2399
1 - 33
1 OVERVIEW
Remark
Device No. Signal name Refresh cycle Fetch cycle Signal direction (Note-1) , (Note-2)
M3081
to Unusable — — — —
M3135
(Note-1) : The device of a remarks column turns ON by OFF to ON of the above device, and the device of a remarks column turns
OFF by ON to OFF of the above device. The state of a device is not in agreement when the device of a remarks column
is turned on directly. In addition, when the request from a data register and the request from the above device are
performed simultaneously, the request from the above device becomes effective.
(Note-2) : It can also be ordered the device of a remark column.
(Note-3) : M3080 does not turn off automatically. Turn it off as an user side.
Remark
Device No. Signal name Refresh cycle Fetch cycle Signal direction (Note-1), (Note-2)
M3140
to Unusable — — — —
M3199
(Note-1) : The device of a remarks column turns ON by OFF to ON of the above device, and the device of a remarks column turns
OFF by ON to OFF of the above device. The state of a device is not in agreement when the device of a remarks column
is turned on directly.
(Note-2) : It can also be ordered the device of a remark column.
1 - 34
1 OVERVIEW
Overall configuration
SV13 SV22
D704 D704
Common device (Command signal) Common device (Command signal)
to (54 points) to (54 points)
D758 D758
Common device (Monitor) Common device (Monitor)
to (42points) to (42points)
D1240
Cam axis monitor device (Note)
to (10 points 32 axes)
D1560
User device
to
(7392 points)
User device
to
(6632 points)
D8191 D8191
(Note) : It can be used as an user device in the SV22 real mode only.
1 - 35
1 OVERVIEW
1 - 36
1 OVERVIEW
1 - 37
1 OVERVIEW
1 - 38
1 OVERVIEW
MEMO
1 - 39
1 OVERVIEW
1 - 40
1 OVERVIEW
1 - 41
1 OVERVIEW
1 - 42
1 OVERVIEW
1 - 43
1 OVERVIEW
1 - 44
1 OVERVIEW
1 - 45
1 OVERVIEW
Signal Signal
Device No. Signal name Device No. Signal name
derecrtion derecrtion
D704 PLC ready flag request D740 Axis 21
Speed switching point specified flag
D705 D741 Axis 22
request
D706 All axes servo ON command request Command D742 Axis 23
Real mode/virtual mode switching device
D707 D743 Axis 24
request (SV22)
JOG operation simultaneous start
D708 D744 Axis 25
command request Manual pulse generators 1
D709 Unusable — D745 Axis 26 pulse input magnification
(Note-1, 2)
D710 D746 Axis 27 setting register
JOG operation simultaneous start
to D747 Axis 28
axis setting register
D713 D748 Axis 29
Command
D749 Axis 30
D714 Manual pulse generator axis 1 No. device
D750 Axis 32
D715 setting register
D751 Axis 32
Manual pulse generator 1 smoothing
D716 Manual pulse generator axis 2 No. D752
magnification setting register
D717 setting register
Manual pulse generator 2 smoothing
D753
magnification setting register
D718 Manual pulse generator axis 3 No.
D719 setting register Manual pulse generator 3 smoothing
D754
magnification setting register
D720 Axis 1 D755 Manual pulse generator 1 enable flag request
D721 Axis 2 D756 Manual pulse generator 2 enable flag request
D722 Axis 3 D757 Manual pulse generator 3 enable flag request
Command
D723 Axis 4 D758 Unusable —
device
D724 Axis 5 PCPU ready complete flag status Monitor
D759
D725 Axis 6 (0 : OFF/1 : ON) device
D726 Axis 7 D760
D727 Axis 8 to Unusable —
D728 Axis 9 Manual pulse generators 1 D789
D729 Axis 10 pulse input magnification D790
Real mode axis information register (SV22)
D730 Axis 11 setting register (Note-1, 2) D791
Monitor
D731 Axis 12 D792
device
D732 Axis 13 to Servo amplifier type
D733 Axis 14 D799
D734 Axis 15
D735 Axis 16
D736 Axis 17
D737 Axis 18
D738 Axis 19
D739 Axis 20
(Note-1) : The range of axis No.1 to 8 is valid in the Q172CPU(N).
(Note-2) : Device area of 9 axes or more is unusable in the Q172CPU(N).
1 - 46
1 OVERVIEW
The headings in the table that follows have the following meanings.
Item Explanation
No. • Indicates the device No. of the special relay.
Name • Indicates the name of the special relay.
Meaning • Indicates the nature of the special relay.
Details • Indicates detailed information about the nature of the special relay.
• Indicates whether the relay is set by the system or user, and, if it is set by system, when
setting is performed.
<Set by>
S : Set by system (Motion CPU)
U : Set by user (Motion SFC program or test operation using a peripheral device)
S/U : Set by both system (Motion CPU) and user
Set by <When set> Indicated only if setting is done by system (Motion CPU) .
(When set) Main process : Set during each main processing (free time processing of the CPU)
Initial process : Set only during initial processing (when power supply is turned ON, or
when executed the reset)
Status change : Set only when there is a change in status
Error : Set when error is occurred.
Request : Set only when there is a user request (Special reray, etc.)
Operation cycle : Set during each operation cycle of the Motion CPU.
1 - 47
1 OVERVIEW
1 - 48
1 OVERVIEW
1 - 49
1 OVERVIEW
OFF : CPU No.1 normal • Turn off when the CPU No.1 is normal. (It contains at
M9244 CPU No.1 error flag ON : On CPU No.1 stop continuation error.)
error • Turn on during stop error of the CPU No.1. (Note-2)
OFF : CPU No.2 normal • Turn off when the CPU No.2 is normal. (It contains at
M9245 CPU No.2 error flag ON : On CPU No.2 stop continuation error.)
error • Turn on during stop error of the CPU No.2. (Note-2) New
S(Change status) (Note-1)
OFF : CPU No.3 normal • Turn off when the CPU No.3 is normal. (It contains at
M9246 CPU No.3 error flag ON : On CPU No.3 stop continuation error.)
error • Turn on during stop error of the CPU No.3. (Note-2)
OFF : CPU No.4 normal • Turn off when the CPU No.4 is normal. (It contains at
M9247 CPU No.4 error flag ON : On CPU No.4 stop continuation error.)
error • Turn on during stop error of the CPU No.4. (Note-2)
(Note-1) : It adds newly at the Motion controller Q series.
(Note-2) : The CPU No.1 is reset after the factor of the stop error is removed to cancel a stop error. Resetting is cancelled.
1 - 50
1 OVERVIEW
The headings in the table that follows have the following meanings.
Item Explanation
Number • Indicates the No. of the special register.
Name • Indicates the name of the special register.
Meaning • Indicates the nature of the special register.
Details • Indicates detailed information about the nature of the special register.
• Indicates whether the register is set by the system or user, and, if it is set by system,
when setting is performed.
<Set by>
S : Set by system (Motion CPU)
U : Set by user (Motion SFC program or test operation using a peripheral device)
S/U : Set by both system (Motion CPU) and user
Set by <When set> Indicated only if setting is done by system (Motion CPU) .
(When set) Main process : Set during each main processing (free time processing of the CPU)
Initial process : Set only during initial processing (when power supply is turned ON, or
when executed the reset)
Status change : Set only when there is a change in status
Error : Set when error is occurred.
Request : Set only when there is a user request (Special reray , etc.)
Operation cycle : Set during each operation cycle of the Motion CPU.
1 - 51
1 OVERVIEW
• The day when data on D9008 are updated, and the hour stored with a BCD
Diagnostic error code two digits.
Diagnostic error
D9011 occurrence time B15 to B8 B7 to B0 Example : 25st, 10 a.m
occurrence time
(Day, Hour) Day(1 to 31) Hour(0 to 23) H2510
S(Occur an error)
• The minute when data on D9008 are updated, and the second stored with a
Diagnostic error BCD code two digits.
D9012 occurrence time B15 to B8 B7 to B0 Example : 35 min., 48 sec.
(Minute, Second) Minute(0 to 59) Second(0 to 59) H3548
New
• The classification code to judge the error information stored in the eror (Note)
2) 1)
Operating state of Operating state of
D9015 1) Operating state of CPU 0 : RUN
CPU CPU
2 : STOP
S(Main processing)
2) STOP cause 0 : RUN/STOP switch
Note : Priority is earliest first 4 : Error
Year Month
(Note) : It adds newly at the Motion controller Q series.
1 - 52
1 OVERVIEW
Day Hour
• Stores the minute and second in BCD.
Minute Second
• Stores the day of the week in BCD. S/U(Request)
B15 to B12 B11 to B8 B7 to B4 B3 to B0
Example :
Friday
H0005
Day of week
Clock data
D9028 Clock data 0 Sunday
(Day of week) "0" must be set here. Monday
1
2 Tuesday
3 Wednesday
4 Thursday
5 Friday
6 Saturday
D9061 Multiple CPU No. Multiple CPU No. • CPU No. of the self CPU is stored. S(Initial processing) New
(Note)
Servo parameter • Axis No. of servo amplifier which begins to read servo parameter is setting.
Servo parameter
D9104 read request axis Q173CPU(N) : 1 to 32 (Axis1 to 32) U
read axis No.
No. Q172CPU(N) : 1 to 8 (Axis1 to 8)
It is operating in
requirement error • Each axis is stopping : 0/Operating : 1, information is stored as a bit data.
D9182 Test mode
occurrence of the D9182 : b0 to b15(Axis 1 to Axis 16)
D9183 request error
test mode, axis D9183 : b0 to b15(Axis 17 to Axis 32)
information
The following error codes are stored in D9184.
1 : S/W fault 1
2 : Operation cycle over
3 : Q bus WDT error
4 : WDT error
30 : Information processor H/W error
Motion CPU WDT Error meaning of
D9184 201 to 215 : Q bus H/W fault
error cause WDT error occurs
250 to 253 : Servo amplifier interface H/W fault
300 : S/W fault3
301 : 15 CPSTART instructions of 8 or more points were started S(Occur an error)
simultaneously.
302 : During ROM operation, system setting data, program and
parameter written to internal FLASH ROM are fault.
• Contents of the manual pulse generator axis setting error is stored when the
manual pulse generator axis setting error flag(M9077) turn on.
(Normal : 0/Setting error : 1)
D9185 : The manual pulse generator axis setting error is stored in b0 to b2
Manual pulse
D9185 Manual pulse (P1 to P3).
generator axis
D9186 generator axis The smoothing magnification setting is stored in b3 to b5 (P1 to
setting error
D9187 setting error P3).
information
D9186 : One pulse input magnification setting error is stored in b0 to b15
(axis 1 to axis 16).
D9187 : One pulse input magnification setting error is stored in b0 to b15
(axis 17 to axis 32).
(Note) : It adds newly at the Motion controller Q series.
1 - 53
1 OVERVIEW
3) No used. 2) 1)
• Information concerning which of the following states the LEDs on the CPU
are in is stored in the following bit patterns.
• 0 is off, 1 is on, and 2 is flicker
B15 B12 B11 B8 B7 B4 B3 B0
8) 7) 6) 5) 4) 3) 2) 1)
New
D9201 State of LED State of CPU-LED 1) : RUN 5) : BOOT S(Change status) (Note)
2) : ERROR 6) : No used
3) : M.RUN 7) : No used
4) : BAT.ALARM 8) : MODE
Bit patterns for MODE
0 : OFF 1 : Green
2 : Orange
(Note) : It adds newly at the Motion controller Q series.
.
1 - 54
1 OVERVIEW
1 - 55
1 OVERVIEW
Motion module CPU base unit Extension cable Q6 B extension base unit
(Q172LX, Q172EX, Q173PX) (Q33B, Q35B, Q38B, Q312B) (QC B) (Q63B, Q65B, Q68B, Q612B)
(Note-5) (Note-2)
SVO ON
(Note-1)
(Note-4)
1 - 56
1 OVERVIEW
Motion module CPU base unit Extension cable Q6 B extension base unit
(Q172LX, Q172EX, Q173PX) (Q33B, Q35B, Q38B, Q312B) (QC B) (Q63B, Q65B, Q68B, Q612B)
(Note-4) (Note-1)
SVO ON
(Note-3)
MITSUBISHI
1 - 57
1 OVERVIEW
Motion module CPU base unit Extension cable Q6 B extension base unit
(Q172LX, Q172EX, Q173PX) (Q33B, Q35B, Q38B, Q312B) (QC B) (Q63B, Q65B, Q68B, Q612B)
(Note-5) (Note-2)
BAT
MITSUBISHI SVO ON
LITHIUM BATTERY
CPU
Q17BAT
PASSED
DATE
(Note-4)
MITSUBISHI
MITSUBISHI
LITHIUM BATTERY
1 - 58
1 OVERVIEW
Motion module CPU base unit Extension cable Q6 B extension base unit
(Q172LX, Q172EX, Q173PX) (Q33B, Q35B, Q38B, Q312B) (QC B) (Q63B, Q65B, Q68B, Q612B)
(Note-4) (Note-1)
SVO ON
SSCNET cable SSCNET cable Cable for the teaching unit Teaching unit
for MR-H-BN for MR-J2 -B
(Q170TUD CBL M(-A)) (A31TU-D3 , A31TU-DN )
(Q172HBCBL M) (Q172J2BCBL M)
(Note-3)
MITSUBISHI
1 - 59
1 OVERVIEW
MITSUBISHI
SSCNET
CARD
A30CD-PCF
Personal computer
(Note) : For information about GPP functions of PLC CPU, refer to the operating
manual of PLC. Also, refer to the help of each software for information about
operation of each programming software package.
1 - 60
1 OVERVIEW
interface module
interface module
interface module
Servo external
Manual pulse
Synchronous
generator
encoder
signals
CPU base
unit PLC CPU/
(Q3 B) Motion CPU
100/200VAC
Analogue input/output
Extension
cable
module
1 - 61
1 OVERVIEW
CAUTION
Construct a safety circuit externally of the Motion controller or servo amplifier if the abnormal
operation of the Motion controller or servo amplifier differ from the safety directive operation in
the system.
The ratings and characteristics of the parts (other than Motion controller, servo amplifier and
servomotor) used in a system must be compatible with the Motion controller, servo amplifier
and servomotor.
Set the parameter values to those that are compatible with the Motion controller, servo amplifier,
servomotor and regenerative resistor model and the system application. The protective
functions may not function if the settings are incorrect.
When a teaching unit is used, the cable for the teaching unit is necessary between the Motion
CPU (Q173CPUN-T/Q172CPUN-T) and teaching unit. And, connect the short-circuit connector
for teaching unit, after removing the teaching unit or when not using it.
1 - 62
1 OVERVIEW
interface module
interface module
interface module
Servo external
Manual pulse
Synchronous
generator
encoder
signals
CPU base
unit PLC CPU/
(Q3 B) Motion CPU
100/200VAC
Analogue input/output
Battery unit
(Q170BAT)
MITSUBISHI
Input/output (Up to 256 points)
LITHIUM BATTERY
d1 d2 d3 d8
SSC I/F Card/Board SSCNET SYSTEM1
(A30CD-PCF/A 0BD-PCF)
M M M M
Panel Personal Computer E E E E
(WinNT/Win98/Win2000/WinXP)
Computer link SSC
MR-H BN/MR-J2S- B/MR-J2M-B/MR-J2- B/
MR-J2-03B5 model Servo amplifier,
Extension base unit Vector inverter(FR-V500), Up to 8 axes
(Q6 B)
Power supply
Extension
cable
module
1 - 63
1 OVERVIEW
CAUTION
Construct a safety circuit externally of the Motion controller or servo amplifier if the abnormal
operation of the Motion controller or servo amplifier differ from the safety directive operation in
the system.
The ratings and characteristics of the parts (other than Motion controller, servo amplifier and
servomotor) used in a system must be compatible with the Motion controller, servo amplifier
and servomotor.
Set the parameter values to those that are compatible with the Motion controller, servo amplifier,
servomotor and regenerative resistor model and the system application. The protective
functions may not function if the settings are incorrect.
When a teaching unit is used, the cable for the teaching unit is necessary between the Motion
CPU (Q173CPUN-T/Q172CPUN-T) and teaching unit. And, connect the short-circuit connector
for teaching unit, after removing the teaching unit or when not using it.
1 - 64
1 OVERVIEW
WindowsNT 4.0
R
or Windows 98
R
1 - 65
1 OVERVIEW
POINT
(1) When the operation of Windows is not unclear in the operation of this software,
refer to the manual of Windows or guide-book from the other supplier.
(2) The screen might not be correctly displayed depending on the system font size
of WindowsNT 4.0/Windows 98/Windows 2000/Windows XP.
R R R R
1)
2) 3)
T 4) 5) 1) OS software TYPE
MITSUBISHI ELECTRIC CORPORATION ALL 2) Software version
RIGHTS RESERVED
3) OS software version
4) Serial number
5) Number of FD
Example) When using the Q173CPU(N), SV13 and version A.
1) SW6RN-SV13QB
2) BCD-B14W276
3) A
(b) Confirmation method in the SW6RN-GSV P
The operating system(OS) type/version of the connected CPU is displayed
on the installation screen of the SW6RN-GSV P.
(Motion SFC-compatible OS) S V 1 3 Q B V E R 3 0 0 A U
A or B : Q173CPU(N) OS version
C or D : Q172CPU(N)
Indicates Motion SFC compatibility.
Indicates teaching unit usable.
1 - 66
1 OVERVIEW
(4) Restrictions of the function and PLC CPU by the Motion CPU and
software version
The function and PLC CPU which can be used has restrictions by version of the
Motion CPU module, operating system software and programming software.
The combination of each version and a function is shown below.
(Note-2)
Operating system CPU module version
Programming Section of
Function software version Q173 Q173 Q172 Q172
software version reference
(Note-1) CPU CPUN CPU CPUN
ROM operation H C M N Chapter 14
ROM operation (For additional parameter
N C T M U M
(Home position return parameter, etc.))
Online change J F Section 12.3
Auto refresh function improvement of the CPU
H C M N Section 3.1 (3)
shared memory
Communications via network H C M N Chapter 16
Main operation cycle monitor D Chapter 17
Read the servo parameter from the servo
D Chapter 18
amplifier.
MULTR D Section 7.13.7
MULTW D J K Section 7.13.6
1 - 67
1 OVERVIEW
GX Developer SW D5C-GPPW-E
(Note) : =used "6" or later.
1 - 68
1 OVERVIEW
(1) It is not allowed to use the Motion CPU as the control CPU of a module installed
on the QA1S6 B extension base unit. PLC CPU must be used as the control
CPU.
(2) The connector for installation of memory card on the Motion CPU module is for
future function expansion.
(3) Motion CPU module cannot be used as standalone module. It must always be
used in combination with the PLC CPU module (version that supports Multiple
CPU systems). Moreover, it must be installed on the right side of PLC CPU
module. PLC CPU module cannot be installed in a position to the right of Motion
CPU module.
(4) Personal computer CPU unit must be installed on the right side of Motion CPU
module. Motion CPU module cannot be installed in a position to the right of
personal computer CPU unit.
(5) Make sure to use the PLC CPU module in the "Q mode".
(6) Motion CPU module cannot be set as the control CPU of intelligent function
module or Graphic Operation Terminal (GOT).
(7) SSCNET cable which connects the Motion CPU and servo amplifier, and the
teaching unit connecting cable which connects the Motion CPU and A31TU-D3 /
(Note-1)
A31TU-DN are pulled from the bottom part of unit. Make sure to secure
sufficient space for pulling out the cable when designing the control panel.
(8) Motion CPU module is one module element of Q series Multiple CPU system. It
must be set the parameters of Q series Multiple CPU system for each PLC CPU.
Motion CPU module must also be set to support the Multiple CPU system in the
system settings.
(9) Make sure to use the Motion CPU as the control CPU of motion modules
(Note-2)
dedicated for Motion CPU (e.g., Q172LX, Q172EX , Q173PX). They will not
operate correctly if PLC CPU is set and installed as the control CPU by mistake.
Motion CPU is treated as a 32-point intelligent module by PLC CPU of other CPU.
It cannot be accessed from other CPU.
(10) When a Multiple CPU system is configured, make sure to configure the modules
so that the total current consumption of individual modules on the CPU base
does not exceed the 5 VDC output capacity of power supply module.
1 - 69
1 OVERVIEW
(Note-2)
(12) Installation position of the Q172EX-S2/S3 is only CPU base unit.
1 - 70
1 OVERVIEW
1.4.1 Overview
(b) You can increase the number of control axes by using a multiple Motion
CPUs. It is possible to control up to 96 axes by using three Q173CPU(N)s.
(c) You can reduce the PLC scan time of the overall system by using a multiple
PLC CPUs and distributing the PLC control load among them.
(b) You can access the device data and start the Motion SFC program from the
PLC CPU to the Motion CPU by Motion dedicated PLC instruction.
1 - 71
1 OVERVIEW
Up to a total four PLC CPUs and Motion CPUs can be installed in the CPU base unit,
in the four slots starting from the CPU slot (the slot located to the immediate right of the
power supply module) to slot 2 in series.
There must be no non-installation slot left, between a PLC CPU and a Motion CPU, or
between Motion CPUs.
When two or more Motion CPUs are installed, they are installed together in the slots
provided to the right of one or more PLC CPUs. (PLC CPU cannot be installed to the
right of a Motion CPU.)
CPU 0 1 2
Power supply
Motion CPU
PLC CPU
I/O, etc.
2 I/O, etc.
CPU 0 1 2 CPU 0 1 2
Power supply
Power supply
Motion CPU
Motion CPU
Motion CPU
PLC CPU
PLC CPU
PLC CPU
I/O, etc.
I/O, etc.
CPU 0 1 2 CPU 0 1 2
Power supply
Power supply
Motion CPU
Motion CPU
Motion CPU
PLC CPU
PLC CPU
PLC CPU
PLC CPU
PLC CPU
4
CPU 0 1 2
Power supply
Motion CPU
Motion CPU
Motion CPU
PLC CPU
1 - 72
1 OVERVIEW
1.4.3 Precautions for using Q series I/O modules and intelligent function modules
(b) The interrupt module (QI60), which is currently not subject to function
upgrade, supports the Multiple CPU system.
(c) The intelligent function modules support the Multiple CPU system only when
their function version is B or later. These modules cannot be controlled by
the Motion CPU, so be sure to use the PLC CPU as a control CPU.
(d) All motion modules (Q172LX, Q172EX, Q173PX) support the Multiple CPU
system. These modules cannot be controlled by the PLC CPU, so be sure to
use the Motion CPU as a control CPU.
(b) Access range from a non-control CPU for the modules controlled by the
Motion CPU are shown below.
I/O setting from outside the group
Access target (setting from the PLC CPU)
Not received Received
Input (X)
Output (Y)
Read
Buffer memory
Write
REMARK
• The function version of an intelligent function module can be checked on the rated
plate of the intelligent function module or in the GX Developer's system monitor
product information list.
• Refer to the "Q173CPU(N)/Q172CPU(N) User's Manual" for the model name
which can be controlled by the Motion CPU.
1 - 73
1 OVERVIEW
(1) Modules subject to installation restrictions in the Motion CPU are sown below.
Use within the restrictions listed below.
Maximum installable modules per CPU
Description Model name
Q173CPU(N) Q172CPU(N)
Servo external signals
Q172LX 4 modules 1 module
interface module
Serial absolute synchronous Q172EX
6 modules 4 modules
interface module (Note-1)
(2) Modules controlled by a Motion CPU cannot be installed in the extension base
unit QA1S6 B. Install them in the CPU base unit Q3 B or extension base unit
Q6 B.
(3) A total of eight base units including one CPU base unit and seven extension base
units can be used. However, the usable slots (number of modules) are limited to
64 per system including vacant slots. If a module is installed in slot 65 or
subsequent slot, an error (SP. UNIT LAY ERROR) will occur. Make sure all
modules are installed in slots 1 to 64. (Even when the total number of slots
provided by the CPU base unit and extension base units exceeds 65 (such as
when six 12-slot base units are used), an error does not occur as long as the
modules are installed within slots 1 to 64.)
1 - 74
1 OVERVIEW
(3) When shortening the processing time of the Multiple CPU system
The processing time of the Multiple CPU system can be shortened in the
following methods:
• Install all modules with many access points such as MELSECNET/10(H) and
CC-Link refreshes together in the CPU base unit.
• Control all modules with many access points such as MELSECNET/10(H) and
CC-Link refreshes using only one PLC CPU so that they are not accessed by
two or more CPUs simultaneously.
• Reduce the number of refresh points of MELSECNET/10(H), CC-Link, etc.
• Reduce the number of automatic refresh points of the PLC CPUs/Motion
CPUs.
1 - 75
1 OVERVIEW
With the Multiple CPU system, resetting the PLC CPU of CPU No. 1 resets the entire
system.
When the PLC CPU of CPU No. 1 is reset, the CPUs, I/O modules and intelligent
function modules of all CPUs will be reset.
To recover any of the CPUs in the Multiple CPU system that generated a CPU stop
error, reset the PLC CPU of CPU No. 1 or restart the power (i.e., turning the power
ON, OFF and then ON).
(If the PLC CPUs or Motion CPUs of CPU Nos. 2 through 4 generated a CPU stop
error, they can not be recovered by resetting the corresponding CPU.)
0 1 2 3 4 5 6 7
Power supply
No. 2
No. 3
No. 4
CPU
CPU
CPU
CPU
POINT
(1) In a Multiple CPU system, the PLC CPUs/Motion CPUs of CPU No. 2, 3 or 4
cannot be reset individually.
When a PLC CPU or Motion CPU of CPU No. 2, 3 or 4 is reset while the
Multiple CPU system is operating, the other CPUs generate a MULTI CPU
DOWN error (error code: 7000) and the entire system stops.
Note that depending on the timing at which the PLC CPU or Motion CPU of
CPU No. 2, 3 or 4 is reset, the PLC CPU of a the other CPU may stop due to
an error other than MULTI CPU DOWN.
(2) Resetting CPU No. 2, 3 or 4 generates a MULTI CPU DOWN error regardless
of the operation mode set in the Multiple CPU Settings tab. (Stop/continue all
CPUs upon error in CPU No. 2, 3 or 4.) (Refer to section 1.4.7 for the setting
of operation mode in Multiple CPU Settings.)
1 - 76
1 OVERVIEW
In the Multiple CPU system, the system operates differently when CPU No. 1
generated a CPU DOWN error as compared with when CPU No. 2, 3 or 4 did.
1 - 77
1 OVERVIEW
(a) When a CPU DOWN error occurs in the CPU of the CPU in a checked "Stop
all CPUs upon error in CPU No. n" item, all PLC CPU/Q173CPU(N)/
Q172CPU(N) of the other CPUs will generate a MULTI CPU DOWN error
(error code: 7000) and the Multiple CPU system will stop. (Note-1)
(b) When a CPU DOWN error occurs in the CPU of the PLC in an unchecked
"Stop all CPUs upon error in CPU No. n" item, all CPUs of the other CPUs
will generate a MULTI CPU ERROR (error code: 7020) and continue their
operation.
POINT
(Note-1) : When a CPU DOWN error occurs, the CPU detecting the error will generate a
MULTI CPU DOWN error.
Therefore, the system may enter a MULTI CPU DOWN mode after detecting the
CPU DOWN error in the CPU generating a MULTI CPU DOWN error, instead of
the error in the CPU that generated the CPU DOWN error in the first place. In
this case, the common error-data area may store a CPU number different from
one corresponding to the CPU that generated the CPU DOWN error first.
When recovering the system, remove the cause of the error present in the CPU
not stopped by a MULTI CPU DOWN error.
In the screen below, the cause of the error present in CPU No. 2, which does
not have a MULTI CPU DOWN error, should be removed.
1 - 78
1 OVERVIEW
1 - 79
1 OVERVIEW
1 - 80
1 OVERVIEW
Parameter write
Power supply
1 - 81
1 OVERVIEW
Type of parameter
Verification item Remark
Name in Motion CPU Name in PLC CPU
Number of Multiple CPUs Number of CPU modules
Operation mode when a CPU
Operation mode
Multiple CPU settings stop error occurred
Number of automatic refresh
Automatic refresh setting
points
• Only the module numbers
set in System Settings on
Motion slot settings Control CPU Control CPU No.
the Motion CPU side are
I/O assignment verified.
Total number of bases • Not verified if base settings
Basic
Base settings Base No. are omitted on the PLC CPU
settings Base
Number of base slots side.
1 - 82
1 OVERVIEW
Number of automatic
refresh points
1 - 83
1 OVERVIEW
(Note): Motion slot setting items are different depending on the operating system software.
1 - 84
1 OVERVIEW
1 - 85
1 OVERVIEW
POINT
GOT is recognized as an intelligent function modules "16 points 10 slots" on the
base (number of extension bases and slot No. are set in the GOT parameter.) for
bus connection with GOT.
Set the one extension base (16 points 10 slots) for connection with GOT, then
set "10 slots" as number of extension bases for connection with GOT in the system
setting (base setting).
<Example>
When the "2nd stage" of extension base is set as connection with GOT.
(Set "10" slot as "2nd stage" of extension base in the base setting.)
If the bus connection with GOT is executed without above settings in the
base setting of system setting, "SP.UNIT LAY ERROR" (error code: 2124)
will occur.
1 - 86
1 OVERVIEW
3) If the duration of motion operation has exceeded the operation cycle, the
operation cycle over flag (M2054) turns ON. Even when "Automatic
setting" is selected, the duration of motion operation may exceed the
operation cycle depending on the control conditions. The actual duration
of motion operation (unit:μs) is stored in the D9188, and the current
setting of operation cycle (unit:μs) is stored in the D9197. Monitor these
special registers and adjust the set value of operation cycle so that the
actual duration of motion operation will not exceed the set operation
cycle. (A WDT or other error may occur in the Motion CPU.)
4) The MR-H BN does not support an operation cycle of 0.8 [ms]. If the
MR-H BN is set in the System Settings, 1.7 [ms] is used as the actual
operation cycle even when 0.8 [ms] is set.
5) The MR-J2S- B supports an operation cycle of 0.8 [ms] and 1.7 [ms] in
version B0 or later. When using the MR-J2S- B of Version A4 or
earlier, set the operation cycle as 3.5 [ms] or more.
6) The vector inverter does not support an operation cycle of 0.8 [ms] and
1.7 [ms]. If the FR-V500 is set in the System Setting, 3.5[ms] is used as
the actual operation cycle even when 0.8 [ms] or 1.7 [ms] is set.
1 - 87
1 OVERVIEW
1 - 88
1 OVERVIEW
1 - 89
1 OVERVIEW
(Note-1) : A maximum of 4 modules, analogue input modules and analogue output modules, can be used.
1 - 90
1 OVERVIEW
1 - 91
1 OVERVIEW
I/O No.s used in the Multiple CPU system include those used by the Motion CPU to
communicate with I/O modules/intelligent function modules and those used in the
communication between the PLC CPU and the Motion CPU. The following explains
each I/O No. and assignment of I/O No..
1.6.1 I/O No. for I/O modules and intelligent function modules
In the Multiple CPU system, the "0H" position(slot) of I/O No. which seen from the PLC
CPU is different from the position in the case of a standalone CPU. However, I/O No. of
the control module may be assigned independently for each CPU in the Motion CPU.
0 1 2 3 4 5
Q02H Q173 QX41 QY41 QX41 QY41
Power supply
CPU CPU
(N) PX0 to PX1F PY20 to PY3F X40 to X5F Y60 to Y7F
O
module
U
T
1 - 92
1 OVERVIEW
(3) Setting of the Motion CPU control modules by the PLC CPU
(a) Type/number of points
Follow the table below when Motion CPU control modules are set in I/O
Assignment Settings of the PLC CPU. (The PLC CPU handles the Q172LX,
Q172EX and Q173PX as intelligent function modules having 32 occupied
points.) Type and number of points may be left unset.
Q172LX 32 points
Q172EX Intelligent 32 points
Q173PX 32 points
POINT
(1) Set the I/O device of the Motion CPU within the range from PX/PY000 to
PX/PYFFF. Set the number of real I/O points within 256 points. (I/O No. may
not be consecutive.)
(2) As for the Motion CPU, the Q172LX, Q172EX, Q173PX and QI60 are not
included in the number of real I/O points.
(b) If the installed Motion CPU control module is different from the I/O
assignment type of PLC CPU, the operation is abnormal.
Name of installed
I/O assignment type of PLC CPU Operation
Motion CPU control module
High-speed input/Output/Composite I/O Operation is abnormal. (An error does not occur.)
Input module
Interrupt/Intelligent Error 2100 (SP.UNIT LAY ERR.)
Input/High-speed input/Composite I/O Operation is abnormal. (An error does not occur.)
Output module
Interrupt/Intelligent Error 2100 (SP.UNIT LAY ERR.)
Input/Output composite Input/High-speed input/Output Operation is abnormal. (An error does not occur.)
module Interrupt/Intelligent Error 2100 (SP.UNIT LAY ERR.)
Analogue input module, Input/High-speed input/Output/
Error 2100 (SP.UNIT LAY ERR.)
Analogue output module, Composite I/O
Q172LX, Q172EX, Q173PX Interrupt Operation is abnormal. (An error does not occur.)
Input/High-speed input/Output/
Error 2100 (SP.UNIT LAY ERR.)
Interrupt module (QI60) Composite I/O
Intelligent Operation is abnormal. (An error does not occur.)
All module Not used Operation is abnormal. (An error does not occur.)
1 - 93
1 OVERVIEW
0 1 2 3 4 5
Q02H Q173 Q172LX QY41 QX41 QY41
Power supply
CPU CPU
(N) PY0 to PY1F X40 to X5F Y60 to Y7F
O
module
U
T
Setting of type/
number of points
Setting of control
CPU etc.
1 - 94
1 OVERVIEW
In the Multiple CPU system, I/O No. is assigned to the PLC CPU/Motion CPU to
enable communication between the PLC CPU and Motion CPU using the following
instructions:
• The Multiple CPU dedicated instructions
• The Motion CPU dedicated instructions
• The Multiple CPU communication dedicated instructions
The I/O No. of the PLC CPU/Motion CPU are fixed based on the installed slots and
cannot be changed.
The table below lists the I/O No. of the PLC CPU/Motion CPU installed in the CPU
base unit of the Multiple CPU system.
The I/O No. of the PLC CPU/Motion CPU are used in the following cases:
• When writing data to the shared CPU memory of the self CPU using the S. TO
instruction.
• When reading data from the shared CPU memory of the other CPU using the FROM
instruction.
• When reading data from the shared CPU memory of the other CPU using an
intelligent function module device (U \G )
• When reading device data directly from the Motion CPU from the PLC CPU using
the "S(P). DDRD" instruction.
• When writing device data directly to the Motion CPU from the PLC CPU using the
"S(P).DDWR" instruction.
REMARK
• Refer to Chapter "3. COMMUNICATION BETWEEN THE PLC CPU AND THE
MOTION CPU IN THE MULTIPLE CPU SYSTEM" for communication between
the PLC CPU and the Motion CPU.
1 - 95
1 OVERVIEW
The procedure for the I/O No. setting for the Motion CPU in System Settings of
SW6RN-GSV P is shown below. In the Motion CPU, by setting a module used in
each CPU base or extension base slot in System Settings, the control CPU of the
applicable slot is assigned as the self CPU. Input modules, output modules and
composite I/O modules require an I/O No. to be set.
Refer to the help of SW6RN-GSV P for the detailed operating procedure on the
System Settings screen.
<System Settings>
6) Click [OK].
(Note): Display of system setting and motion slot setting are different depending on the operating system
software.
POINT
I/O No.s cannot be assigned automatically, unlike a PLC CPU for which I/O No. are
assigned automatically if such setting is omitted in the Motion CPU. In the Motion
CPU, be sure to set the first I/O No. in System Settings for each module used.
1 - 96
2 STARTING UP THE MULTIPLE CPU SYSTEM
This section describes a standard procedure to start up the Multiple CPU system.
Device application and assignment • Refer to Section 3.1 for automatic refresh
function of device data.
Secure the refresh points continuously
for automatic refresh of device data.
Parameters, etc. create • Create the parameters for CPU No. 1 to 4 and
Create the parameter setting such as PLC programs.
Multiple CPU setting and control CPU • Refer to the "QCPU User's Manual" (Function
setting, and the PLC programs. Explanation/Program Fundamentals)" for PLC
settings.
PLC CPU
1)
2-1
2 STARTING UP THE MULTIPLE CPU SYSTEM
1)
System settings and program create • Refer to Section 1.5 for system settings.
Create the system settings, servo data • Refer to the Programming Manual of each
Motion CPU
and Motion SFC program. operating system software for details of program.
Actual operation
Actual
Check in the operation
automatic operation.
(Note) : Installation of the operating system software is required to the Motion CPU module before start of
the Multiple CPU system.
Refer to Chapter 5 of the "Q173CPU(N)/Q172CPU(N) User's Manual" for installation of the Motion
CPU operating system software.
2-2
3 COMMUNICATION BETWEEN THE PLC CPU AND THE MOTION CPU IN
THE MULTIPLE CPU SYSTEM
The following tasks can be performed between the PLC CPU and the Motion CPU in
the Multiple CPU system.
• Data transfer between CPUs by the automatic refresh function of the shared CPU
memory
• Control instruction from the PLC CPU to Motion CPU by the Motion dedicated
Instructions
• Reading/writing device data from the PLC CPU to Motion CPU by the dedicated
instruction 3
3.1 Automatic Refresh Function of The Shared CPU Memory
Automatic refresh area 3) Reading via main cycle Automatic refresh area
processing of CPU No.2
User-defined area User-defined area
3-1
3 COMMUNICATION BETWEEN THE PLC CPU AND THE MOTION CPU IN
THE MULTIPLE CPU SYSTEM
By the above operations, the data written to B0 to B1F in CPU No.1 can be
read as B0 to B1F of CPU No.2, while the data written to B20 to B3F in CPU
No.2 can be read as B20 to B3F of CPU No.1. B0 to B1F of CPU No.1 can
be read or written freely using CPU No.1, but B20 to B3F correspond to the
refresh area for the data of CPU No.2 and can only be read, not written, by
CPU No. 1. Similarly, B20 to B3F of CPU No.2 can be read or written freely
using CPU No.2, but B0 to B1F correspond to the refresh area for the data
of CPU No.1 and thus can only be read, not written, by CPU No.2.
(c) To execute the automatic refresh function, for the Motion CPU the number of
transmitting points for the CPU and the devices whose data is stored
(devices to which the automatic refresh function is executed) must be set in
Multiple CPU Settings of System Settings. For the PLC CPU, the applicable
parameters must be set identically in Multiple CPU Settings of PC
parameters.
Item Description
Y, M, B (Set the first device No. as a multiple of 16 in
Bit
Type of refresh device modules of 32 bits.)
Word D, W, # (Set in modules of 2 words.)
Number of refresh device range settings 4 ranges (Bit and word may be mixed.)
Number of refresh words per CPU A maximum of 8k words
Number of transmitting words per CPU A maximum of 2k words (Set in units of 2 words.)
CAUTION
If necessary, perform interlocking during the execution of the automatic refresh function using
other CPU DOWN detection signals M9244 to M9247.
3-2
3 COMMUNICATION BETWEEN THE PLC CPU AND THE MOTION CPU IN
THE MULTIPLE CPU SYSTEM
(b) Setting number selection/send range (refresh range) for each CPU
1) The refresh setting of four ranges can be set by setting selection.
For example, ON/OFF data may be refreshed using bit-device setting,
while other data may be refreshed using word device setting.
2) The number of points in the shared CPU memory set in units of 2 points
(2 words) is set in the range for each CPU. (2 points if word device is
specified for the CPU-side device, or 32 points if bit device is specified.)
Data of the CPUs for which "0" is set as the number of points
representing the send range of the CPU will not be refreshed.
Assume that 32 points (B0 to B1F) of CPU No.1 and 32 points (B20 to
B3F) of CPU No.2 are to be refreshed. Since one point in the shared
CPU memory corresponds to 16 bit-device points, the number of
transmitting points becomes 2 for CPU No. 1 and also 2 for CPU No. 2.
3) The maximum number of transmitting points combining all four ranges is
2k words per CPU (PLC CPU or Motion CPU) or 8k points (8k words) for
all CPUs.
• Data in CPU No.3 and 4 is not refreshed since the number of points is set to 0.
3-3
3 COMMUNICATION BETWEEN THE PLC CPU AND THE MOTION CPU IN
THE MULTIPLE CPU SYSTEM
• Last address of
CPU-side device
5) Set the same number of transmitting points for all CPUs in the Multiple
CPU system.
If any of the CPUs has a different number of transmitting points, a
PARAMETER ERROR will be occurred.
3-5
3 COMMUNICATION BETWEEN THE PLC CPU AND THE MOTION CPU IN
THE MULTIPLE CPU SYSTEM
3-6
3 COMMUNICATION BETWEEN THE PLC CPU AND THE MOTION CPU IN
THE MULTIPLE CPU SYSTEM
3) The block diagram below illustrates the automatic refresh operation over
four ranges of setting 1: link relay (B), setting 2: link register (W), setting
3: data register (D), and setting 4: internal relay (M).
CPU No.1
Shared CPU memory Device Shared CPU memory
of other CPU Setting 1
B0 CPU No.1 Write during END processing CPU No.1
to transmitting data transmitting data
Read via END processing (No.1) (No.1)
CPU No.2
of CPU No.1 CPU No.2 CPU No.1
CPU No.2 receiving data (No.1)
transmitting data (No.1) transmitting data
n g
CPU No.3 ssi (No.2)
CPU No.2 ce
transmitting data (No.2)
receiving data (No.1) pro CPU No.1
Maximum ND
2k words
CPU No.4 gE transmitting data Maximum
CPU No.2 rin 2k words
receiving data (No.1)
e du (No.3)
transmitting data (No.3) i t
Setting 2 Wr
CPU No.2 W0 CPU No.1
g
CPU No.1
sin
transmitting data (No.4) transmitting data
es
transmitting data (No.4)
oc
(No.2)
pr
CPU No.3
D
EN
CPU No.2
CPU No.3 User-defined area
g
receiving data (No.2)
rin
transmitting data (No.1)
du
CPU No.3
e
CPU No.3
g
rit
receiving data (No.2)
sin
W
Maximum transmitting data (No.2)
s
CPU No.4
ce
2k words CPU No.3
pro
receiving data (No.2)
transmitting data (No.3) Maximum
D
Setting 3
8k words
EN
CPU No.3 D0 CPU No.1
g
transmitting data (No.4)
rin
transmitting data
du
(No.3)
ite
CPU No.4
Wr
CPU No.2
CPU No.4 receiving data (No.3)
transmitting data (No.1)
CPU No.3
CPU No.4 receiving data (No.3)
Maximum transmitting data (No.2)
CPU No.4
2k words CPU No.4 receiving data (No.3)
transmitting data (No.3)
Setting 4
CPU No.4 M0
M0 CPU No.1
transmitting data (No.4) transmitting data
(No.4)
CPU No.2
receiving data (No.4)
CPU No.3
receiving data (No.4)
CPU No.4
receiving data (No.4)
3-7
3 COMMUNICATION BETWEEN THE PLC CPU AND THE MOTION CPU IN
THE MULTIPLE CPU SYSTEM
3-8
3 COMMUNICATION BETWEEN THE PLC CPU AND THE MOTION CPU IN
THE MULTIPLE CPU SYSTEM
4) If "*" is set as the first device setting column A of each automatic refresh
setting, the first device for every CPU can be arbitrarily set up by the
user in the column of B.
6) Set the same number of transmitting points for all CPUs in the Multiple
CPU system.
If any of the CPUs has a different number of transmitting points, a
PARAMETER ERROR will be occurred.
3-9
3 COMMUNICATION BETWEEN THE PLC CPU AND THE MOTION CPU IN
THE MULTIPLE CPU SYSTEM
3 - 10
3 COMMUNICATION BETWEEN THE PLC CPU AND THE MOTION CPU IN
THE MULTIPLE CPU SYSTEM
[Dummy setting]
Usually, the automatic refresh setting is executed between PLC CPU and Motion
CPU for the instructions to each Motion CPU and the monitor of a state by the
PLC CPU at the time of operation. However, the automatic refresh is not
necessary between each Motion CPU. In this case, because it is made not to
execute the automatic refresh setting between the Motion CPU using a dummy
setting, it is not necessary to use the user device for the automatic refresh vainly,
and a main cycle can also be shortened.
Example of the automatic refresh setting using the "Dummy setting" is as follows.
Read data of
Motion CPU No.4 CPU No.3
• The device of CPU No.2 and No.4 are not refreshed by the CPU No.3.
• The device of CPU No.4 is not refreshed by the CPU No.2. • The device of CPU No.2 is not refreshed by the CPU No.4.
Although the example of a setting is the case of the automatic refresh setting 1,
the automatic refresh setting 2 - 4 can be also set similarly.
3 - 11
3 COMMUNICATION BETWEEN THE PLC CPU AND THE MOTION CPU IN
THE MULTIPLE CPU SYSTEM
(a) SV13
• Overall configuration
Table of the internal relays Table of the Data registers
Device No. Application Device No. Application
M0 D0
User device Axis monitor device
to (2000 points) to (20 points 32 axes)
M2000 D640
Common device Control change register
to (320 points) to (2 points 32 axes)
M3040 D800
Unusable
to
to
User device
(4352 points)
M8191 D8191
3 - 12
3 COMMUNICATION BETWEEN THE PLC CPU AND THE MOTION CPU IN
THE MULTIPLE CPU SYSTEM
M8191
Data registers Data registers
D0 Command device for D0 Monitor device
the Motion CPU (118 points) (640 points)
D118 Monitor device for D640 Command device
the Motion CPU (640 points) (118 points)
D758 D758
D8191 D8191
CPU CPU share memory G Dev. starting M0 CPU CPU share memory G Dev. starting *
Point Start End Start End Point Start End Start End
CPU CPU share memory G Dev. starting D0 CPU CPU share memory G Dev. starting *
Point Start End Start End Point Start End Start End
POINT
Although it has set up so that 32 axes may be assigned in the above assignment
example, reduce the number of assignment automatic refresh points a part for the
number of axes to be used.
3 - 13
3 COMMUNICATION BETWEEN THE PLC CPU AND THE MOTION CPU IN
THE MULTIPLE CPU SYSTEM
D8191
CPU No.2 (Motion CPU)
Data registers
D0 Monitor device
(640 points)
D758
D8191
Data registers
D0 Monitor device
(640 points)
D758
D8191
3 - 14
3 COMMUNICATION BETWEEN THE PLC CPU AND THE MOTION CPU IN
THE MULTIPLE CPU SYSTEM
CPU CPU share memory G Dev. starting M0 CPU CPU share memory G Dev. starting *
Point Start End Start End Point Start End Start End
CPU CPU share memory G Dev. Starting D0 CPU CPU share memory G Dev. starting *
Point Start End Start End Point Start End Start End
CPU CPU share memory G Dev. Starting M1824 CPU CPU share memory G Dev. starting *
Point Start End Start End Point Start End Start End
CPU CPU share memory G Dev. starting D758 CPU CPU share memory G Dev. starting *
Point Start End Start End Point Start End Start End
3 - 15
3 COMMUNICATION BETWEEN THE PLC CPU AND THE MOTION CPU IN
THE MULTIPLE CPU SYSTEM
No.1 48 * *
No.2 66 * *
No.3 0
No.4
(Note) : A dummy setting is made so that an excessive device may not be refreshed in the
Motion CPU No.3.
No.1 118 * *
No.2 640 * *
No.3 0
No.4
(Note) : A dummy setting is made so that an excessive device may not be refreshed in the
Motion CPU No.3.
POINT
In the case of the combination "PLC CPU (1 module) + Motion CPU (3 modules)"
with SV13, make all the devices of all the CPUs refresh as mentioned above
because the setting that Read/Write is made of the PLC CPU cannot be executed.
3 - 16
3 COMMUNICATION BETWEEN THE PLC CPU AND THE MOTION CPU IN
THE MULTIPLE CPU SYSTEM
(b) SV22
• Overall configuration
Table of the internal relays Table of the Data registers
Device No. Application Device No. Application
M0 User device D0 Axis monitor device
to (2000 points) to (20 points 32 axes)
M2000 Common device D640 Control change register
to (320 points) to (2 points 32 axes)
M2320 Special relay allocated device D704 Common device
to (Status) to (Command signal)
(64 points) (54 points)
M2400 Axis status D758 Common device
to (20 points 32 axes) to (Monitor)
M3040 (42 points)
Unusable
to D800 Virtual servomotor axis monitor
M3072 Common device to device
to (Command signal) (10 points 32 axes)
(64 points) (Mechanical system setting axis only)
M3136 Special relay allocated device D1120 Synchronous encoder axis monitor
to (Command signal) to device
(64 points) (10 points 12 axes)
M3200 Axis command signal D1240 Cam axis monitor device
to (20 points 32 axes) to (10 points 32 axes)
M3840 D1560
Unusable
to
M4000 Virtual servomotor axis status
to (20 points 32 axes)
(Mechanical system setting axis only)
M4640 Synchronous encoder axis status
to (4 points 12 axes)
M4688
Unusable
to
M4800 Virtual servomotor axis command to
to signal
(20 points 32 axes)
(Mechanical system setting axis only) User device
M5440 Synchronous encoder axis (6632 points)
to command signal
(4 points 12 axes)
M5488 Cam axis command signal
to (1 points 32 axes)
(Mechanical system setting axis only)
M5520 Soothing clutch complete signal
to (2 points 32 axes)
M5584
Unusable
to
M5600
User device)
to
(2592 points)
M8191 D8191
3 - 17
3 COMMUNICATION BETWEEN THE PLC CPU AND THE MOTION CPU IN
THE MULTIPLE CPU SYSTEM
M8191 M4800
Virtual command device
(704 points)
Data registers M5504
D0 Real command device for
the Motion CPU (118 points) M8191
D118 Real monitor device for
the Motion CPU (640 points) Data registers
D758 D0 Real monitor device
Virtual monitor device for
(640 points)
the Motion CPU (660 points)
D1418 D640
Real command device
D757 (118 points)
D8191
D800 Virtual monitor device
(660 points)
D1460
D8191
3 - 18
3 COMMUNICATION BETWEEN THE PLC CPU AND THE MOTION CPU IN
THE MULTIPLE CPU SYSTEM
CPU CPU share memory G Dev. starting M0 CPU CPU share memory G Dev. starting *
Point Start End Start End Point Start End Start End
CPU CPU share memory G Dev. Starting D0 CPU CPU share memory G Dev. starting *
Point Start End Start End Point Start End Start End
CPU CPU share memory G Dev. Starting M1824 CPU CPU share memory G Dev. starting *
Point Start End Start End Point Start End Start End
CPU CPU share memory G Dev. starting D758 CPU CPU share memory G Dev. starting *
Point Start End Start End Point Start End Start End
No.1 0 No.1 0
No.2 660 D758 D1417 No.2 660 D800 D1459
No.3 No.3
No.4 No.4
POINT
In the case of the combination "PLC CPU (1 module) + Motion CPU (2 modules)"
with SV22, make all the devices of all the CPUs refresh as mentioned above
because the setting that Read/Write is made of the PLC CPU cannot be executed.
3 - 19
3 COMMUNICATION BETWEEN THE PLC CPU AND THE MOTION CPU IN
THE MULTIPLE CPU SYSTEM
3.2 Control Instruction from the PLC CPU to The Motion CPU (Motion dedicated
instructions)
Control can be instructed from the PLC CPU to the Motion CPU using the Motion
dedicated PLC instructions listed in the table below.
Refer to Chapter "5 MOTION DEDICATED PLC INSTRUCTIONS" for the details of
each instruction.
(Control may not be instructed from the Motion CPU to another Motion CPU.)
By using the S(P). SFCS instruction of the Motion dedicated instruction, the Motion
SFC of the Motion CPU from the PLC CPU can be started.
<Example>
PLC CPU Motion CPU
Start request Motion SFC
POINT
One PLC CPU can execute a total of up to 32 "Motion dedicated instructions" and
"dedicated instructions excluding the S(P). GINT" simultaneously.
When Motion dedicated instructions and dedicated instructions excluding the "S(P).
GINT" are executed simultaneously, the instructions will be processed in the order
received.
If the command which has not completed processing becomes 33 or more, an
OPERATION ERROR (error code: 4107) will be occurred.
3 - 20
3 COMMUNICATION BETWEEN THE PLC CPU AND THE MOTION CPU IN
THE MULTIPLE CPU SYSTEM
Device data can be written or read to/from the Motion CPU by the PLC CPU using the
dedicated instructions listed in the table below.
Refer to Chapter 5 "MOTION DEDICATED PLC INSTRUCTIONS" for the details of
each instruction.
(Data cannot be written or read to/from the PLC CPU by another PLC CPU, to/from the
PLC CPU by the Motion CPU, or to/from a Motion CPU by another Motion CPU.)
For example, by using the S(P). DDWR dedicated instruction, the device data of the
PLC CPU can be written to the device data of the Motion CPU.
<Example>
PLC CPU Motion CPU
POINT
(1) One PLC CPU can execute a total of up to 32 "Motion dedicated instructions"
and "dedicated instructions excluding the S(P). GINT" simultaneously.
When Motion dedicated instructions and dedicated instructions excluding the
S(P). GINT are executed simultaneously, the instructions will be processed in
the order received.
If the command which has not completed processing becomes 33 or more, an
OPERATION ERROR (error code: 4107) will be occurred.
(2) Data refresh via the S(P). DDRD/S(P). DDWR is not synchronized with data
refresh via the automatic refresh function of shared CPU memory.
Do not issue S(P). DDRD/S(P). DDWR instructions to the devices whose data
in shared CPU memory is being refreshed.
3 - 21
3 COMMUNICATION BETWEEN THE PLC CPU AND THE MOTION CPU IN
THE MULTIPLE CPU SYSTEM
Shared CPU memory is used to transfer data between the CPUs in the Multiple CPU
system and has a capacity of 4096 words from 0H to FFFH.
Shared CPU memory has four areas: "self CPU operation data area", "system area",
"automatic refresh area" and "user-defined area."
When the automatic refresh function of shared CPU memory is set, the area
corresponding to the number of automatic refresh points starting from 800H is used as
the automatic refresh area.
The user-defined area begins from the address immediately next to the last address of
the automatic refresh area.
If the number of automatic refresh points is 18 (12H points), the area from 800H to
811H becomes the automatic refresh area and the area after 812H becomes the user-
defined area.
The diagram below shows the structure of shared CPU memory and accessibility from
a PLC program.
to
User-defined area Allowed Not allowed Not allowed Allowed
FFFH
REMARK
(Note-1) : Use the S. TO instruction to write to the user-defined area of the self CPU
in the PLC CPU.
Use the MULTW instruction to write to the user-defined area of the self
CPU in the PLC CPU. (Refer to Section 1.3.4(4) for the conditions which
can use the MULTW instruction.)
(Note-2) : Use the FROM instruction/intelligent function module device (U \G ) to
read the shared memory of the Motion CPU from the PLC CPU.
Use the MULTR instruction to read the shared memory of other CPU in
the Motion CPU. (Refer to Section 1.3.4(4) for the conditions which can
use the MULTR instruction.)
3 - 22
3 COMMUNICATION BETWEEN THE PLC CPU AND THE MOTION CPU IN
THE MULTIPLE CPU SYSTEM
Table 3.1 Table of Contents Stored in the Self CPU Operation Data Area
Shared
Corresponding
memory Name Description Detailed explanation (Note)
special resister
address
This area is used to check whether data is stored or not in the
Data available/not "Data available/not self CPU operation data area (1H to 1FH) of the self CPU.
0H —
available available" flag • 0: Data is not stored in the self CPU operation data area.
• 1: Data is stored in the self CPU operation data area.
The error number of an error generated during diagnosis is
1H Diagnosis error Diagnosis error number D9008
stored as a BIN code.
The year and month when the error number was stored in
2H address 1H of shared CPU memory is stored in 2-digit BCD D9010
code.
The date and hour when the error number was stored in
Diagnosis-error Diagnosis-error
3H address 1H of shared CPU memory is stored in 2-digit BCD D9011
occurrence time occurrence time
code.
The minutes and seconds when the error number was stored in
4H address 1H of shared CPU memory is stored in 2-digit BCD D9012
code.
Category codes indicating the nature of the stored common
5H Error-data category code Error-data category code D9013
error data and individual error data are stored.
Common data corresponding to the error number of an error
6H Error data Error data D9014
generated during diagnosis is stored.
7H to 1CH Not used — Not used —
1DH Switch status CPU switch status The switch status of the CPU is stored. D9200
1EH LED status CPU-LED status The bit pattern of the CPU LED is stored D9201
1FH CPU operation status CPU operation status The operation status of the CPU is stored. D9015
(Note) : Refer to the applicable special register for details.
(b) The self CPU operation data area is refreshed every time the applicable
register has been changed.
However, the refresh timing may be delayed by up to the main cycle time.
(It updates using idle time during motion control. The maximum main cycle
time: several milliseconds to several hundred milliseconds).
(c) The data of the self CPU operation data area can be read from the PLC
CPU of the other CPU by the FROM instruction.
However, since there is a delay in data update, use the data that has been
read as an object for monitoring only.
(d) Self CPU operation data area used by Motion dedicated PLC instruction
(30H to 33H)
The complete status of the to self CPU high speed interrupt accept flag from
CPUn is stored in the following address.
Table 3.2 Self CPU Operation Data Area used by the Motion Dedicated PLC Instruction
Shared
memory Name Description
address
30H(48) To self CPU high speed interrupt accept flag from CPU1 This area is used to check whether to self CPU high speed interrupt accept flag
31H(49) To self CPU high speed interrupt accept flag from CPU2 from CPUn can be accepted or not.
32H(50) To self CPU high speed interrupt accept flag from CPU3 0: To self CPU high speed interrupt accept flag from CPUn accept usable.
33H(51) To self CPU high speed interrupt accept flag from CPU4 1: To self CPU high speed interrupt accept flag from CPUn accept disable.
3 - 23
3 COMMUNICATION BETWEEN THE PLC CPU AND THE MOTION CPU IN
THE MULTIPLE CPU SYSTEM
Table 3.3 Table of System Area used by the Motion Dedicated PLC Instruction
Shared
memory Name Description
address
The start accept flag is stored by the 1 to 32 axis, each bit.
(As for a bit's actually being set Q173CPU(N) : J1 to J32/
204H(516) Start accept flag (Axis1 to 16) Q172CPU(N) : J1 to J8.)
OFF : Start accept flag usable
ON : Start accept flag disable
b15 b1 b0
3 - 24
3 COMMUNICATION BETWEEN THE PLC CPU AND THE MOTION CPU IN
THE MULTIPLE CPU SYSTEM
3 - 25
3 COMMUNICATION BETWEEN THE PLC CPU AND THE MOTION CPU IN
THE MULTIPLE CPU SYSTEM
MEMO
3 - 26
4 STRUCTURE OF THE MOTION CPU PROGRAM
Motion CPU programs is created in the Motion SFC of flowchart format. The motion
control of servomotors is performed using the real-mode servo programs specified by
motion-control steps in a Motion SFC program in SV13/SV22 real mode. Virtual
servomotors in a mechanical system program are controlled using the virtual mode
servo programs specified by motion-control steps so as to enable synchronous control
in SV22 virtual mode. Refer to the documents below for the details of Motion SFC
programs, motion control in real mode, and motion control in virtual mode.
4-1
4 STRUCTURE OF THE MOTION CPU PROGRAM
(1) System with servomotor is controlled directly using the servo program in
(SV13/SV22) real mode.
(2) Setting of the positioning parameter and creation of the servo program/ Motion
SFC program are required.
(3) The procedure of positioning control is shown below:
1) Motion SFC program is requested to start using the S(P).SFCS
instruction of the PLC program.
(Motion SFC program can also be started automatically by parameter
setting.)
2) Execute the positioning control using the specified the Motion SFC
program. (Output to the servo amplifier)
END
System settings
Fixed parameters
Servo parameters
Parameter blocks
Home position return data
JOG operation data
Limit switch output data
4-2
4 STRUCTURE OF THE MOTION CPU PROGRAM
END
Output module
Positioning control parameters
System settings
Fixed parameters
Servo parameters
Parameter blocks
Limit switch output data
• Home position return data is not used, since home position return cannot be performed in virtual mode. 3) 3)
(Home position return is executed in real mode.)
• JOG operation in virtual mode is controlled using the JOG operation data set by drive module parameters. Servo amplifier Servo amplifier
4) 4)
Servomotor Servomotor
4-3
4 STRUCTURE OF THE MOTION CPU PROGRAM
MEMO
4-4
5 MOTION DEDICATED PLC INSTRUCTION
(1) The Motion dedicated PLC instruction which can be executed toward the Motion
CPU which installed a SV13/SV22 operating system software for the Motion SFC
is shown below.
Instruction Description
S(P).SFCS Start request of the Motion SFC program(Program No. may be specified.)
S(P).SVST Start request of the specified servo program
S(P).CHGA Current value change request of the specified axis
S(P).CHGV Speed change request of the specified axis
S(P).CHGT Torque control value change request of the specified axis
S(P).DDWR Write from the PLC CPU to the Motion CPU
S(P).DDRD Reads from the devices of the Motion CPU
S(P).GINT Execute request of an event task of Motion SFC program
(Note) : As for the details of each instruction, it explains after the next section.
5
5.1.1 Restriction item of the Motion dedicated PLC instruction
(1) To self CPU high speed interrupt accept flag from CPUn.
Common precautions of the Motion dedicated PLC instruction as shown below.
(a) To self CPU high speed interrupt accept flag from CPUn is shown in the
following table.
To self CPU high speed interrupt accept flag from CPUn is "No operation"
even if the instruction is executed when it is cannot be accepted.
When the Motion dedicated PLC instruction is accepted in the Motion CPU,
to self CPU high speed interrupt accept flag from CPUn of the self CPU
(Motion CPU) shared CPU memory cannot be accepted and
processing toward the instruction for requirement.
When processing is completed and it becomes the condition that it has an
instruction accepted, to self CPU high speed interrupt accept flag from
CPUn can be accepted.
5-1
5 MOTION DEDICATED PLC INSTRUCTION
Shared CPU
memory address Example of the reading
Description
( ) is decimal (When target is the CPU No.2)
address
The lowest rank bit (30H(48)) toward executing instruction
30H(48) U3E1/G48.0
from CPU No.1.
The lowest rank bit (31H(49)) toward executing instruction
31H(49) U3E1/G49.0
from CPU No.2.
The lowest rank bit (32H(50)) toward executing instruction
32H(50) U3E1/G50.0
from CPU No.3.
The lowest rank bit (33H(51)) toward executing instruction
33H(51) U3E1/G51.0
from CPU No.4.
(b) "To self CPU high speed interrupt accept flag from CPUn" turn ON/OFF at
the executing instruction, when the Multiple CPU dedicated instructions are
executed to the same CPU from one PLC CPU.
Therefore, when each instruction is executed only once at approval the
executing condition, it is necessary to take an interlock by internal relay
(M10) and so on besides "To self CPU high speed interrupt accept flag from
CPUn".
(b) One Motion CPU can be accepted max.32 instructions simultaneously from
multiple other CPUs. (Except S(P).GINT instruction.) If 33 instructions or
more are executed Motion CPU returns the complete status[4C08] error.
As Motion CPU can be accepted up to 32 instructions, number of
acceptable instructions changes according to number of CPUs included
Motion CPU. Calculation expression is shown below.
(c) Local devices and file registers as program are written to device by END
processing. Do not use the devices below.
Each instruction complete device
D1 of S(P).DDRD instruction (The first device of the self CPU which
stored the reading data.)
5-2
5 MOTION DEDICATED PLC INSTRUCTION
(d) Use a flag in the shared CPU memory which correspond with each
instruction not to execute multiple instructions to the same shaft of the
Motion CPU of same CPU No. for the inter-lock condition.
(Program example 1)
(e) S(P).SFCS/S(P).SVST/S(P).CHGA/S(P).CHGVS(P).CHGT/S(P).DDWR/
S(P).DDRD instructions cannot be executed simultaneously. Therefore, it is
necessary to take an interlock by to self CPU high speed interrupt accept
flag from CPUn.
One PLC CPU can be executed max.32 Motion dedicated PLC instructions
simultaneously using to self CPU high speed interrupt accept flag from
CPUn. (Except S(P).GINT instruction.)
If 33 instructions or more are executed, the PLC CPU returns the
OPERATION ERROR [4107].
(f) When multiple Motion dedicated PLC instructions are directly executed
because one contact-point turns on, an instruction may not be executed.
In this case, create a program with reference to program example.
(Program example 2)
(g) When the Motion dedicated function of the operation control step (Fn/FSn)
and Motion control program (Kn) in Motion CPU. Since there is no flag which
can be distinguished on instruction execution in the PLC CPU, it is
necessary to taken an interlock by user program.
(Program example 3)
RST M0
RST M6
5-3
5 MOTION DEDICATED PLC INSTRUCTION
Program which executes directly multiple Motion dedicated PLC instructions because
one contact-point turns on.
M1001
SET M21
SET M23
SET M25
SET M27
RST M1001
To self CPU high
speed interrupt Start accept
accept flag from flag of the Axis 1
CPU1 (CPU No.2)
M21 U3E1\G48.0 U3E1\G516.0
SP.SVST H3E1 "J1" K104 M30 D20
RST M23
To self CPU high
Start accept
speed interrupt
flag of the Axis 4
accept flag from
(CPU No.2)
CPU1
U3E1\G516.3
M25 U3E1\G48.0
SP.SVST H3E1 "J4" K106 M34 D24
RST M25
To self CPU high
speed interrupt Start accept
accept flag from flag of the Axis 5
CPU1 (CPU No.2)
M27 U3E1\G48.0 U3E1\G516.4
SP.SVST H3E1 "J5" K107 M36 D26
RST M27
5-4
5 MOTION DEDICATED PLC INSTRUCTION
SET M32
M32 M31
RST M30
SET M34
(Note) : 4 points worth of the data from "M0" of the CPU No.2 are stored after M400
by S(P).DDRD instruction.
Start program
[F200]
SET M1//Axis 1 positioning start
[K104: Real]
1 INC-1
Axis 1, 10000000 PLS
Speed 1000000 PLS/s
[F201]
RST M1 //Axis 1 positioning end
Completion
POINT
Access from the PLC CPU is processed before the communication processing of
the Motion CPU. Therefore, if the Motion dedicated PLC instruction is frequently
performed from the PLC CPU, the scan time of the PLC CPU is not only prolonged,
but delay will arise in the communication processing of the Motion CPU.
Perform execution of the Motion dedicated PLC instruction from the PLC CPU by
S(P).DDWR/S(P).DDRD/S(P).CHGV instruction etc. only at the time of necessity.
5-5
5 MOTION DEDICATED PLC INSTRUCTION
5-6
5 MOTION DEDICATED PLC INSTRUCTION
(4) Self CPU operation data area used by Motion dedicated instruction (30H to 33H)
The complete status of the to self CPU high speed interrupt accept flag from
CPUn is stored in the following address.
Shared
CPU
Name Description
memory
address
To self CPU high speed interrupt
30H(48)
accept flag from CPU1
To self CPU high speed interrupt This area is used to check whether to self CPU high speed interrupt accept
31H(49)
accept flag from CPU2 flag from CPUn can be accepted or not.
To self CPU high speed interrupt 0: To self CPU high speed interrupt accept flag from CPUn accept usable.
32H(50)
accept flag from CPU3 1: To self CPU high speed interrupt accept flag from CPUn accept disable.
To self CPU high speed interrupt
33H(51)
accept flag from CPU4
5-7
5 MOTION DEDICATED PLC INSTRUCTION
5-8
5 MOTION DEDICATED PLC INSTRUCTION
5.2 Motion SFC Start Request from The PLC CPU to The Motion CPU:
S(P).SFCS (PLC instruction: S(P).SFCS )
• Motion SFC start request instruction from the PLC CPU to the Motion CPU
(S(P).SFCS)
Usable devices
Setting data
(n1)
(n2)
(D1)
(D2)
: Usable : Usable partly
(Note) : Setting data (n1) to (D2) : Index qualification possible
[Setting data]
Setting data Description Data type
(First I/O No. of the target CPU)/16
(Note-1) 16-bit
(n1) Value to specify actually is the following.
binary
CPU No.2 : 3E1H, CPU No.3 : 3E2H, CPU No.4 : 3E3H
16-bit
(n2) Motion SFC program No. to start.
binary
Complete devices
(D1+0) : Device which make turn on for one scan at start accept completion of
instruction.
(D1) Bit
(D1+1) : Device which make turn on for one scan at start accept abnormal
completion of instruction.
("D1+0" also turns on at the abnormal completion.)
16-bit
(D2) Device to store the complete status.
binary
(Note-1) : Motion CPU cannot used CPU No.1 in the Multiple CPU configuration.
(1) This instruction is dedicated instruction toward the Motion CPU in the Multiple
CPU system. Errors occurs when it was executed toward the CPU except the
Motion CPU.
5-9
5 MOTION DEDICATED PLC INSTRUCTION
(2) Request to start the Motion SFC program of the program No. specified with (n2).
The Motion SFC program can start any task setting of the normal task, event task
and NMI task.
(3) This instruction is always effective regardless of the state of real mode/virtual
mode/mode switching when the operating system software of Motion CPU is
SV22.
(4) S(P).SFCS/S(P).SVST/S(P).CHGA/S(P).CHGV/S(P).CHGT/S(P).DDRD/
S(P).DDWR cannot be executed simultaneously toward the CPU executing
S(P).SFCS instruction.
When the Motion dedicated PLC instruction is started continuously, it is necessary
to execute the next instruction after the complete device of executing instruction
turns on.
S(P).SFCS execution
ON
ON
Instruction start OFF
accept complete device
(D1+0)
ON : Abnormal completion only
State display device (D1+1)
at the instruction start OFF
accept completion
Instruction accept 1 scan
completion at the
Motion CPU side
5 - 10
5 MOTION DEDICATED PLC INSTRUCTION
[Errors]
The abnormal completion in the case shown below, and the error code is stored in the
device specified with the complete status storing device (D2).
Complete status (Note) Corrective
Error factor
(Error code)(H) action
The specified device cannot be used in the Motion CPU. Or,
4C00
it is outside the device range.
The instruction for the Multiple CPU system which did not be
4C01 correspond with operating system software of the Motion
Confirm a
CPU was executed.
program, and
The Motion SFC program No. to start is outside the range 0
4C02 correct it to a
to 255.
correct PLC
There are 33 or more instruction requests to the Motion CPU
program.
from the PLC CPU in S(P).SFCS/S(P).SVST/S(P).CHGA/
4C08
S(P).GINT sum table simultaneously, and the Motion CPU
cannot process them.
4C09 CPU No. of the instruction cause is injustice.
(Note) : 0000H (Normal)
The error flag (SM0) is turned on an operation error in the case shown below, and an
error code is stored in SD0.
(Note) Corrective
Error code Error factor
action
The CPU No. to be set by "(First I/O No. of the target
2110
CPU)/16" is specified.
The self CPU by "(First I/O No. of the target CPU)/16" is
2114
specified. Confirm a
The CPU except the Motion CPU by "(First I/O No. of the program, and
2117
target CPU)/16" is specified. correct it to a
4002 Specified instruction is wrong. correct PLC
The instruction is composed of devices except usable program.
4004
devices.
Since 0 to 3DFH, 3E4H is specified by "(First I/O No. of the
4100
target CPU)/16" is specified.
(Note) : 0000H (Normal)
[Program example]
This program starts the Motion SFC program No.10 of the Motion CPU No.4.
X0
SP.SFCS H3E3 K10 M0 D0
M0 M1
Normal complete program
M1
Abnormal complete program
5 - 11
5 MOTION DEDICATED PLC INSTRUCTION
5.3 Servo Program Start Request from The PLC CPU to The Motion CPU:
S(P).SVST (PLC instruction: S(P).SVST )
Refer to Section "1.3.4" for the applicable version of the Motion CPU and the software.
• Servo program start request instruction from the PLC CPU to the Motion CPU
(S(P).SVST)
Usable devices
Setting data
(S2)
(D1)
(D2)
: Usable : Usable partly
(Note) : Setting data except (S1) : Index qualification possible
[Setting data]
Setting data Description Data type
(First I/O No. of the target CPU)/16
(Note-1) 16-bit
(n1) Value to specify actually is the following.
binary
CPU No.2 : 3E1H, CPU No.3 : 3E2H, CPU No.4 : 3E3H
(Note-2)
Axis No.("Jn") to start. Character
(S1)
Q173CPU(N) : J1 to J32/Q172CPU(N) : J1 to J8 sequence
16-bit
(S2) Servo program No. to start.
binary
Complete devices
(D1+0) : Device which make turn on for one scan at start accept completion of
instruction.
(D1) Bit
(D1+1) : Device which make turn on for one scan at start accept abnormal
completion of instruction.
("D1+0" also turns on at the abnormal completion.)
16-bit
(D2) Device to store the complete status.
binary
(Note-1) : Motion CPU cannot used CPU No.1 in the Multiple CPU configuration.
(Note-2) : "n" shows the numerical value correspond to axis No..
Q173CPU(N) : Axis No.1 to No.32 (n=1 to 32) / Q172CPU(N) : Axis No.1 to No.8 (n=1 to 8)
5 - 12
5 MOTION DEDICATED PLC INSTRUCTION
[Controls]
(1) This instruction is dedicated instruction toward the Motion CPU in the Multiple
CPU system. Errors occurs when it was executed toward the CPU except the
Motion CPU.
(3) This instruction is always effective regardless of the state of real mode/virtual
mode/mode switching when the operating system software of Motion CPU is
SV22.
(4) S(P).SFCS/S(P).SVST/S(P).CHGA/S(P).CHGV/S(P).CHGT/S(P).DDRD/
S(P).DDWR cannot be executed simultaneously toward the CPU executing
S(P).SFCS instruction.
When the Motion dedicated PLC instruction is started continuously, It is necessary
to take an inter-lock by the to self CPU high speed interrupt accept flag from
CPUn.
(5) When the servo program is executed also at the motion control step (Kn) in the
Motion CPU, it is necessary to take an inter-lock by user program, because there
is no flag which can distinguish the axis starting in the PLC CPU.
Start accept flag (M2001 to M2032) of the motion devices or positioning start
completion flag (M2400+20n) is used as the inter-lock condition.
(6) It is necessary to take an inter-lock by the start accept flag of the shared CPU
memory so that multiple instructions may not be executed toward the same axis of
the same Motion CPU No..
[Operation]
PLC program END END END END t
S(P).SVST execution
ON
ON
Instruction start OFF
accept complete device
(D1+0)
ON : Abnormal completion only
State display device (D1+1)
at the instruction start OFF
accept completion
Instruction accept 1 scan
completion at the
Motion CPU side
(1) The start accept status of each axis can be confirmed with the start accept flag in
the shared CPU memory of target CPU.
5 - 13
5 MOTION DEDICATED PLC INSTRUCTION
[Setting range]
(1) Setting of the starting axis
The starting axis set as (S1) sets J + Axis No. in a character sequence " ".
Up to 8 axes can be set. If multiple axes are set, it sets without dividing in a
space etc,.
The axis No. set in the system setting (Refer to Section 1.5) is used as the axis
No. to start.
And, the axis No. to start does not need to be a order.
Example) When multiple axes (Axis1, Axis2, Axis10, Axis11) are set.
"J1J2J10J11"
5 - 14
5 MOTION DEDICATED PLC INSTRUCTION
[Errors]
The abnormal completion in the case shown below, and the error code is stored in the
device specified with the complete status storing device (D2).
5 - 15
5 MOTION DEDICATED PLC INSTRUCTION
The error flag (SM0) is turned on an operation error in the case shown below, and an
error code is stored in SD0.
(Note)
Error code Error factor Corrective action
[Program example]
Program which requests to start the servo program No.10 toward axis No.1 and No.2 of
the Motion CPU No.4. from the PLC CPU No.1.
RST M100
M0 M1
Normal complete program
M1
Abnormal complete program
5 - 16
5 MOTION DEDICATED PLC INSTRUCTION
5.4 Current Value Change Instruction from The PLC CPU to The Motion CPU:
S(P).CHGA (PLC instruction: S(P).CHGA )
Refer to Section "1.3.4" for the applicable version of the Motion CPU and the software.
• Current value change instruction from the PLC CPU to the Motion CPU (S(P).CHGA)
Usable devices
Setting data
(n1)
(S1)
(S2)
(D1)
(D2)
: Usable : Usable partly
(Note) : Setting data except (S1) : Index qualification possible
[Setting data]
Setting data Description Data type
(First I/O No. of the target CPU)/16
(Note-1) 16-bit
(n1) Value to specify actually is the following.
binary
CPU No.2 : 3E1H, CPU No.3 : 3E2H, CPU No.4 : 3E3H
(Note-2)
Axis No. ("Jn") to execute the current value change.
Q173CPU(N) : J1 to J32/Q172CPU(N) : J1 to J8
Synchronous encoder axis No. ("En") to execute the current value change. Character
(S1)
Q173CPU(N) : E1 to E12/Q172CPU(N) : E1 to E8 sequence
Cam axis No. ("Cn") to execute the within-one-revolution current value change.
Q173CPU(N) : C1 to C32/Q172CPU(N) : C1 to C8
32-bit
(S2) Setting of the current value to change.
binary
Complete devices
(D1+0) : Device which make turn on for one scan at start accept completion of
instruction.
(D1) Bit
(D1+1) : Device which make turn on for one scan at start accept abnormal
completion of instruction.
("D1+0" also turns on at the abnormal completion.)
16-bit
(D2) Device to store the complete status.
binary
(Note-1) : Motion CPU cannot used CPU No.1 in the Multiple CPU configuration.
(Note-2) : "n" shows the numerical value which correspond to axis No..
Q173CPU(N) : Axis No.1 to No.32 (n=1 to 32) / Q172CPU(N) : Axis No.1 to No.8 (n=1 to 8)
5 - 17
5 MOTION DEDICATED PLC INSTRUCTION
[Controls]
(1) This instruction is dedicated instruction toward the Motion CPU in the Multiple
CPU system. Errors occurs when it was executed toward the CPU except the
Motion CPU.
(2) The current value change of axis (stopped axis) No. specified with (S1) is changed
into the current value specified (S2).
(3) This instruction is always effective regardless of the state of real mode/virtual
mode/mode switching when the operating system software of Motion CPU is
SV22.
(4) S(P).SFCS/S(P).SVST/S(P).CHGA/S(P).CHGV/S(P).CHGT/S(P).DDRD/
S(P).DDWR cannot be executed simultaneously toward the CPU executing
S(P).CHGA instruction.
When the Motion dedicated PLC instruction is started continuously, It is necessary
to take an inter-lock by the to self CPU high speed interrupt accept flag from
CPUn.
(5) When the servo program is executed also at the motion control step (Kn) in the
Motion CPU, it is necessary to take an inter-lock by user program, because there
is no flag which can distinguish the axis starting in the PLC CPU.
Start accept flag (M2001 to M2032) of the motion devices is used as the inter-lock
condition in the Motion CPU.
(6) It is necessary to take an inter-lock by the start accept flag of the shared CPU
memory so that multiple instructions may not be executed toward the same axis of
the same Motion CPU No..
(7) The current change value is also possible when the servo program which execute
the CHGA instruction toward an axis is executed in the S(P).SVST instruction.
5 - 18
5 MOTION DEDICATED PLC INSTRUCTION
[Operation]
S(P).CHGA execution
ON
ON
Instruction start OFF
accept complete device
(D1+0)
ON : Abnormal completion only
State display device (D1+1)
at the instruction start OFF
accept completion
Instruction accept 1 scan
completion at the
Motion CPU side
(1) The start accept status of each axis can be confirmed with the start accept flag in
the shared CPU memory of target CPU.
[Setting range]
(1) Setting of axis to execute the current value change.
The starting axis set as (S1) sets J + Axis No. in a character sequence " ".
5 - 19
5 MOTION DEDICATED PLC INSTRUCTION
[Errors]
The abnormal completion in the case shown below, and the error code is stored in the
device specified with the complete status storing device (D2).
5 - 20
5 MOTION DEDICATED PLC INSTRUCTION
The error flag (SM0) is turned on an operation error in the case shown below, and an
error code is stored in SD0.
(Note)
Error code Error factor Corrective action
[Program example]
Program which changes the current value of the axis No.1 of the Motion CPU
(CPU No.4) from PLC CPU (CPU No.1) to 10.
RST M100
M0 M1
Normal complete program
M1
Abnormal complete program
5 - 21
5 MOTION DEDICATED PLC INSTRUCTION
[Controls]
(1) This instruction is dedicated instruction toward the Motion CPU at the Multiple
CPU system. Errors occurs when it was executed toward the CPU except the
Motion CPU.
(2) The synchronous encoder axis current value specified with (S1) is changed into
the current value specified (S2) at the virtual mode.
(3) This instruction is always effective regardless of the state of real mode/virtual
mode/mode switching when the operating system software of Motion CPU is
SV22.
(4) S(P).SFCS/S(P).SVST/S(P).CHGA/S(P).CHGV/S(P).CHGT/S(P).DDRD/
S(P).DDWR cannot be executed simultaneously toward the CPU executing
S(P).CHGA instruction.
When the Motion dedicated PLC instruction is started continuously, It is necessary
to take an inter-lock by the to self CPU high speed interrupt accept flag from
CPUn.
(5) When the servo program is executed also at the motion control step (Kn) in the
Motion CPU, it is necessary to take an inter-lock by user program, because there
is no flag which can distinguish the axis starting in the PLC CPU.
Synchronous encoder current value changing flag (M2101 to M2112) of the
motion devices is used as the inter-lock condition in the Motion CPU.
(6) It is necessary to take an inter-lock by the current value changing flag of the
shared CPU memory so that multiple instructions may not be executed toward the
same synchronous encoder axis of the same Motion CPU No..
(7) The current change value is also possible when the servo program which execute
the CHGA instruction toward the synchronous encoder axis is executed in the
S(P).SVST instruction.
5 - 22
5 MOTION DEDICATED PLC INSTRUCTION
[Operation]
S(P).CHGA execution
ON
ON
Instruction start OFF
accept complete device
(D1+0)
ON : Abnormal completion only
State display device (D1+1)
at the instruction start OFF
accept completion
Instruction accept 1 scan
completion at the
Motion CPU side
(1) The current value status of the synchronous encoder axis can be confirmed with
the current value changing in the shared CPU memory of target CPU.
[Setting range]
(1) Setting of the synchronous encoder axis to execute the current value change.
The synchronous encoder axis to execute the current value change set as (S1)
sets E + synchronous encoder axis No. in a character sequence " ".
[Errors]
The abnormal completion in the case shown below, and the error code is stored in the
device specified with the complete status storing device (D2).
5 - 24
5 MOTION DEDICATED PLC INSTRUCTION
The error flag (SM0) is turned on an operation error in the case shown below, and an
error code is stored in SD0.
(Note)
Error code Error factor Corrective action
[Program example]
Program which changes the current value of the axis No.1 of the Motion CPU
(CPU No.4) from PLC CPU (CPU No.1) to 10.
RST M100
M0 M1
Normal complete program
M1
Abnormal complete program
5 - 25
5 MOTION DEDICATED PLC INSTRUCTION
[Controls]
(1) This instruction is dedicated instruction toward the Motion CPU in the Multiple
CPU system. Errors occurs when it was executed toward the CPU except the
Motion CPU.
(2) The cam axis within-one-revolution current value specified with (S1) is changed
into the current value specified (S2) at the virtual mode.
(3) This instruction is always effective regardless of the state of real mode/virtual
mode/mode switching when the operating system software of Motion CPU is
SV22.
(4) S(P).SFCS/S(P).SVST/S(P).CHGA/S(P).CHGV/S(P).CHGT/S(P).DDRD/
S(P).DDWR cannot be executed simultaneously toward the CPU executing
S(P).CHGA instruction.
When the Motion dedicated PLC instruction is started continuously, It is necessary
to take an inter-lock by the to self CPU high speed interrupt accept flag from
CPUn.
(5) When the servo program is executed also at the motion control step (Kn) in the
Motion CPU, it is necessary to take an inter-lock by user program, because there
is no flag which can distinguish the axis starting in the PLC CPU.
(7) The current change value is also possible when the servo program which execute
the CHGA instruction toward the cam axis is executed in the S(P).SVST
instruction.
[Operation]
PLC program END END END END t
S(P).CHGA execution
ON
ON
Instruction start OFF
accept complete device
(D1+0)
ON : Abnormal completion only
State display device (D1+1)
at the instruction start OFF
accept completion
Instruction accept 1 scan
completion at the
Motion CPU side
5 - 26
5 MOTION DEDICATED PLC INSTRUCTION
(1) The current value status of the cam axis within-one-revolution current value
change can be confirmed with the cam axis within-one-revolution current value
changing flag in the shared CPU memory of target CPU.
[Setting range]
(1) Setting the cam axis which execute the within-one-revolution current value
change.
The cam axis to execute the within-one-revolution current value change set as
(S1) sets C + cam axis No. in a character sequence " ".
5 - 27
5 MOTION DEDICATED PLC INSTRUCTION
Shared CPU
memory address
Description
( ) is decimal
address
The cam axis within-one-revolution current value changing flag is stored by the
1 to 32 axis, each bit.
(As for a bit's actually being set Q173CPU(N) : C1 to C32/
Q172CPU(N) : C1 to C8.)
20CH(524) OFF : Start accept usable
20DH(525) ON : Start accept disable
b15 b1 b0
[Errors]
The abnormal completion in the case shown below, and the error code is stored in the
device specified with the complete status storing device (D2).
5 - 28
5 MOTION DEDICATED PLC INSTRUCTION
The error flag (SM0) is turned on an operation error in the case shown below, and an
error code is stored in SD0.
(Note)
Error code Error factor Corrective action
[Program example]
Program which changes the current value of the axis No.1 of the Motion CPU
(CPU No.4) from PLC CPU (CPU No.1) to 10.
RST M100
M0 M1
Normal complete program
M1
Abnormal complete program
5 - 29
5 MOTION DEDICATED PLC INSTRUCTION
5.5 Speed Change Instruction from The PLC CPU to The Motion CPU:
S(P).CHGV (PLC instruction: S(P).CHGV )
Refer to Section "1.3.4" for the applicable version of the Motion CPU and the software.
• Speed change instruction (S(P).CHGV)
Usable devices
Setting data
(S2)
(D1)
(D2)
: Usable : Usable partly
(Note) :Setting data except (S1) : Index qualification possible
[Setting data]
Setting data Description Data type
(First I/O No. of the target CPU)/16
(Note-1) 16-bit
(n1) Value to specify actually is the following.
binary
CPU No.2 : 3E1H, CPU No.3 : 3E2H, CPU No.4 : 3E3H
(Note-2)
Axis No. ("Jn") to execute the speed change. Character
(S1)
Q173CPU(N) : J1 to J32/Q172CPU(N) : J1 to J8 sequence
16-bit
(S2) Setting of the current value to change.
binary
Complete devices
(D1+0) : Device which make turn on for one scan at start accept completion of
instruction.
(D1) Bit
(D1+1) : Device which make turn on for one scan at start accept abnormal
completion of instruction.
("D1+0" also turns on at the abnormal completion.)
16-bit
(D2) Device to store the complete status.
binary
(Note-1) : Motion CPU cannot used CPU No.1 in the Multiple CPU configuration.
(Note-2) : "n" shows the numerical value which correspond to axis No..
Q173CPU(N) : Axis No.1 to No.32 (n=1 to 32) / Q172CPU(N) : Axis No.1 to No.8 (n=1 to 8)
5 - 30
5 MOTION DEDICATED PLC INSTRUCTION
[Controls]
(1) This instruction is dedicated instruction toward the Motion CPU in the Multiple
CPU system. Errors occurs when it was executed toward the CPU except the
Motion CPU.
(2) The speed change is executed of the axis specified with (S1) during positioning or
JOG operating.
(3) S(P).SFCS/S(P).SVST/S(P).CHGA/S(P).CHGV/S(P).CHGT/S(P).DDRD/
S(P).DDWR cannot be executed simultaneously toward the CPU executing
S(P).CHGV instruction.
When the Motion dedicated PLC instruction is started continuously, It is necessary
to take an inter-lock by the to self CPU high speed interrupt accept flag from
CPUn.
(4) When the speed change is executed also at the operation control step (Fn/FSn) in
the Motion CPU, it is necessary to take an inter-lock by user program, because
there is no flag which can distinguish the speed changing in the PLC CPU.
Speed changing flag (M2061 to M2092) of the motion devices is used as the inter-
lock condition in the Motion CPU.
(5) It is necessary to take an inter-lock by the speed changing flag of the shared CPU
memory so that multiple instructions may not be executed toward the same axis of
the same Motion CPU No..
[Operation]
PLC program END END END END t
S(P).CHGV execution
ON
ON
Instruction start OFF
accept complete device
(D1+0)
ON : Abnormal completion only
State display device (D1+1)
at the instruction start OFF
accept completion
Instruction accept 1 scan
completion at the
Motion CPU side
5 - 31
5 MOTION DEDICATED PLC INSTRUCTION
[Setting range]
(1) Setting of axis to execute the speed change.
The axis to execute the speed change set as (S1) sets J + axis No. in a character
sequence " ".
5 - 32
5 MOTION DEDICATED PLC INSTRUCTION
[Errors]
The abnormal completion in the case shown below, and the error code is stored in the
device specified with the complete status storing device (D2).
The error flag (SM0) is turned on an operation error in the case shown below, and an
error code is stored in SD0.
(Note)
Error code Error factor Corrective action
[Program example]
Program which changes the positioning speed of the axis No.1 of the Motion CPU
(CPU No.4) from PLC CPU (CPU No.1) to 1000.
RST M100
M0 M1
Normal complete program
M1
Abnormal complete program
5 - 33
5 MOTION DEDICATED PLC INSTRUCTION
5.6 Torque Limit Value Change Request Instruction from The PLC CPU to The Motion CPU:
S(P).CHGT (PLC instruction: S(P).CHGT )
Refer to Section "1.3.4" for the applicable version of the Motion CPU and the software.
• Torque limit value change request instruction from the PLC CPU to the Motion CPU
(S(P).CHGT)
Usable devices
Setting data
(S2)
(D1)
(D2)
: Usable : Usable partly
(Note) : Setting data except (S1) : Index qualification possible
[Setting data]
Setting data Description Data type
(First I/O No. of the target CPU)/16
(Note-1) 16-bit
(n1) Value to specify actually is the following.
binary
CPU No.2 : 3E1H, CPU No.3 : 3E2H, CPU No.4 : 3E3H
(Note-2)
Axis No. ("Jn") to execute the torque limit value change. Character
(S1)
Q173CPU(N) : J1 to J32/Q172CPU(N) : J1 to J8 sequence
16-bit
(S2) Setting of the torque limit value change to change.
binary
Complete devices
(D1+0) : Device which make turn on for one scan at start accept completion of
instruction.
(D1) Bit
(D1+1) : Device which make turn on for one scan at start accept abnormal
completion of instruction.
("D1+0" also turns on at the abnormal completion.)
16-bit
(D2) Device to store the complete status.
binary
(Note-1) : Motion CPU cannot used CPU No.1 in the Multiple CPU configuration.
(Note-2) : "n" shows the numerical value which correspond to axis No..
Q173CPU(N) : Axis No.1 to No.32 (n=1 to 32) / Q172CPU(N) : Axis No.1 to No.8 (n=1 to 8)
5 - 34
5 MOTION DEDICATED PLC INSTRUCTION
[Controls]
(1) This instruction is dedicated instruction toward the Motion CPU in the Multiple
CPU system. Errors occurs when it was executed toward the CPU except the
Motion CPU.
(2) The torque limit value of the axis specified with (S1) is changed to the value of
(S2) regardless of the state of during operating or stopping at the real mode.
(3) S(P).SFCS/S(P).SVST/S(P).CHGA/S(P).CHGV/S(P).CHGT/S(P).DDRD/
S(P).DDWR cannot be executed simultaneously toward the CPU executing
S(P).CHGT instruction.
When the Motion dedicated PLC instruction is started continuously, It is necessary
to take an inter-lock by the to self CPU high speed interrupt accept flag from
CPUn.
[Operation]
PLC program END END END END t
S(P).CHGT execution
ON
ON
Instruction start accept OFF
complete device (D1+0)
[Setting range]
(1) Setting of the axis to execute the torque limit value change.
The axis to execute the torque limit change set as (S1) sets J + axis No. in a
character sequence " ".
(S1) usable range
Q173CPU(N) 1 to 32
Q172CPU(N) 1 to 8
5 - 35
5 MOTION DEDICATED PLC INSTRUCTION
[Errors]
The abnormal completion in the case shown below, and the error code is stored in the
device specified with the complete status storing device (D2).
The error flag (SM0) is turned on an operation error in the case shown below, and an
error code is stored in SD0.
(Note)
Error code Error factor Corrective action
5 - 36
5 MOTION DEDICATED PLC INSTRUCTION
[Program example]
Program which changes the torque limit value of the axis No.1 of the Motion CPU
(CPU No.4) from PLC CPU (CPU No.1) to 10[%].
To self CPU
high speed
interrupt accept
flag from CPU
U3E3
\G48.0
M100
SP.CHGT H3E3 "J1" K10 M0 D0
RST M100
M0 M1
Normal complete program
M1
Abnormal complete program
5 - 37
5 MOTION DEDICATED PLC INSTRUCTION
5.7 Write from The PLC CPU to The Motion CPU: S(P).DDWR (PLC instruction:
S(P).DDWR )
• Write instruction from the PLC CPU to the Motion CPU (S(P).DDWR)
Usable devices
Setting data
(S2)
(D1)
(D2)
: Usable : Usable partly
(Note) : Setting data (n1) to (D2) : Index qualification possible
[Setting data]
Setting data Description Data type
(First I/O No. of the target CPU)/16
(Note-1) 16-bit
(n1) Value to specify actually is the following.
binary
CPU No.1 : 3E0H, CPU No.2 : 3E1H, CPU No.3 : 3E2H, CPU No.4 : 3E3H
(S1) First device of the self CPU in which control data is stored.
16-bit
(S2) First device of the self CPU in which writing data is stored.
binary
(D1) First device of the target Motion CPU which stores the writing data.
(D2) Bit device which make turn on for one scan at completion of instruction. Bit
(Note-1) : Motion CPU cannot used CPU No.1 in the Multiple CPU configuration.
[Control data]
Setting
Device Item Setting data Set by
range
The condition result at the completion of the
instruction is stored.
S1+0 Complete status — System
0 : No error (Normal completion)
Except 0 : Error code
Number of writing
S1+1 Set the number of writing data 1 to 16 User
data
5 - 38
5 MOTION DEDICATED PLC INSTRUCTION
[Controls]
(1) This instruction is dedicated instruction toward the Motion CPU in the Multiple
CPU system. Errors occurs when it was executed toward the CPU except the
Motion CPU.
A part for the number of writing data of the control data specified with (S1) of data
since the device specified with (S2) of the self CPU are stored to since the word
device specified with (D1) of the target CPU (n1) in the Multiple CPU system.
(2) Figure specification of the bit device is possible for (S2) and (D1). However, figure
specification is 4 figures and a start bit device number is only the multiple of 16. It
becomes INSTRCT CODE ERROR [4004] when other values are specified.
(3) If the target CPU is not instruction acceptable condition, even if the S(P).DDWR
instruction is executed, it may not be processed. In this case, it is necessary to
execute the S(P).DDWR instruction again.
(S(P).SFCS/S(P).SVST/S(P).CHGA/S(P).CHGV/S(P).CHGT/S(P).DDRD/
S(P).DDWR cannot be executed simultaneously toward the CPU executing
S(P).DDWR instruction.). It can be confirmed by data in the shared CPU memory
of the target CPU (Motion CPU) whether the instruction is acceptable or not.
When the Motion dedicated PLC instruction is started continuously, it is must be
design to execute next instruction after executing instruction complete device on.
(4) The target CPU device range check is not executed with self CPU at the
S(P).DDWR instruction execution, but it checks by the target CPU side, and it
becomes abnormal completion at the device range over.
(6) SM390 turns on when the target CPU specified with (n1) complete to accept.
SM390 turns off when the target CPU specified with (n1) cannot be write correctly
by the reset status or error factor (5000 to 5999).
5 - 39
5 MOTION DEDICATED PLC INSTRUCTION
ON : Abnormal completion
State display device at the first
S(P).DDWR instruction OFF
completion OFF : Normal completion
ON
S(P).DDWR instruction
(Second) OFF
ON
Second S(P).DDWR instruction
complete device OFF
ON : Abnormal completion
State display device at the second OFF
S(P).DDWR instruction
completion OFF : Normal completion
5 - 40
5 MOTION DEDICATED PLC INSTRUCTION
The error flag (SM0) is turned on an operation error in the case shown below, and an
error code is stored in SD0.
Confirm a program,
4002 Specified instruction is wrong.
and correct it to a
The instruction is composed of devices except usable correct PLC
4004 program.
devices.
[Program example]
<Example 1> <Example 2>
Program which stores 10 points worth of the data from D0 of the self Program which stores 10 points worth of the data from D0 of the
CPU (CPU No.1) since D100 of CPU No.2., when X0 is turned on. self CPU (CPU No.1) since D100 of CPU No.2. during turn on X0.
SM400 SM400
MOV K10 D51 MOV K10 D51
X0 X0 M10
SP.DDWR H3E1 D50 D0 D100 M10 SP.DDWR H3E1 D50 D0 D100 M10
M10 M11
Normal complete processing SET M0
M11 M0 M10
Abnormal complete processing RST M0
M10 M11
Normal complete processing
M11
Abnormal complete processing
5 - 41
5 MOTION DEDICATED PLC INSTRUCTION
5.8 Read from The Devices of The Motion CPU: S(P).DDRD (PLC instruction: S(P).DDRD )
(S2)
(D1)
(D2)
: Usable : Usable partly
(Note) : Setting data (n1) to (D2) : Index qualification possible
[Setting data]
Setting data Description Data type
(First I/O No. of the target CPU)/16
(Note-1)
(n1) Value to specify actually is the following.
CPU No.1 : 3E0H, CPU No.2 : 3E1H, CPU No.3 : 3E2H, CPU No.4 : 3E3H 16-bit
(S1) First device of the self CPU in which control data is stored. binary
(S2) First device of the target CPU in which reading data is stored.
(D1) First device of the self CPU which stores the reading data.
(D2) Bit device which make turn on for one scan at completion of instruction. Bit
(Note-1) : Motion CPU cannot used CPU No.1 in the Multiple CPU configuration.
[Control data]
Setting
Device Item Setting data Set by
range
The condition result at the completion of the
instruction is stored.
S1+0 Complete status — System
0 : No error (Normal completion)
Except 0 : Error code
Number of reading
S1+1 Set the number of reading data. 1 to 16 User
data
5 - 42
5 MOTION DEDICATED PLC INSTRUCTION
[Controls]
(1) This instruction is dedicated instruction toward the Motion CPU in the Multiple
CPU system. Errors occurs when it was executed toward the CPU except the
Motion CPU.
A part for the number of reading data of the control data specified with (S1) of
data since the device specified with (S2) in the target CPU (n1) is stored to since
the word device specified with (D1) of the self CPU in the Multiple CPU system.
(2) Figure specification of the bit device is possible for (S2) and (D1). However, figure
specification is 4 figures and a start bit device number is only the multiple of 16. It
becomes INSTRCT CODE ERROR [4004] when other values are specified.
(3) If the target CPU is not instruction acceptable condition, even if the S(P).DDWR
instruction is executed, it may not be processed. In this case, it is necessary to
execute the S(P).DDWR instruction again.
(S(P).SFCS/S(P).SVST/S(P).CHGA/S(P).CHGV/S(P).CHGT/S(P).DDRD/
S(P).DDWR cannot be executed simultaneously toward the CPU executing
S(P).DDWR instruction.). It can be confirmed by data in the shared CPU memory
of the target CPU (Motion CPU) whether the instruction is acceptable or not.
When the Motion dedicated PLC instruction is started continuously, it is must be
design to execute next instruction after executing instruction complete device on.
(4) The target CPU device range check is not executed with self CPU at the
S(P).DDRD instruction execution, but it checks by the target CPU side, and it
becomes abnormal completion at the device range over.
(6) SM390 turns on when the target CPU specified with (n1) complete to accept.
SM390 turns off when the target CPU specified with (n1) cannot be write correctly
by the reset status or error factor (5000 to 5999).
5 - 43
5 MOTION DEDICATED PLC INSTRUCTION
ON : Abnormal completion
State display device at the first
S(P).DDRD instruction OFF
completion OFF : Normal completion
ON
S(P).DDRD instruction
(Second) OFF
ON
Second S(P).DDRD instruction
complete device OFF
ON : Abnormal completion
State display device at the second OFF
S(P).DDRD instruction
completion OFF : Normal completion
[Errors]
The abnormal completion in the case shown below, and the error code is stored in the
control data (S1+ 0 : Complete status).
(Note)
Complete status
Error factor Corrective action
(Error code)(H)
The specified device cannot be used in the Motion
4C00
CPU. Or, it is outside the device range. Confirm a
There are 33 or more instruction requests to the Motion program, and
CPU from the PLC CPU in S(P).DDRD/S(P).DDWR correct it to a
4C08
sum table simultaneously, and the Motion CPU cannot correct PLC
process them. program.
4C09 CPU No. of the instruction cause is injustice.
(Note) : 0000H (Normal)
5 - 44
5 MOTION DEDICATED PLC INSTRUCTION
The error flag (SM0) is turned on an operation error in the case shown below, and an
error code is stored in SD0.
Confirm a program,
4002 Specified instruction is wrong.
and correct it to a
The instruction is composed of devices except usable correct PLC
4004 program.
devices.
[Program example]
<Example 1> <Example 2>
Program which stores 10 points worth of the data from D0 of the CPU Program stores 10 points worth of the data from D0 of the CPU No.2
since D100 of self CPU (CPU No.1), when X0 is turned on. since D100 of self CPU (CPU No.1) during turn on X0..
SM400 SM400
MOV K10 D51 MOV K10 D51
X0 X0 M10
SP.DDRD H3E1 D50 D0 D100 M0 SP.DDRD H3E1 D50 D0 D100 M10
M0 M1
Normal complete processing SET M0
M1 M0 M10
Abnormal complete processing RST M0
M10 M11
Normal complete processing
M11
Abnormal complete processing
5 - 45
5 MOTION DEDICATED PLC INSTRUCTION
5.9 Interrupt Instruction to The Other CPU: S(P).GINT (PLC instruction: S(P).GINT )
[Setting data]
Setting data Description Data type
(First I/O No. of the target CPU)/16
(Note-1) 16-bit
(n1) Value to specify actually is the following.
binary
CPU No.1 : 3E0H, CPU No.2 : 3E1H, CPU No.3 : 3E2H, CPU No.4 : 3E3H
16-bit
(n2) Interrupt instruction No. (0 to 15)
binary
(Note-1) : Motion CPU cannot used CPU No.1 in the Multiple CPU configuration.
[Controls]
This instruction generates the interrupt to the Motion CPU by PLC program when the
execution instruction of S(P).GINT is started (OFF ON).
The Motion CPU executes the active program (operation program status) processing
of the Motion SFC program set by "PLC interruption of the event task" at the interrupt
generation from the PLC CPU.
(1) This instruction is always effective regardless of the state of real mode/virtual
mode/mode switching when the operating system software of Motion CPU is
SV22.
(2) Motion CPU side is during DI (interrupt disable), event processing can make wait
even as for the EI (interrupt enable) instruction execution.
(3) SM390 turn on when the transmission of the instruction toward the target CPU
was completed. SM391 (S(P).GINT instruction execution completion flag) turned
on simultaneously.
5 - 46
5 MOTION DEDICATED PLC INSTRUCTION
(4) SM390 turn off when the transmission of the instruction toward the target CPU
was not completed. SM391 (S(P).GINT instruction execution completion flag)
turned off when the instruction toward the target CPU cannot be transmitted.
(5) Number of instruction execution does not have restriction, if to self CPU high
speed interrupt accept flag from CPUn in the target shared CPU memory of
S(P).GINT instruction.
[Operation]
PLC program END END END END t
S(P).GINT instruction execution
ON
[Errors]
The error flag (SM0) is turned on an operation error in the case shown below, and an
error code is stored in SD0.
(Note)
Complete status
Error factor Corrective action
(Error code)(H)
The CPU No. to be set by "(First I/O No. of the target
2110
CPU)/16" is specified.
The self CPU by "(First I/O No. of the target CPU)/16"
2114
is specified.
Confirm a
The CPU except the Motion CPU by "(First I/O No. of
2117 program, and
the target CPU)/16" is specified.
Since 0 to 3DFH, 3E4H is specified by "(First I/O No. of correct it to a
4100
the target CPU)/16" is specified. correct PLC
There are 33 or more instruction requests to the Motion program.
CPU from the PLC CPU in S(P).SFCS/S(P).SVST/
4C08
S(P).CHGA/S(P).GINT sum table simultaneously, and
the Motion CPU cannot process them.
(Note) : 0000H (Normal)
[Program example]
Program which generates the interrupt toward the Motion CPU No.4.
X0
SP.GINT H3E3 K10
SM391
Normal complete program
SM391
The program which generates
interruption again.
5 - 47
5 MOTION DEDICATED PLC INSTRUCTION
MEMO
5 - 48
6 MOTION SFC PROGRAMS
Refer to Chapter "19 ERROR CODE LISTS" for details of Motion SFC program error.
The Motion SFC Program is constituted by the combination of start, steps, transitions,
end and others are shows below.
Operation Program
start name START : Entry of program.
Positioning Step (operation control step) : The specified operation SET Y0=X0+X10
F0
ready control program is executed at active status. D100=W0+W100
Positioning ABS-1
K0 Step (motion control step) : The specified servo
execution Axis1, D100
program is executed at active status.
Speed 10000
Positioning
complete G1 Transition (WAIT) : Condition to transit to the next step. !X0
check
The above Motion SFC program to be started performs the following operations.
(1) The step (F0) is activated and the operation specified with the step (F0) is
executed (positioning ready). A step in such an active state is called an active 6
step.
(2) Whether the condition specified with the transition (G0) has enabled or not
(whether the positioning program can be started or not) is checked. The active
step (F0) is deactivated at the completion of condition and the next step (K0) is
activated (servo program (K0) is started).
(3) The operating completion of the step (K0) (positioning completion of the servo
program K0) is checked, and control transits to the next step at operating
completion (completion of condition).
(4) With the transition of the active step as described in above (1) to (3), control is
executed and ends at END.
Refer to Section "11.2.2 Task operation" for details of the execution timing of the
Motion SFC program such as above.
POINT
The number of steps which can be active steps simultaneously is up to 256, with
those of all Motion SFC programs combined. Excess of 256 will result in the Motion
SFC Program error 16120.
Each symbol of the Motion SFC program is as follows.
F/FS : Operation control, K : Positioning control, G : Judgment
6-1
6 MOTION SFC PROGRAMS
Parts as Motion SFC program components are shown below. The operation sequence
or transition control is expressed with connecting these parts by directed lines in the
Motion SFC program.
Symbol
Classification Name List Representation Function
(Code size (byte))
Program
start/end • Indicates an end (exit) of program.
• When a subroutine call was carried out, returns to the
END END END call source program.
• Multiple program names or no symbols for one
(8)
program.
Motion control Kn
CALL Kn • Starts a servo program Kn (K0 to K4095).
step
(8)
Once execution
Fn • Execute once the operation control program Fn (F0 to
type operation CALL Fn
F4095).
control step (8)
Scan execution
FSn • Repeats an operation control program FSn (FS0 to
type operation CALL FSn
FS4095) until the next transition condition enables.
control step (8)
6-2
6 MOTION SFC PROGRAMS
Symbol
Classification Name List representation Function
(Code size (byte))
• When just before is the motion control step, transits to
the next step by formation of transition condition Gn
(G0 to G4095) without waiting for the motion operating
completion.
Shift • When just before is the operation control step, transits
Gn
(Pre-read SFT Gn to the next step by the completion of transition
transition) (8) condition after operating execution.
• When just before is "subroutine call" / "starting step",
transits to the next step by formation of transition
condition without waiting for the operating completion
of subroutine.
• When just before is the motion control step, waits for
the motion operating completion and then transits to
the next step by the completion of transition condition
Gn (G0 to G4095).
• When just before is the operation control step, transits
Gn
WAIT WAIT Gn to the next step by formation of transition condition after
(8) operating execution. (Same operation as Shift.)
• When just before is "subroutine call" or "starting step",
waits for the operating completion of subroutine and
then transits to the next step by the completion of
transition condition.
• Prepares for starting of the next motion control step,
ON bit device
Transition and issues an instruction immediately when the
WAITON Kn WAITON bit device specified bit device turns ON.
• Always pair this transition with the motion control step
(14) one-for-one.
• Prepares for starting of the next motion control step,
OFF bit device
and issues an instruction immediately when the
WAITOFF Kn WAITOFF bit device specified bit device turns OFF.
• Always pair this transition with the motion control step
(14) one-for-one.
• When just before is the motion control step, transits to
the next step by formation of transition condition Gn
(G0 to G4095) without waiting for the motion operating
IFBm
completion. If not formation of transition condition,
IFT1
transits to the right-connected step.
(Not SFT Gn
completion • When just before is the operation control step, transits
of condition) :
to the next step by the completion of transition
Gn JMP IFEm
Shift Y/N N condition after operating execution. If not the
(Completion Y IFT2
of condition) completion of transition condition, transits to the right-
SFT Gn+?
connected step.
:
• When just before is "subroutine call" or "starting step",
JMP IFEm
transits to the next step by the completion of transition
IFEm
condition without waiting for the operating of subroutine
completion. If not formation of transition condition,
transits to the right-connected step.
6-3
6 MOTION SFC PROGRAMS
Symbol
Classification Name List representation Function
(Code size (byte))
• When just before is the motion control step, waits for
the motion operating completion and then transits to
the next step by formation of transition condition Gn
IFBm (G0 to G4095). If not completion of transition condition,
IFT1 transits to the right-connected step.
WAIT Gn • When just before is the operation control step, transits
(Not
completion : to the next step by the completion of transition
of condition)
JMP IFEm condition after operating execution. If not the
Transition WAIT Y/N Gn
N IFT2 completion of transition condition, transits to the right-
(Completion Y
of condition) WAIT Gn+? connected step.
: (Same operation as Shift.)
JMP IFEm • When just before is "subroutine call" or "starting step",
IFEm waits for the operating completion of subroutine, and
then transits to the next step by the completion of
transition condition. If not formation of transition
condition, transits to the right-connected step.
6-4
6 MOTION SFC PROGRAMS
Branch and coupling patterns which specify step and transition sequences in the
Motion SFC charts are shown below.
Name List
Motion SFC chart symbol Function
(Code size (byte)) representation
• Steps and transitions connected in series are
List processed in order from top to bottom.
representation • Steps and transitions need not be lined up
Series transition corresponding to alternately.
(Corresponding the Motion SFC • When a transition is omitted, unconditional shift
symbol size) chart symbols processing is performed.
shown in Section
6.2.
6-5
6 MOTION SFC PROGRAMS
Combining the basic type branches/couplings provides the following application types,
which are defined as in the basic types.
List
Name Motion SFC chart symbol Function
representation
CALL Kn • After a selective branch, a parallel branch can be
IFBm performed.
IFT1
SFT Gn
IFBm
Selective branch PABm
IFT1 IFT2
| PAT1
PABm
Parallel branch CALL Fn
PAT1 PAT2
:
JMP PAEm
PAT2
CALL Fn’
:
• The selective coupling point can be the same as
(JMP PAEm)
the coupling point of a parallel coupling for
PAEm
selective branch parallel branch. Note that in the
JMP IFEm
Motion SFC chart, this type is displayed in order of
Parallel coupling a parallel coupling a selective coupling, as
IFT2
| PAEm shown on the left.
SFT Gn’
Selective coupling IFEm • In this case, a pointer (Pn) cannot be set between
CALL Fn’’
the parallel coupling point (PAEm) and the
:
selective coupling point (IFEm).
(JMP IFEm)
IFEm
SFT Gn’’
Appli- SFT Gn • After a parallel branch, a selective branch can be
cation PABm PABm performed.
type Parallel branch PAT1 PAT2
PAT1
IFBm
| CALL Fn
FIT1 FIT2
Selective branch
IFBm
IFT1
SFT Gn’ • The parallel coupling point can be the same as the
CALL Fn’ coupling point of a selective coupling for parallel
: branch selective branch.
JMP IFEm
Note that in the Motion SFC chart, this type is
IFT2
displayed in order of a selective coupling a
SFT Gn’’
parallel coupling, as shown on the left.
CALL Fn’’
• In this case, a pointer (Pn) cannot be set between
:
the selective coupling point (IFEm) and the parallel
(JMP IFEm)
Selective coupling coupling point (PAEm).
IFEm
IFEm
| JMP PAEm
Parallel coupling PAEm
PAT2
CALL Fn’’’
:
CALL Kn
(JMP PAEm)
PAEm
SFT Gn’’’
6-6
6 MOTION SFC PROGRAMS
List
Name SFC chart symbol Function
representation
CALL Kn • After a selective branch, a selective branch can be
IFBm performed.
IFT1
SFT Gn
IFBm+1
IFBm
Selective branch IFT1
IFT1 IFT2
| SFT Gn’
IFBm+1
Selective branch :
IFT1 IFT2
JMP IFEm+1
IFT2
SFT Gn’’
:
(JMP IFEm+1)
IFEm+1
• The two selective coupling points for selective
JMP IFEm
branch selective branch can be the same.
Note that in the Motion SFC chart, this type is
IFT2
displayed in order of a selective coupling a
SFT Gn’’’
Selective coupling selective coupling, as shown on the left.
CALL Fn’ • In this case, a pointer (Pn) cannot be set between
IFEm+1
| :
IFEm the selective coupling point (IFEm+1) and the
Selective coupling (JMP IFEm) selective coupling point (IFEm).
IFEm
SFT Gn’’’’
Appli-
:
cation
type CALL Kn • After a parallel branch, a parallel branch can be
PABm performed.
PAT1 • A parallel branch can be nested up to four levels.
SFT Gn
PABm
Parallel branch PAT1 PAT2 PABm+1
| PABm+1
PAT1
PAT1 PAT2
Parallel branch CALL Fn’
:
JMP PAEm+1
PAT2
CALL Fn’’
: • The two parallel coupling points for parallel branch
(JMP PAEm+1) parallel branch can be the same. Note that in the
PAEm+1 Motion SFC chart, this type is displayed in order of
JMP PAEm a parallel coupling a parallel coupling, as shown
on the left.
PAT2 • In this case, a pointer (Pn) cannot be set between
Parallel coupling
PAEm+1
CALL Fn’’’ the parallel coupling point (PAEm+1) and the
|
PAEm
: parallel coupling point (PAEm).
Parallel coupling
CALL Kn
JMP PAEm
PAEm
SFT Gn’’’
:
6-7
6 MOTION SFC PROGRAMS
List
Name SFC chart symbol Function
representation
: • The selective coupling point and parallel branch
(JMP IFEm) point can be the same.
IFEm Note that in the Motion SFC chart, this type is
PABm displayed in order of a selective coupling a
PAT1 parallel branch, as shown on the left.
CALL Fn • In this case, a pointer (Pn) cannot be set between
Selective coupling IFEm
: the selective coupling point (IFEm) and the parallel
|
JMP PAEm branch point (PABm).
Parallel branch PABm
PAT2
PAT1 PAT2
CALL Fn’
:
(JMP PAEm)
PAEm
:
: • The parallel coupling point and selective branch
JMP PAEm point can be the same.
PAEm Note that in the Motion SFC chart, this type is
IFBm displayed in order of a parallel coupling a
IFT1 selective branch, as shown on the left.
SFT Gn • Execution waits at the parallel coupling point and
Parallel coupling PAEm
: shifts to the selective branch.
|
IFBm JMP IFEm • In this case, a pointer (Pn) cannot be set between
Selective branch
IFT2 the parallel coupling point (PAEm) and the
IFT1 IFT2
SFT Gn’ selective branch point (IFBm).
:
(JMP IFEm)
Appli- IFEm
cation :
type : • The selective coupling point and selective branch
(JMP IFEm) point can be the same.
IFEm Note that in the Motion SFC chart, this type is
IFBm+1 displayed in order of a selective coupling a
IFT1 selective branch, as shown on the left.
Selective coupling SFT Gn • In this case, a pointer (Pn) cannot be set between
| IFEm : the selective coupling point (IFEm) and the
Selective branch JMP IFEm+1 selective branch point (IFBm+1).
IFBm+1
IFT2
IFT1 IFT2 SFT Gn’
:
(JMP IFEm+1)
IFEm+1
: • The parallel coupling point and parallel branch
(JMP PAEm) point can be the same.
PAEm Note that in the Motion SFC chart, this type is
PABm+1 displayed in order of a parallel coupling a parallel
PAT1 branch, as shown on the left.
CALL Fn • Execution waits at the parallel coupling point and
Parallel coupling
: shifts to the parallel branch.
| PAEm
JMP PAEm+1 • In this case, a pointer (Pn) cannot be set between
Parallel branch
PABm+1 PAT2 the parallel coupling point (PAEm) and the parallel
PAT1 PAT2 CALL Fn’ branch point (PABm+1).
:
(JMP PAEm+1)
PAEm+1
:
6-8
6 MOTION SFC PROGRAMS
Set the "Motion SFC program name" to the Motion SFC program No.0 to No.255
individually. (Make this setting in the "Motion SFC program management window" on
the Motion SFC program edit screen.)
Set the Motion SFC program name within 16 characters. Specify this Motion SFC
program name for a "subroutine call/start step (GSUB)" and "clear step (CLR)".
Motion SFC programs correspond to No.0 to No.255 and saved in a one program-for-
one file format. The preset "Motion SFC program name" is used as the file name of the
Motion SFC Program file for user file management. (Refer to Chapter "12 USER
FILES" for details.)
POINT
(1) It is can be set the Motion SFC program to any of No.0 to No.255. There are
no specific programs which have special roles.
(2) "$" cannot be used in the first character of the Motion SFC program name.
(3) " / : ; , . * ? " < > |" cannot be used in Motion SFC program name.
6-9
6 MOTION SFC PROGRAMS
6.5 Steps
[Operations]
(1) Turns on the start accept flag of the axis specified with the specified servo program
Kn (n = 0 to 4095) runnnig.
Execution timing
[Errors]
(1) When the specified servo program Kn does not exist, the Motion SFC program
error [16200] will occur and stops to execute the Motion SFC program at the error
detection.
[Instructions]
(1) When the current value change is executed in the Motion SFC program running,
specify the CHGA instruction in the servo program and call it at the motion control
step.
(2) If the servo program has stopped due to a major/minor error which occurred at or
during a start of the servo program specified with the motion control step, the
Motion SFC program continues executing. When the Motion SFC program is
stopped at error detection, provide an error detection condition at the transition
(transition condition).
6 - 10
6 MOTION SFC PROGRAMS
[Operations]
(1) Once execution type operation control step Fn
In the case of Fn, executes the specified operation control program Fn (n = 0 to
4095) once.
[Errors]
(1) When the specified operation control program Fn/FSn does not exist, the Motion
SFC program error [16201] will occur and stops to execute the Motion SFC
program at the error detection.
[Instructions]
(1) Refer to Chapter "7 OPERATION CONTROL PROGRAMS" for operation
expressions that may be described in operation control programs.
(2) If an operation or similar error occurs the operation control program running, the
Motion SFC program continues executing.
6 - 11
6 MOTION SFC PROGRAMS
[Operations]
(1) Calls/starts the Motion SFC program of the specified program name.
(2) Control varies with the type of the transition coupled next to the subroutine
call/start step.
END END
WAIT Except WAIT
(Subroutine call) (Subroutine start)
[Errors]
(1) When the specified Motion SFC program does not exist at a subroutine call/start,
the Motion SFC program error [16005] will occur and stops to execute the Motion
SFC program at the error detection.
(2) When the called/started Motion SFC program is already starting at a subroutine
call/start, the Motion SFC program error [16006] will occur and stops to execute
the Motion SFC program at the error detection.
(3) When the self program is started at a subroutine call/start, the Motion SFC
program error [16110] will occur and stops to execute the Motion SFC program at
the error detection.
[Instructions]
(1) There are no restrictions on the depth of subroutine call/start nesting.
(2) For a subroutine start, the start source Motion SFC program continues processing
if the start destination Motion SFC program stops due to an error.
(3) For a subroutine call, the call source Motion SFC program stops running as soon
as the call destination Motion SFC program stops due to an error.
6 - 13
6 MOTION SFC PROGRAMS
[Operations]
(1) Stops the specified Motion SFC program running.
(2) The clear-specified Motion SFC program will not start automatically after stopped
if it has been set to start automatically.
(4) If the specified program is being subroutine called, the subroutine program called
is also stopped. (Shown below)
MAIN SUB If the program has been "subroutine called" as shown on the left
When the call source program (MAIN) is cleared.
Even if the subroutine (SUB) is running, both the call source
SUB program (MAIN) and subroutine (SUB) stop running.
When the subroutine (SUB) is running, the subroutine (SUB)
WAIT END stops running and execution to the call source program (MAIN).
END
(5) When the specified program has been subroutine started, the subroutine program
started continues processing. (Shown below)
MAIN SUB If the program has been "subroutine started" as shown on the left
When the started program (MAIN) is cleared.
Even if the subroutine (SUB) is running, the started program
SUB (MAIN) stops running but the started subroutine (SUB)
continues processing.
Shift END When the subroutine (SUB) is cleared
If the subroutine (SUB) is running, only the subroutine (SUB)
stops running.
END
(6) When the servo program started from the specified program is starting, the servo
program continues processing.
[Errors]
(1) When the Motion SFC program specified with the clear step does not exist, the
Motion SFC program error [16203] will occur.
[Instructions]
(1) When the Motion SFC program specified with the clear step is not starting, an
error does not occur specifically and this step is ignored.
(2) If the Motion SFC program running is stopped by the clear step, the output is held.
6 - 14
6 MOTION SFC PROGRAMS
6.6 Transitions
You can describe conditional and operation expressions at transitions. The operation
expression described here is repeated until the transition condition enables, as at the
scan execution type operation step.
Refer to Chapter "8 TRANSITION PROGRAMS" for the conditional/operation
expressions that can be described in transition conditions.
(1) Combinations with motion control steps
(a) Motion control step + Shift
[Operations]
Kn
• Transits to the next step by formation of transition condition
Gn Gn without waiting for the operating completion of the
servo program Kn started at the motion control step.
(b) Motion control step + WAIT
[Operations]
• Waits for the operating completion of the servo program Kn
started at the motion control step, and then transits to the
Kn
next step by formation of transition condition Gn.
Gn • The operation completion condition of the servo program
Kn is not needed in the transition condition Gn.
• An error stop of the started servo program Kn at/during a
start is also regarded as an operation completion.
(c) WAITON/WAITOFF + Motion control step
[Operations]
• Prepares for the start of the motion control
step next to WAITON/WAITOFF, and makes
a start immediately when the specified bit
device turns ON/OFF. When the motion
control step is executed without being used
ON M0 OFF M0 with WAITON/WAITOFF, preparations for a
start are made after the transition condition
Kn Kn preceding the motion control step enables.
This will cause a variation of delay/starting
time between when the transition condition is
completed and when a start is made, but a
combination with WAITON/WAITOFF can
eliminate the variation of the above
delay/starting time.
• Specifiable bit devices
Device Range
X X0 to X1FFF
Y Y0 to Y1FFF
M M0 to M8191
Special M M9000 to M9255
L L0 to L8191
B B0 to B1FFF
F F0 to F2047
6 - 15
6 MOTION SFC PROGRAMS
[Instructions]
• Always pair a transition with a motion control step one-for-one. If the step following
WAITON/WAITOFF is not a motion control step, the Motion SFC program error
[16102] will occur and the Motion SFC program running will stop at the error
detection.
• An error will not occur if the jump destination immediately after WAITON/WAITOFF
is a motion control step. (Left below)
• A pointer may exist immediately after WAITON/WAITOFF. (Right below)
ON M0
Gn
Pn
Pn
Kn
Pn
Kn
• If the servo program specified with a motion control step could not be started due to
a major/minor error, the Motion SFC program continues running and execution shifts
to the next, independently of the WAITON/WAITOFF bit device status. To stop the
Motion SFC program at error detection, provide an error detection condition at the
next transition (transition condition).
• The following instructions can be used in the motion control step used combining the
WAITON/WAITOFF.
(Linear interpolation control, circular interpolation control, helical interpolation, speed
switching control, position follow-up control, constant-speed control and high speed
oscillation.)
[Operations]
• At an operation control step, both Shift and
Fn Fn
WAIT perform the same operation, and after
Gn Gn
executing of the operation control program
Fn, transits to the next step by formation of
transition condition Gn.
6 - 16
6 MOTION SFC PROGRAMS
Pn Pn
Jump Pointer
[Operations]
• Setting a jump will cause a jump to the specified pointer Pn of the self program.
• You can set pointers at steps, transitions, branch points and coupling points.
• You can set pointers Pn at P0 to P16383 in one program.
[Instructions]
• You cannot make a jump setting which will exit from within parallel branch-parallel
coupling. Connect directly. (Bad example 1 given below)
• You cannot make a jump setting from outside parallel branch-parallel coupling to
within parallel branch-parallel coupling. (Bad example 2 given below)
• You cannot make a setting where a label and a jump will continue.
(Bad example 3 given below)
Pn
Pn Pn Pn
Pn
Pn
6.8 END
END
[Operations]
• Ends a program. (In this case of an event task or NMI task, operation changes with
end operation setting of the program parameter. Refer to Section "11.5 Program
Parameters" for details.)
• Making a subroutine call will return to the call source Motion SFC program.
[Instructions]
• END may be set a multiple number of times in one program.
• END cannot be set between a parallel branch and a parallel coupling.
• The output is held after the Motion SFC program is ended by END.
6 - 17
6 MOTION SFC PROGRAMS
G1
Transits to next by the completion of condition set at transition G1
without waiting for operating completion of the servo program K1.
K2 Starts the servo program K2.
POINT
For a subroutine start, self program and a subroutine program are processed in
parallel.
POINT
(1) The above start accept flag of the axis started in the next servo program K2 is
not included in interlocks.
To use it as an interlock, the user should set it in the transition condition G1.
(2) WAIT must be set to proceed to the next step on operation completion.
However, when there are specifically no conditions to be set as interlocks, set
"NOP (No Operation)" in the transition program (Gn).
6 - 18
6 MOTION SFC PROGRAMS
(Example) WAIT
After start axis in the servo
K1 Starts the servo program K1. program K1 has stopped (start
accept flag turns OFF), the
conditions of transitions G1 to
G1
G1 G2 G3 G255
G255
G255 are judged, and
execution transits to route
K2 K3 K4 K255
which condition is completed.
POINT
(1) Transition condition judgment is not always executed from left to right.
(2) Using Shift and WAIT together will cause a parallel branch.
P0
IFB1
G255 G255
G255
P0 Jump transition (normal jump)
6 - 19
6 MOTION SFC PROGRAMS
POINT
"Shift" or "WAIT" can be set to a transition preceding a parallel branch.
"WAITON" and "WAITOFF" cannot be set.
G1
PAB1 Parallel branch point
K2 K4 F10
Coupling jump
ON M100 G11
K3 F11
6 - 20
6 MOTION SFC PROGRAMS
POINT
The number of parallel branches need not match that of couplings at a parallel
coupling point.
(In the example of the diagram in Section 6.9.3 (2), the number of parallel branches
is 3 and that of couplings is 2.)
When a WAIT transition is set right after a parallel coupling, the stop completions of the
axes are not included in the waiting conditions if the parallel coupling is preceded by
motion control steps. To perform a parallel coupling on stop completions, set WAIT
transitions before a parallel coupling.
( )
K2 K3 K4 K5
Parallel coupling
( )
K2 K3 K4 K5
When you want to perform a coupling
on stop completions of axes started in
G2 G3 G4 G5 K2 to K5, set WAIT transition in each
route to make parallel coupling.
Parallel coupling
G1
6 - 21
6 MOTION SFC PROGRAMS
When routes are branch at a transition condition enables and disable, "Shift Y/N
transition" or "WAIT Y/N transition" will be useful.
<Y/N transition is used.> • Set the G0 program shown in above (Example 1) or (Example
2) as a G0 program.
IFB1 • The Motion SFC program list codes after conversion are the
G0 same as in the conventional description (different only in the
Motion SFC chart representation). Therefore, "automatic
search for free G number automatic generation of program
which conditional expression part is logically negated" is
performed during program editing to occupy two G programs.
Using "Program editor" to delete a Y/N transition does not
delete the automatically generated G program (G1 below).
Use "Program use list" to delete that program.
IFB1
G0 G1
6 - 22
6 MOTION SFC PROGRAMS
POINT
Refer to Section "1.2.3 (2) Table of the operation control/transition instruction" for
the instructions usable in the conditional expressions of "Shift Y/N" or "WAIT Y/N"
transition programs.
6 - 23
6 MOTION SFC PROGRAMS
• "Shift Y/N" used as selective branch • "WAIT Y/N" used as selective branch
• "Shift Y/N" and "WAIT Y/N" used as • "Shift (or WAIT) Y/N" used with other
parallel branch step/transition as parallel branch or
selective branch
(b) When a coupling precedes "Shift Y/N" or "WAIT Y/N: Provide "coupling-
branch continuation" in between.
6 - 24
6 MOTION SFC PROGRAMS
• End (END) from "Shift Y/N" or "WAIT Y/N" • Jump from "Shift Y/N" or "WAIT Y/N"
P1 P2
END
• Continuation from "Shift Y/N" or "WAIT Y/N" to "Shift Y/N" or "WAIT Y/N"
(selective branch-selective branch)
END
• When there are two or more connection lines from Y/N side of "Shift Y/N" or "WAIT
Y/N", selective branch continues to selective branch or parallel branch.
6 - 25
6 MOTION SFC PROGRAMS
A comment can be set to each symbol of the step/transition in the motion SFC chart.
Comments are shown in the Motion SFC chart by changing the display mode to
"Comment display" on the Motion SFC program edit screen.
Since the Motion SFC comments are stored into the CPU code area, performing read
from PC displays the Motion SFC chart with comments.
END
END
Subroutine call/start
Program name
step
CLR
Clear step Program name
Shift Up to 80 characters
Gn
(preread transition) Displayed in 20 characters 4 lines
WAIT Gn
Transition
WAITOFF OFF bit device
Shift Y/N Gn
WAIT Y/N Gn
Jump Jump Pn
Up to 64 characters
Displayed in 16 characters 4 lines
Pointer Pointer Pn
6 - 26
6 MOTION SFC PROGRAMS
POINT
(1) Motion SFC comments are stored into the CPU code area. The CPU code
area stores the Motion SFC chart codes, operation control (F/FS) program
codes, transition (G) program codes and Motion SFC comments.
Be careful not to set too many comments to avoid code area overflow. (Refer
to Section "1.2.2 (2) (b) Motion SFC Performance Specifications" for the code
area sizes.)
(2) You cannot use "," in comment statements.
6 - 27
6 MOTION SFC PROGRAMS
MEMO
6 - 28
7 OPERATION CONTROL PROGRAMS
Refer to Section "19.2 Motion SFC Error Code List" for error codes of the operation
error.
(Refer to the "Q173CPU(N)/Q172CPU(N) Motion controller (SV13/SV22) Programming
Manual (REAL MODE)" and "Q173CPU(N)/Q172CPU(N) Motion controller (SV22)
Programming Manual (VIRTUAL MODE)" for minor errors of the operation error.)
(c) There are no restrictions on the number of blocks that may be set in one
operation control program. However, one program is within 64k bytes.
(e) Transition conditions cannot be set. Transition conditions can be set only in
transition programs.
(f) The bit conditional expression that logical data value (true or false) is
returned in an operation control program, a comparison conditional
expression can be set up only as a source (S) of device set (SET=) or device
reset (RST=).
7
An operation control program example is shown below. 1 block
#0=D0+(D1+D2) #5//Substitution expression (four arithmetic operations)
W0:F=SIN(#10F)//Substitution expression (standard function)
CHGV(K2,K10)//Motion-dedicated function
1 program
SET M100=M0+X0//Bit device control (SET=)
RST M10=!X0//Bit device control (RST=)
DIN D0,X0//Bit device control (DIN)
Comment
7-1
7 OPERATION CONTROL PROGRAMS
7-2
7 OPERATION CONTROL PROGRAMS
The instruction and data parts are used for the following purposes.
• Instruction part.......... Indicates the function of that instruction.
• Data part................... Indicates the data used in the instruction.
7-3
7 OPERATION CONTROL PROGRAMS
Bit data
Logical data
b63 (1 bit)
Sign bit field
7-4
7 OPERATION CONTROL PROGRAMS
Bit data
7-5
7 OPERATION CONTROL PROGRAMS
Logical data
Bit data
Example 2
RST M5 = !X10 M100
Logical data
Bit data
Logical data
7-6
7 OPERATION CONTROL PROGRAMS
(a) For differentiation, the 32-bit floating-point type is ended by L and the 64-bit
floating-point type by F (F for the link register).
(b) For the 32-bit integer type and 64-bit floating-point type, specify the device
number with an even number. (It cannot be set as an odd number).
(c) The coasting timer FT is incremented per 888µs. (The coasting timer is a 32-
bit integer type.)
(a) When using the device in DIN or DOUT as batch bit data, specify n as a
multiple of 16.
7-7
7 OPERATION CONTROL PROGRAMS
(Description examples)
Good example Bad example
#(D10) #(D(D5))
D(#10L)F D(#4F)
(b) Indirect specification of device No. (n) using word device using operation
expression
• Device No. can be specified indirectly by calculation expressions which
use the following data and operators.
16-bit integer type word device
32-bit integer type word device
Usable data
16-bit integer type constant
32-bit integer type constant
Addition: +
Subtraction:
Multiplication:
Usable operators
Division: /
Remainder: %
Sign inversion:
• The word device which the device No. is specified indirectly cannot be
used.
• Only one operator may be used.
(Description examples)
Good example Bad example
#(D10-K5) #(D(D5)F+K20)
D(#10L%H6L)F D(#4L<<K2)
(Note) : When you want to use the result of calculation other than the above
to specify the device No. indirectly, describe it in two blocks as
shown below.
D0=SHORT(ASIN(#0F))
W0=#(D0)
7-8
7 OPERATION CONTROL PROGRAMS
The constant descriptions of the 16-bit integer type, 32-bit integer type and 64-bit
floating-point type are shown below.
16-Bit integer type 32-Bit integer type 64-Bit floating-point type
K-1.79E+308 to K-2.23E-308,
Decimal
K-32768 to K32767 K-2147483648L to K2147483647L K0.0,
representation
K2.23E-308 to K1.79E+308
Hexadecimal
H0000 to HFFFF H00000000L to HFFFFFFFFL —
representation
(1) The 32-bit integer type is ended by L and the 64-bit floating-point type is provided
with a decimal point and exponent part (E) to denote their data types explicitly.
(2) The constant without the data type is regarded as the applicable minimum type.
7-9
7 OPERATION CONTROL PROGRAMS
F/FS G
7.4.1 Substitution : =
[Usable data]
Usable Data
Word device Constant
Setting 64-bit 64-bit Bit Comparison
16-bit 32-bit 16-bit 32-bit Calculation
data Bit device floating Coasting floating conditional conditional
integer integer integer integer type expression
point timer point expression expression
type type (L) type (K/H) (K/H, L)
type (F) type (K)
(S) — — —
(D) — — — — — — — —
: Usable
[Setting data]
Setting data Description Data type of result
Word device/constant/calculation expression to be
(S)
substituted Data type of (D)
(D) Word device which will store the operation result
[Functions]
(1) The data value specified with (S) is substituted to the specified word device at (D).
(2) When (S) and (D) differ in data type, the data at (S) is converted into the data type
of (D) and the resultant data is substituted.
(When (D) is a 16- or 32-bit integer type and (S) is a 64-bit floating-point type, the
fraction part of (S) is discarded.)
[Errors]
(1) An operation error will occur if:
• The data at (S) is outside the data type range of (D); or
• (D) or (S) is an indirectly specified device and its device No. is outside the
range.
[Program examples]
(1) Program which substitutes the D0 value to #0
#0 = D0
#0 123 D0 123
7 - 10
7 OPERATION CONTROL PROGRAMS
The 64-bit floating-point type is converted into the 32-bit integer type and the
result is substituted.
#0 456
7 - 11
7 OPERATION CONTROL PROGRAMS
F/FS G
7.4.2 Addition : +
[Usable data]
Usable Data
Word device Constant
Setting 64-bit 64-bit Bit Comparison
16-bit 32-bit 16-bit 32-bit Calculation
data Bit device floating Coasting floating conditional conditional
integer integer integer integer type expression
point timer point expression expression
type type (L) type (K/H) (K/H, L)
type (F) type (K)
(S1) — — —
(S2) — — —
: Usable
[Setting data]
Setting data Description Data type of result
(S1) Augend data Data type of (S1) or (S2)
(S2) Addend data which is greater
[Functions]
(1) The data specified with (S2) is added to the data specified with (S1).
(2) When (S1) and (S2) differ in data type, the data of the smaller data type is
converted into that of the greater type before operation is performed.
[Errors]
(1) An operation error will occur if:
• (S1) or (S2) is an indirectly specified device and its device No. is outside the
range.
[Program examples]
(1) Program which substitutes the result of adding K123 and #0 to W0
W0 = K123 + #0
(2) Program which substitutes the result of adding #0F and #10 to D0L
D0L = #0F + #10
#3 #2 #1 #0
12345.789
D1 D0
D0L 12468
12468.789 +
#10 123
The 64-bit floating-point type data are used for addition, and the result is
converted into the 32-bit integer type and then substituted.
7 - 12
7 OPERATION CONTROL PROGRAMS
F/FS G
7.4.3 Subtraction :
[Usable data]
Usable Data
Word device Constant
Setting 64-bit 64-bit Bit Comparison
16-bit 32-bit 16-bit 32-bit Calculation
data Bit device floating Coasting floating conditional conditional
integer integer integer integer type expression
point timer point expression expression
type type (L) type (K/H) (K/H, L)
type (F) type (K)
(S1) — — —
(S2) — — —
: Usable
[Setting data]
Setting data Description Data type of result
(S1) Minuend data Data type of (S1) or (S2)
(S2) Subtracted data which is greater
[Functions]
(1) The data specified with (S2) is subtracted from the data specified with (S1).
(2) When (S1) and (S2) differ in data type, the data of the smaller data type is
converted into that of the greater type before operation is performed.
[Errors]
(1) An operation error will occur if:
• (S1) or (S2) is an indirectly specified device and its device No. is outside the
range.
[Program examples]
(1) Program which substitutes the result of subtracting #0 from K123 to W0
W0 = K123 #0
123
W0 -333
#0 456
7 - 13
7 OPERATION CONTROL PROGRAMS
(2) Program which substitutes the result of subtracting #10 from #0F to D0L
D0L = #0F #10
#3 #2 #1 #0
12345.789
D1 D0
12222.789
D0L 12222
#10 123
64-bit floating-point type data are used for subtraction, and the result is converted
into the 32-bit integer type and then substituted. The
7 - 14
7 OPERATION CONTROL PROGRAMS
F/FS G
7.4.4 Multiplication :
[Usable data]
Usable Data
Word device Constant
Setting 64-bit 64-bit Bit Comparison
16-bit 32-bit 16-bit 32-bit Calculation
data Bit device floating Coasting floating conditional conditional
integer integer integer integer type expression
point timer point expression expression
type type (L) type (K/H) (K/H, L)
type (F) type (K)
(S1) — — —
(S2) — — —
: Usable
[Setting data]
Setting data Description Data type of result
(S1) Multiplicand data Data type of (S1) or (S2)
(S2) Multiplier data which is greater
[Functions]
(1) The data specified with (S1) is multiplied by the data specified with (S2).
(2) When (S1) and (S2) differ in data type, the data of the smaller data type is
converted into that of the greater type before operation is performed.
[Errors]
(1) An operation error will occur if:
• (S1) or (S2) is an indirectly specified device and its device No. is outside the
range.
[Program examples]
(1) Program which substitutes the result of multiplying K123 by #0 to W0
W0 = K123 #0
123
W0 56088 *
#0 456
(2) Program which substitutes the result of multiplying #0F by #10 to D0L
D0L = #0F #10
#3 #2 #1 #0
12345.789
D1 D0
D0L 1518532
1518532.047 *
#10 123
The 64-bit floating-point type data are used for multiplication, and the result is
converted into the 32-bit integer type and then substituted.
7 - 15
7 OPERATION CONTROL PROGRAMS
F/FS G
7.4.5 Division : /
[Usable data]
Usable Data
Word device Constant
Setting 64-bit 64-bit Bit Comparison
16-bit 32-bit 16-bit 32-bit Calculation
data Bit device floating Coasting floating conditional conditional
integer integer integer integer type expression
point timer point expression expression
type type (L) type (K/H) (K/H, L)
type (F) type (K)
(S1) — — —
(S2) — — —
: Usable
[Setting data]
Setting data Description Data type of result
(S1) Dividend data Data type of (S1) or (S2)
(S2) Divisor data which is greater
[Functions]
(1) The data specified with (S1) is divided by the data specified with (S2) to find a
quotient.
(2) When (S1) and (S2) differ in data type, the data of the smaller data type is
converted into that of the greater type before operation is performed.
[Errors]
(1) An operation error will occur if:
• (S2) is 0; or
• (S1) or (S2) is an indirectly specified device and its device No. is outside the
range.
[Program examples]
(1) Program which divides K456 by #0 and substitutes a quotient to W0
W0 = K456 / #0
456
W0 3 /
#0 123
(2) Program which divides #0F by #10 and substitutes a quotient to D0L
D0L = #0F / #10
#3 #2 #1 #0
12345.789
D1 D0
100
100.3722683 /
#10 123
The 64-bit floating-point type data are used for division, and the quotient is
converted into the 32-bit integer type and then substituted.
7 - 16
7 OPERATION CONTROL PROGRAMS
F/FS G
7.4.6 Remainder : %
[Usable data]
Usable Data
Word device Constant
Setting 64-bit 64-bit Bit Comparison
16-bit 32-bit 16-bit 32-bit Calculation
data Bit device floating Coasting floating conditional conditional
integer integer integer integer type expression
point timer point expression expression
type type (L) type (K/H) (K/H, L)
type (F) type (K)
(S1) — — — — —
(S2) — — — — —
: Usable
[Setting data]
Setting data Description Data type of result
[Functions]
(1) The data specified with (S1) is divided by the data specified with (S2) to find a
remainder.
(2) When (S1) and (S2) differ in data type, the data of the smaller data type is
converted into that of the greater type before operation is performed.
[Errors]
(1) An operation error will occur if:
• (S2) is 0; or
• (S1) or (S2) is an indirectly specified device and its device No. is outside the
range.
[Program examples]
(1) Program which divides K456 by #0 and substitutes a remainder to W0
W0 = K456 % #0
456
W0 87 %
#0 123
7 - 17
7 OPERATION CONTROL PROGRAMS
F/FS G
[Usable data]
Usable Data
Word device Constant
Setting 64-bit 64-bit Bit Comparison
16-bit 32-bit 16-bit 32-bit Calculation
data Bit device floating Coasting floating conditional conditional
integer integer integer integer type expression
point timer point expression expression
type type (L) type (K/H) (K/H, L)
type (F) type (K)
(S) — — — — —
: Usable
[Setting data]
Setting data Description Data type of result
Data type of (S)
(S) Data whose bits will be inverted
(Integer type)
[Functions]
(1) The bit inverted value of the data specified with (S) is found.
[Errors]
(1) An operation error will occur if:
• (S) is an indirectly specified device and its device No. is outside the range.
[Program examples]
(1) Program which finds the bit inverted value of #0 and substitutes the value to D0
D0 = ˜ #0
b15 b0 b15 b0
D0 1101101011001011 #0 0010010100110100
7 - 18
7 OPERATION CONTROL PROGRAMS
F/FS G
[Usable data]
Usable Data
Word device Constant
Setting 64-bit 64-bit Bit Comparison
16-bit 32-bit 16-bit 32-bit Calculation
data Bit device floating Coasting floating conditional conditional
integer integer integer integer type expression
point timer point expression expression
type type (L) type (K/H) (K/H, L)
type (F) type (K)
(S1) — — — — —
(S2) — — — — —
: Usable
[Setting data]
Setting data Description Data type of result
[Functions]
(1) The bit-by-bit logical product of the data specified with (S1) and the data specified
with (S2) is found.
(2) When (S1) and (S2) differ in data type, the data of the smaller data type is
converted into that of the greater type before operation is performed. At this time,
note that signed data is converted.
[Errors]
(1) An operation error will occur if:
• (S1) or (S2) is an indirectly specified device and its device No. is outside the
range.
[Program examples]
(1) Program which ANDs #0 and #1 and substitutes the result to D0
D0 = #0 & #1
b15 b0
#0 0010010100110100
b15 b0
D0 0010000100100100 &
b15 b0
#1 0010100100100100
7 - 19
7 OPERATION CONTROL PROGRAMS
F/FS G
[Usable data]
Usable Data
Word device Constant
Setting 64-bit 64-bit Bit Comparison
16-bit 32-bit 16-bit 32-bit Calculation
data Bit device floating Coasting floating conditional conditional
integer integer integer integer type expression
point timer point expression expression
type type (L) type (K/H) (K/H, L)
type (F) type (K)
(S1) — — — — —
(S2) — — — — —
: Usable
[Setting data]
Setting data Description Data type of result
[Functions]
(1) The bit-by-bit logical add of the data specified with (S1) and the data specified with
(S2) is found.
(2) When (S1) and (S2) differ in data type, the data of the smaller data type is
converted into that of the greater type before operation is performed. At this time,
note that signed data is converted.
[Errors]
(1) An operation error will occur if:
• (S1) or (S2) is an indirectly specified device and its device No. is outside the
range.
[Program examples]
(1) Program which ORs #0 and #1 and substitutes the result to D0
D0 = #0 l #1
b15 b0
#0 0010010100110100
b15 b0
D0 0010110100110100 |
b15 b0
#1 0010100100100100
7 - 20
7 OPERATION CONTROL PROGRAMS
F/FS G
[Usable data]
Usable Data
Word device Constant
Setting 64-bit 64-bit Bit Comparison
16-bit 32-bit 16-bit 32-bit Calculation
data Bit device floating Coasting floating conditional conditional
integer integer integer integer type expression
point timer point expression expression
type type (L) type (K/H) (K/H, L)
type (F) type (K)
(S1) — — — — —
(S2) — — — — —
: Usable
[Setting data]
Setting data Description Data type of result
[Functions]
(1) The bit-by-bit exclusive logical add of the data specified with (S1) and the data
specified with (S2) is found.
(2) When (S1) and (S2) differ in data type, the data of the smaller data type is
converted into that of the greater type before operation is performed. At this time,
note that signed data is converted.
[Errors]
(1) An operation error will occur if:
• (S1) or (S2) is an indirectly specified device and its device No. is outside the
range.
[Program examples]
(1) Program which EXCLUSIVE ORs #0 and #1 and substitutes the result to D0
D0 = #0 ^ #1
b15 b0
#0 0010010100110100
b15 b0
D0 0000110000010000 ^
b15 b0
#1 0010100100100100
7 - 21
7 OPERATION CONTROL PROGRAMS
F/FS G
[Usable data]
Usable Data
Word device Constant
Setting 64-bit 64-bit Bit Comparison
16-bit 32-bit 16-bit 32-bit Calculation
data Bit device floating Coasting floating conditional conditional
integer integer integer integer type expression
point timer point expression expression
type type (L) type (K/H) (K/H, L)
type (F) type (K)
(S1) — — — — —
(S2) — — — — —
: Usable
[Setting data]
Setting data Description Data type of result
(S1) Data to be right-shifted Data type of (S1)
(S2) Number of right shifts (Integer type)
[Functions]
(1) The data specified with (S1) is shifted to the right by the number of times specified
with (S2).
(2) If the most significant bit of (S1) is 1, 1 enters the most significant bit of the right
shift result.
If the most significant bit of (S1) is 0, 0 enters the most significant bit of the right
shift result.
(3) When (S1) is a 16-bit integer type and (S2) is a negative number or not less than
16, the result is 0.
(4) When (S1) is a 32-bit integer type and (S2) is a negative number or not less than
32, the result is 0.
[Errors]
(1) An operation error will occur if:
• (S1) or (S2) is an indirectly specified device and its device No. is outside the
range.
[Program examples]
(1) Program which shifts #0 two bit positions to the right and substitutes the result to
D0
D0 = #0 >> K2
b15 b0 b15 b0
D0 0000100101001101 #0 0010010100110100
7 - 22
7 OPERATION CONTROL PROGRAMS
F/FS G
[Usable data]
Usable Data
Word device Constant
Setting 64-bit 64-bit Bit Comparison
16-bit 32-bit 16-bit 32-bit Calculation
data Bit device floating Coasting floating conditional conditional
integer integer integer integer type expression
point timer point expression expression
type type (L) type (K/H) (K/H, L)
type (F) type (K)
(S1) — — — — —
(S2) — — — — —
: Usable
[Setting data]
Setting data Description Data type of result
(S1) Data to be left-shifted Data type of (S1)
(S2) Number of left shifts (Integer type)
[Functions]
(1) The data specified with (S1) is shifted to the left by the number of times specified
with (S2).
(2) 0 enters the least significant bit of the left shift result.
(3) When (S1) is a 16-bit integer type and (S2) is a negative number or not less than
16, the result is 0.
(4) When (S1) is a 32-bit integer type and (S2) is a negative number or not less than
32, the result is 0.
[Errors]
(1) An operation error will occur if:
• (S1) or (S2) is an indirectly specified device and its device No. is outside the
range.
[Program examples]
(1) Program which shifts #0 one bit position to the left and substitutes the result to D0
D0 = #0 << K1
b15 b0 b15 b0
D0 0100101001101000 #0 0010010100110100
7 - 23
7 OPERATION CONTROL PROGRAMS
F/FS G
[Usable data]
Usable Data
Word device Constant
Setting 64-bit 64-bit Bit Comparison
16-bit 32-bit 16-bit 32-bit Calculation
data Bit device floating Coasting floating conditional conditional
integer integer integer integer type expression
point timer point expression expression
type type (L) type (K/H) (K/H, L)
type (F) type (K)
(S) — — —
: Usable
[Setting data]
Setting data Description Data type of result
(S) Data whose sign will be inverted Data type of (S)
[Functions]
(1) The sign-inverted value of the data specified with (S) is found.
[Errors]
(1) An operation error will occur if:
• (S) is an indirectly specified device and its device No. is outside the range.
[Program examples]
(1) Program which substitutes the sign-inverted value of #0 to D0
D0 = #0
D0 -123 #0 123
7 - 24
7 OPERATION CONTROL PROGRAMS
F/FS G
[Usable data]
Usable Data
Word device Constant
Setting 64-bit 64-bit Bit Comparison
16-bit 32-bit 16-bit 32-bit Calculation
data Bit device floating Coasting floating conditional conditional
integer integer integer integer type expression
point timer point expression expression
type type (L) type (K/H) (K/H, L)
type (F) type (K)
(S) — — —
: Usable
[Setting data]
Setting data Description Data type of result
Angle data on which SIN (sine) operation will be
(S) Floating-point type
performed
[Functions]
(1) SIN (sine) operation is performed on the data specified with (S).
(3) If (S) is an integer type, it is converted into a floating-point type before operation is
performed.
[Errors]
(1) An operation error will occur if:
• (S) is an indirectly specified device and its device No. is outside the range.
[Program examples]
(1) Program which performs the SIN operation of D0 and substitutes the result to #0F
#0F = SIN(D0)
#3 #2 #1 #0
0.70710678118655 D0 45
7 - 25
7 OPERATION CONTROL PROGRAMS
F/FS G
[Usable data]
Usable Data
Word device Constant
Setting 64-bit 64-bit Bit Comparison
16-bit 32-bit 16-bit 32-bit Calculation
data Bit device floating Coasting floating conditional conditional
integer integer integer integer type expression
point timer point expression expression
type type (L) type (K/H) (K/H, L)
type (F) type (K)
(S) — — —
: Usable
[Setting data]
Setting data Description Data type of result
Angle data on which COS (cosine) operation will
(S) Floating-point type
be performed
[Functions]
(1) COS (cosine) operation is performed on the data specified with (S).
(3) If (S) is an integer type, it is converted into a floating-point type before operation is
performed.
[Errors]
(1) An operation error will occur if:
• (S) is an indirectly specified device and its device No. is outside the range.
[Program examples]
(1) Program which performs the COS operation of D0 and substitutes the result to
#0F
#0F = COS(D0)
#3 #2 #1 #0
0.5 D0 60
7 - 26
7 OPERATION CONTROL PROGRAMS
F/FS G
[Usable data]
Usable Data
Word device Constant
Setting 64-bit 64-bit Bit Comparison
16-bit 32-bit 16-bit 32-bit Calculation
data Bit device floating Coasting floating conditional conditional
integer integer integer integer type expression
point timer point expression expression
type type (L) type (K/H) (K/H, L)
type (F) type (K)
(S) — — —
: Usable
[Setting data]
Setting data Description Data type of result
Angle data on which TAN (tangent) operation will
(S) Floating-point type
be performed
[Functions]
(1) TAN (tangent) operation is performed on the data specified with (S).
(3) If (S) is an integer type, it is converted into a floating-point type before operation is
performed.
[Errors]
(1) An operation error will occur if:
• (S) is an indirectly specified device and its device No. is outside the range; or
• (S) is 90+(180 n). ("n" is an integer)
[Program examples]
(1) Program which performs the TAN operation of D0 and substitutes the result to
#0F
#0F = TAN(D0)
#3 #2 #1 #0
0.57735026918963 D0 30
7 - 27
7 OPERATION CONTROL PROGRAMS
F/FS G
[Usable data]
Usable Data
Word device Constant
Setting 64-bit 64-bit Bit Comparison
16-bit 32-bit 16-bit 32-bit Calculation
data Bit device floating Coasting floating conditional conditional
integer integer integer integer type expression
point timer point expression expression
type type (L) type (K/H) (K/H, L)
type (F) type (K)
(S) — — —
: Usable
[Setting data]
Setting data Description Data type of result
-1
SIN value data on which SIN (arcsine) operation
(S) Floating-point type
will be performed
[Functions]
(1) SIN -1 (arcsine) operation is performed on the SIN value data specified with (S) to
find an angle.
(2) The SIN value specified with (S) must be within the range -1.0 to 1.0.
(4) If (S) is an integer type, it is converted into a floating-point type before operation is
performed.
[Errors]
(1) An operation error will occur if:
• (S) is outside the range -1.0 to 1.0; or
• (S) is an indirectly specified device and its device number is outside the range.
[Program examples]
(1) Program which performs the SIN -1 (arcsine) operation of D0 and substitutes the
result to #0F
#0F = ASIN(D0)
#3 #2 #1 #0
90.0 D0 1
7 - 28
7 OPERATION CONTROL PROGRAMS
F/FS G
[Usable data]
Usable Data
Word device Constant
Setting 64-bit 64-bit Bit Comparison
16-bit 32-bit 16-bit 32-bit Calculation
data Bit device floating Coasting floating conditional conditional
integer integer integer integer type expression
point timer point expression expression
type type (L) type (K/H) (K/H, L)
type (F) type (K)
(S) — — —
: Usable
[Setting data]
Setting data Description Data type of result
-1
COS value data on which COS (arccosine)
(S) Floating-point type
operation will be performed
[Functions]
(1) COS -1 (arccosine) operation is performed on the COS value data specified with
(S) to find an angle.
(2) The COS value specified with (S) must be within the range -1.0 to 1.0.
(4) If (S) is an integer type, it is converted into a floating-point type before operation is
performed.
[Errors]
(1) An operation error will occur if:
• (S) is outside the range -1.0 to 1.0; or
• (S) is an indirectly specified device and its device No. is outside the range.
[Program examples]
(1) Program which performs the COS -1 (arccosine) operation of D0F and substitutes
the result to #0F
#0F = ACOS(D0F)
#3 #2 #1 #0 D3 D2 D1 D0
60.0 0.5
7 - 29
7 OPERATION CONTROL PROGRAMS
F/FS G
[Usable data]
Usable Data
Word device Constant
Setting 64-bit 64-bit Bit Comparison
16-bit 32-bit 16-bit 32-bit Calculation
data Bit device floating Coasting floating conditional conditional
integer integer integer integer type expression
point timer point expression expression
type type (L) type (K/H) (K/H, L)
type (F) type (K)
(S) — — —
: Usable
[Setting data]
Setting data Description Data type of result
-1
TAN value data on which TAN (arctangent)
(S) Floating-point type
operation will be performed
[Functions]
(1) TAN -1 (arctangent) operation is performed on the TAN value data specified with
(S) to find an angle.
(3) If (S) is an integer type, it is converted into a floating-point type before operation is
performed.
[Errors]
(1) An operation error will occur if:
• (S) is an indirectly specified device and its device No. is outside the range.
[Program examples]
(1) Program which performs the TAN -1 (arctangent) operation of D0F and substitutes
the result to #0F
#0F = ATAN(D0F)
#3 #2 #1 #0 D3 D2 D1 D0
45.0 1.0
7 - 30
7 OPERATION CONTROL PROGRAMS
F/FS G
[Usable data]
Usable Data
Word device Constant
Setting 64-bit 64-bit Bit Comparison
16-bit 32-bit 16-bit 32-bit Calculation
data Bit device floating Coasting floating conditional conditional
integer integer integer integer type expression
point timer point expression expression
type type (L) type (K/H) (K/H, L)
type (F) type (K)
(S) — — —
: Usable
[Setting data]
Setting data Description Data type of result
Data on which square root operation will be
(S) Floating-point type
performed
[Functions]
(1) The square root of the data specified with (S) is found.
(2) Only a positive number may be specified with (S). (Operation cannot be
performed with a negative number.)
(3) If (S) is an integer type, it is converted into a floating-point type before operation is
performed.
[Errors]
(1) An operation error will occur if:
• (S) is a negative number; or
• (S) is an indirectly specified device and its device No. is outside the range.
[Program examples]
(1) Program which finds the square root of D0F and substitutes the result to #0F
#0F = SQRT(D0F)
#3 #2 #1 #0 D3 D2 D1 D0
3.0 9.0
7 - 31
7 OPERATION CONTROL PROGRAMS
F/FS G
[Usable data]
Usable Data
Word device Constant
Setting 64-bit 64-bit Bit Comparison
16-bit 32-bit 16-bit 32-bit Calculation
data Bit device floating Coasting floating conditional conditional
integer integer integer integer type expression
point timer point expression expression
type type (L) type (K/H) (K/H, L)
type (F) type (K)
(S) — — —
: Usable
[Setting data]
Setting data Description Data type of result
Data on which natural logarithm operation will be
(S) Floating-point type
performed
[Functions]
(1) The base e natural logarithm of the data specified with (S) is found.
(2) Only a positive number may be specified with (S). (Operation cannot be
performed with a negative number.)
(3) If (S) is an integer type, it is converted into a floating-point type before operation is
performed.
[Errors]
(1) An operation error will occur if:
• (S) is 0 or a negative number; or
• (S) is an indirectly specified device and its device No. is outside the range.
[Program examples]
(1) Program which finds the natural logarithm of D0F and substitutes the result to #0F
#0F = LN(D0F)
#3 #2 #1 #0 D3 D2 D1 D0
2.3025850929940 10.0
7 - 32
7 OPERATION CONTROL PROGRAMS
F/FS G
[Usable data]
Usable Data
Word device Constant
Setting 64-bit 64-bit Bit Comparison
16-bit 32-bit 16-bit 32-bit Calculation
data Bit device floating Coasting floating conditional conditional
integer integer integer integer type expression
point timer point expression expression
type type (L) type (K/H) (K/H, L)
type (F) type (K)
(S) — — —
: Usable
[Setting data]
Setting data Description Data type of result
Data on which exponential operation will be
(S) Floating-point type
performed
[Functions]
(1) Exponential operation is performed on the base e data specified with (S).
(2) If (S) is an integer type, it is converted into a floating-point type before operation is
performed.
[Errors]
(1) An operation error will occur if:
• (S) is an indirectly specified device and its device No. is outside the range.
[Program examples]
(1) Program which performs exponential operation of D0F and substitutes the result
to #0F
#0F = EXP(D0F)
#3 #2 #1 #0 D3 D2 D1 D0
442413.39200892 13.0
7 - 33
7 OPERATION CONTROL PROGRAMS
F/FS G
[Usable data]
Usable Data
Word device Constant
Setting 64-bit 64-bit Bit Comparison
16-bit 32-bit 16-bit 32-bit Calculation
data Bit device floating Coasting floating conditional conditional
integer integer integer integer type expression
point timer point expression expression
type type (L) type (K/H) (K/H, L)
type (F) type (K)
(S) — — —
: Usable
[Setting data]
Setting data Description Data type of result
Data on which absolute value conversion will be
(S) Data type of (S)
performed
[Functions]
(1) The absolute value of the data specified with (S) is found.
[Errors]
(1) An operation error will occur if:
• (S) is an indirectly specified device and its device No. is outside the range.
[Program examples]
(1) Program which finds the absolute value of D0F and substitutes the result to #0F
#0F = ABS(D0F)
#3 #2 #1 #0 D3 D2 D1 D0
33.0 -33.0
7 - 34
7 OPERATION CONTROL PROGRAMS
F/FS G
[Usable data]
Usable Data
Word device Constant
Setting 64-bit 64-bit Bit Comparison
16-bit 32-bit 16-bit 32-bit Calculation
data Bit device floating Coasting floating conditional conditional
integer integer integer integer type expression
point timer point expression expression
type type (L) type (K/H) (K/H, L)
type (F) type (K)
(S) — — —
: Usable
[Setting data]
Setting data Description Data type of result
(S) Data whose fractional portion will be rounded off Data type of (S)
[Functions]
(1) The rounded-off fractional portion value of the data specified with (S) is found.
(2) If (S) is a negative number, the absolute value of (S) is found and its fractional
portion is rounded off and signed.
(3) If (S) is an integer type, its value is returned unchanged, with no conversion
processing performed.
[Errors]
(1) An operation error will occur if:
• (S) is an indirectly specified device and its device No. is outside the range.
[Program examples]
(1) Program which finds the rounded-off fractional portion value of D0F and
substitutes the result to #0F
#0F = RND(D0F)
#3 #2 #1 #0 D3 D2 D1 D0
34.0 33.54
(2) Program which finds the rounded-off fractional portion value of D4F and
substitutes the result to #0F (when D4F is a negative number)
#0F = RND(D4F)
#3 #2 #1 #0 D7 D6 D5 D4
-33.0 -33.44
7 - 35
7 OPERATION CONTROL PROGRAMS
F/FS G
[Usable data]
Usable Data
Word device Constant
Setting 64-bit 64-bit Bit Comparison
16-bit 32-bit 16-bit 32-bit Calculation
data Bit device floating Coasting floating conditional conditional
integer integer integer integer type expression
point timer point expression expression
type type (L) type (K/H) (K/H, L)
type (F) type (K)
(S) — — —
: Usable
[Setting data]
Setting data Description Data type of result
(S) Data whose fractional portion will be rounded down Data type of (S)
[Functions]
(1) The largest integer not greater than the data specified with (S) is found.
(2) If the (S) value is positive, the absolute value will be smaller, and if it is negative,
the absolute value will be greater.
(3) If (S) is an integer type, its value is returned unchanged, with no conversion
processing performed.
[Errors]
(1) An operation error will occur if:
• (S) is an indirectly specified device and its device No. is outside the range.
[Program examples]
(1) Program which finds the rounded-down fractional portion value of D0F and
substitutes the result to #0F
#0F = FIX(D0F)
#3 #2 #1 #0 D3 D2 D1 D0
33.0 33.54
(2) Program which finds the rounded-down fractional portion value of D4F and
substitutes the result to #0F (when D4F is a negative number)
#0F = FIX(D4F)
#3 #2 #1 #0 D7 D6 D5 D4
-34.0 -33.54
7 - 36
7 OPERATION CONTROL PROGRAMS
F/FS G
[Usable data]
Usable Data
Word device Constant
Setting 64-bit 64-bit Bit Comparison
16-bit 32-bit 16-bit 32-bit Calculation
data Bit device floating Coasting floating conditional conditional
integer integer integer integer type expression
point timer point expression expression
type type (L) type (K/H) (K/H, L)
type (F) type (K)
(S) — — —
: Usable
[Setting data]
Setting data Description Data type of result
(S) Data whose fractional portion will be rounded up Data type of (S)
[Functions]
(1) The smallest integer not less than the data specified with (S) is found.
(2) If the (S) value is positive, the absolute value will be greater, and if it is negative,
the absolute value will be smaller.
(3) If (S) is an integer type, its value is returned unchanged, with no conversion
processing performed.
[Errors]
(1) An operation error will occur if:
• (S) is an indirectly specified device and its device No. is outside the range.
[Program examples]
(1) Program which finds the rounded-up fractional portion value of D0F and
substitutes the result to #0F
#0F = FUP(D0F)
#3 #2 #1 #0 D3 D2 D1 D0
34.0 33.54
(2) Program which finds the rounded-up fractional portion value of D4F and
substitutes the result to #0F (when D4F is a negative number)
#0F = FUP(D4F)
#3 #2 #1 #0 D7 D6 D5 D4
-33.0 -33.54
7 - 37
7 OPERATION CONTROL PROGRAMS
F/FS G
[Usable data]
Usable Data
Word device Constant
Setting 64-bit 64-bit Bit Comparison
16-bit 32-bit 16-bit 32-bit Calculation
data Bit device floating Coasting floating conditional conditional
integer integer integer integer type expression
point timer point expression expression
type type (L) type (K/H) (K/H, L)
type (F) type (K)
(S) — — — — —
: Usable
[Setting data]
Setting data Description Data type of result
Data type of (S)
(S) BCD data which will be converted into BIN data
(Integer type)
[Functions]
(1) The BCD data specified with (S) is converted into BIN data.
[Errors]
(1) An operation error will occur if:
• A value other than 0 to 9 is in any digit of (S); or
• (S) is an indirectly specified device and its device No. is outside the range.
[Program examples]
(1) Program which converts the BCD data of D0 into BIN data and substitutes the
result to #0
#0 = BIN(D0)
BIN 9999 BCD 9999
b15 b0 b15 b0
#0 0010011100001111 D0 1001100110011001
7 - 38
7 OPERATION CONTROL PROGRAMS
F/FS G
[Usable data]
Usable Data
Word device Constant
Setting 64-bit 64-bit Bit Comparison
16-bit 32-bit 16-bit 32-bit Calculation
data Bit device floating Coasting floating conditional conditional
integer integer integer integer type expression
point timer point expression expression
type type (L) type (K/H) (K/H, L)
type (F) type (K)
(S) — — — — —
: Usable
[Setting data]
Setting data Description Data type of result
Data type of (S)
(S) BIN data which will be converted into BCD data
(Integer type)
[Functions]
(1) The BIN data specified with (S) is converted into BCD data.
[Errors]
(1) An operation error will occur if:
• The data is other than 0 to 9999 when (S) is a 16-bit integer type;
• The data is other than 0 to 99999999 when (S) is a 32-bit integer type; or
• (S) is an indirectly specified device and its device No. is outside the range.
[Program examples]
(1) Program which converts the BIN data of D0 into BCD data and substitutes the
result to #0
#0 = BCD(D0)
BCD 9999 BIN 9999
b15 b0 b15 b0
#0 1001100110011001 D0 0010011100001111
7 - 39
7 OPERATION CONTROL PROGRAMS
F/FS G
[Usable data]
Usable Data
Word device Constant
Setting 64-bit 64-bit Bit Comparison
16-bit 32-bit 16-bit 32-bit Calculation
data Bit device floating Coasting floating conditional conditional
integer integer integer integer type expression
point timer point expression expression
type type (L) type (K/H) (K/H, L)
type (F) type (K)
(S) — — —
: Usable
[Setting data]
Setting data Description Data type of result
Data which will be converted into signed 16-bit
(S) 16-bit integer type
integer value
[Functions]
(1) The data specified with (S) is converted into a signed 16-bit integer value.
(3) When (S) is a 64-bit floating-point type, its fractional portion is rounded down
before conversion is made.
(4) If (S) is a 16-bit integer type, its value is returned unchanged, with no conversion
processing performed.
[Errors]
(1) An operation error will occur if:
• The (S) data is outside the range -32768 to 32767; or
• (S) is an indirectly specified device and its device No. is outside the range.
[Program examples]
(1) Program which converts the data of D0L into a signed 16-bit integer value and
substitutes the result to #0
#0 = SHORT(D0L)
D1 D0
#0 K-30000 K-30000L
(H8AD0) (HFFFF8AD0)
7 - 40
7 OPERATION CONTROL PROGRAMS
F/FS G
[Usable data]
Usable Data
Word device Constant
Setting 64-bit 64-bit Bit Comparison
16-bit 32-bit 16-bit 32-bit Calculation
data Bit device floating Coasting floating conditional conditional
integer integer integer integer type expression
point timer point expression expression
type type (L) type (K/H) (K/H, L)
type (F) type (K)
(S) — — —
: Usable
[Setting data]
Setting data Description Data type of result
Data which will be converted into unsigned 16-bit
(S) 16-bit integer type
integer value
[Functions]
(1) The data specified with (S) is converted into an unsigned 16-bit integer value.
(3) When (S) is a 64-bit floating-point type, its fractional portion is rounded down
before conversion is made.
(4) If (S) is a 16-bit integer type, its value is returned unchanged, with no conversion
processing performed.
[Errors]
(1) An operation error will occur if:
• The (S) data is outside the range 0 to 65535; or
• (S) is an indirectly specified device and its device No. is outside the range.
[Program examples]
(1) Program which converts the data of D0L into an unsigned 16-bit integer value and
substitutes the result to #0
#0 = USHORT(D0L)
D1 D0
#0 K-5536 K60000L
(HEA60) (H0000EA60)
7 - 41
7 OPERATION CONTROL PROGRAMS
F/FS G
[Usable data]
Usable Data
Word device Constant
Setting 64-bit 64-bit Bit Comparison
16-bit 32-bit 16-bit 32-bit Calculation
data Bit device floating Coasting floating conditional conditional
integer integer integer integer type expression
point timer point expression expression
type type (L) type (K/H) (K/H, L)
type (F) type (K)
(S) — — —
: Usable
[Setting data]
Setting data Description Data type of result
Data which will be converted into signed 32-bit
(S) 32-bit integer type
integer value
[Functions]
(1) The data specified with (S) is converted into a signed 32-bit integer value.
(3) When (S) is a 64-bit floating-point type, its fractional portion is rounded down
before conversion is made.
(4) If (S) is a 32-bit integer type, its value is returned unchanged, with no conversion
processing performed.
[Errors]
(1) An operation error will occur if:
• The (S) data is outside the range -2147483648 to 2147483647; or
• (S) is an indirectly specified device and its device No. is outside the range.
[Program examples]
(1) Program which converts the data of D0 into a signed 32-bit integer value and
substitutes the result to #0L
#0L = LONG(D0)
#1 #0
K-1L D0 K-1
(HFFFFFFFF) (HFFFF)
7 - 42
7 OPERATION CONTROL PROGRAMS
F/FS G
[Usable data]
Usable Data
Word device Constant
Setting 64-bit 64-bit Bit Comparison
16-bit 32-bit 16-bit 32-bit Calculation
data Bit device floating Coasting floating conditional conditional
integer integer integer integer type expression
point timer point expression expression
type type (L) type (K/H) (K/H, L)
type (F) type (K)
(S) — — —
: Usable
[Setting data]
Setting data Description Data type of result
Data which will be converted into unsigned 32-bit
(S) 32-bit integer type
integer value
[Functions]
(1) The data specified with (S) is converted into an unsigned 32-bit integer value.
(3) When (S) is a 64-bit floating-point type, its fractional portion is rounded down
before conversion is made.
(4) If (S) is a 32-bit integer type, its value is returned unchanged, with no conversion
processing performed.
[Errors]
(1) An operation error will occur if:
• The (S) data is outside the range 0 to 4294967295; or
• (S) is an indirectly specified device and its device No. is outside the range.
[Program examples]
(1) Program which converts the data of D0 into an unsigned 32-bit integer value and
substitutes the result to #0L
#0L = ULONG(D0)
#1 #0
K65535L D0 K-1
(H0000FFFF) (HFFFF)
Unsigned value is K65535
7 - 43
7 OPERATION CONTROL PROGRAMS
F/FS G
[Usable data]
Usable Data
Word device Constant
Setting 64-bit 64-bit Bit Comparison
16-bit 32-bit 16-bit 32-bit Calculation
data Bit device floating Coasting floating conditional conditional
integer integer integer integer type expression
point timer point expression expression
type type (L) type (K/H) (K/H, L)
type (F) type (K)
(S) — — —
: Usable
[Setting data]
Setting data Description Data type of result
Data which will be converted into signed 64-bit
(S) 64-bit floating-point type
floating-point value
[Functions]
(1) The data specified with (S) is converted into a signed 64-bit floating-point value.
(2) If (S) is a 64-bit floating-point type, its value is returned unchanged, with no
conversion processing performed.
[Errors]
(1) An operation error will occur if:
• (S) is an indirectly specified device and its device No. is outside the range.
[Program examples]
(1) Program which converts the data of D0L into a signed 64-bit floating-point value
and substitutes the result to #0F
#0F = FLOAT(D0L)
#3 #2 #1 #0 D1 D0
K-1.0 K-1L
(HFFFFFFFF)
7 - 44
7 OPERATION CONTROL PROGRAMS
F/FS G
[Usable data]
Usable Data
Word device Constant
Setting 64-bit 64-bit Bit Comparison
16-bit 32-bit 16-bit 32-bit Calculation
data Bit device floating Coasting floating conditional conditional
integer integer integer integer type expression
point timer point expression expression
type type (L) type (K/H) (K/H, L)
type (F) type (K)
(S) — — —
: Usable
[Setting data]
Setting data Description Data type of result
Data which will be converted into unsigned 64-bit
(S) 64-bit floating-point type
floating-point value
[Functions]
(1) The data specified with (S) is converted into an unsigned 64-bit floating-point
value.
(2) If (S) is a 64-bit floating-point type, its value is returned unchanged, with no
conversion processing performed.
[Errors]
(1) An operation error will occur if:
• (S) is an indirectly specified device and its device No. is outside the range.
[Program examples]
(1) Program which converts the data of D0L into an unsigned 64-bit floating-point
value and substitutes the result to #0F
#0F = UFLOAT(D0L)
#3 #2 #1 #0 D1 D0
K4294967295.0 K-1L
(HFFFFFFFF)
Unsigned value is K4294967295
7 - 45
7 OPERATION CONTROL PROGRAMS
F/FS G
[Usable data]
Usable Data
Word device Constant
Setting 64-bit 64-bit Bit Comparison
16-bit 32-bit 16-bit 32-bit Calculation
data Bit device floating Coasting floating conditional conditional
integer integer integer integer type expression
point timer point expression expression
type type (L) type (K/H) (K/H, L)
type (F) type (K)
(S) — — — — — — — — — —
: Usable
[Setting data]
Setting data Description Data type of result
(S) Bit device used in bit conditional expression Logical type (true/false)
[Functions]
(1) True is returned when the bit device specified with (S) in a bit conditional
expression is ON (1), or false is returned when that bit device is OFF (0).
[Errors]
(1) An operation error will occur if:
• (S) is an indirectly specified device and its device No. is outside the range.
[Program examples]
(1) Program which sets M100 when either of M0 and X0 is ON (1)
SET M100 = M0 + X0
M0 0 (False)
(True)
M100 1 +
X0 1 (True)
7 - 46
7 OPERATION CONTROL PROGRAMS
F/FS G
[Usable data]
Usable Data
Word device Constant
Setting 64-bit 64-bit Bit Comparison
16-bit 32-bit 16-bit 32-bit Calculation
data Bit device floating Coasting floating conditional conditional
integer integer integer integer type expression
point timer point expression expression
type type (L) type (K/H) (K/H, L)
type (F) type (K)
(S) — — — — — — — — — —
: Usable
[Setting data]
Setting data Description Data type of result
(S) Bit device used in bit conditional expression Logical type (true/false)
[Functions]
(1) True is returned when the bit device specified with (S) in a bit conditional
expression is OFF (0), or false is returned when that bit device is ON (1).
[Errors]
(1) An operation error will occur if:
• (S) is an indirectly specified device and its device No. is outside the range.
[Program examples]
(1) Program which resets M100 when M0 is OFF (0)
RST M100 = !M0
M100 0 !M0 0 (True)
7 - 47
7 OPERATION CONTROL PROGRAMS
F/FS G
[Usable data]
Usable Data
Word device Constant
Setting 64-bit 64-bit Bit Comparison
16-bit 32-bit 16-bit 32-bit Calculation
data Bit device floating Coasting floating conditional conditional
integer integer integer integer type expression
point timer point expression expression
type type (L) type (K/H) (K/H, L)
type (F) type (K)
(D) — — — — — — — — — —
(S) — — — — — — — —
: Usable
(Note-1) : PX is write-disabled and cannot be used at (D).
(Note-2) : M2001 to M2032 cannot be used at (D).
[Setting data]
Setting data Description Data type of result
(D) Bit data for device set
Bit logical type
Condition data which determines whether device
(S) (true/false)
set will be performed or not
[Functions]
(1) If the data specified with (S) is true, the bit data specified with (D) is set.
(3) When this instruction is set as a transition condition in the last block of a transient
program, whether the data specified with (S) is true or false is returned as logical
type data. In this case, (S) cannot be omitted.
[Errors]
(1) An operation error will occur if:
• (D) or (S) is an indirectly specified device and its device No. is outside the
range.
7 - 48
7 OPERATION CONTROL PROGRAMS
[Program examples]
(1) Program which sets M100 when either of M0 and X0 is 1
SET M100 = M0 + X0
M0 0
M100 1 + (True)
X0 1
M100 1 == (True)
D0 100
Y0 1
7 - 49
7 OPERATION CONTROL PROGRAMS
F/FS G
[Usable data]
Usable Data
Word device Constant
Setting 64-bit 64-bit Bit Comparison
16-bit 32-bit 16-bit 32-bit Calculation
data Bit device floating Coasting floating conditional conditional
integer integer integer integer type expression
point timer point expression expression
type type (L) type (K/H) (K/H, L)
type (F) type (K)
(D) — — — — — — — — — —
(S) — — — — — — — —
: Usable
(Note-1) : PX is write-disabled and cannot be used at (D).
(Note-2) : M2001 to M2032 cannot be used at (D).
[Setting data]
Setting data Description Data type of result
(D) Bit data for device reset
Bit logical type
Condition data which determines whether device
(S) (true/false)
reset will be performed or not
[Functions]
(1) If the data specified with (S) is true, the bit data specified with (D) is reset.
(3) When this instruction is set as a transition condition in the last block of a transient
program, whether the data specified with (S) is true or false is returned as logical
type data. In this case, (S) cannot be omitted.
[Errors]
(1) An operation error will occur if:
• (D) or (S) is an indirectly specified device and its device No. is outside the
range.
7 - 50
7 OPERATION CONTROL PROGRAMS
[Program examples]
(1) Program which resets M100 when either of M0 and X0 is 1
RST M100 = M0 + X0
M0 0
M100 0 + (True)
X0 1
M100 0 != (True)
D0 200
Y0 0
7 - 51
7 OPERATION CONTROL PROGRAMS
F/FS G
[Usable data]
Usable Data
Word device Constant
Setting 64-bit 64-bit Bit Comparison
16-bit 32-bit 16-bit 32-bit Calculation
data Bit device floating Coasting floating conditional conditional
integer integer integer integer type expression
point timer point expression expression
type type (L) type (K/H) (K/H, L)
type (F) type (K)
(D) — — — — — — — — — —
(S) — — — — —
: Usable
(Note-1) : PX and special M cannot be used at (D).
(Note-2) : Range including M2000 to M2127 cannot be used at (D).
[Setting data]
Setting data Description Data type of result
(D) Output destination bit data
Batch bit
(S) Output source data
[Functions]
(1) The data specified with (S) is output to the bit data specified with (D).
(2) Specify a multiple of 16 as the device No. of the bit data specified with (D).
(3) If the type of (S) is a 16-bit integer type, 16 points of the (S) data, starting at the
least significant bit, are output in order to the bit devices headed by the one
specified with (D).
(4) If the type of (S) is a 32-bit integer type, 32 points of the (S) data, starting at the
least significant bit, are output in order to the bit devices headed by the one
specified with (D).
[Errors]
(1) An operation error will occur if:
• (D) or (S) is an indirectly specified device and its device No. is outside the
range.
• (D) is an indirectly specified device and its device No. is not a multiple of 16.
[Program examples]
(1) Program which outputs the data of D0 to Y0-YF
DOUT Y0, D0
YF Y0 b15 b0
0010011100001111 D0 0010011100001111
7 - 52
7 OPERATION CONTROL PROGRAMS
F/FS G
[Usable data]
Usable Data
Word device Constant
Setting 64-bit 64-bit Bit Comparison
16-bit 32-bit 16-bit 32-bit Calculation
data Bit device floating Coasting floating conditional conditional
integer integer integer integer type expression
point timer point expression expression
type type (L) type (K/H) (K/H, L)
type (F) type (K)
(D) — — — — — — — — —
(S) — — — — — — — — — —
: Usable
[Setting data]
Setting data Description Data type of result
(D) Input destination data Data type of (D)
(S) Input source bit data (Integer type)
[Functions]
(1) The bit data specified with (S) is input to the data specified with (D).
(2) Specify a multiple of 16 as the device No. of the bit data specified with (S).
(3) If the type of (D) is a 16-bit integer type, 16 points of the (D) data, starting at the
least significant bit, are input in order to the bit devices headed by the one
specified with (S).
(4) If the type of (D) is a 32-bit integer type, 32 points of the (D) data, starting at the
least significant bit, are input in order to the bit devices headed by the one
specified with (S).
[Errors]
(1) An operation error will occur if:
• (D) or (S) is an indirectly specified device and its device No. is outside the
range.
• (S) is an indirectly specified device and its device No. is not a multiple of 16.
[Program examples]
(1) Program which inputs the data of X0-XF to D0
DIN D0, X0
b15 b0 XF X0
D0 0010011100001111 0010011100001111
7 - 53
7 OPERATION CONTROL PROGRAMS
F/FS G
Refer to the Section "1.3.4" for the correspondence version of the Motion CPU and the
software.
Format OUT(D)=(S) Number of basic steps 4
[Usable data]
Usable Data
Word device Constant
Setting 64-bit 64-bit Bit Comparison
16-bit 32-bit 16-bit 32-bit Calculation
data Bit device floating Coasting floating conditional conditional
integer integer integer integer type expression
point timer point expression expression
type type (L) type (K/H) (K/H, L)
type (F) type (K)
(D) — — — — — — — — — —
(S) — — — — — — — —
: Usable
[Setting data]
Setting data Description Data type of result
(D) Bit device for device output Bit logical type
(S) Condition data which determines device output (true/false)
[Functions]
(1) If the data specified with (S) is true, the bit data specified with (D) is set, and if the
data specified with (S) is false, the bit data specified with (D) is reset.
(2) When this instruction is set as a transition condition in the last block of a transient
program, whether the data specified with (S) is true or false is returned as logical
type data.
[Errors]
(1) An operation error will occur if:
• (D) or (S) is an indirectly specified device and its device No. is outside the
range.
[Program examples]
(1) Program which sets M100 when M0 is ON (1) and program which resets M100
when M0 is OFF (0)
OUT M100 = M0
(2) Program which sets M100 when M0 and M1 are both on and resets M100 except
it
OUT M100 = M0 * M1
7 - 54
7 OPERATION CONTROL PROGRAMS
(3) Program which sets M100 when D0 is equal to D2000 and resets M100 when D is
not equal to D2000
OUT M100 = (D0 == D2000)
7 - 55
7 OPERATION CONTROL PROGRAMS
F/FS G
[Usable data]
Usable Data
Word device Constant
Setting 64-bit 64-bit Bit Comparison
16-bit 32-bit 16-bit 32-bit Calculation
data Bit device floating Coasting floating conditional conditional
integer integer integer integer type expression
point timer point expression expression
type type (L) type (K/H) (K/H, L)
type (F) type (K)
(S) — — — — — — — —
: Usable
[Setting data]
Setting data Description Data type of result
(S) Data which will be logically acknowledged Logical type (true/false)
[Functions]
(1) Whether the logical type data specified with (S) is true or false is returned
unchanged. (Logical acknowledgement)
[Errors]
(1) An operation error will occur if:
• (S) is an indirectly specified device and its device No. is outside the range.
[Program examples]
(1) Program which sets M100 when either of M0 and X0 is ON (1)
SET M100 = M0 + X0
M0 0 (False)
(True)
M100 1 +
X0 1 (True)
7 - 56
7 OPERATION CONTROL PROGRAMS
F/FS G
[Usable data]
Usable Data
Word device Constant
Setting 64-bit 64-bit Bit Comparison
16-bit 32-bit 16-bit 32-bit Calculation
data Bit device floating Coasting floating conditional conditional
integer integer integer integer type expression
point timer point expression expression
type type (L) type (K/H) (K/H, L)
type (F) type (K)
(S) — — — — — — — —
: Usable
[Setting data]
Setting data Description Data type of result
(S) Data which will be logically negated Logical type (true/false)
[Functions]
(1) The data specified with (S) is logically negated.
[Errors]
(1) An operation error will occur if:
• (S) is an indirectly specified device and its device No. is outside the range.
[Program examples]
(1) Program which sets M100 when "either of M0 and X0 is not ON (1)" (when M0
and X0 are both OFF (0))
SET M100 = ! (M0 + X0)
M0 0 (False)
(True) ! (False)
M100 1 +
X0 0 (False)
7 - 57
7 OPERATION CONTROL PROGRAMS
F/FS G
[Usable data]
Usable Data
Word device Constant
Setting 64-bit 64-bit Bit Comparison
16-bit 32-bit 16-bit 32-bit Calculation
data Bit device floating Coasting floating conditional conditional
integer integer integer integer type expression
point timer point expression expression
type type (L) type (K/H) (K/H, L)
type (F) type (K)
(S1) — — — — — — — —
(S2) — — — — — — — —
: Usable
[Setting data]
Setting data Description Data type of result
(S1)
Data which will be ANDed Logical type (true/false)
(S2)
[Functions]
(1) The data specified with (S1) and the data specified with (S2) are ANDed.
[Errors]
(1) An operation error will occur if:
• (S) is an indirectly specified device and its device No. is outside the range.
[Program examples]
(1) Program which sets M100 when M0 and X0 are both 1
SET M100 = M0 X0
M0 1
M100 1 (True)
X0 1
7 - 58
7 OPERATION CONTROL PROGRAMS
F/FS G
7.10.4 Logical OR : +
[Usable data]
Usable Data
Word device Constant
Setting 64-bit 64-bit Bit Comparison
16-bit 32-bit 16-bit 32-bit Calculation
data Bit device floating Coasting floating conditional conditional
integer integer integer integer type expression
point timer point expression expression
type type (L) type (K/H) (K/H, L)
type (F) type (K)
(S1) — — — — — — — —
(S2) — — — — — — — —
: Usable
[Setting data]
Setting data Description Data type of result
(S1)
Data which will be ORed Logical type (true/false)
(S2)
[Functions]
(1) The data specified with (S1) and the data specified with (S2) are ORed.
[Errors]
(1) An operation error will occur if:
• (S1) or (S2) is an indirectly specified device and its device No. is outside the
range.
[Program examples]
(1) Program which sets M100 when either of M0 and X0 is 1
SET M100 = M0 + X0
M0 0
M100 1 + (True)
X0 1
7 - 59
7 OPERATION CONTROL PROGRAMS
F/FS G
7.11.1 Equal to : ==
[Usable data]
Usable Data
Word device Constant
Setting 64-bit 64-bit Bit Comparison
16-bit 32-bit 16-bit 32-bit Calculation
data Bit device floating Coasting floating conditional conditional
integer integer integer integer type expression
point timer point expression expression
type type (L) type (K/H) (K/H, L)
type (F) type (K)
(S1) — — —
(S2) — — —
: Usable
[Setting data]
Setting data Description Data type of result
(S1)
Data which will be compared Logical type (true/false)
(S2)
[Functions]
(1) The data specified with (S1) and the data specified with (S2) are compared, and
the result is true if they are equal.
(2) When (S1) and (S2) differ in data type, the data of the smaller data type is
converted into that of the greater type before comparison is performed.
[Errors]
(1) An operation error will occur if:
• (S1) or (S2) is an indirectly specified device and its device No. is outside the
range.
[Program examples]
(1) Program which compares whether #0 and D0 are equal or not
#0 = = D0
#0 100
(True) ==
D0 100
7 - 60
7 OPERATION CONTROL PROGRAMS
F/FS G
[Usable data]
Usable Data
Word device Constant
Setting 64-bit 64-bit Bit Comparison
16-bit 32-bit 16-bit 32-bit Calculation
data Bit device floating Coasting floating conditional conditional
integer integer integer integer type expression
point timer point expression expression
type type (L) type (K/H) (K/H, L)
type (F) type (K)
(S1) — — —
(S2) — — —
: Usable
[Setting data]
Setting data Description Data type of result
(S1)
Data which will be compared Logical type (true/false)
(S2)
[Functions]
(1) The data specified with (S1) and the data specified with (S2) are compared, and
the result is true if they are not equal.
(2) When (S1) and (S2) differ in data type, the data of the smaller data type is
converted into that of the greater type before comparison is performed.
[Errors]
(1) An operation error will occur if:
• (S1) or (S2) is an indirectly specified device and its device No. is outside the
range.
[Program examples]
(1) Program which compares whether #0 and D0 are unequal or not
#0 != D0
#0 100
(True) !=
D0 20
7 - 61
7 OPERATION CONTROL PROGRAMS
F/FS G
[Usable data]
Usable Data
Word device Constant
Setting 64-bit 64-bit Bit Comparison
16-bit 32-bit 16-bit 32-bit Calculation
data Bit device floating Coasting floating conditional conditional
integer integer integer integer type expression
point timer point expression expression
type type (L) type (K/H) (K/H, L)
type (F) type (K)
(S1) — — —
(S2) — — —
: Usable
[Setting data]
Setting data Description Data type of result
(S1)
Data which will be compared Logical type (true/false)
(S2)
[Functions]
(1) The result is true if the data specified with (S1) is less than the data specified with
(S2).
(2) When (S1) and (S2) differ in data type, the data of the smaller data type is
converted into that of the greater type before comparison is performed.
[Errors]
(1) An operation error will occur if:
• (S1) or (S2) is an indirectly specified device and its device No. is outside the
range.
[Program examples]
(1) Program which compares whether #0 is less than D0 or not
#0 < D0
#0 10
(True) <
D0 20
7 - 62
7 OPERATION CONTROL PROGRAMS
F/FS G
[Usable data]
Usable Data
Word device Constant
Setting 64-bit 64-bit Bit Comparison
16-bit 32-bit 16-bit 32-bit Calculation
data Bit device floating Coasting floating conditional conditional
integer integer integer integer type expression
point timer point expression expression
type type (L) type (K/H) (K/H, L)
type (F) type (K)
(S1) — — —
(S2) — — —
: Usable
[Setting data]
Setting data Description Data type of result
(S1)
Data which will be compared Logical type (true/false)
(S2)
[Functions]
(1) The result is true if the data specified with (S1) is less than or equal to the data
specified with (S2).
(2) When (S1) and (S2) differ in data type, the data of the smaller data type is
converted into that of the greater type before comparison is performed.
[Errors]
(1) An operation error will occur if:
• (S1) or (S2) is an indirectly specified device and its device No. is outside the
range.
[Program examples]
(1) Program which compares whether #0 is less than or equal to D0 or not
#0 <= D0
#0 10
(True) <=
D0 20
7 - 63
7 OPERATION CONTROL PROGRAMS
F/FS G
[Usable data]
Usable Data
Word device Constant
Setting 64-bit 64-bit Bit Comparison
16-bit 32-bit 16-bit 32-bit Calculation
data Bit device floating Coasting floating conditional conditional
integer integer integer integer type expression
point timer point expression expression
type type (L) type (K/H) (K/H, L)
type (F) type (K)
(S1) — — —
(S2) — — —
: Usable
[Setting data]
Setting data Description Data type of result
(S1)
Data which will be compared Logical type (true/false)
(S2)
[Functions]
(1) The result is true if the data specified with (S1) is greater than the data specified
with (S2).
(2) When (S1) and (S2) differ in data type, the data of the smaller data type is
converted into that of the greater type before comparison is performed.
[Errors]
(1) An operation error will occur if:
• (S1) or (S2) is an indirectly specified device and its device No. is outside the
range.
[Program examples]
(1) Program which compares whether #0 is greater than D0 or not
#0 > D0
#0 400
(True) >
D0 20
7 - 64
7 OPERATION CONTROL PROGRAMS
F/FS G
[Usable data]
Usable Data
Word device Constant
Setting 64-bit 64-bit Bit Comparison
16-bit 32-bit 16-bit 32-bit Calculation
data Bit device floating Coasting floating conditional conditional
integer integer integer integer type expression
point timer point expression expression
type type (L) type (K/H) (K/H, L)
type (F) type (K)
(S1) — — —
(S2) — — —
: Usable
[Setting data]
Setting data Description Data type of result
(S1)
Data which will be compared Logical type (true/false)
(S2)
[Functions]
(1) The result is true if the data specified with (S1) is greater than or equal to the data
specified with (S2).
(2) When (S1) and (S2) differ in data type, the data of the smaller data type is
converted into that of the greater type before comparison is performed.
[Errors]
(1) An operation error will occur if:
• (S1) or (S2) is an indirectly specified device and its device No. is outside the
range.
[Program examples]
(1) Program which compares whether #0 is greater than or equal to D0 or not
#0 >= D0
#0 400
(True) >=
D0 20
7 - 65
7 OPERATION CONTROL PROGRAMS
F/FS G
[Usable data]
Usable Data
Word device Constant
Setting 64-bit 64-bit Bit Comparison
16-bit 32-bit 16-bit 32-bit Calculation
data Bit device floating Coasting floating conditional conditional
integer integer integer integer type expression
point timer point expression expression
type type (L) type (K/H) (K/H, L)
type (F) type (K)
(S1) — — — — — — — — — —
(S2) — — — — — —
: Usable
[Setting data]
Setting data Description Data type of result
Axis No. to which speed change request will be
(S1)
given —
(S2) Specified speed
[Functions]
(1) A speed change is made in the following procedure.
(a) The speed changing flag (M2061 to M2092) correspond to the axis specified
with (S1) is turned ON.
(b) The speed of the axis specified with (S1) is changed to the speed specified
with (S2).
(c) The speed changing flag is turned OFF.
(2) The axis No. that may be set at (S1) is within the following range.
Q172CPU(N) Q173CPU(N)
1 to 8 1 to 32
For interpolation control, set any one of the interpolation axes. When linear
interpolation control is exercised, a speed change varies as described below with
the positioning speed designation method set in the servo program.
Positioning speed designation
Operation
method
Speed change is made so that the combined speed
Combined speed designation
becomes the speed specified with (S2).
Speed change is made so that the longest axis
Longest axis designation
speed becomes the speed specified with (S2).
Speed change is made so that the reference axis
Reference axis speed designation
speed becomes the speed specified with (S2).
7 - 66
7 OPERATION CONTROL PROGRAMS
(3) Operation varies with the sign of the specified speed set at (S2).
Sign of specified speed Operation
Positive Speed change
0 Temporary stop
Negative Return
(4) The specified speed that may be set at (S2) is within the following range.
(a) Real mode
mm inch degree PLS
Setting range Unit Setting range Unit Setting range Unit Setting range Unit
Speed change 0 to 10-2 0 to 10-3 0 to 10-3 0 to
PLS/s
request 600000000 mm/min 600000000 inch/min 2147483647 degree/min 10000000
-1 to 10-2 -1 to 10-3 -1 to 10-3 -1 to
Return request PLS/s
-600000000 mm/min -600000000 inch/min -2147483647 degree/min -10000000
(5) The speed changed by CHGV instruction is effective only on the servo program
during starting.
7 - 67
7 OPERATION CONTROL PROGRAMS
(6) By specifying a negative speed and making a speed change request during the
start, allows the axis to start deceleration at that point and return in the opposite
direction upon completion of deceleration.
The following operations by the servo instruction are shown below.
Control mode Servo instruction Operation
ABS 1 INC 1
[Controls]
(a) If a speed change is made to a negative speed, control is executed with the
control mode during the start as indicated in the above table.
(b) The returning command speed is the absolute value of a new speed.
[Errors]
(1) An operation error will occur and a speed change will not be made if:
• The specified axis No. of (S1) is outside the range.
• (S2) is an indirectly specified device and its device No. is outside the range.
(2) A minor error will occur and a speed change will not be made if:
• The axis specified with (S1) is home position return (Minor error: 301).
• The axis specified with (S1) is decelerating (Minor error: 303).
(3) A minor error will occur and the axis to be controlled at the speed limit value if:
• The absolute value of the speed specified with (S2) is greater than the speed
limit value. (Minor error: 305)
POINT
If the absolute value of a negative new speed is higher than the speed specified
with the servo program during constant-speed control, return control is exercised at
the speed specified in the program (speed clamp control for a speed change during
constant-speed control).
At this time, an error will not occur.
7 - 69
7 OPERATION CONTROL PROGRAMS
[Program examples]
(1) Program which changes the positioning speed of axis 2
CHGV(K2,K10)
(2) Return program which changes the positioning speed of axis 1 to a negative value
CHGV(K1,K 1000)
[ Servo program ]
Locus
CPSTART2
Axis 1 Axis 2
Axis 2
Speed 1000
P2 P3
P1 ABS-2
Axis 1, 10000
Axis 2, 0
P2 ABS-2
Axis 1, 10000 Negative speed change
Axis 2, 10000
ABS-2
P3
Axis 1, 20000 Starting point P1 Axis 1
Axis 2, 10000
CPEND
Combined speed
Waiting at P1
Return operation to point
Command in-position
(OFF)
Speed change "0"
accepting flag
7 - 70
7 OPERATION CONTROL PROGRAMS
POINT
(1) A speed change may be invalid if it is made from when a servo program start
request is made until the "positioning start completion signal" status changes to
ON. When making a speed change at almost the same timing as a start,
always create a program which will execute the speed change after the
"positioning start completion signal" has turned ON.
(2) A return request, which is made while the axis is at a stop waiting for FIN using
the M code FIN signal waiting function during constant-speed control, will be
ignored.
(3) In the above example, if a return request is given right before P2 and the axis
passes through P2 during deceleration, the axis will return to P2.
(4) There will be a delay of time equivalent to an operation cycle at the maximum
in the response time from when the CHGV instruction is executed until the
speed begins to change actually.
Axis 2
P2 P3
7 - 71
7 OPERATION CONTROL PROGRAMS
F/FS G
[Usable data]
Usable Data
Word device Constant
Setting 64-bit 64-bit Bit Comparison
16-bit 32-bit 16-bit 32-bit Calculation
data Bit device floating Coasting floating conditional conditional
integer integer integer integer type expression
point timer point expression expression
type type (L) type (K/H) (K/H, L)
type (F) type (K)
(S1) — — — — — — — — — —
(S2) — — — — — —
: Usable
[Setting data]
Setting data Description Data type of result
Axis No. to which torque limit value change request
(S1)
will be given —
(S2) Specified torque limit value
[Functions]
(1) The torque limit value of the axis specified with (S1) is changed to the torque limit
value axis specified with (S2).
(2) In the real mode, any axis that has completed a servo startup can be changed in
torque limit value any time, independently of the status, starting, stopping, servo
ON or servo OFF.
(3) The axis No. that may be set at (S1) is within the following range.
Q172CPU(N) Q173CPU(N)
1 to 8 1 to 32
(4) The torque limit value that may be set at (S2) is within the range 1 to 500[%].
(5) The torque limit value specified here and the one specified in the servo program
have the following relationships.
At start
At a normal start, the torque limit value is given to the servo of the start axis
according to "P. torque" set in the servo program or the "torque limit value" of the
specified parameter block.
For an interpolation start, the torque limit value is given to the number of axes to
be interpolated.
Executing the CHGT instruction gives the preset torque limit value to only the
specified axis.
Thereafter, the torque limit value given to the servo at a servo program start or
JOG start is made valid only when it is lower than the torque limit value specified
in CHGT.
This torque limit value clamp processing is performed per axis.
7 - 72
7 OPERATION CONTROL PROGRAMS
During start
(a) If the following torque limit value has been set, it will not be changed to higher
than the torque limit value specified in the CHGT instruction.
• Torque limit value at a midway point in constant-speed control or speed
switching control
• Torque limit value at the point of switching to position control in speed/
position changing control
• Torque limit value in speed control
(b) The CHGT instruction accepts a torque limit value which is higher than the
torque limit value set in the servo program or parameter block.
(6) The torque limit value changed by CHGT instruction is effective only during power
supply is on.
[Errors]
(1) An operation error will occur and a torque limit value change will not be made if:
• The specified axis No. at (S1) is outside the range; or
• (S2) is an indirectly specified device and its device No. is outside the range.
(2) A minor error will occur and a torque limit value change will not be made if:
• The torque limit value specified with (S2) is outside the range 1 to 500[%]
(Minor error: 311); or
• The CHGT instruction is executed for any axis that has not yet been started
(Minor error: 312).
[Program examples]
(1) Program which changes the torque limit value of axis 2
CHGT(K2,K10)
POINT
(1) CHGT instruction is invalid (ignored) during the virtual mode. When changing
the torque limit value during operation in the virtual mode, set the "torque limit
value setting device" in the output module parameter of the mechanical system
program.
(2) There will be a delay of time equivalent to an operation cycle at the maximum
in the response time from when the CHGT instruction is executed until the
torque limit value is changed actually.
7 - 73
7 OPERATION CONTROL PROGRAMS
F/FS G
[Usable data]
Usable Data
Word device Constant
Setting 64-bit 64-bit Bit Comparison
16-bit 32-bit 16-bit 32-bit Calculation
data Bit device floating Coasting floating conditional conditional
integer integer integer integer type expression
point timer point expression expression
type type (L) type (K/H) (K/H, L)
type (F) type (K)
— — — — — — — — — — — —
: Usable
[Setting data]
There are no setting data.
[Functions]
(1) The execution of an event task is enabled.
[Errors]
(1) An operation error will occur if:
• This instruction is used with other than a normal task.
[Program examples]
(1) Enables the execution of an event task.
EI
7 - 74
7 OPERATION CONTROL PROGRAMS
F/FS G
[Usable data]
Usable Data
Word device Constant
Setting 64-bit 64-bit Bit Comparison
16-bit 32-bit 16-bit 32-bit Calculation
data Bit device floating Coasting floating conditional conditional
integer integer integer integer type expression
point timer point expression expression
type type (L) type (K/H) (K/H, L)
type (F) type (K)
— — — — — — — — — — — —
: Usable
[Setting data]
[Functions]
(1) The execution of an event task is disabled.
(2) If an external interrupt or PLC interrupt occurs after execution of the DI instruction,
the corresponding event task is executed once at the execution of the EI
instruction. (If two or more external interrupts or PLC interrupts occur during DI,
the corresponding event task is executed only once at the execution of the EI
instruction.)
(5) The DI status is established at power-on or when a reset is made with the
RESET/L.CLR switch.
[Errors]
(1) An operation error will occur if:
• This instruction is used with other than a normal task.
[Program examples]
(1) Program which disables the execution of an event task.
DI
7 - 75
7 OPERATION CONTROL PROGRAMS
F/FS G
[Usable data]
Usable Data
Word device Constant
Setting 64-bit 64-bit Bit Comparison
16-bit 32-bit 16-bit 32-bit Calculation
data Bit device floating Coasting floating conditional conditional
integer integer integer integer type expression
point timer point expression expression
type type (L) type (K/H) (K/H, L)
type (F) type (K)
— — — — — — — — — — — —
: Usable
[Setting data]
There are no setting data.
[Functions]
(1) This is a no-operation instruction and does not affect the preceding operations.
[Errors]
(1) There are no operation errors for no operation: NOP.
7 - 76
7 OPERATION CONTROL PROGRAMS
F/FS G
Refer to the Section "1.3.4" for the correspondence version of the Motion CPU and the
software.
Format BMOV(D), (S), (n) Number of basic steps 6
[Usable data]
Usable Data
Word device Constant
Setting 64-bit 64-bit Bit Comparison
16-bit 32-bit 16-bit 32-bit Calculation
data Bit device floating Coasting floating conditional conditional
integer integer integer integer type expression
point timer point expression expression
type type (L) type (K/H) (K/H, L)
type (F) type (K)
(D) — — — — — — — —
(S) — — — — — — — —
(n) — — — — — — — — —
: Usable
[Setting data]
Setting data Description Data type of result
(D) Transfer destination device starting No.
(S) Transfer source device starting No. —
(n) Number of words to be transferred
[Functions]
(1) The contents for n words from device specified with (S) are batch-transferred to
the n words from device specified with (D).
(2) Data can be transferred if the word devices of the transfer source and destination
overlap.
Data are transferred from devices, starting with the one at (S), for transfer of data
from devices of larger numbers to those of smaller numbers, or starting with the
one at (S)+(n-1) for transfer of data from devices of smaller numbers to those of
larger numbers.
(3) Specifying Nn (cam No.) at (D) or (S) enables batch-transfer of cam data.
In the Motion controller, the cam data of same cam No. must already have been
registered.
The number of transferred words specified with (n) should match the resolution of
the specified cam No..
7 - 77
7 OPERATION CONTROL PROGRAMS
(4) The word devices that may be set at (D), (S) and (n) are shown below.
(Note-2) (Note-2), (Note-3) Cam No.
Word devices Bit devices
Setting data specification
(Note-1)
Dn Wn #n Mn Bn Fn Xn Yn Nn
(n) — — — — — —
(Note-1) : "Nn" indicates the cam No..
(Note-2) : The device No. cannot be specified indirectly.
(Note-3) : Specify a multiple of 16 as the device number of bit data.
(Note-4) : PX/PY cannot be set.
(Note-5) : Special relays (M9000 to M9255) and dedicated devices (M2000 to M2399) cannot be set.
(Note: DOUT cannot output the PX, special relays (M2000 to M9255) and dedicted devices
(M2000 to M2127).)
(5) The cam No. that may be set as "Nn" is within the following range.
Q173CPU(N)/Q172CPU(N)
1 to 64
101 to 164
201 to 264
301 to 364
[Errors]
(1) An operation error will occur if:
• The cam data of cam No. specified with (D) or (S) are not yet registered to the
Motion controller;
• The resolution of cam No. specified with (D) or (S) differs from the number of
transferred words specified with (n);
• (S) to (S)+(n-1) is outside the device range;
• (D) to (D)+(n-1) is outside the device range;
when (n) specified is a
• (n) is 0 or a negative number;
word device
• PX/PY is set in (S) to (S)+(n-1); or
• PX/PY is set in (D) to (D)+(n-1).
(2) When conversion is made in program editing of the SW6RN-GSV P, an error will
occur if:
• (S) to (S)+(n-1) is outside the device range;
• (D) to (D)+(n-1) is outside the device range;
when (n) specified is a
• (n) is 0 or a negative number;
constant
• PX/PY is set in (S) to (S) + (n-1).
• PX/PY is set in (D) to (D) + (n-1).
• (S) is a bit device and the device number is not a multiple of 16; or
• (D) is a bit device and the device number is not a multiple of 16.
7 - 78
7 OPERATION CONTROL PROGRAMS
[Program examples]
(1) Program which batch-transfers a contents for 5 words from D0 to all data for 5
words from #10
#10 12 D0 12
#
#11 34 Batch transfer D1 34
#12 56 D2 56
#13 78 D3 78
#14 90 D4 90
(2) Program which batch-transfers a contents for 2048 words from #0 to the data area
of cam No.2 (resolution 2048)
POINT
Cam stroke ratio is set within 0 to 7FFFH.
(3) Program which batch-transfers a contents for 4 words from X0 to all data for 4
words from #20
b15 b0 XF X0
#20 0 0 1 0 0 1 1 1 0 0 0 0 1 1 1 1 0 0 1 0 0 1 1 1 0 0 0 0 1 1 1 1
b15 b0 X1F X10
#21 1 0 0 0 0 0 1 1 0 0 0 0 0 1 1 1 Batch transfer 1 0 0 0 0 0 1 1 0 0 0 0 0 1 1 1
b15 b0 X2F X20
#22 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1
7 - 79
7 OPERATION CONTROL PROGRAMS
F/FS G
Refer to the Section "1.3.4" for the correspondence version of the Motion CPU and the
software.
Format FMOV(D), (S), (n) Number of basic steps 6
[Usable data]
Usable Data
Word device Constant
Setting 64-bit 64-bit Bit Comparison
16-bit 32-bit 16-bit 32-bit Calculation
data Bit device floating Coasting floating conditional conditional
integer integer integer integer type expression
point timer point expression expression
type type (L) type (K/H) (K/H, L)
type (F) type (K)
(D) — — — — — — — —
(S) — — — — — — — —
(n) — — — — — — — — —
: Usable
[Setting data]
Setting data Description Data type of result
(D) Transfer destination device starting No.
Device No. which transfer data or data to be
(S) —
transferred are stored.
(n) Number of words to be transferred
[Functions]
(1) The data specified with (S) or contents of word device are transferred a part for
(n)words of data to the word device specified with (D).
(2) The word devices that may be set at (D), (S) and (n) are shown below.
(Note-1) (Note-1), (Note-2)
Word devices Bit devices
Setting data
Dn Wn #n Mn Bn Fn Xn Yn
(n) — — — — —
(Note-1) : The device No. cannot be specified indirectly.
(Note-2) : Specify a multiple of 16 as the device number of bit data.
(Note-3) : PX/PY cannot be set.
(Note-4) : Special relays (M9000 to M9255) and dedicated devices (M2000 to M2399) cannot be set.
7 - 80
7 OPERATION CONTROL PROGRAMS
[Errors]
(1) An operation error will occur if:
• (D) to (D)+(n-1) is outside the device range;
When (n) specified is a
• (n) is 0 or a negative number; or
word device
• PX/PY is set in (D) to (D)+(n-1).
(2) When conversion is made in program editing of the SW6RN-GSV P, an error will
occur if:
• (D) to (D)+(n-1) is outside the device range;
• (S) is outside the device range;
When (n) specified is a
• (n) is 0 or a negative number;
constant
• PX/PY is set in (S);
• PX/PY is set in (D) to (D)+(n-1);
• (S) is a bit device and the device number is not a multiple of 16; or
• (D) is a bit device and the device number is not a multiple of 16.
[Program examples]
(1) Program which sets 3456H to all data for 100 words from #10
#10 H3456
#
#11 H3456 Transfer
#12 H3456 H3456
: :
#109 H3456
(2) Program which sets a content of D4000 to all data for 50 words from W0
W0 1234
W1 1234 Transfer
W2 1234 D4000 1234
: : #
W31 1234
(3) Program which sets 8000H to all data for 4 words from M0
M15 M0
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
M31 M16
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 b15 b0
Transfer
M47 M32 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
M63 M48
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
7 - 81
7 OPERATION CONTROL PROGRAMS
F/FS G
7.13.6 Write device data to shared CPU memory of the self CPU: MULTW
Refer to the Section "1.3.4" for the correspondence version of the Motion CPU and the
software.
Format MULTW(D), (S), (n), (D1) Number of basic steps 8
[Usable data]
Usable Data
Word device Constant
Setting 64-bit 64-bit Bit Comparison
16-bit 32-bit 16-bit 32-bit Calculation
data Bit device floating Coasting floating conditional conditional
integer integer integer integer type expression
point timer point expression expression
type type (L) type (K/H) (K/H, L)
type (F) type (K)
(D) — — — — — — — — —
(S) — — — — — — — — —
(n) — — — — — — — — —
(D1) — — — — — — — — — —
: Usable
[Setting data]
Setting data Description Data type of result
The shared CPU memory address of self CPU of
(D)
the writing destination device. (800H to FFFH)
(S) First device No. which writing data are stored.
—
(n) Number of words to be written (1 to 256)
Self CPU device is made to turn on by the writing
(D1)
completion.
[Functions]
(1) A part for (n)words of data since the device specified with (S) of the self CPU
module are written to since the shared CPU memory address specified with (D) of
the self CPU module. After writing completion of the device data, the complete bit
device specified with (D1) turns on.
Shared CPU
memory address
Shared CPU 0H Self CPU operation This area
memory of the data area cannot be
self CPU Write the data Device memory 200H used at
System area
(D) H0000 of a part for (S) H0000 users area.
H0005 (n)words H0005 800H Automatic refresh This area
H000A H000A area (Note) can be
User-defined area used at
H0000 H0000 0FFFH users area.
(Note) : When automatic refresh is not set, it can be used as a user defined area.
And, when automatic refresh is set up, since the automatic refresh transmitting
range becomes a user defined area.
7 - 82
7 OPERATION CONTROL PROGRAMS
(4) The word devices that may be set at (D), (S) (n) and (D1) are shown below.
(Note-1) (Note-1), (Note-2)
Word devices Bit devices
Setting data
Dn Wn #n Mn Bn Fn Xn Yn
(D) — — — — —
(n) — — — — —
(5) Adjust an executive task, the number of transfer word referring to the operation
processing time so that this instruction may not obstruct the execution of the
motion operation because processing time becomes long in argument to the
number of words (n) to be written.
[Errors]
(1) An operation error will occur if:
• Number of words (n) to be written is outside the range of 1 to 256.
• The shared CPU memory address (D) of self CPU of the writing destination
device is outside the range (800H to FFFH) of the shared CPU memory
address.
• The shared CPU memory address (D) of self CPU of the writing destination
device + number of words (n) to be written is outside the range (800H to FFFH)
of the shared CPU memory address.
• First device No. (S) which writing data are stored + number of words (n) to be
written is outside the device range.
• MULTW instruction was executed again before MULTW instruction is executed
and complete bit device is turned on.
• (D1) is a write-disabled device.
• (S) is a bit device and device number is not a multiple of 16.
• PX/PY is set in (S) to (S)+(n-1).
7 - 83
7 OPERATION CONTROL PROGRAMS
[Program examples]
(1) 2 words from D0 is written in the shared CPU memory to since A00H, and transits
to next step after confirmation of writing completion.
F0
RST M0
MULTW HA00, D0, K2, M0
G0
M0
7 - 84
7 OPERATION CONTROL PROGRAMS
F/FS G
7.13.7 Read device data from shared CPU memory of the other CPU: MULTR
Refer to the Section "1.3.4" for the correspondence version of the Motion CPU and the
software.
Format MULTR(D), (S1), (S2), (n) Number of basic steps 7
[Usable data]
Usable Data
Word device Constant
Setting 64-bit 64-bit Bit Comparison
16-bit 32-bit 16-bit 32-bit Calculation
data Bit device floating Coasting floating conditional conditional
integer integer integer integer type expression
point timer point expression expression
type type (L) type (K/H) (K/H, L)
type (F) type (K)
(D) — — — — — — — — —
(S1) — — — — — — — — —
(S2) — — — — — — — — —
(n) — — — — — — — — —
: Usable
[Setting data]
Setting data Description Data type of result
(D) First device No. which stores the reading data.
First I/O No. of the PLC CPU/Motion CPU which it
will be read.
(S1)
(CPU No.1 : 3E0H, CPU No.2 : 3E1H, CPU No.3 :
—
3E2H, CPU No.4 : 3E3H)
The shared CPU memory first address of the data
(S2)
which it will be read. (000H to FFFH)
(n) Number of words to be read (1 to 256)
[Functions]
(1) A part for (n)words of data of the other CPU specified with (S1) are read from the
address specified with (S2) of the shared CPU memory, and are stored since the
device specified with (S2).
Shared CPU
(S1) Shared CPU memory address
memory of the 0H Self CPU operation
specified CPU data area
Device memory No. with (S1) 200H
System area This area can
(D) H0000 Read the data of (S2) H0000 be used at
H0005 a part for (n)words H0005 800H Automatic refresh users area.
H000A H000A area (Note)
User-defined area
H0000 H0000 0FFFH
(Note) : When automatic refresh is not set, it can be used as a user defined area.
And, when automatic refresh is set up, since the automatic refresh transmitting
range becomes a user defined area.
7 - 85
7 OPERATION CONTROL PROGRAMS
(2) The word devices that may be set at (D), (S), (n) and (D1) are shown below.
(Note-1) (Note-1), (Note-2)
Word devices Bit devices
Setting data
Dn Wn #n Mn Bn Fn Xn Yn
(S) — — — — —
(n) — — — — —
(D1) — — — — —
(Note-1) : The device No. cannot be specified indirectly.
(Note-2) : Specify a multiple of 16 as the device number of bit data.
(Note-3) : Special relays (M9000 to M9255) and dedicated devices (M2000 to M2399) cannot be set.
(Note-4) : PX/PY cannot be set.
(3) When data are read normally from the target CPU specified with (S1), the reading
complete flag M9216 to M9219 (CPU No.1 : M9216, CPU No.2 : M9217, CPU
No.3 : M9218, CPU No.4 : M9219) corresponding to the target CPU turns on. If
data cannot be read normally, the reading complete flag of the target CPU does
not turn on.
(4) Adjust an executive task, the number of transfer word referring to the operation
processing time so that this instruction may not obstruct the execution of the
motion operation because processing time becomes long in argument to the
number of words (n) to be written.
(5) When multiple MULTR instructions are executed to the same CPU
simultaneously, the reading complete flag M9216 to M9219 turns on/as a result of
MULTR that it is executed at the end.
(6) Reset the reading complete flag (M9126 to M9219) using the user program.
[Errors]
(1) An operation error will occur if:
• Number of words (n) to be read is outside the range of 1 to 256.
• The shared CPU memory first address (S2) of the data which it will be read is
outside the range (000H to FFFH) of the shared CPU memory address.
• The shared CPU memory first address (S2) of the data which it will be read +
number of words (n) to be read is outside the range (000H to FFFH) of the
shared CPU memory address.
• First device No. (D) which stores the reading data + number of words (n) to be
read is outside the device range.
• Except 3E0H/3E1H/3E2H/3E3H is set at (S1).
• The self CPU is specified with (S1).
• The CPU which reads is resetting.
• The errors are detected in the CPU which read.
• (D) is a bit device and device number is not a multiple of 16.
• PX/PY is set in (D) to (D)+(n-1).
7 - 86
7 OPERATION CONTROL PROGRAMS
[Program examples]
(1) It checks that a CPU No.1 is not resetting, 2 words is read to since #0 from the
shared CPU memory C00H of CPU No.1, and transits to next step after reading
completion.
G0
!M9240
F0
RST M9216
MULTR #0, H3E0, HC00, K2
G0
M9216
7 - 87
7 OPERATION CONTROL PROGRAMS
F/FS G
Refer to the Section "1.3.4" for the correspondence version of the Motion CPU and the
software.
Format TO(D1), (D2), (S), (n) Number of basic steps 7
[Usable data]
Usable Data
Word device Constant
Setting 64-bit 64-bit Bit Comparison
16-bit 32-bit 16-bit 32-bit Calculation
data Bit device floating Coasting floating conditional conditional
integer integer integer integer type expression
point timer point expression expression
type type (L) type (K/H) (K/H, L)
type (F) type (K)
(D1) — — — — — — — — —
(D2) — — — — — — — — —
(S) — — — — — — — — —
(n) — — — — — — — — —
: Usable
[Setting data]
Setting data Description Data type of result
First I/O No. of the intelligent function module /
(D1)
special function module(000H to FF0H)
First address of the buffer memory which writes
(D2) —
data.
(S) First device No. which writing data are stored.
(n) Number of words to be written (1 to 256)
[Functions]
(1) A part for (n)words of data from device specified with (S) are written to since
address specified with (D2) of the buffer memory in the intelligent function
module/special function module controlled by the self CPU specified with (D1).
(D1) Intelligent function
module/special
function module
buffer memory Write the data Device memory
(D2) H0000 of a part for (S) H0000
H0005 (n)words H0005
H000A H000A
H0000 H0000
(2) First I/O No. of the module set by system setting is specified by (D1).
Q02H Q173 QX40 Q64AD Q64DA
Power supply
CPU CPU(N)
First First First
module
(D1) sets 20H by the system setting when a TO instruction is executed in the D/A
conversion module (Q64DA).
7 - 88
7 OPERATION CONTROL PROGRAMS
(3) The word devices that may be set at (D1), (D2), (S) and (n) are shown below.
(Note-1) (Note-1), (Note-2)
Word devices Bit devices
Setting data
Dn Wn #n Mn Bn Fn Xn Yn
(D1) — — — — —
(D2) — — — — —
(n) — — — — —
(Note-1) : The device No. cannot be specified indirectly.
(Note-2) : Specify a multiple of 16 as the device number of bit data.
(Note-3) : PX/PY cannot be set.
(4) Adjust an executive task, the number of transfer word referring to the operation
processing time so that this instruction may not obstruct the execution of the
motion operation because processing time becomes long in argument to the
number of words (n) to be written.
(5) The following analogue modules can be used as the control module of Motion
CPU.
• Q62DA • Q64AD
• Q64DA • Q68ADV
• Q68DAV • Q68ADI
• Q68DAI
[Errors]
(1) An operation error will occur if:
• Number of words (n) to be written is outside the range of 1 to 256.
• Motion CPU cannot communicate with intelligent function module/special
function module at the instruction execution.
• Abnormalities of the intelligent function module/special function module were
detected at the instruction execution.
• I/O No.s specified with (D1) differ from the intelligent function module/special
function module controlled by the self CPU.
• The address specified with (D2) is outside the buffer memory range.
• First device No. (S) which writing data are stored + number of words (n) to be
written is outside the device range.
• (S) is a bit device and device number is not a multiple of 16.
• PX/PY is set in (S) to (S)+(n-1).
7 - 89
7 OPERATION CONTROL PROGRAMS
[Program examples]
(1) 2 words from #0 is written to since buffer memory address of the Intelligent
function module/special function module (First I/O No. : 010H).
TO H010, H0, #0, K2
7 - 90
7 OPERATION CONTROL PROGRAMS
F/FS G
7.13.9 Read device data from intelligent function module/special function module : FROM
Refer to the Section "1.3.4" for the correspondence version of the Motion CPU and the
software.
Format FROM(D), (S1), (S2), (n) Number of basic steps 7
[Usable data]
Usable Data
Word device Constant
Setting 64-bit 64-bit Bit Comparison
16-bit 32-bit 16-bit 32-bit Calculation
data Bit device floating Coasting floating conditional conditional
integer integer integer integer type expression
point timer point expression expression
type type (L) type (K/H) (K/H, L)
type (F) type (K)
(D) — — — — — — — — —
(S1) — — — — — — — — —
(S2) — — — — — — — — —
(n) — — — — — — — — —
: Usable
[Setting data]
Setting data Description Data type of result
(D) First device No. which stores the reading data.
First I/O No. of the intelligent function module /
(S1)
special function module (000H to FF0H)
—
First address of the buffer memory which it will be
(S2)
read.
(n) Number of words to be read (1 to 256)
[Functions]
(1) A part for (n)words of data are read from the address specified with (S2) of the
buffer memory in the intelligent function module/special function module controlled
by the self CPU specified with (S1), and are stored since the device specified with
(S2).
(S1) Intelligent function
module/special
function module
Device memory buffer memory
(D) Read the data (S2)
H0000 of a part for H0000
H0005 (n)word H0005
H000A H000A
H0000 H0000
(2) First I/O No. of the module set by system setting is specified by (D1).
Q02H Q173 QX40 Q64AD Q64DA
Power supply
CPU CPU(N)
First First First
module
(D1) sets 20H by the system setting when a TO instruction is executed in the D/A
conversion module (Q64DA).
7 - 91
7 OPERATION CONTROL PROGRAMS
(3) The word devices that may be set at (D), (S1), (S2) and (n) are shown below.
(Note-1) (Note-1), (Note-2)
Word devices Bit devices
Setting data
Dn Wn #n Mn Bn Fn Xn Yn
(S1) — — — — —
(S2) — — — — —
(n) — — — — —
(Note-1) : The device No. cannot be specified indirectly.
(Note-2) : Specify a multiple of 16 as the device number of bit data.
(Note-3) : Special relays (M9000 to M9255) and dedicated devices (M2000 to M2399) cannot be set.
(Note-4) : PX/PY cannot be set.
(4) Adjust an executive task, the number of transfer word referring to the operation
processing time so that this instruction may not obstruct the execution of the
motion operation because processing time becomes long in argument to the
Number of words (n) to be read.
(5) The following analogue modules can be used as the control module of Motion
CPU.
• Q62DA • Q64AD
• Q64DA • Q68ADV
• Q68DAV • Q68ADI
• Q68DAI
[Errors]
(1) An operation error will occur if:
• Number of words (n) to be read is outside the range of 1 to 256.
• Motion CPU cannot communicate with intelligent function module/special
function module at the instruction execution.
• Abnormalities of the intelligent function module/special function module were
detected at the instruction execution.
• I/O No.s specified with (S1) differ from the intelligent function module/special
function module controlled by the self CPU.
• The address specified with (S2) is outside the buffer memory range.
• First device No. (D) which stores the reading data + number of words (n) to be
read is outside the device range.
• (D) is a bit device and device number is not a multiple of 16.
• PX/PY is set in (D) to (D) + (n-1).
7 - 92
7 OPERATION CONTROL PROGRAMS
[Program examples]
(1) 1 word is read from the buffer memory address 10H of the intelligent function
module/special function module (First I/O No. : 020H), and is stored in W0.
FROM W0, H020, H10, K1
Intelligent function
module/special
function module
(First I/O No. : 020H)
7 - 93
7 OPERATION CONTROL PROGRAMS
F/FS G
—
7.13.10 Time to wait : TIME
[Usable data]
Usable Data
Word device Constant
Setting 64-bit 64-bit Bit Comparison
16-bit 32-bit 16-bit 32-bit Calculation
data Bit device floating Coasting floating conditional conditional
integer integer integer integer type expression
point timer point expression expression
type type (L) type (K/H) (K/H, L)
type (F) type (K)
(S) — — — — — — —
: Usable
[Setting data]
Setting data Description Data type of result
(S) Waiting time (0 to 2147483647)ms Logical type (true/false)
[Functions]
(1) A wait state continues for the time specified with (S). The result is false when the
elapsed time is less than the preset time, or the result is true and execution
transits when the preset time has elapsed.
(2) When a 16-bit integer type word device is used to specify any of 32768 to
65535ms at (S), convert it into an unsigned 16-bit integer value with USHORT.
(Refer to the program example.)
[Errors]
(1) An operation error will occur if:
• (S) is an indirectly specified device and its device No. is outside the range. ; or
• The data (device data at indirect specification) specified with (S) is outside the
range of 0 to 2147483647.
[Program examples]
(1) Program which sets a wait of 60 seconds (when constant is specified)
TIME K60000
(2) Program for a case where there may be a wait of 32768 to 65535ms for 16-bit
integer type indirect designation (#0)
TIME USHORT(#0)
(3) Program which SETS (RSTs) a bit device when the specified time has elapsed
SET M100 = TIME K60000
7 - 94
7 OPERATION CONTROL PROGRAMS
POINT
(1) When the waiting time setting is indirectly specified with a word device, the
value imported first is used as the device value for exercising control. The set
time cannot be changed if the device value is changed during a wait state.
(2) The TIME instruction is equivalent to a conditional expression, and therefore
may be set on only the last line of a transition (G) program.
(3) When the transition program (Gn) of the same number having the TIME
instruction setting is used in multiple Motion SFC programs, avoid running them
at the same time. (If they are run simultaneously, the waiting time in the
program run first will be illegal.)
(4) Another transition program (Gn) can executed a time of instruction by multiple
Motion SFC program simultaneously. (Multi active step less than 256.)
(5) While time by TIME instruction waits, the wait time can not be stopped.
(6) When using the TIME instruction, a verification error may occur, even when the
Motion SFC program of SW6RN-GSV P is equal to the Motion CPU, if a
verification of Motion SFC program is executed.
7 - 95
7 OPERATION CONTROL PROGRAMS
F/FS G
[Usable data]
Usable Data
Word device Constant
Setting 64-bit 64-bit Bit Comparison
16-bit 32-bit 16-bit 32-bit Calculation
data Bit device floating Coasting floating conditional conditional
integer integer integer integer type expression
point timer point expression expression
type type (L) type (K/H) (K/H, L)
type (F) type (K)
— — — — — — — — — — — —
: Usable
[Setting data]
There are no setting data.
[Functions]
(1) A character string from after // to a block end is a comment.
[Errors]
(1) There are no operation errors for comment: //.
[Program examples]
(1) Example which has commented a substitution program.
D0=D1//Substitutes the D0 value (16-bit integer data) to D1.
7 - 96
8 TRANSITION PROGRAMS
8. TRANSITION PROGRAMS
(c) There are no restrictions on the number of blocks that may be set in a single
transition program.
Note that one program is within 64k bytes.
(e) Transition condition must be set in the last block of a transition program.
Transition program is repeated until the transition condition enables, and
when the transition condition has enabled, it shifts to the next step.
Transition condition can be set only in the last block.
Transition condition
Comment
8-1
8 TRANSITION PROGRAMS
What can be set as a transition condition in the last block are bit conditional
expressions, comparison conditional expressions and device set
(SET=)/device reset (RST=) which return logical data values (true/false). In
the case of device set (SET=)/device reset (RST=), whether the bit or
comparison conditional expression specified at (S) is true or false is a
transition condition, and when the transition condition enables, device
set/reset is executed and execution shifts to the next step.
POINT
(1) A transition program differs from an operation control program in that a
transition condition is set in the last block.
Other settings are the same as those of the operation control program.
(2) When setting device set (SET=)/device reset (RST=) in the last block as a
transition condition, the bit or comparison conditional expression specified with
(S) is not omissible.
(3) Only the bit or comparison conditional expression cannot be set in other than
the last block. Device set (SET=)/device reset (RST=) can be set in other than
the last block.
8-2
9 MOTION CONTROL PROGRAMS
Positioning data
OSC 1 Other
Common Circular Parameter block
WAIT-ON/OFF
FIN acceleration/deceleration
M-code
Command speed
Amplitude
Torque limit value
Acceleration time
Auxiliary point
Radius
Central point
Control unit
Program No.
Pitch
Frequency
Dwell time
Starting angle
Deceleration time
Repeat condition
Cancel
Skip
at stop input
S-curve ratio
Rapid stop deceleration time
interpolation
Address/travel
Axis
Deceleration processing
Number of steps
Instruction Processing
symbol
Virtual enable
Number of step 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 2 2 2 1 2
2 2 2 2
Number of indirect words 1 2 2 1 1 1 2 2 2 1 2 2 2 1 1 2 1 1 1 1 1 2 1 1/ 2 1(B) 1(B) 1 1(B)
1(B)
1) 2)
Number Description
Instruction symbol Gives the servo instructions usable in servo programs.
1)
Processing Gives the processing outlines of the servo instructions.
(a) Indicates positioning data which can be set in servo instructions.
1) : Item which must be set (Data which cannot execute the servo instruction unless it sets.)
2) : Item which is set when required (Data which will be controlled by the default value unless it sets.)
(b) Allows direct or indirect designation (except axis No.)
1) Direct designation : Set with numerical value.
2) Indirect designation : Set with word device (D, W, #).
2) • Servo program execution is controlled using the preset word device contents.
• Each setting item may either be 1 or 2 word data.
9
• For 2 word data, set the first device No..
(c) Number of steps
As there are more setting items, there are more number of instruction steps. (The number of steps is displayed when a
servo program is created.)
(The instruction + item comprise the minimum steps, and one item increases the number of steps by 1.)
3) Items common to the servo instructions
4) Items set in circular interpolation starting servo programs
5) Items set for high-speed oscillation
Set when changing the parameter block (default value when not set) data set in the servo program to control.
6)
(The parameter block data are not changed.)
7) Setting items other than the common, circular and parameter block items (Items to be set vary with the servo instruction.)
8) Indicates the number of steps of each servo instruction.
9-1
9 MOTION CONTROL PROGRAMS
M -code
Pitch
Parameter block No.
Command speed
Dwell time
Axis
Radius
Central point
Auxiliary point
Instruction
Positioning control
Processing
symbol
Virtual enable —
Number of steps 1 1 1 1 1 1 1 1 1 1 1
interpolation
point-
9-2
2
1
—
Starting angle
2
1
—
Amplitude
OSC
2
1
—
Frequency
1
1
*1
Reference axis No.
1
1
—
Control unit
2
2
Speed limit value
1
1
Acceleration time
1
1
Deceleration time
1
1
Rapid stop deceleration time
1
1
—
Torque limit value
Parameter block
Deceleration processing
1
1
9 MOTION CONTROL PROGRAMS
—
at stop input
Allowable error range for circular
2
1
interpolation
Positioning data
1
1
S-curve ratio
9-3
1
1/
*2
Repeat condition
1(B)
1
—
Program No.
2 Command speed
2
(constant speed)
2
*2
Cancel
1(B)
2
*2
Skip
1(B)
Others
1
1
FIN acceleration/deceleration
2
*2
WAIT-ON/OFF
: Must be set.
1(B)
Command speed
M-code
Pitch
Address/travel value
Dwell time
Radius
Central point
Auxiliary point
Instruction
Processing
symbol
Positioning control
Virtual enable —
Number of steps 1 1 1 1 1 1 1 1 1 1 1
interpolation CW
Absolute central point-specified circular
ABS
interpolation CCW
control
interpolation
point-
interpolation CW
Absolute central point-specified helical
ABH
interpolation CCW
Incremental central point-specified helical
INH
interpolation CW
Incremental central point-specified helical
INH
interpolation CCW
9-4
2
1
—
Starting angle
2
1
—
Amplitude
OSC
2
1
—
Frequency
1
1
*1
Reference axis No.
1
1
—
Control unit
2
2
Speed limit value
1
1
Acceleration time
1
1
Deceleration time
1
1
Rapid stop deceleration time
1
1
—
Torque limit value
Parameter block
Deceleration processing
1
1
9 MOTION CONTROL PROGRAMS
—
at stop input
Allowable error range for circular
2
1 interpolation
Positioning data
1
1
S-curve ratio
9-5
1
1/
*2
Repeat condition
1(B)
1
Program No.
Command speed
2
2
(constant speed)
2
*2
Cancel
1(B)
2
*2
Skip
1(B)
Others
1
1
FIN acceleration/deceleration
2
*2
WAIT-ON/OFF
: Must be set.
1(B)
10 to 27
10 to 27
Number of steps
9 MOTION CONTROL PROGRAMS
Command speed
M-code
Pitch
Address/travel value
Dwell time
Radius
Central point
Auxiliary point
Instruction
Processing
symbol
Positioning control
Virtual enable —
Number of steps 1 1 1 1 1 1 1 1 1 1 1
rotation start
Speed
Speed-position control
VPF
Speed-position
Speed-position control
VPR reverse rotation start
Restart
ABS-1
Speed-switching control end
Speed-switching control
ABS-3
INC-1
Travel value up to speed-switching
INC-2 control end point
INC-3
Speed-switching point
VABS absolute specification
Speed-switching point
VINC incremental specification
9-6
9 MOTION CONTROL PROGRAMS
Positioning data
OSC *1 Parameter block Others
WAIT-ON/OFF
(constant speed)
Skip
Program No.
FIN acceleration/deceleration
Cancel
Starting angle
Control unit
Acceleration time
Amplitude
Frequency
Deceleration processing
S-curve ratio
Repeat condition
Command speed
Reference axis No.
at stop input
interpolation
Deceleration time
— — — — — —
1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 2 2 2 1 2
*2
*2 *2 *2
2 2 2 1 1 2 1 1 1 1 1 2 1 1/ — 2 1
1(B) 1(B) 1(B)
1(B)
4 to 17
5 to 19
7 to 21
3 to 15
3 to 16
4 to 18
2 to 4
1 to 13
4 to 9
5 to 10
7 to 12
4 to 9
5 to 10
7 to 12
4 to 6
9-7
9 MOTION CONTROL PROGRAMS
Command speed
M-code
Address/travel value
Dwell time
Parameter block No.
Pitch
Central point
Axis
Radius
Auxiliary point
Instruction
Positioning control
Processing
symbol
Virtual enable —
Number of steps 1 1 1 1 1 1 1 1 1 1 1
control
ABS-1
ABS-2
ABS-3
ABS-4
ABS
Constant-speed control
ABS
ABS
ABS
ABS
ABH
ABH
ABH
Constant-speed control passing point
ABH
helical absolute specification
ABH
ABH
ABH
9-8
2
1
—
Starting angle
2
1
—
Amplitude
OSC
2
1
—
Frequency
1
1
*1
Reference axis No.
1
1
—
Control unit
2
2
Speed limit value
1
1
Acceleration time
1
1
Deceleration time
1
1
Rapid stop deceleration time
1
1
—
Torque limit value
Parameter block
Deceleration processing
1
1
9 MOTION CONTROL PROGRAMS
—
at stop input
Allowable error range for circular
2
1 interpolation
Positioning data
1
1
S-curve ratio
9-9
1
*2
1/
Repeat condition
1(B)
1
Program No.
Command speed
2
2
(constant speed)
2
*2
Cancel
2
*2
Skip
1(B) 1(B)
Others
1
1
FIN acceleration/deceleration
2
*2
: Must be set.
WAIT-ON/OFF
1(B)
9 to 14
8 to 13
9 to 14
5 to 14
4 to 13
5 to 14
5 to 13
4 to 12
3 to 11
2 to 10
3 to 17
3 to 15
4 to 16
Number of steps
9 MOTION CONTROL PROGRAMS
Command speed
M-code
Address/travel value
Dwell time
Parameter block No.
Pitch
Central point
Axis
Radius
Auxiliary point
Instruction
Positioning control
Processing
symbol
Virtual enable —
Number of steps 1 1 1 1 1 1 1 1 1 1 1
INC-1
INC-2
INC-3
INC-4
INC
Constant-speed control passing point
INC
incremental specification
INC
INC
Constant-speed control
INC
INC
INC
INH
INH
INH
Constant-speed control passing point
INH
helical incremental specification
INH
INH
INH
9 - 10
2
1
—
Starting angle
2
1
—
Amplitude
OSC
2
1
—
Frequency
1
1
*1
Reference axis No.
1
1
—
Control unit
2
2
Speed limit value
1
1
Acceleration time
1
1
Deceleration time
1
1
Rapid stop deceleration time
1
1
—
Torque limit value
Parameter block
Deceleration processing
1
1
9 MOTION CONTROL PROGRAMS
—
at stop input
Allowable error range for circular
2
1
interpolation
Positioning data
1
1
S-curve ratio
9 - 11
1
*2
1/
Repeat condition
1(B)
1
Program No.
Command speed
2
2
(constant speed)
2
*2
Cancel
2
*2
Skip
1(B) 1(B)
Others
1
1
FIN acceleration/deceleration
2
*2
: Must be set.
WAIT-ON/OFF
1(B)
Command speed
M-code
Address/travel value
Dwell time
Parameter block No.
Pitch
Central point
Axis
Radius
Auxiliary point
Instruction
Positioning control
Processing
symbol
Virtual enable —
Number of steps 1 1 1 1 1 1 1 1 1 1 1
FOR-TIMES
control, constant-
(used in speed
speed control)
same control
Repetition of
switching
FOR-OFF
return
9 - 12
2
1
—
Starting angle
2
1
—
Amplitude
OSC
2
1
—
Frequency
1
1
*1
Reference axis No.
1
1
—
Control unit
2
2
Speed limit value
1
1
Acceleration time
1
1
Deceleration time
1
1
Rapid stop deceleration time
1
1
—
Torque limit value
Parameter block
Deceleration processing
1
1
9 MOTION CONTROL PROGRAMS
—
at stop input
Allowable error range for circular
2
1 interpolation
Positioning data
1
1
S-curve ratio
9 - 13
1
*2
1/
Repeat condition
1(B)
1
Program No.
Command speed
2
2
(constant speed)
2
*2
Cancel
2
*2
Skip
1(B) 1(B)
Others
1
1
FIN acceleration/deceleration
2
*2
: Must be set.
WAIT-ON/OFF
1(B)
2
3
5 to 10
Number of steps
9 MOTION CONTROL PROGRAMS
The current value of the specified axis is changed in the real mode.
The current value of the specified virtual servomotor shaft is changed in the virtual
mode.
Items set on peripheral device
Common Circular Parameter block Others
Command speed
M-code
Dwell time
Address/travel
Cancel
Parameter block No.
Control unit
Acceleration time
Central point
S-curve ratio
Axis
Radius
Deceleration time
Auxiliary point
FIN acceleration/deceleration
interpolation
at stop input
Allowable error range for circular
Deceleration processing
Servo Positioning Number of Speed
instruction method Control axes change
[Controls]
Control using CHGA instruction
(1) Executing the CHGA instruction changes the current value in the following
procedure.
(a) The start accept flag (M2001 to M2008/M2001 to M2032) corresponding to
the specified axis is turned on.
(b) The current value of the specified axis is changed to the specified address.
(c) Start accept flag is turned off at completion of the current value change.
(2) The current value of the specified axis is changed in the real mode.
(3) The current value of the specified virtual servo-motor shaft is changed in the
virtual mode.
(4) The used axis No. can be set within the following range.
Q172CPU(N) Q173CPU(N)
Axis 1 to 8 Axis 1 to 32
(5) The address which made the current value change by CHGA instruction is valid
on the power supply turning on.
9 - 14
9 MOTION CONTROL PROGRAMS
[Program example]
A program which made the current value change control in the real mode is described
as the following conditions.
CHGA instruction
9 - 15
9 MOTION CONTROL PROGRAMS
POINT
(1) Current value changing instructions
• When PLC ready flag (M2000) or PCPU ready flag (M9074) is OFF, a minor error
(Note)
[100] occurs and a current value change is not made.
• This change is made only during a stop. If a current value change is made while
(Note)
the specified axis is starting, a minor error [101] (start accept signal of the
corresponding axis is ON) occurs and the current value change is not made.
(Note)
• If the servo of the corresponding axis is not READY, a major error [1004]
occurs and the current value change is not made.
(Note)
• If the corresponding axis is in a servo error, a major error [1005] occurs and
the current value change is not made.
For SV22
• Set the current value change program of the virtual servomotor shaft within the
virtual mode program No. range set in "program mode assignment".
• Set the current value change program of the servomotor (output) shaft within the
real mode program No. range.
• If a virtual servomotor shaft current value change is executed in the real mode, a
(Note)
servo program setting error [903] occurs and the current value change is not
made.
• If a servomotor (output) shaft current value change is executed in the virtual
(Note)
mode, a servo program setting error [904] occurs and the current value
change is not made.
• If a current value change is made during mode changing, a servo program setting
(Note)
error [907] (real virtual changing) or [908] (virtual real changing) occurs
and the current value change is not made.
(Note) : Refer to the "Q173CPU(N)/Q172CPU(N) Motion controller (SV13/SV22)
Programming Manual (REAL MODE)"/"Q173CPU(N)/Q172CPU(N) Motion
controller (SV22) Programming Manual (VIRTUAL MODE)" for minor error,
major error and servo program setting error.
9 - 16
9 MOTION CONTROL PROGRAMS
9.3 Synchronous Encoder Shaft Current Value Change Control (SV22 only)
Command speed
M-code
Dwell time
Address/travel
Cancel
Parameter block No.
Control unit
Acceleration time
Central point
S-curve ratio
Axis
Radius
Deceleration time
FIN acceleration/deceleration
Auxiliary point
interpolation
at stop input
Allowable error range for circular
Deceleration processing
Servo Positioning Number of Speed
instruction method Control axes change
(1) Executing the CHGA-E instruction changes the current value of the synchronous
encoder shaft in the following procedure.
(a) The synchronous encoder shaft current value changing flag (M2101 to
M2112) corresponding to the specified synchronous encoder shaft is turned
on.
(b) The current value of the specified synchronous encoder shaft is changed to
the specified address.
(c) The synchronous encoder shaft current value changing flag is turned off at
completion of the current value change.
(2) The used axis No. can be set within the following range.
Q172CPU(N) Q173CPU(N)
Axis 1 to 8 Axis 1 to 12
(3) The address which made the current value change by CHGA-E instruction is valid
after also the power supply turned off.
9 - 17
9 MOTION CONTROL PROGRAMS
[Program example]
A program which made the current value change control of the synchronous encoder
shaft is described as the following conditions.
P1 axis
CHGA-E instruction
Synchronous encoder
shaft current value
changing flag Current value change
completion
9 - 18
9 MOTION CONTROL PROGRAMS
POINT
(1) Synchronous encoder current value changing instructions
• The current value change of the synchronous encoder is executed if
operation is being performed in the virtual mode (during pulse input from
the synchronous encoder).
If the current value is changed, the feed current value of the
synchronous encoder continues from the new value.
• The current value change of the synchronous encoder does not affect the
current value of the output module.
• Set the current value change program of the synchronous encoder shaft
program within the virtual mode program No. range set in "program mode
assignment".
• When PLC ready flag (M2000) or PCPU ready flag (M9074) is OFF, a
(Note)
minor error [100] occurs and a current value change is not made.
• If a synchronous encoder current value change is executed in the real
(Note)
mode, a servo program setting error [903] or [905] occurs and the
current value change is not made. ([903] when the current value change
servo program is set to within the virtual mode program No. range, or 905
when it is set to within the real mode program No. range.)
• If a current value change is made during mode changing, a servo program
(Note)
setting error [907] (real virtual changing) or [908] (virtual real
changing) occurs and the current value change is not made.
(Note) : Refer to the "Q173CPU(N)/Q172CPU(N) Motion controller (SV13/SV22)
Programming Manual (REAL MODE)"/"Q173CPU(N)/Q172CPU(N) Motion
controller (SV22) Programming Manual (VIRTUAL MODE)" for minor error,
major error and servo program setting error.
9 - 19
9 MOTION CONTROL PROGRAMS
9.4 Cam Shaft Within-One-Revolution Current Value Change Control (SV22 only)
The current value of the specified cam shaft within-one-revolution is changed in the
virtual mode.
Items set on peripheral device Speed
Common Circular Parameter block Others change
Command speed
M-code
Dwell time
Address/travel
Cancel
Control unit
Acceleration time
Parameter block No.
Central point
S-curve ratio
Axis
Radius
Deceleration time
FIN acceleration/deceleration
Auxiliary point
interpolation
at stop input
Allowable error range for circular
Deceleration processing
Servo Positioning Number of
instruction method Control axes
(3) The used axis No. can be set within the following range.
Q172CPU(N) Q173CPU(N)
Axis 1 to 8 Axis 1 to 32
(4) The address which made the current value change by the CHGA-C instruction is
valid after also the power supply turned off.
9 - 20
9 MOTION CONTROL PROGRAMS
[Program example]
A program which made the current value change control of the cam shaft within-one-
revolution current value change is described as the following conditions.
POINT
(1) Cam shaft within-one revolution current value changing instructions
• If a new within-one revolution current value is outside the range 0 to (one-
(Note)
revolution pulse count - 1), a minor error [6120] occurs and current
value change is not.
• Set the current value change program the cam shaft within-one-revolution
within the virtual mode program No. range set in "program mode
assignment".
• When PLC ready flag (M2000) or PCPU ready flag (M9074) is OFF, a
(Note)
minor error [100] occurs and a current value change is not made.
• If the cam shaft within-one-revolution current value change is executed in
(Note)
the real mode, a servo program setting error [903] or [905] occurs and
the current value change is not made. ([903] when the current value
change servo program is set to within the virtual mode program No. range,
or 905 when it is set to within the real mode program No. range.)
• If a current value change is made during mode changing, a servo program
(Note)
setting error [907] (real virtual changing) or [908] (virtual real
changing) occurs and the current value change is not made.
(Note) : Refer to the "Q173CPU(N)/Q172CPU(N) Motion controller (SV13/SV22)
Programming Manual (REAL MODE)"/"Q173CPU(N)/Q172CPU(N) Motion
controller (SV22) Programming Manual (VIRTUAL MODE)" for minor error,
major error and servo program setting error.
9 - 21
9 MOTION CONTROL PROGRAMS
When a cancel start has been set in the setting items of the servo program which
was started at the motion control step of the Motion SFC program, the cancel of the
running servo program is valid but the servo program specified to start after a
cancel is ignored, without being started.
The following example shows the Motion SFC program which exercises control
equivalent to a cancel start.
Selective branch
K0
G0 G1
Providing transition G1 with cancel device condition specified
with servo program K0 will cancel to execute of servo program
K0 and allow servo program K1 to start.
K1
(2) The coasting timer (FT) cannot used to make indirect specification in the servo
program and mechanical system program.
9 - 22
10 MOTION DEVICES
The motion registers (#0 to #8191) and coasting timer (FT) are available as Motion
CPU-dedicated devices.
They can be used in operation control (F/FS) programs or transition (G) programs.
to dedicated devices • Cleared by the Motion SFC error history request flag
(64 points) on (keep at power on or reset).
(Note-2)
POINT
The motion registers (#) cannot be set as indirectly specified devices of mechanical
system programs.
10
10 - 1
10 MOTION DEVICES
10 - 2
10 MOTION DEVICES
Description
No. Signal name
Motion SFC control errors Conventional errors
Error Motion SFC 0 to 255 : Motion SFC program No. in error
+0 -1
program No. -1 : Independent of Motion SFC program
3 : Minor/major error
4 : Minor/major error (virtual servomotor shaft) (SV22 only)
5 : Minor/major error (synchronous encoder shaft) (SV22
1 :F/FS only)
2 :G 6 : Servo error
+1 Error type -1 :K or other 7 : Servo program error
(not any of F/FS, G and SFC chart) 8 : Mode change error (SV22 only)
-2 :Motion SFC chart 9 : Manual pulse generator axis setting error
10 : Test mode request error
11 : WDT error
12 : Personal computer link communication error
0 to 4095 : F/FS, G, K program No. 0 to 4095 : Servo program No. when error type is "3", "4" or
+2 Error program No. 0 to 255 : GSUB program No. "7"
-1 : Independent of F/FS, G, K, GSUB -1 : Others
0 to 8191 : F/FS or G program's block No.
(line No.) when error type is "1"
Error block No./ or "2" 1 to 32 : Corresponding axis No. when error type is any of "3"
+3 Motion SFC list 0 to 8188 : Motion SFC list line No. when error to "6"
line No./axis No. type is "-2" -1 : Others
-1 : Independent of block when error
type is "-1" or error type is "1" or "2"
• Conventional error code (less than 16000) when error type
is any of "3" to "6"
• Error code stored in D9190 when error type is "7"
16000 and later
+4 Error code • Error code stored in D9193 when error type is "8"
(Refer to Chapter "19 ERROR CODE LISTS".)
• -1 when error type is "9" or "10"
• Error code stored in D9184 when error type is "11"
• Error code stored in D9196 when error type is "12"
Year/
+5
Error month
occur- Day/ The clock data (D9025, D9026, D9027) are set.
+6
rence hour (BCD code, year in its lower 2 digits)
time Minute/
+7
second
10 - 3
10 MOTION DEVICES
c) Set the error information to the above "Motion SFC error history
devices (#8000 to #8063)".
In the user program, reset the "Motion SFC error detection flag (M2039)"
after reading the error history at the "Motion SFC error detection flag
(M2039)".
After that, "Motion SFC error detection flag (M2039)" turns on again at
occurrence of a new error.
POINT
(1) Resetting the "Motion SFC error detection flag (M2039)" will not reset (clear to
zero) the "Motion SFC error history devices (#8000 to #8063)".
After power-on, they always controls the error history continuously.
(2) Set the clock data and clock data read request (M9028) in the user program.
10 - 4
10 MOTION DEVICES
Axis
Device No. Signal name
No.
1 #8064 to #8067
2 #8068 to #8071
Signal name (Note-1) Signal description Refresh cycle Signal direction
3 #8072 to #8075
4 #8076 to #8079 0 : Unused 4 : MR-J2S-B
5 #8080 to #8083 1 : MR-H-BN 5 : MR-J2-M When the servo amplifier
+0 Servo amplifier type
6 #8084 to #8087 2 : MR-J-B 6 : MR-J2-03B5 power-on
3 : MR-J2-B 65 : FR-V500 Monitor device
7 #8088 to #8091
8 #8092 to #8095 +1 Motor current -5000 to 5000 ( 0.1[%] )
9 #8096 to #8099 +2 3.55ms
Motor speed -50000 to 50000 ( 0.1[r/min] )
10 #8100 to #8103 +3
11 #8104 to #8107 (Note-1) : The value that the lowest servo monitor device No. was added ”+0, +1 ···” on each axis is shown.
12 #8108 to #8111
13 #8112 to #8115
14 #8116 to #8119
15 #8120 to #8123
16 #8124 to #8127
17 #8128 to #8131
18 #8132 to #8135
19 #8136 to #8139
20 #8140 to #8143
21 #8144 to #8147
22 #8148 to #8151
23 #8152 to #8155
24 #8156 to #8159
25 #8160 to #8163
26 #8164 to #8167
27 #8168 to #8171
28 #8172 to #8175
29 #8176 to #8179
30 #8180 to #8183
31 #8184 to #8187
32 #8188 to #8191
REMARK
The servo monitor devices (#8064 to #8191) is effective with SW6RN-SV13Q /
SV22Q (Ver.00D or later).
10 - 5
10 MOTION DEVICES
10 - 6
11 MOTION SFC PARAMETER
Two different Motion SFC parameters are available: "task parameters" designed to 11
control the tasks (normal task, event task, NMI task) and "program parameters" to be
set per Motion SFC program.
Their details are shown below.
When to execute the Motion SFC program processing can be set only once in the
program parameter per program.
Roughly classified, there are the following three different tasks.
11 - 1
11 MOTION SFC PARAMETER
Consecutive transition control indicates that transition destination steps are executed
one after another in the same one execution cycle when their transition conditions
have enabled (single basic operation is performed consecutively).
In this case, set the number of consecutive transitions.
Control exercised is common to the Motion SFC programs executed by normal tasks.
POINT
Set the number of consecutive transitions to the Motion SFC programs executed
by event and NMI tasks for every program.
11 - 2
11 MOTION SFC PARAMETER
F20 1) F30 A)
F1 F5
F2 F6
2) B)
F3 F7
END F8 C)
END
SFCS1 SFCS2
PLC program
Normal task 1) A) 2) B)
Main cycle
Normal task is ended with END.
(No continuation operation)
C) When making it operate
continuously, it returns to
starting step in a jump.
[Points]
(a) The Motion SFC program which includes motion control steps should be set
to a normal task.
(b) During execution of an event or NMI task, the execution of the normal task
is suspended.
Note that since the normal task allows the event task disable instruction
(DI) to be described in an operation control step, the event task can be
disabled in the area enclosed by the event task disable instruction (DI) and
event task enable instruction (EI).
11 - 3
11 MOTION SFC PARAMETER
<Example 1>
Program 1
Program name
F20 1)
F1
F2 2)
F3
F4 3)
END
SFCS
PLC program
3.55ms
Event task
END operation: End 1) 2) 3)
11 - 4
11 MOTION SFC PARAMETER
<Example 2>
Program name
F20 1)
F1
F2 2)
F3
3)
F4
END
SFCS
PLC program
DI
EI/DI status
by other programs. EI
Event processing
by external interrupt/ Starting of the
GINT event task is
accepted.
1) 2) 3)
Event occurrence during DI status
Event task is not executed is memorized and executed.
during DI status.
(Except for NMI task.)
Event processing
by the fixed cycle Starting of the
interrupt. event task is
accepted.
1) 2) 3)
[Points]
(a) Multiple events can be set to one Motion SFC program. However, multiple
fixed cycles cannot be set.
(c) Motion control steps cannot be executed during the event task.
(d) The event task cannot be executed when it is disabled by the normal task.
The event that occurred during event task disable is executed the moment
the event task is enabled.
[Errors]
When the motion control step is executed by the Motion SFC program set to the
event task, the Motion SFC program error [16113] occurs and stops the Motion
SFC program running.
11 - 5
11 MOTION SFC PARAMETER
F20 1)
F1
F2 2)
F3
F4 3)
END
SFCS
PLC program
External interrupts
NMI task
END operation: End 1) 2) 3)
[Points]
(a) NMI task has the highest priority among the normal, event and NMI tasks.
(b) If the event task is disabled (DI) by the normal task, the interruption of the
NMI task is executed, without being masked.
[Errors]
The motion control step is executed during NMI task.
If the motion control step is executed during NMI task, the Motion SFC program
error [16113] occurs and stops the Motion SFC program.
11 - 6
11 MOTION SFC PARAMETER
Execution status of each Motion SFC program when the Motion SFC program is
executed multiple tasks is shown below.
When there are programs which are executed by the NMI task, 3.55ms fixed-cycle
even task with a program to run by the NMI task, and the normal task like a chart,
(1) The 3.55ms fixed-cycle event task is executed at intervals of 3.55ms;
(2) The NMI task is executed with the highest priority when an NMI interrupt is input;
and
[Points]
One Motion SFC program can be executed partially by another task by setting the area
to be executed by another task as a subroutine and setting a subroutine running task
as another task.
<Example>
No. 0 Main Motion SFC program Normal task
No. 1 Subroutine Event task (3.55ms cycle)
CAUTION
A normal task may be hardly executed when a NMI task, an event task are executed in many.
11 - 7
11 MOTION SFC PARAMETER
POINT
Set the number of consecutive transitions to the Motion SFC programs executed
by event and NMI tasks for every program.
[Errors]
These parameters are imported and checked when the PLC ready flag (M2000)
turns off to on.
When the value that was set is outside the setting range, the following Motion
SFC error is set and the initial value is used to control.
Error code Error cause
Error processing Corrective action
(Note) Name Contents
The normal task's
Normal task consecutive transition Turn PLC ready flag (M2000)
The initial value
consecutive count of the Motion SFC off, make correction to set the
17000 of 3 is used for
transition program executed by the value of within the range, and
control.
count error normal task is outside the write it to the CPU.
range 1 to 30.
(Note) : 0000H (normal)
11 - 8
11 MOTION SFC PARAMETER
[Errors]
None.
11 - 9
11 MOTION SFC PARAMETER
POINT
The settings of "END operation" are invalid for the subroutine called program.
"END operation" is controlled as "end".
11 - 10
11 MOTION SFC PARAMETER
11 - 11
11 MOTION SFC PARAMETER
[Errors]
None.
POINT
In the case of the program which is executed by the normal task, write the
program so that it is not ended by END but it returns to the starting step by a
jump when starting of the automatically from an initial again.
11 - 12
11 MOTION SFC PARAMETER
When the event task is set, multiple events among the "fixed cycle, external
interrupt (for event task) and PLC interrupt".
However, multiple fixed cycles cannot be set toward one Motion SFC program.
Example) Interrupt setting: Inputs for event task I6, I7, I8, I9, I10, I11, I12, I13,
I14 and I15
Motion SFC program No. 10 – event : Fixed cycle (3.55ms)
Motion SFC program No. 20 – event :
Fixed cycle (1.77ms) + external interrupt (I6)
Motion SFC program No. 30 – event :
External interrupts (I7, I15) + PLC CPU
interrupt
When the NMI task is set, multiple interrupt inputs among the external
interrupts (for NMI task) can be set.
Example) Interrupt setting: Inputs for NMI task I0, I1, I2, I3, I4, I5
Motion SFC program No. 10 – NMI : I0
Motion SFC program No. 20 – NMI : I1 + I2
Motion SFC program No. 30 – NMI : I5
[Errors]
This program parameter is imported when the PLC ready flag (M2000) turns off
to on, and is checked at starting of the Motion SFC program (automatic start,
start from PLC or subroutine start).
When the value is illegal, either of the following Motion SFC errors is set and
the initial value is controlled.
Error code Error cause
Error processing Corrective action
(Note) Name Contents
Multiple events
among the normal,
Execute task
17010 event and NMI
setting is illegal Turn PLC ready flag (M2000) off,
tasks are set, or The initial value
make correction to set the value
one is not set. (normal task) is
of within the range, and write it to
Two or more fixed controlled.
Executed task the CPU.
cycles of the event
17011 setting is illegal
task have been
(event)
set.
(Note) : 0000H (normal)
11 - 13
11 MOTION SFC PARAMETER
POINT
Since the execute task can be set for every Motion SFC program No., multiple
programs need not be written for single control (machine operation) to divide
execution timing-based processing’s.
For example, it can be achieved easily by subroutine starting the areas to be run
in fixed cycle and to be run by external interrupt partially in the Motion SFC
program run by the normal task.
[Errors]
This program parameter is imported when the PLC ready flag (M2000) turns off
to on, and is checked at starting of the Motion SFC program (automatic start,
start from PLC or subroutine start).
When the value is illegal, either of the following Motion SFC errors is set and
the initial value is controlled.
Error code Error cause
Error processing Corrective action
(Note) Name Contents
The number of
consecutive
Event task
transitions of the
consecutive
17001 Motion SFC program
transition count
started by the event
error
task is outside the Turn PLC ready flag (M2000) off,
range 1 to 10. The initial value make correction to set the value
The number of of 1 is controlled. of within the range, and write it to
consecutive the CPU.
NMI task
transitions of the
consecutive
17002 Motion SFC program
transition
started by the NMI
count error
task is outside the
range 1 to 10.
(Note) : 0000H (normal)
11 - 14
11 MOTION SFC PARAMETER
POINT
The END operation of subroutine called program is controlled as an "end".
Program name
F3
END
11 - 15
11 MOTION SFC PARAMETER
The Motion SFC program is executed during PLC ready flag (M2000) is on.
The Motion SFC program may be started by any of the following three methods.
Set the starting method in the program parameter for every Motion SFC program.
Refer to Section "11.5 Program Parameters" for parameter setting.
[Operations]
An automatic start is made by turning PLC ready flag (M2000) on.
[Operations]
A start is made by executing a subroutine call/start step in the SFC program.
Refer to Chapter "6 MOTION SFC PROGRAMS" for details of the subroutine call/start
step.
The SFC program can started by executing the S(P).SFCS in the PLC program.
Refer to Chapter "5 MOTION DEDICATED PLC INSTRUCTION" for details.
11 - 16
11 MOTION SFC PARAMETER
[Operations]
(1) The Motion SFC program is ended by executing END set in itself.
(2) The Motion SFC program is stopped by turning off the PLC ready flag (M2000).
(3) The program can be ended by the clear step.
Refer to Section "6.5.4 Clear step" for details of the clear step.
[Point]
(1) Multiple ENDs can be set in one Motion SFC program.
Use a subroutine start to stop the Motion SFC program running and switch it to another
Motion SFC program.
SUB
END
There are no specific information that indicates which the Motion SFC program is
executing. Use a user program (Motion SFC program/PLC program) to control the
executing program.
11 - 17
11 MOTION SFC PARAMETER
When the CPU is powered off or reset operation is performed, Motion SFC programs
run are shown below.
(1) When the CPU is powered off or reset operation is performed, Motion SFC
programs stop to execute.
(2) At CPU power-off or key-reset, the contents of the motion registers #0 to #7999
are held. Initialize them in the Motion SFC programs as required.
(3) After CPU power-on or reset processing, Motion SFC programs run is shown
below.
• The SFC programs set to start automatically are run from the beginning by
turning PLC ready flag (M2000) on in the PLC program.
• The other Motion SFC programs are also executed from the first at starting.
When a RUN/STOP switch is operated, PLC ready flag (M2000) turns on/off in
accordance with "Operation at STOP to RUN" of a setting of a basic systems.
Refer to Section "1.5.3 Individual parameters" for the details of "Operation at STOP to
RUN".
And, refer to the next section for PLC ready flag (M2000) off/on.
11 - 18
11 MOTION SFC PARAMETER
11.12 Operation Performed when PLC Ready flag (M2000) Turns OFF/ON
This section explains about the turns off/on of PLC ready flag (M2000).
The on/off condition of PLC ready flag (M2000) differences in "Operation at STOP to
RUN" of a setting of a basic systems.
Refer to Section "1.5.3 Individual parameters" for details.
[M2000 ON OFF]
When PLC ready flag (M2000) turns off, Motion SFC programs stops to execute and
the PCPU ready flag (M9074) turns off.
Since actual outputs PY has whole point turn off.
POINT
When the PLC ready flag (M2000) turns off, Motion SFC programs stop but
actual outputs PY in the Motion SFC programs do not turn off.
11 - 19
11 MOTION SFC PARAMETER
Outputs are held if Motion SFC programs stop due to error occurrence.
To turn off outputs at error occurrence, executes the following Motion SFC program.
ERROR
Processing for the Motion
P0 SFC program B
Processing for
the Motion SFC Whether error occurred in correspondence Motion
program A0 SFC program or not is judged by error detection flag
G0 G1 M2039 and #8056
(latest error Motion SFC program No.)
F0 F1 Outputs which must be turned OFF are turned OFF.
Motion SFC error detection flag M2039 is turned OFF.
P0
11 - 20
12 USER FILES
POINT
• Set the "project name" on the project management screen.
• The "project path name" + "project name" are restricted to 230 characters in
length.
((Example) "C:\Usr\.........\project name\")
12 - 1
12 USER FILES
(16) Mechanical system svedtda1.bin Mechanical system program edit information files (page 1 to 8)
program editing file svedtda2.bin (Note-1) Mechanical system program edit information files (page 9 to 16)
(Note-1) : 32-axes only svedtda3.bin (Note-1) Mechanical system program edit information files (page 17 to 24)
svedtda4.bin (Note-1) Mechanical system program edit information files (page 25 to 32)
( ) svmchprm.bin File after conversion of mechanical system program edit
(17) Mechanical system SV22
program conversion file information file svedtdan.bin into internal codes only
( ) Cam data files of cam No.1 to 64
(18) Cam data conversion svcamprm.bin
file svcampr2.bin (Note-1) Cam data files of cam No.101 to 164
(Note-1) : 32-axes only svcampr3.bin (Note-1) Cam data files of cam No.201 to 264
svcampr4.bin (Note-1) Cam data files of cam No.301 to 364
(19) Backup data file svbackup.bin Information file 1 for backup and load
svbackup2.bin Information file 2 for backup and load
svbackup6.bin Information file 6 for backup and load
(20) Motion register file modevice.bin Motion register (#0 to #8191) reading file
Only user device range(#0 to #7999) is written.
Device memory file devmem.bin Devices (X,Y, M/L, B, F, D, W, Special relay, Special register) except # reading file
(21) Device setting screen devset.inf Device setting information file of device setting screen
information file
(22) PLC of the Q series param.wpa Data files of Multiple CPU setting, I/O assignment etc.
common parameter file
12 - 2
12 USER FILES
The online change is used to write to the Motion SFC program to the internal SRAM
during the positioning control (M.RUN LED: ON).
Program correction and a check of operation can be executed repeatedly at the
Multiple CPU system start.
POINT
(1) Program writing is executed during the positioning control in the online change.
Be safely careful enough for work.
(2) Programs writing to the internal SRAM of Motion CPU at the mode operated by
ROM in the online change. If the online change is executed at the mode
operated by ROM, it returns to the contents of program written in the internal
FLASH ROM by the next power ON or resetting.
(3) If the online change is executed simultaneously to one Motion CPU from the
multiple personal computers, a program writing may not be executed. Please do
not perform.
(4) If the online changes are executed by other personal computer during the
following operation by SW6RN-GSV P, injustice of a monitor value and
operation failure may occur. Please do not perform.
• Monitor mode of the Motion SFC program • Test mode
• Debug mode of the Motion SFC program
(5) If the online change of Motion SFC chart added newly is executed, since the
online change of Motion SFC parameter cannot be executed, it operates as the
normal task (default value).
(6) When using the SV22, if the online change is executed by changing the
"program/servo program editor screen – [Mode assignment setting]", the
contents of change are not reflected.
(7) If the cables between the peripheral devices and Motion CPU fall out, or the
power supply of the Motion CPU turns OFF or resets, the program is corrupted.
Write the program again with the communication screen of SW6RN-GSV P.
12 - 3
12 USER FILES
Select the "Online change OFF/ON" of Motion SFC program with the "program editor
screen [Convert] menu – [Online change setting]" of SW6RN-GSV P.
There are following three methods for the online change of Motion SFC program.
• When the program editor screen [SFC diagram write] is used ---- Online change of
the Motion SFC program
• When the operation control/transition program editor screen [Convert] is used ----
Online change of the operation control/transition program editor screen
• When the servo program editor screen [Store] is used ---- Online change of the servo
program
(1) When the program editor screen [SFC diagram write] is used.
Online change of the Motion SFC program during edit is executed by selecting
the [SFC diagram write] key.
Online change is possible to the Motion SFC program during stop.
If the online change is made to the program during execution, an alarm message
indicates. (Execution/stop state of the Motion SFC program can be checked with
the program batch monitor.)
If the start request is made to the program during online change, the Motion SFC
start error (error code16007: online change) will occur and the program does not
start.
[SFC Diagram Write] Key
Conv(X)
SFC Diagram Write(C)
Batch Conversion(A)
Online Change Setting(R)
12 - 4
12 USER FILES
(2) When the operation control/transition program editor screen [Convert] is used.
Online change of the operation control/transition program during edit is executed
by selecting the [Convert] key.
Online change is possible to the operation control/transition program during
execution.
A program that the online change was made is executed from the next scan.
[Convert] Key
Operations for which made the online change to the operation control/transition
program during execution in the following conditions are shown below. Be careful
to execute the online change in the following conditions.
Program Condition Operation
• Online change of the FSn • After completion of online change,
FSn
operation control program is the FSn repeats the operation
Gn executed during FSn control program that the online
or
execution in the state of change was made until the
waiting for the completion of completion of condition for Gn.
FSn
condition for Gn.
Gn
12 - 5
12 USER FILES
[Store] Key
Operations for which made the online change to the servo program in the
following conditions during execution are shown below. Be careful to execute the
online change in the following conditions.
Program Condition Operation
• Online change of the servo • After completion of condition for
ON bit device
program Kn at the WAITON or WAITON/WAITOFF, the servo
Kn after WAITOFF is executed in program before the online change
or the state of waiting for the is started.
completion of condition for • The servo program that the online
OFF bit device WAITON/WAITOFF. change was made is executed at
Kn
the next servo program start.
Kn
12 - 6
12 USER FILES
The outline operations to transfer the program from SW6RN-GSV P to the program
memory of Motion CPU are described.
Free area
Free area
12 - 7
12 USER FILES
(b) If the online change is executed repeatedly, the free space in program
memory is lost and the online change may not be executed. In this case, an
error message is displayed by SW6RN-GSV P at the online change, and
"Online change OFF" is set.
Motion CPU Personal computer
Program No.5
Program No.5
Program No.2
(c) In the case of b), arrange to stuff to the front the invalid programs.
Operation procedures to stuff to the front are shown below.
1) Select the "program editor screen [Option] menu – [Sort]" of SW6RN-
GSV P. In this case, the invalid programs in the personal computer
arranges by SW6RN-GSV P.
2) Execute the program writing with the [Communication] menu – [Transfer]
in the stop state of Motion CPU.
Motion CPU Personal computer
12 - 8
13 LIMIT SWITCH OUTPUT FUNCTION
This function is used to output the ON/OFF signal corresponding to the data range of
the watch data set per output device.
Motion control data or optional word data can be used as watch data. (Refer to Section
"13.2 Limit Output Setting Data" for details.) A maximum output device for 32 points
can be set regardless of the number of axes.
13.1 Operations
(1) ON output to an output device is made while the watch data value is in the ON
13
output region set with (ON Value) and (OFF Value) in this function.
(a) (ON Value), (OFF Value) and watch data value are handled as signed data.
ON output region where an ON output is made to the output device is
governed by the magnitude relationship between (ON Value) and (OFF
Value) as indicated below.
Relationship between (ON Value) and
ON output region
(OFF Value)
(ON Value) < (OFF Value) (ON Value) <= (watch data value) < (OFF Value)
(ON Value) <= (watch data value)
(ON Value) > (OFF Value)
(Watch data value) < (OFF Value)
(ON Value) = (OFF Value) Output OFF in whole region
ON
Output device OFF OFF
OFF Value
ON region setting
ON Value
ON ON
Output device OFF
ON Value
ON region setting
OFF Value
(Watch data value) (OFF Value) (ON Value) (Watch data value)
13 - 1
13 LIMIT SWITCH OUTPUT FUNCTION
(b) The limit switch outputs are controlled based on the each watch data during
the PCPU ready status (M9074: ON) by the PLC ready flag (M2000) from
OFF to ON.
When the PCPU ready flag (M9074) turns OFF by turning the PLC ready flag
(M2000) from ON to OFF, all points turn OFF. When (ON Value) and (OFF
Value) are specified with word devices, the word device contents are input to
the internal area when the PLC ready flag (M2000) turns from OFF to ON.
After that, the word device contents are input per motion operation cycle, and
limit switch outputs are controlled.
(c) Multiple outputs (Up to 32 points) can be also set to one watch data. In each
setting, the output device may be the same.
If multiple ON region settings have been made to the same output device, the
logical add of the output results in the regions is output.
ON ON
Output device OFF OFF
OFF Value
ON region setting No.2
ON Value
OFF Value
ON region setting No.1
ON Value
(2) Output enable/disable bit can be set and executed enable/disable of the limit
switch outputs point-by-point.
Limit switch output control is executed when the output enable/disable bit is ON,
and the output is OFF when it is OFF.
If there is no setting, the outputs are always enabled.
(3) Forced output bit can be set and turned the forcibly output of the limit switch
outputs point-by-point ON.
The output is ON when the forced output bit is ON. Priority is given to control of
this setting over off (disable) of the "output enable/disable bit".
If there is no setting, no forced outputs are not always made.
13 - 2
13 LIMIT SWITCH OUTPUT FUNCTION
(4) When the multiple watch data, ON region, output enable/disable bit and forced
output bit are set to the same output device, the logical add of output results of the
settings is output.
M9074 ON
Output device
OFF Value
ON region setting
ON Value
Output device
Output control based on Output ON
Output OFF ON Value and OFF Value (Forced output) Output OFF
13 - 3
13 LIMIT SWITCH OUTPUT FUNCTION
13 - 4
13 LIMIT SWITCH OUTPUT FUNCTION
(b) As the watch data, motion control data or optional word device data can be
used.
1) Motion control data
Axis No. setting range
Item Unit Data type
Q173CPU(N) Q172CPU(N)
Feed current value
Position command 32-bit
Real current value
integer type
Deviation counter value PLS
16-bit
Motor current (Command output voltage : ACF) 0.1% (0.01V)
integer type 1 to 32 1 to 8
Motor speed 0.1r/min
Cam shaft within-one-revolution current value
Feed current value (Virtual) 32-bit
After-differential current value (Virtual) PLS integer type
After-differential encoder current value
1 to 12 1 to 8
Encoder current value
3) When the optional device data is set, the following data type is set as the
data type to be compared.
Data type Device No. setting range
16-bit integer type
32-bit integer type Set the device No. as an even No..
64-bit floating-point type
13 - 5
13 LIMIT SWITCH OUTPUT FUNCTION
(b) The following devices can be used as the ON Value and OFF Value of the
data range.
The data type of device/constant to be set is the same as the type of watch
data.
Item Device No. setting range
Data register D0 to D8191
Link register W0 to W1FFF
Motion register #0 to #8191
Constant Hn/Kn
13 - 6
13 LIMIT SWITCH OUTPUT FUNCTION
13 - 7
13 LIMIT SWITCH OUTPUT FUNCTION
MEMO
13 - 8
14 ROM OPERATION FUNCTION
Refer to Section 1.3.4 for the correspondence version of the Motion CPU and the
software.
This function is used to store beforehand the user programs and parameters in the
internal FLASH ROM memory built-in the Motion CPU module, and operate it based on
the data of internal FLASH ROM memory.
(1) Turn on or reset the power supply of Multiple CPU system in the "Mode operated
by RAM".
(2) Execute a trial run and adjustment by creating the system setting, programs and 14
parameters using SW6RN-GSV P.
(3) Turn on or reset the power supply of Multiple CPU system in the "Installation
mode • mode written in ROM".
(4) Write the system setting, programs and parameters of SRAM built-in the Motion
CPU module to the internal FLASH ROM by performing the ROM writing request
using SW6RN-GSV P.
(5) Start a normal operation by starting the Motion CPU in the "Mode operated by
ROM" after reading the system setting, programs and parameters written in the
internal FLASH ROM to the internal SRAM.
POINT
(1) Switch the operation mode using a DIP switches of Motion CPU module.
(2) Confirm the operation mode with "Mode LED" and "BOOT LED" of Motion
CPU module.
14 - 1
14 ROM OPERATION FUNCTION
Personal computer
1) ROM writing request
Internal FLASH ROM memory
MT Developer
System setting data
Each parameter for servo control
Servo program
14 - 2
14 ROM OPERATION FUNCTION
Q17 CPU(N)
MODE 1) MODE
RUN 10)
ERR. 2) RUN
ERR.
M.RUN
BAT.
3) M.RUN
BAT.
BOOT 4) BOOT
5) ON SW
1
6) 2
3 9)
4
FRONT 5
SSCNET
STOP RUN
CN2
CN1
RESET L CLR
7)
PULL
8)
USB
RS-232
14 - 3
14 ROM OPERATION FUNCTION
RESET : Set the switch to the "RESET" position once to reset the hardware.
Applies a reset after an operation error and initialized the operation.
L.CLR : Clear the latch area all data which set with the parameters.
(LATCH CLEAR also clears data outside the latch area at this time.)
RESET/L.CLR switch (Note-1) • Latch clear operating method
8)
(Momentary switch) 1) Set the "RUN/STOP" switch to "STOP".
2) Move the "RESET/L.CLR" switch to "L.CLR" several times until the "M.RUN
LED" flickers.
("M.RUN LED" flickers : Latch clear completed. )
3) Move the "RESET/L.CLR" switch to "L.CLR" once more. ("M.RUN LED" turn off.)
Dip switch 1 Must not be used. (Shipped from the factory in OFF position)
ROM operating setting (Shipped from the factory in OFF position)
Dip switches Dip switch 2 SW2 SW3
ON SW OFF OFF Mode operated by RAM
1 ON OFF Must not be set
Dip switch 3 OFF ON Must not be set
2
9) ON ON Mode operated by ROM
3 Dip switch 4 Must not be used. (Shipped from the factory in OFF position)
4 Dip switch 5 ON : Installation mode • mode written in ROM
5 (Installation • OFF : Normal mode (Mode operated by RAM / Mode operated by ROM)
ROM writing Turn ON dip switch 5 when installed the operating system software into the
switch) Motion CPU module from the peripheral device. After completing the installation,
move to switch and re-start.
10) Memory card EJECT button Used to eject the memory card from the Motion CPU.
(Note-1) : It is not possible to reset the Multiple CPU system by each of the PLC CPU/Motion CPU No.2 to 4.
If it is reset, other CPU occurred to stop of the overall Multiple CPU system where "MULTI CPU DOWN" (Error code: 7000).
The overall Multiple CPU system reset is resetting the CPU No.1 of PLC CPU.
14 - 4
14 ROM OPERATION FUNCTION
14 - 5
14 ROM OPERATION FUNCTION
POINT
Even if a DIP switch setting is changed on the way after the power supply on,
"Operation mode" is not changed. Be sure to turn on or reset the power supply of
Multiple CPU system to change a DIP switch setting.
14 - 6
14 ROM OPERATION FUNCTION
Servo program
Personal computer
1) ROM writing request
MT Developer
Internal FLASH ROM memory
System setting data
Each parameter for servo control
Servo program
(Note-1) : "Registration codes" is used to judge whether the programs and parameters written in the
internal FLASH ROM are normal or not.
14 - 7
14 ROM OPERATION FUNCTION
POINT
(1) When the RAM is selected with "Communication" - "Transfer" menu of
SW6RN-GSV P, the SRAM memory built-in Motion CPU module is targeted
at the "Installation mode • mode written in ROM" and "Mode operated by
ROM".
(2) The SRAM memory built-in Motion CPU module is targeted at the "Backup •
load" operation of SW6RN-GSV P. Set the "Mode operated by ROM" after
"ROM writing" for the ROM operation after "Backup • load" at the CPU module
replacement.
(3) The internal FLASH ROM serves as a life in 100000 times writing. If it passes
over a life, "writing error" will occur. After that, replace a module at the ROM
operation.
(4) The online change of Motion SFC program at the mode operated by ROM
executes the Motion SFC program performed the online change from the next
scanning. After that, it returns to the contents of Motion SFC program written
in the internal FLASH ROM at the power supply on or system reset.
14 - 8
14 ROM OPERATION FUNCTION
Installation mode
mode written in Set "normal mode" as a DIP switch 5,
ROM (Install the and set "Mode operated by RAM" as a DIP
operating system switch 2 and 3.
software.)
Mode operated NO
by RAM Check the operation
YES
Installation mode
mode written in
Set "normal mode" as a DIP switch 5, and
ROM set "Mode operated by ROM" as a DIP
(ROM writing.) switch 2 and 3.
Mode operated
by ROM
ROM operation start
(Note) : Do not execute the ROM writing for program and parameter while installing
the operating system software.
14 - 9
14 ROM OPERATION FUNCTION
POINT
If the ROM operation of a data written in the internal FLASH ROM is executed in
the combination of the Motion CPU module for additional parameter (ROM
operation function) and programming software by the operating system software
not for additional parameter (ROM operation function), a Motion CPU WDT error
(error code: 302) will occur and the ROM operation cannot executed.
In this case, use the operating system software for additional parameter (ROM
operation function). (Refer to Section 1.3.4.)
14 - 10
14 ROM OPERATION FUNCTION
The operating procedure of ROM writing using the SW6RN-GSV P is shown below.
System setting screen
Operating procedure
"When selecting the RAM." (Default screen at "Transfer" selecting.) 2) Click on "ROM" of "RAM/ROM" menu screen.
Write the programs and data in the RAM of Motion
CPU to the ROM.
(Note) : At "RAM" clicking on
Communication dialog is left screen (When
selecting the RAM).
RAM/ROM(M) Read, write and verify to the RAM of Motion
RAM(T) CPU.
ROM(R) Write the all data to Motion CPU after
clicking on "RAM" at the ROM writing.
"When selecting the ROM." (ROM writing window) 3) "RAM/ROM" communication dialog is left screen
(When selecting the ROM.).
POINT
Be sure to write the all data beforehand to the RAM of
Motion CPU at the ROM writing.
14 - 11
14 ROM OPERATION FUNCTION
MEMO
14 - 12
15 SECURITY FUNCTION
15 SECURITY FUNCTION
Refer to Section "1.3.4" for the correspondence version of the Motion CPU and the
software.
This function is used to protect the user data of Motion CPU by registering a password.
The following user data can be protected in this function.
"Write Protection" or "Read/Write Protection" can be set every user data.
POINT
Security function can be used only by combining with operating system software
(for security function) and SW6RN-GSV P (for security function).
Items Details
Type • Type of user data
Registration • " " is displayed when a password is registered in the Motion CPU.
• Enter new password.
Password • Set a password by the alphanumeric character (ASCII) of 6 or less characters.
• Match case (Full-size character cannot be used.)
• A registration condition set in the Motion CPU is displayed.
Registration Write Protection: Not writing operation
condition Read/Write Protection: Not reading/writing operation
• New registration condition can be selected by a password input.
15 - 1
15 SECURITY FUNCTION
(b) Enter new password in the password column, and select a registration
condition (Write Protection, Read/Write Protection). It leaves in a blank for
the user data that does not register/change a password.
(c) Push [Execute] key to register a password in the Motion CPU at the
password registration.
(d) Push [Execute] key to display a screen which checks old password at the
password change. Enter old password, and push [Execute] key. New
password will be registered in the Motion CPU by success of old password
check. When the new password is the same as old password (change for
only registration condition), [Password check] screen is not displayed.
POINT
(1) If an user has forgotten a registration password, clear a password (include
user data) of Motion CPU by [Clear All]. However, if [Clear All] is executed,
since all password data and user data will be cleared re-write user data in the
Motion CPU.
(2) ROM operation can be executed by user data registered a password. The
password setting is also included in the ROM writing/reading data.
(3) When a password is registered or changed, the password data in the project is
also registered or changed. Be sure to save a password.
15 - 2
15 SECURITY FUNCTION
Items Details
Type • Type of user data
Registration • " " is displayed when a password is registered in the Motion CPU.
Password • Enter old password.
(b) Enter old password in the password column, and push [Execute] key.
(c) A password set in the Motion CPU will be deleted by success of password
check. (A blank is displayed in the registration column.)
POINT
(1) When a password is deleted, the password data in the project is also deleted.
Be sure to save a password.
15 - 3
15 SECURITY FUNCTION
When the user data program set in a password is corrected, the password check
screen is displayed automatically.
Items Details
Type • Type of user data
Password • Enter old password.
(b) A password protection set in the Motion CPU will be released temporarily by
success of password check, and the user data program can be corrected.
POINT
A password memorized by success of password check is valid even if the project
change is executed while SW6RN-GSV P is running. (A password check screen
is not displayed.)
15 - 4
15 SECURITY FUNCTION
There are two following methods to save a password in the project data.
• Registration/change or clearance password
• A password read with user data by [Transfer] [Read].
A password saved in the project data can be registered with user data, when the user
data are written in the Motion CPU that does not set password by [Transfer] [Write].
The updated password data is saved in the project data by the following operations.
• Password [Save] key of communication setting screen displayed by
"[Communication] [Transfer]".
• Password [Save] key of password registration/change/clearance screen.
• When the password registration/change/clearance screen ends, if there is non-saved
password data, select "Yes" of save check screen.
The password data in the project is not saved in the project before password
save.
POINT
Save a password after delete of password to delete the password data in the
project. Or, create new project and divert user data from the project with password
data to create the project without password data.
15 - 5
15 SECURITY FUNCTION
This function is used to clear the all user data and password setting in Motion CPU.
Clear all can be executed in the following operation.
• Select "[Option] [Clear All]" of the communication screen displayed by
"[Communication] [Transfer]".
POINT
(1) Turn off the PLC ready flag (M2000) and test mode ON flag (M9075) to
execute "Clear All".
(3) All user data and password setting are cleared at the "Clear All". Backup of
user data and password setting data is recommended before clearance.
15 - 6
16 COMMUNICATIONS VIA NETWORK
Refer to Section "1.3.4" for the correspondence version of the Motion CPU and the
software.
The communication between the personal computer and the Motion CPU is possible
via Q series Network module (MELSECNET/10(H), Ethernet, CC-Link, RS-232 and
etc.) in the Motion CPU (Q173CPU(N)/Q172CPU(N)).
Refer to the following manuals for the specifications of each network modules of
MELSECNET/10(H), Ethernet, CC-Link and Serial communication, the handling
method.
16 - 1
16 COMMUNICATIONS VIA NETWORK
(2) Access range of the communications via network of the Motion CPU is an access
range equivalent to Qn(H)CPU. (Refer to Section "16.2 Access Range of The
Communications via Network".)
(3) By setting the routing parameter to the control CPU of the network module and the
CPU which connected the peripheral devices in the network by
MELSECNET/10(H) and Ethernet, it is possible to relay to 8 network points and
communicate.
(4) Because the Motion CPU cannot become the control CPU of the network module,
there is not setting item of the network module and network parameter.
However, when connecting with the CPU on the other network from the peripheral
device which connected the Motion CPU, it needs to the setting of the routing
parameter.
(5) It can operate by remote control the monitor or program editing of the Motion CPU
via the intranet using the Ethernet module.
Ethernet Ethernet
Intranet
16 - 2
16 COMMUNICATIONS VIA NETWORK
(1) It can access the other CPU via the network from the programming software (GX
Developer, SW6RN-GSV P, etc.) of the personal computer connected with the
CPU or serial communication module in USB/RS-232.
(2) It can access the other CPU via the network from the programming software in the
personal computer by connecting the personal computer equipped with Ethernet
to MELSECNET/10(H) or Ethernet board to the Ethernet to MELSECNET/10(H) or
Ethernet.
(3) The access range of above (1) and (2) can be accessed to 8 network points by
setting the routing parameter to the control CPU of the network module and the
CPU which connected the personal computer.
16 - 3
16 COMMUNICATIONS VIA NETWORK
Qn(H) Q173 C24 MNET Qn(H) Q173 MNET Qn(H) Q173 MNET MNET
CPU CPU or CPU CPU or CPU CPU or or Network
(N) Ether (N) Ether (N) Ether Ether
No.2
Network No.3
Qn(H) Q173 MNET MNET Qn(H) Q173 MNET Qn(H) Q173 MNET MNET
CPU CPU or or CPU CPU or CPU CPU or or
(N) Ether Ether (N) Ether (N) Ether Ether
Network No.4
Network No.5
Qn(H) Q173 MNET MNET Qn(H) Q173 MNET Qn(H) Q173 MNET MNET
CPU CPU or or CPU CPU or CPU CPU or or Network
(N) Ether Ether (N) Ether (N) Ether Ether No.6
Network No.7
Qn(H) Q173 MNET MNET Qn(H) Q173 MNET Qn(H) Q173 MNET MNET
CPU CPU or or CPU CPU or CPU CPU or or
(N) Ether Ether (N) Ether (N) Ether Ether
Network No.8
Network No.9
Qn(H) Q173 MNET MNET Qn(H) Q173 MNET Qn(H) Q173 MNET MNET Network
CPU CPU or or CPU CPU or CPU CPU or or
(N) Ether Ether (N) Ether (N) Ether Ether
No.10
: Communication is possible
: Communication is possible (Setting of the routing parameter is necessary.)
: Communication is impossible
16 - 4
16 COMMUNICATIONS VIA NETWORK
(1) It can access the other CPU via the CC-link from the programming software (GX
Developer, SW6RN-GSV P, etc.) of the personal computer connected with the
CPU or serial communication module in USB/RS-232.
(2) It can access the other CPU via the CC-Link from the programming software in the
personal computer by connecting the personal computer equipped with CC-Link
board to the CC-Link.
(3) The access range of above (1) is only the CPU on the CC-Link which a system
connects it to, and it can select a CC-Link network to connect by specifying the I/O
No. of the CC-Link module.
(4) The access range of above (2) is only the CPU of the connected the CC-Link.
Qn(H) Q173 C24 CC- Qn(H) Q173 CC- Qn(H) Q173 CC- CC-
CPU CPU Link CPU CPU Link CPU CPU Link Link Network
(N) (N) (N)
No.2
Network No.3
Qn(H) Q173 CC- Qn(H) Q173 CC- Qn(H) Q173 CC- CC-
CPU CPU Link CPU CPU Link CPU CPU Link Link
(N) (N) (N)
Qn(H) Q173 C24 CC- Qn(H) Q173 CC- Qn(H) Q173 CC- CC-
CPU CPU Link CPU CPU Link CPU CPU Link Link Network
(N) (N) (N)
No.2
Network No.3
Qn(H) Q173 CC- Qn(H) Q173 CC- Qn(H) Q173 CC- CC-
CPU CPU Link CPU CPU Link CPU CPU Link Link
(N) (N) (N)
: Communication is possible
: Communication is possible (Setting of the routing parameter is necessary.)
: Communication is impossible
16 - 5
16 COMMUNICATIONS VIA NETWORK
(1) It can access the other CPU via the RS-422/485 from the programming software
(GX Developer, SW6RN-GSV P, etc.) of the personal computer connected with
the CPU or serial communication module in USB/RS-232.
(2) The access range of above (1) is only the CPU on the RS-422/485 which a
system connects it to, and it can select RS-422/485 network to connect by
specifying the I/O No. of the C24 module.
Qn(H) Q173 C24 C24 Qn(H) Q173 C24 Qn(H) Q173 C24 C24
CPU CPU CPU CPU CPU CPU
(N) (N) (N)
RS-422/485
Qn(H) Q173 C24 Qn(H) Q173 C24 Qn(H) Q173 C24 C24
CPU CPU CPU CPU CPU CPU
(N) (N) (N)
Qn(H) Q173 C24 C24 Qn(H) Q173 C24 Qn(H) Q173 C24 C24
CPU CPU CPU CPU CPU CPU
(N) (N) (N)
RS-422/485
Qn(H) Q173 C24 Qn(H) Q173 C24 Qn(H) Q173 C24 C24
CPU CPU CPU CPU CPU CPU
(N) (N) (N)
: Communication is possible
: Communication is possible (Setting of the routing parameter is necessary.)
: Communication is impossible
16 - 6
16 COMMUNICATIONS VIA NETWORK
Usable/
Network communications
unusable
Programming software CPU (C24) Network Link CPU
(3) Because routing cannot access, it can access only the connected network. The
connected network can be selected by specifying the I/O No. of the module.
16 - 7
16 COMMUNICATIONS VIA NETWORK
Qn(H) Q173 C24 MNET Qn(H) Q173 MNET C24 Qn(H) Q173 MNET MNET
CPU CPU or CPU CPU or CPU CPU or or Network
(N) Ether (N) Ether (N) Ether Ether No.2
RS-422/485
Network No.3
Network No.4
Qn(H) Q173 C24 MNET Qn(H) Q173 MNET CC- CC- Qn(H) Q173 MNET MNET
CPU CPU or CPU CPU or Link Link CPU CPU or or
(N) Ether (N) Ether (N) Ether Ether
RS-422/485
RS-422/485 Network No.5
Qn(H) Q173 MNET Qn(H) Q173 CC- Qn(H) Q173 CC- MNET Qn(H) Q173 MNET
CPU CPU or CPU CPU Link CPU CPU Link or CPU CPU or
(N) Ether (N) (N) Ether (N) Ether
: Communication is possible
: Communication is possible (Setting of the routing parameter is necessary.)
: Communication is impossible
16 - 8
16 COMMUNICATIONS VIA NETWORK
RS-422/485
Qn(H) Q173 C24 CC- CC- Qn(H) Q173 CC- Qn(H) Q173 CC- MNET
CPU CPU Link Link CPU CPU Link CPU CPU Link or Network
(N) (N) (N) Ether No.1
RS-422/485
Network No.2
Qn(H) Q173 CC- MNET Qn(H) Q173 MNET MNET Qn(H) Q173 MNET
CPU CPU Link or CPU CPU or or CPU CPU or
(N) Ether (N) Ether Ether (N) Ether
Network No.3
RS-422/485
Qn(H) Q173 MNET C24 Qn(H) Q173 C24 Qn(H) Q173 C24
CPU CPU or CPU CPU CPU CPU
(N) Ether (N) (N)
RS-422/485
Qn(H) Q173 C24 CC- CC- Qn(H) Q173 CC- Qn(H) Q173 CC- MNET
CPU CPU Link Link CPU CPU Link CPU CPU Link or Network
(N) (N) (N) Ether No.1
RS-422/485
Network No.2
Qn(H) Q173 CC- Qn(H) Q173 MNET Qn(H) Q173 MNET MNET
CPU CPU Link CPU CPU or CPU CPU or or
(N) (N) Ether (N) Ether Ether
: Communication is possible
: Communication is possible (Setting of the routing parameter is necessary.)
: Communication is impossible
16 - 9
16 COMMUNICATIONS VIA NETWORK
MEMO
16 - 10
17 MONITOR FUNCTION OF THE MAIN CYCLE
Refer to Section "1.3.4" for the correspondence version of the Motion CPU and the
software.
(1) Information for main cycle of the Motion CPU processing (process cycle executed
at free time except for motion control) is stored to the special register.
(2) Since the automatic refresh of shared CPU memory and normal task of Motion
SFC program are executed in the main cycle, make it reference for process time,
etc. to program.
(4) When a main cycle is lengthened (more than 1.6[s]), a WDT error may occur in
the Motion CPU.
Current scan time • Current scan time is stored in the unit 1[ms].
D9017 Scan time
(1ms units) • Setting range (0 to 65535[ms])
17
Maximum scan time • Maximum main cycle is stored in the unit 1[ms].
D9019 Maximum scan time
(1ms units) • Setting range (0 to 65535[ms])
17 - 1
17 MONITOR FUNCTION OF THE MAIN CYCLE
MEMO
17 - 2
18 SERVO PARAMETER READING FUNCTION
Refer to Section "1.3.4" for the correspondence version of the Motion CPU and the
software.
(1) When the servo parameters are changed, the Motion CPU will be automatically
read the servo parameters and reflected them to the servo parameter storage
area in the Motion CPU. Therefore, an operation to read servo parameters is
unnecessary in the following cases.
(a) The parameters are changed by auto tuning.
POINT
If the power supply of Motion CPU is turned off/reset or the power supply of servo
amplifier is turned off immediately after change, it may not be reflected.
(2) After executing the servo parameter reading function, when it needs to reflect the
servo parameters changed to the SW6RN-GSV P, read the servo parameters
from the Motion CPU and save data.
(1) Set the axis No. of servo amplifier to read a parameter in the servo parameter
read request axis No. (D9104) and turn the servo parameter read request flag
(M9104) ON for reading of the servo parameter from servo amplifier.
(2) While the servo parameter reading flag (M9105) is turned on, the servo parameter
read request flag does not become valid. Use this condition as an interlocks.
(3) Reading of servo parameter from servo amplifier becomes valid at the turning
OFF to ON of the servo parameter read request flag.
(4) The servo parameter read request flag is not turned off automatically. Execute the 18
device OFF processing by the user side.
(5) After executing the read function of the servo parameter from servo amplifier,
when the servo parameter read request is executed toward the other axis, turn the
servo parameter read request flag (M9104) OFF to ON, set the correspondence
axis in the servo parameter read request axis No. (D9104) and turns the servo
parameter read request flag (M9104) OFF to ON.
(6) After executing the read function of the servo parameter from servo amplifier,
when the servo parameter read request is executed toward the same axis again,
turn the servo parameter read request flag (M9104) ON to OFF, and turn the
servo parameter read request flag (M9104) OFF to ON again.
18 - 1
18 SERVO PARAMETER READING FUNCTION
(7) When the servo parameter read request flag (M9104) turns OFF to ON, if the
servo parameter read request axis is not used or the power is off, the reading of
the servo parameter from servo amplifier is not executed.
(8) When the servo parameter read request axis No. (D9104) is outside of the setting
range, it becomes "No operation" even if the servo parameter read request flag
(M9104) turns OFF to ON.
(9) The list of the servo parameter read request device is shown below.
An operation procedure which the servo parameter read by the reading function
of the servo parameter is reflected on the SW6RN-GSV P is shown below.
Operating procedure
END
18 - 2
19 ERROR CODE LISTS
When an error occurs while the Motion CPU is running, the error information is stored
in the error history register (#8000 to #8063), special relay M and special register D.
When an error occurs while the Motion SFC program is operating, the error code and
error message can be read by the SW6RN-GSV P.
The procedure for reading error codes by the SW6RN-GSV P is shown below.
Refer to the applicable the help of the SW6RN-GSV P for details of the SW6RN-
GSV P operating method.
The occurrence date of the Motion CPU error history uses a watch function with the
internal Motion CPU.
Make the set of the clock data and the clock data read request (M9028) by user
programs.
As for the self-diagnosis error code, confirmation can be done by the PC diagnosis of
GX Developer.
Refer to the GX Developer operation manual for the GX Developer operation
procedure.
19
19 - 1
19 ERROR CODE LISTS
Eight errors that occurred in the past during the Motion SFC control are stored in the
"error history devices (#8000 to #8063)" of the motion registers. (Check by SW6RN-
GSV P).
The "error codes" for the Motion SFC program are shown below.
Refer to the "Q173CPU(N)/Q172CPU(N) Motion controller (SV13/SV22) Programming
Manual (REAL MODE)"/ "Q173CPU(N)/Q172CPU(N) Motion controller (SV22)
Programming Manual (VIRTUAL MODE )" for minor errors, major errors, servo errors
and servo program setting errors.
#8056
to Latest error information
#8063
19 - 2
19 ERROR CODE LISTS
• At a Motion SFC program start by S(P).SFCS Double start should be managed on the user
16003 Double start error instruction, the same Motion SFC program side. Provide the user's starting signal as a
starts. start interlock in the PLC program.
The active step of Motion
• S(P).GINT instruction was executed with PLC Provide ON of PLC ready flag (M2000) and
PLC ready OFF SFC program executed by
16004 ready flag (M2000) or PCPU ready flag PCPU ready flag (M9074) as S(P).GINT
(GINT) "PLC interrupt" is not
(M9074) is OFF. execution interlocks.
processed.
• At a Motion SFC program start by automatic Check the Motion SFC program No., and
None Motion SFC The specified Motion SFC
16005 start setting or GSUB, the specified Motion correct a program, or create the non-created
program program does not start.
SFC program does not exist. Motion SFC program.
When it started by GSUB,
• At a Motion SFC program start by automatic the start source Motion SFC Double start should be managed on the user
16006 Double start error start setting or GSUB, the same Motion SFC also stop to execute. side. Provide the user's starting signal as an
program is already starting. interlocks in the transition condition.
• The Motion SFC program which is rewriting
The specified Motion SFC
16007 Online change the Motion SFC chart by online change was Start after the completion of online change.
program does not start.
started.
19 - 3
19 ERROR CODE LISTS
Table 19.3 Motion SFC interpreter detection errors (16100 to 16199) (continued)
Error factor
Error code Error Processing Corrective Action
Name Description
• The self program was called/started by
16110 GSUB setting error 1
GSUB. GSUB cannot call its own or main program.
• The main program was called/started by Correct the Motion SFC program.
16111 GSUB setting error 2
GSUB.
Stop to execute the The nesting of parallel branch is up to four
Parallel branch • Nesting of parallel branches within a parallel applicable Motion SFC levels.
16112 program No..
nesting excess branch route exceeded four levels. Subroutine the branch destination processing
For the subroutine called and correct the program.
program, the call source
Motion control steps cannot be executed in
• An attempt was made to execute a motion program also stops to
16113 Executed task error the Motion SFC programs executed by the
control step K with an event or NMI task. execute.
event and NMI tasks.
Specified the invalid • The invalid device (T, C) in the program is set Correct the program which does set the
16207
device up. effective device.
19 - 4
19 ERROR CODE LISTS
Event task enable • Event task enable was executed at except for Event task enable may be executed in the
16301
(EI) execution error the normal task. normal task only. Correct the program.
Event task disable • Event task disable was executed at except for Event task disable may be executed in the
16302
(DI) execution error the normal task. normal task only. Correct the program.
• The cam data of the cam No. specified with
(D) or (S) is not yet registered to the Motion
controller. • Correct the program so that cam data is that
• The resolution of the cam No. specified with of the already registered cam No..
(D) or (S) differs from the number of • Correct the program to match (n) with the cam
transferred words specified with (n). resolution.
Block transfer • (S) to (S)+(n-1) is outside the device range. • Change (n) so that the block transfer range is
16303 (BMOV) execution • (D) to (D)+(n-1) is outside the device range. within the device range.
error • (n) is 0 or a negative number. • Change (n) to a positive number.
• (S) is a bit device and the device number is not • When (S) or (D) is a bit device, set the device
a multiple of 16 number to be multiple of 16.
• (D) is a bit device and the device number is not • When (S) or (D) is a bit device, do not set
a multiple of 16. PX/PY.
• PX/PY is set in (S) to (S)+(n-1).
• PX/PY is set in (D) to (D)+(n-1).
• The device No. which indirectly specifies (S) is • Correct the program so that the device No.
Time to wait (TIME) illegal. which indirectly specifies (S) is proper.
16304
execution error • The (S) data is outside the range 0 to • Correct the program so that the (S) data is
2147483647. within the range of 0 to 2147483647.
• (D) to (D)+(n-1) is outside the device range.
• (n) is 0 or a negative number. • Change (n) so that the block transfer range is
• (S) is a bit device and the device number is not within the device range.
Same data block
a multiple of 16 • When (S) or (D) is a bit device, set the device
16305 transfer (FMOV)
• (D) is a bit device and the device number is not number to be multiple of 16.
execution error
a multiple of 16. • When (S) or (D) is a bit device, do not set
• PX/PY is set in (S). The block processing on PX/PY.
• PX/PY is set in (D) to (D)+(n-1). executing is stopped and
the next block is executed.
Speed change
16308 request (CHGV)
execution error
Correct the program so that the specified axis
Torque limit value • The specified axis No. is outside the range.
No. is within the range.
change request
16309
(CHGT) execution
error
• The (S) data is outside the range of the data • Correct the program so that the (S) data is
Assignment (=) type of (D). within the range of the data type of (D).
16316
execution error • The device No. which indirectly specifies (D) is • Correct the program so that the device No.
illegal. which indirectly specifies (D) is proper.
Operation (/)
16320
execution error Correct the program so that the divisor is other
• The divisor is 0.
Remainder (%) than 0.
16321
execution error
Device set (SET)
16322
execution error
Device reset (RST)
16333
execution error • Correct the program so that the device No.
• The device No. which indirectly specifies (D) is
Device set (SET=) which indirectly specifies (D) is proper.
16334 illegal.
execution error • Correct the program to set a write-enabled
• (D) is a device which is write-disabled.
Device reset (RST=) device at (D).
16335
execution error
Device output
16336
(DOUT) execution
Device input (DIN)
16337
execution error
• The device No. which indirectly specifies (D) is Correct the program so that the device No.
Bit device output illegal. which indirectly specifies (D) is proper.
16338 (OUT=) execution
error
19 - 5
19 ERROR CODE LISTS
19 - 6
19 ERROR CODE LISTS
19 - 7
19 ERROR CODE LISTS
Indirectly specified
16466 32-bit data register
(D(n)L) read error
• The indirectly specified device No. is outside
the range or an odd number.
Indirectly specified
16467 64-bit data register
(D(n)F) read error
19 - 8
19 ERROR CODE LISTS
Annunciator (F(n))
16490 The block processing in Correct the program so that the indirectly
read error
execution is stopped and specified device No. is proper.
Indirectly specified
the next block is executed.
16-bit batch input
16516
relay (X(n)) read
error
Indirectly specified
32-bit batch input
16517
relay (X(n)) read
error • The indirectly specified device No. is outside
Indirectly specified the range or is not a multiple of 16.
16-bit batch output
16518
relay (Y(n)) read
error
Indirectly specified
32-bit batch output
16519
relay (Y(n)) read
error
Indirectly specified
16-bit batch
16520 internal/latch relay • The indirectly specified device No. is outside
(M(n)/L(n)) read the range or is not a multiple of 16.
error
Indirectly specified
32-bit batch
16521 internal/latch relay
(M(n)/L(n)) read
error
19 - 9
19 ERROR CODE LISTS
Indirectly specified
16-bit batch
16522
internal/latch relay
(B(n)) read error
Indirectly specified
32-bit batch
16523
internal/latch relay
(B(n)) read error The block processing in
• The indirectly specified device No. is outside Correct the program so that the indirectly
execution is stopped and
Indirectly specified the range or is not a multiple of 16. specified device No. is proper.
the next block is executed.
16-bit batch
16524
annunciator (F(n))
read error
Indirectly specified
32-bit batch
16525
annunciator (F(n))
read error
19 - 10
19 ERROR CODE LISTS
Table 19.6 PLC ready flag (M2000) OFF ON errors (17000 to 17009)
Error factor
Error code Error Processing Corrective Action
Name Description
Normal task
• The normal task's consecutive transition count
consecutive The initial value of 3 is
17000 of the Motion SFC program started by the
transition count used for control.
normal task is outside the range 1 to 30.
error
Event task • The set number of consecutive transitions of Turn PLC ready flag (M2000) OFF, make
17001 consecutive the Motion SFC program started by the event correction to set the value within the range,
transition count error task is outside the range 1 to 10. and write it to the CPU.
The initial value of 1 is
used for control.
NMI task • The set number of consecutive transitions of
17002 consecutive the Motion SFC program started by the NMI
transition count error task is outside the range 1 to 10.
Executed task • Among the normal, event and NMI tasks, more
17010
setting is illegal than one or none of them has been set. Turn PLC ready flag (M2000) OFF, make
The initial value (normal
correction, and write a correct value to the
Executed task task) is used for control.
• Two or more fixed cycles of the event task have CPU.
17011 setting is illegal
been set.
(event)
19 - 11
19 ERROR CODE LISTS
MEMO
19 - 12
19 ERROR CODE LISTS
This section explains the self-diagnosis error code. A self-diagnosis error code is
stored in D9008.
And, it can be confirmed with device monitor of the PC diagnosis/SW6RN-GSV P of
GX Developer.
Each digit is defined as the error code as follows.
Big classification
1 Internal hardware
2 Handling
Digit :
3 Parameter
Tens digit : Details code
Hundreds digit : 4 Program
The characteristic error of Motion CPU is 10000 (the error code which occurs except
the PLC CPU).
19 - 13
19 ERROR CODE LISTS
Table 19.8 Multiple CPU errors which occurs in the Motion CPU (1000 to 10000)
Occurs CPU LED status
Middle Error Error information Operating Diagnostic
Error messages Single Multiple
classification code Classification code RUN ERROR status of CPU timing
composition composition
1000
1001
1002
In the CPU,
At power supply
RAM error 1105 — OFF Flickers Stop
ON/at reset
(RAM ERROR)
Stop/Continue
FUSE BREAK OFF 1300 — — — OFF/ON Flickers/ON Always
(Note-7)
1600 ON OFF
Battery (BATTERY ERROR) Drive name Continue Always
BAT. ALM
1601
LED ON
2121
(Note-1) : CPU No. is stored in slot No. of the common information classification.
(Note-2) : Base No. in "common information classification code" of "error information classification code" is 0 : CPU base, 1 to 7 : Number of extension bases.
(Note-3) : Because a stop error or CPU No. except CPU No. that it was reset becomes MULTI CPU DOWN simultaneously, a stop error or CPU No. except CPU
No. that it was reset may store in the classification of error information depending on timing.
(Note-4) : When an error occurs in the Motion CPU and so on except PLC CPU, if a PC diagnosis is made in the CPU except PLC CPU from GX Developer via
PLC CPU, the error code "10000" is indicated.
(Note-5) : The Motion SFC error detection signal (M2039) turned on at the error detection. A self-diagnosis error flag (M9008) and a diagnosis error flag (M9010)
do not turn on at the error detection. The error code "10000" being set in D9008 is reset in the Motion SFC error detection signal (M2039) ON OFF.
(Note-6) : MOTION RUN LED turns off at the stop error occurrence. (The condition of RUN LED does not change.)
(Note-7) : Operating status of CPU at the error occurrence can be set in the parameter. (LED display also changes continuously.)
19 - 14
19 ERROR CODE LISTS
1000
1001
(1) Measure noise level.
1002
Run-away or failure of main CPU (2) Reset and establish the RUN status again. If the same error is
1003 (1) Malfunctioning due to noise or other reason displayed again, this suggests a CPU hardware error. Explain
1004 (2) Hardware fault the error symptom and get advice from our sales
1005 representative.
1006
1007
1008
1009
(1) Measure noise level.
(2) Reset and establish the RUN status again. If the same error is
1105 Shared CPU memory fault in the CPU. displayed again, this suggests a CPU hardware error. Explain
the error symptom and get advice from our sales
representative.
Check ERR. LED of the output modules and replace the module
1300 There is an output module with a blown fuse.
whose LED is lit.
The Motion dedicated module, the intelligent function module, the
There was no response from the motion module or intelligent CPU module or the base unit has hardware error.
1401 Explain the error symptom and get advice from our sales
function module during initial communications.
representative.
1413
An error is detected on the Q bus.
1414 A special function module, the CPU module, or the base unit has
1415 Fault of the CPU or extension base unit was detected. hardware error. Explain the error symptom and get advice from
our sales representative.
1416 Bus fault was detected at power-on or reset.
A momentary power interruption of the power supply occurred. Check the power supply.
1500 The power supply went off.
1601 Battery voltage has dropped below stipulated level. Replace the battery.
2121 A CPU module is installed in a slot except CPU slot, 0 to 2 slot. A CPU module is installed to a CPU slot or 0 to 2 slot.
(1) A module is installed in slot 65 or subsequent slot. (1) Remove a module of slot 65 or subsequent slot.
2124 (2) A module is installed in a base for which "None" is set in the base (2) Remove a module of base for which "None" is set in the base
settings. settings.
(1) A module which the PLC CPU cannot recognize has been (1) Install a usable module in the PLC CPU.
(2) The intelligent function module has hardware error. Explain
2125 installed. the error symptom and get advice from our sales
(2) There was no response from the intelligent function module. representative.
(1) There must be non-installation slots between the CPU
CPU module locations in a Multiple CPU system is either of the
modules in the Multiple CPU system. (When the non-
following.
installation slots are reserved, cancel the reservation.)
2126 (1) There are non-installation slots between the CPU modules.
(2) Remove the modules except the PLC CPU installed between
(2) The modules except the PLC CPU are installed between the PLC
the PLC CPU modules, and shift over to the slots with the
CPU modules.
PLC CPU modules in the Multiple CPU system.
: It occurs in the CPU (CPU No.) which detected a error.
: It occurs in all CPU No. at the time of the Multiple CPU composition.
: It does not occur.
19 - 15
19 ERROR CODE LISTS
Table 19.8 Multiple CPU errors which occurs in the Motion CPU (continued)
Occurs CPU LED status
Middle Error Error information Operating Diagnostic
Error messages Single Multiple
classification code Classification code RUN ERROR status of CPU timing
composition composition
3001
At power
3010 —
PARAMETER supply ON/
Parameter File name OFF Flickers Stop
ERROR at reset/
3012 — at Stop Run
3013 —
Always
Module No.
7000 —
(Note-1) (Note-3)
Other issue
opportunity CPU
OFF Flickers Stop
weight occasion error
(MULTI CPU DOWN) At power
7002 — supply ON/
Module No. at reset
(Note-1)
Multiple 7003 —
CPU
(Note-1) : CPU No. is stored in slot No. of the common information classification.
(Note-2) : Base No. in "common information classification code" of "error information classification code" is 0 : CPU base, 1 to 7 : Number of extension bases.
(Note-3) : Because a stop error or CPU No. except CPU No. that it was reset becomes MULTI CPU DOWN simultaneously, a stop error or CPU No. except CPU
No. that it was reset may store in the classification of error information depending on timing.
(Note-4) : When an error occurs in the Motion CPU and so on except PLC CPU, if a PC diagnosis is made in the CPU except PLC CPU from GX Developer via
PLC CPU, the error code "10000" is indicated.
(Note-5) : The Motion SFC error detection signal (M2039) turned on at the error detection. A self-diagnosis error flag (M9008) and a diagnosis error flag (M9010)
do not turn on at the error detection. The error code "10000" being set in D9008 is reset in the Motion SFC error detection signal (M2039) ON OFF.
(Note-6) : MOTION RUN LED turns off at the stop error occurrence. (The condition of RUN LED does not change.)
19 - 16
19 ERROR CODE LISTS
The number of CPU modules set in the parameter differ from the real Match (preset count of Multiple CPU setting) – (CPU (empty)
3010
installation in a Multiple CPU system. setting in I/O assignment) with the real installation of CPUs.
The reference CPU No. set in the parameter differ from the setting in Match the setting in the parameter with that of the reference CPU
3012
a Multiple CPU system. No. (CPU No.1).
Check the following in the Multiple CPU automatic refresh
Multiple CPU automatic refresh setting is any of the followings in a
parameters and make correction.
Multiple CPU system.
(1) When specifying the bit device, specify a multiple of 16 for the
(1) When a bit device is used as a refresh device, a number except a
3013 refresh first device.
multiple of 16 is set as the refresh first device.
(2) Specify the device that may be specified for the refresh
(2) A non-specifiable device is specified.
device.
(3) The number of transmitting points is an odd number.
(3) Set the number of transmitting points to an even number.
In a Multiple CPU system, a CPU fault occurred at the CPU where "all
station stop by stop error of CPU was selected" in the operating
mode.
Read the individual information of the error at the peripheral
(It occurs in the CPU except for the CPU that suspension of a system
7000 device, check the error of the CPU resulting in CPU fault, and
is chosen.)
remove the error.
In a Multiple CPU system, CPU No.1 resulted in stop error at power-
on and the other CPU cannot start. (This error occurred at CPU No.2
to 4)
7002
Reset the PLC CPU and run it again. If the same error is
At initial communication in a Multiple CPU system, no response is
displayed again, it is a hardware fault of any CPU. Explain the
given back from the target CPU of initial communication.
7003 error symptom and get advice from our sales representative.
In a Multiple CPU system, a CPU fault occurred at the CPU where "all
Read the individual information of the error at the peripheral
station stop by stop error of CPU was not selected" in the operation
7020 device, check the error of the CPU resulting in CPU fault, and
mode. (The error is detected at the PLC CPU of other than the CPU
remove the error.
No. where the CPU fault occurred.)
19 - 17
19 ERROR CODE LISTS
The CPU can perform the release operation for errors only when the errors allow the
CPU to continue its operation.
To release the errors, follow the steps shown below.
(1) Eliminate the error cause.
(2) Store the error code to be released in the special register D9060.
(3) Turn the special relay M9060 off to on.
(4) The target error is released.
After the CPU is reset by the release of error, the special relays, special registers and
LEDs for the error are returned to the states under which the error occurred.
If the same error occurs again after the release of the error, it will be registered again.
19 - 18
APPENDICES
APPENDICES
APP - 1
APPENDICES
APP - 2
APPENDICES
APP - 3
APPENDICES
APP - 4
APPENDICES
APP - 5
APPENDICES
APP - 6
APPENDICES
APP - 7
APPENDICES
CLR
F G F SUB SUB
P
G
Note) Note)
SUB SUB P
P
F F
END G
P
Q173CPU(N)/
31.92 28.38 34.5 87.24 47.3 22.86
Q172CPU(N) [ s]
F F F F F F F
G G G G G G G
G G G G G G G
F F F F F F F
Q173CPU(N)/
139.68 196.02
Q172CPU(N) [ s]
(Note) : Varies greatly with the started or cleared program.
POINT
Long processing time may cause a Motion CPU WDT error or servo fault.
Especially for the Motion SFC programs run by event/NMI tasks, take care so that
the processing time will not be too long.
APP - 8
APPENDICES
APPENDIX 2.1 Program example to execute the Multiple CPU dedicated instruction
continuously
This is the program example which publishes the instruction continuously toward the
same Motion CPU in the Multiple dedicated instruction toward the Motion CPU. When
an instruction cannot be accepted even if it is executed, it becomes "No operation".
The following is program example which repeats reading data for 10 points from D0 of
the Motion CPU installing the CPU No.2 to since D100 of the PLC CPU, and the data
for 10 points from D200 of the Motion CPU to since D300 of the PLC CPU by turns
continuously during X0 is ON. Make a circuit to execute the next S(P).DDRD
instruction after the device which it is made to turn on by the instruction completion of
the S(P).DDRD instruction execute 1-scan turns it on.
<Example>
SM400
MOV K10 D51
X0
PLS M2
M2 X0
SET M0
M1
M0 M10
SP.DDRD H3E1 D50 D0 D100 M10
SET M50
M50 M10
RST M0
SET M1
RST M50
M1 M20
SP.DDRD H3E1 D250 D200 D300 M20
SET M51
M51 M20
RST M1
RST M51
M10 M11
Read the data from D0 to D100,
and normality complete processing.
M11
Read the data from D0 to D100,
and abnormality complete processing.
M20 M21
Read the data from D200 to D300,
and normality complete processing.
M21
Read the data from D200 to D300,
and abnormality complete processing
APP - 9
APPENDICES
APP - 10
APPENDICES
APPENDIX 2.2 The program example to execute plural Multiple CPU instruction by the
instructions of one time
This is the program example which executes to the Multiple same Motion CPU at
high speed by one instruction.
In this case, you must take an interlock with "To self CPU high speed interrupt
accept flag from CPU". When an instruction cannot be accepted even if it is
executed, it becomes "No operation".
The program which read the data for 10 points from D0 of the Motion CPU
installing the CPU No.2 to since D100 of the PLC CPU, the data for 10 points
from D200 of the Motion CPU to since D300 of the PLC CPU, and the data for 10
points from D400 of the Motion CPU to since D500 of the PLC CPU by starting of
X0 is shown as an example 1.
At this time, number of multiple CPU dedicated execute instructions at one
command should no exceed the maximum acceptable number of instructions
(Refer to Chapter 5.) of one Motion CPU.
When an maximum acceptable number of instructions is 32, the program which
made not to execute the multiple dedicated instructions when number of the
Multiple CPU dedicated execute instructions exceeds 32 is shown as an example
2.
<Example 1>
SM400
MOV K10 D51
SET M1
To self CPU high speed interrupt
accept flag from CPU 1
M1 U3E1 G48.0
SP.DDRD H3E1 D250 D200 D300 M20
RST M1
SET M2
To self CPU high speed interrupt
accept flag from CPU 1
M2 U3E1 G48.0
SP.DDRD H3E1 D450 D400 D500 M30
RST M2
M10 M11
Read the data from D0 to D100,
and normality complete processing.
M11
Read the data from D0 to D100,
and abnormality complete processing.
M20 M21
Read the data from D200 to D300,
and normality complete processing.
M21
Read the data from D200 to D300,
and abnormality complete processing.
M30 M31
Read the data from D400 to D500,
and normality complete processing.
M31
Read the data from D400 to D500,
and abnormality complete processing.
APP - 11
APPENDICES
<Example 2>
SM400
MOV K10 D51
M20
> D1000 K0 DECP D1000
M30
> D1000 K0 DECP D1000
X0
> K32 D1000 PLS M0
To self CPU high speed interrupt
accept flag from CPU 1
M0 U3E1 G48.0
SP.DDRD H3E1 D50 D0 D100 M10
INCP D1000
SET M1
To self CPU high speed interrupt
accept flag from CPU 1
U3E1 G48.0
M1
SP.DDRD H3E1 D250 D200 D300 M20
INCP D1000
RST M1
SET M2
To self CPU high speed interrupt
accept flag from CPU 1
M2 U3E1 G48.0
SP.DDRD H3E1 D450 D400 D500 M30
INCP D1000
RST M2
M10 M11
Read the data from D0 to D100,
and normality complete processing.
M11
Read the data from D0 to D100,
and abnormality complete processing.
M20 M21
Read the data from D200 to D300,
and normality complete processing.
M21
Read the data from D200 to D300,
and abnormality complete processing.
M30 M31
Read the data from D200 to D300,
and normality complete processing.
M31
Read the data from D200 to D300,
and abnormality complete processing.
APP - 12
APPENDICES
APP - 13
APPENDICES
APP - 14
APPENDICES
APP - 15
APPENDICES
P0
[F0]
//Each axis status M2400 to M3039
//(40 words)
//M2400 to CPU No.1 of the Qn(H)CPU
DIN W00L, M2400
DIN W02L, M2432 (1) Each axis status M2400 to M3039 (for 32 axes) transferred
DIN W04L, M2464 to "W0 to".
DIN W06L, M2496
DIN W08L, M2528 (2) Common devices M2000 to M2064 transferred to "W28 to".
DIN W0AL, M2560 (3) Special relay M9000 to M9015 transferred to "W2C to".
DIN W0CL, M2592
DIN W0EL, M2624 Automatic refresh of the between Multiple CPU, and "W0 to" of
DIN W10L, M2656 Q173CPU(N) (CPU No.2) sets it up to have refresh by "M2400
DIN W12L, M2688 to" of Qn(H)CPU (CPU No.1), therefore the condition of
DIN W14L, M2720
DIN W16L, M2752 Q173CPU(N) (CPU No.2) can be grasped with Qn(H)CPU of
DIN W18L, M2784 the CPU No.1 by monitoring the following device.
DIN W1AL, M2816 Devices of QnHCPU Correspond with devices
DIN W1CL, M2848 (CPU No.1) of Q173CPU(N) (CPU No.2)
DIN W1EL, M2880
DIN W20L, M2912 M2400 to M3039 M2400 to M3039
DIN W22L, M2944 M3040 to M3103 M2000 to M2064
DIN W24L, M2976 M3104 to M3119 M9000 to M9015
DIN W26L, M3008
(Note) : Refresh does data for 32 axes by this sample example,
//Common devices M2000 to M2063(4 words) number of refresh points is made a necessary minimum
//M3040 to CPU No.1 of the Qn(H)CPU corresponding to the system for processing time
DIN W28L, M2000 shortening.
DIN W2AL, M2032
//Special relays M9000 to M9015(1 word)
//M3104 to CPU No.1 of the Qn(H)CPU
DIN W2C, M9000
[F1]
//Each axis monitor devices
//D0000 to D0639(640 words)
//D000 to CPU No.1 of the Qn(H)CPU (1) Each monitor devices D0 to D639 (for 32 axes) transferred
BMOV W100, D0, K640 to "W100 to".
(2) Special register D9000 to D9015 transferred to "W380 to".
//Special devices D9000 to D9015(16 words) (3) Special register D9182 to M9197 transferred to "W38A to".
//D640 to CPU No.1 of the Qn(H)CPU
W380=D9000 Automatic refresh of the between Multiple CPU, and "W100 to"
W381=D9005 of Q173CPU(N) (CPU No.2) sets it up to have refresh by "D0
W382=D9008 to" of Qn(H)CPU (CPU No.1), therefore the condition of
W384L=D9010L Q173CPU(N) (CPU No.2) can be grasped with Qn(H) CPU of
W386L=D9012L the CPU No.1 by monitoring the following device.
W388L=D9014L
Devices of QnHCPU Correspond with devices
//Special registers D9182 to D9197 (CPU No.1) of Q173CPU(N) (CPU No.2)
//(16 words) D0000 to D0639 D0000 to D0630
//D656 to CPU No.1 of the Qn(H)CPU D0640 to D0655 D9000 to D9015
W38AL=D9182L D0656 to D0671 D9182 to D9197
W38CL=D9184L (Note) : Refresh does data for 32 axes by this sample example,
W38EL=D9186L
number of refresh points is made a necessary minimum
W390L=D9188L
corresponding to the system for processing time
W392L=D9190L
shortening.
W394L=D9192L
W396L=D9194L
W398L=D9196L
P0
APP - 16
APPENDICES
[F20]
SET M9028 //Clock data read request ON
P0
[G20]
M9076 //Did you during the forced When a forced stop is released, a
//stop? subroutine starts "No.110 : Motion
control". (Because the next step is a
shift, it becomes a subroutine start, and
Motion control
the next step is executed at the same
time with subroutine practice, too.)
When a forced stop is released, it is
the structure which starts the program
[G21] "No.110 : Motion control" is made to which does motion control from the
!M9076 //Did you release the stop at the time of the forced stop, initials again by sample program.
//forced stop? and (The program that a subroutine call Therefore it is the system example
is executed from No.110 stops, too.) that motion control is resumed when
CLR
Motion control actual output (PY) is turned off. a forced stop release is executed
(Note-1) : The program that a subroutine after it stops forced for while.
was started is made to stop if
necessary when a subroutine
[F25] start program is added
DOUT PY10,H0000 //PY10 to PY1F because it does not stop.
(16points)OFF (Note-2) : Real output is turned off if
necessary.
(Note-3) : The occurrence detection of
P0 servo error and so on is added
to the stop status with forced
stop if necessary.
[F110]
SET M2042 //All axes servo ON
//command ON
P0
[G105]
M2415*M2435 //Is 1 axis and
//2 axis servo on/off status ON?
[G115]
//Wait a subroutine call completion
NOP
P0 The subroutine call of the following program is executed corresponding to the status of
PX1, PX2.
Selective branch is made the program so that each subroutine may never start it in the
plural at the same time.
And, each subroutine makes the next step "WAIT" to become a subroutine call to
make it stop when this program is suspended by the clear step of "No.20 : Main", too.
Condition of Subroutine call program
PX1, PX2
PX2 PX1 No. Program name
OFF OFF 120 JOG
OFF ON 130 Manual pulse generator
ON OFF 140 Home position return
ON ON 150 Programming operation
APP - 17
APPENDICES
[F120]
//1 axis JOG operation speed =
//100000PLS/s
D640L=K100000
//2 axes JOG operation speed =
//100000PLS/s
D642L=K100000
[G120] When each signal of PX3 to PX6 is turned on/off, which the
//1 axis forward rotation JOG start correspondences JOG command device is SET/RST.
//SET/RST It makes forward rotation JOG start of the same axis and a
SET M3202=PX3 * !M3203 reverse rotation JOG start from making turned on at the same
RST M3202=!PX3 time.
//1 axis reverse rotation JOG start Signal name Correspond with JOG command device
//SET/RST PX3 M3202(1 axis forward rotation JOG)
SET M3203=PX4 * !M3202 PX4 M3203(1 axis reverse rotation JOG)
RST M3203=!PX4 PX5 M3222(2 axis forward rotation JOG)
//2 axis forward rotation JOG start PX6 M3223(2 axis reverse rotation JOG)
//SET/RST
SET M3222=PX5 * !M3223 (Note) : The ON/OFF distinction of each signal can be
RST M3222=!PX5 described with Y/N transition. But, processing time can
//2 axes reverse rotation JOG start
be shortened more the number of steps when it was
//SET/RST
SET M3223=PX6 * !M3222 described as the following in the case of the processing
RST M3223=!PX6 which could be described only with SET=/RST=
because it is made low.
//Is repeated to the JOG mode
//completion.
!(!PX1*!PX2)
[F122]
//1, 2 axis forward/reverse rotation Forward rotation/reverse rotation JOG status of 1, 2 axis is
//JOG start command is reset. turned off at the time of the JOG mode completion not to
RST M3202 continue a JOG movement after it moves to other mode of the
RST M3203 safety.
RST M3222
RST M3223
END
[F130]
D720=100 //1-pulse input magnification
//setting of 1 axis
D721=100 //1-pulse input magnification The setup of the following is executed to do manual pulse
//setting of 2 axes generator operation of P1 with 1 axis/P2 with 2 axis.
D714L=H00000001 //P1 is controlled Setting of 1-pulse input magnification of the 1 axis and 2
//1 axis. axis.
D716L=H00000002 //P2 is controlled
Manual pulse generator axis No. setting register is setup to
//2 axes
control of P1 with 1 axis/P2 with 2 axis.
SET M2051 //P1 Manual pulse generator
Manual pulse generator axis enable flag of P1, P2 is
//enable flag is ON turned on.
SET M2052 //P2 Manual pulse generator
//enable flag is ON
[G130]
!(!PX2*PX1)//Did you complete a manual
//pulse generator mode?
[F131] 1, 2 axis Manual pulse generator enable flag turned off at the
RST M2051 //P1 Manual pulse generator time of the JOG mode completion not to continue a manual
//enable flag is OFF pulse generator operation after it moves to other mode of the
RST M2052 //P2 Manual pulse generator safety.
//enable flag is OFF
END
APP - 18
APPENDICES
P0
P0
When PX3 is ON, the home position return request of 1 axis is executed.
When PX4 is ON, the home position return request of 2 axes is executed.
At this time in-position signal ON and start accept OFF confirmed, and home
position return request program is started.
(Note) : This program is the structure which does not have WAIT that it waits for the
completion of the home position return in the next of the motion control
step, because it possible a thing during "K140" practice and "K141" are
started.
(You must take the initial start of each axis to interlock condition to prevent
the double start of K140 and K141.)
APP - 19
APPENDICES
Programming operation
P0
[F150] END
#0L=1000000//1 axis positioning address
[K150:Real] //set
1 INC-1 #2L=2000000//2 axes positioning address
Axis 1, 1000000 PLS //set
Speed 500000 PLS/s #4L=500000//Positioning speed Positioning address, the indirect
designation of the speed.
[K151:Real]
[G153] 1 INC-2
//It waits 1000[ms] after the motion control Axis 1, # 0 PLS
//completion.TIME K1000 Axis 2, # 2 PLS
Speed # 4 PLS/s
[K152:Real] [G154]
1 INC-1 //Did you turned on 1 axis and 2 axis
Axis 2, 2000000 PLS //in-position?
Speed 1000000 PLS/s M2402*M2422
[G155] [F151]
NOP //Waits for the motion control #0L=-#0L //1 axis positioning address sign
//completion. //inversion
#2L=-#2L //2 axes positioning address sign
//inversion
#4L= #4L*2 //Positioning speed *2 Positioning address, the indirect
designation of the speed.
When OFF to ON of
PX3 is detected, [K151:Real]
1000[ms] after 1 axis 1 INC-2
positioning completion Axis 1, # 0 PLS
stands by, and the Axis 2, # 2 PLS
positioning of 2 axes Speed # 4 PLS/s
is executed, and
stands by to the
[G156]
positioning completion
//Did you turn on PX4?
of 2 axes.
!PX4
P0
When PX4 is on, the linear interpolation
control of the 1 axis and 2 axis is
executed at a double speed in the
action, the opposition direction after the
linear interpolation control of the 1 axis
and 2 axis in-position check. And stands
by to PX4 is OFF.
APP - 20
APPENDICES
APP - 21
APPENDICES
Send range for each CPU CPU side device This device area is set
up in "M2400" with the
CPU CPU share memory G Dev. starting W0
Qn(H) CPU No.1. (The
Point Start End Start End
bit device for monitor is
No.1 0 transferred to "W0 to" by
No.2 50 0800 0831 W0 W31 the Motion SFC
No.3 program on the
No.4 Q173CPU(N) side.).
Send range for each CPU CPU side device This device area is set
up in "D0" with the Qn
CPU CPU share memory G Dev. starting W100
(H) CPU No.1. (The
Point Start End Start End
ward device for monitor
No.1 0 is transferred to "W100"
No.2 640 0832 0AB1 W100 W37F to by the Motion SFC
No.3 program on the
No.4 Q173CPU(N) side.).
No.1
No.2
No.3
No.4
This setting area is used
for the use except for
5) Automatic refresh setting 4
the positioning device
Send range for each CPU CPU side device for the monitor.
No.1
No.2
No.3
No.4
APP - 22
APPENDICES
6) System setting
Setting items Description
Operation cycle setting Auto
Operation mode M2000 is turned on with switch (Stop to Run)
Emergency shout down input PX0
APPENDIX 2.4 Continuation execution example at the subroutine re-start by the Motion
SFC program
The servo is turned on by the forced stop release and the positioning control of
the 2 axes liner interpolation is executed when PX4 is ON in this program. One
cycle operation is completed after confirmation that PX4 became OFF. When the
forced stop is executed during the positioning operating, the positioning operation
is interrupted and the servomotor is stopped. It is resumed from the interrupted
positioning operation when the forced stop was released next.
Continuation execution of the subroutine re-start is executed by this program
example by the following processing.
(b) The subroutine re-start is resumed from the motion control step of stopping
the information memorized by the above (a).
(c) A motion control step should locate absolute to cope with it when it is
resumed after it stops on the way of the positioning.
(d) A positioning complete signal (M2401+20n) is used for the decision, whether
servomotor is stopped during the positioning.
APP - 24
APPENDICES
APP - 25
APPENDICES
Main
P0
[G20]
M9076 //Did you release a forced
//stop?
The subroutine starts "No.160 : Restart
[F110] continuation" after all axis servo are
SET M2042//All axis servo ON command turned on and servo on of 1 axis and 2
//ON axes is confirmed when a forced stop is
released.
[G105] (Because the next step is a shift, it
M2415*M2435//Did a thing during servo becomes a subroutine start, and the
//on 1 axis and 2 axes? next step is executed at the same time When a forced stop is released, it is
with subroutine practice, too.) the structure which starts the program
which does motion control from the
Restart continuation initials again by sample program.
"No.160 : Restart continuation" is made
to stop by the forced stop, and real Therefore it is the system example
output (PY) is turned off. that motion control is resumed when
a forced stop release is executed
[G21] (Note-1) : The program that a subroutine after it stops forced for while.
!M9076//Did you turn on a forced was started is made to stop if
//stop? necessary when a subroutine
start program is added because
CLR it does not stop.
Restart continuation
(Note-2) : Actual output is turned off if
necessary.
(Note-3) : The occurrence detection of
[F25] servo error and so on is added
DOUT PY10, H0000 //PY10 to PY1F to the stop condition with
//(16 points) OFF forced stop if necessary.
P0
APP - 26
APPENDICES
Restart continuation
[F189]
#100=10 //Continuation point=10
For the continuation
from P10
P0
P10
[G154] [G156]
//Did you turn on 1 axis and //Did you turn on PX4?
//2 axes in-position signal? !PX4
M2402*M2422
[F150] [F193]
#0L=1000000//1 axis positioning #100=0 //Continuation point=0 "0" is set on #100
//address set (Continuation point)
#2L=2000000//2 axes positioning and it jumps in P0.
//address set P0
#4L=500000//Positioning speed set
APP - 27
APPENDICES
APPENDIX 2.5 Continuation execution example after the stop by the Motion SFC program
The servo is turned on by the forced stop release and the positioning control of
the 2 axes liner interpolation is executed when PX4 is ON in this program. One
cycle operation is completed after confirmation that PX4 became OFF.
When PX5 turns ON during the positioning operating, the positioning operation is
stopped by the stop instruction and it is resumed from the interrupted positioning
operation at turning PX5 on. The transition to the next step is not executed during
PX5 is ON in the WAIT transition.
When the forced stop is executed during the positioning operating, the
positioning operation is interrupted and the servomotor is stopped. It is resumed
from the interrupted positioning operation when the forced stop was released
next.
Continuation execution of the stop and stop after is executed by this program
example by the following processing.
(a) While PX5 turns it on, it is made to turn on a stop command (M3200+20n)
and an internal relay (M100) for the stop.
(b) While PX5 turns it off, it is made to turn off a stop command (M3200+20n)
and an internal relay (M100) for the stop.
(c) A motion control step does absolute position to cope with it when it is
resumed after it stops on the way of the positioning.
(e) The motion control step is resumed after it waits to turn it off, when it was
stepped during positioning.
(f) "The internal relay (M100) for the stop turn off." is substituted for the WAIT
transition condition that you must stop.
APP - 28
APPENDICES
APP - 29
APPENDICES
Main
Stop
P0
Stop
P0
[G170]
//Did you release a stop?
// (Did a thing during servo ON and PX5 When servo ON and the outside input
//turn off 1 axis and 2 axes?) signal (PX5) for the stop are OFF, 1
M2415*M2435*!PX5 axis, 2 axis stop command are turned
off, and 1 axis, 2 axis continue motion
control by turning off an internal relay
(M100) for the stop.
[F170] [F171] It is made to turn on 1 axis, 2 axis stop
//A stop is being released stop, status. //The stop is being turned on, status. command, and motion control is made
RST M3200 //1 axis stop command OFF SET M100 //Stop ON to stop by turning on an internal relay
RST M3220 //2 axes stop command OFF SET M3200 //1 axis stop command ON (M100) for the stop, too, when either
RST M100 //Stop OFF SET M3220 //2 axes stop command ON axis turns off servo or when PX5 turns
it on.
P0
APP - 30
APPENDICES
Programming operation
P0
[F150] P10
#0L=1000000//1 axis positioning
//address set
#2L=2000000//2 axes positioning
//address set
#4L=500000//Positioning speed set
P20
[K151:Real]
1 ABS-2 The motion control step
Axis 1, # 0 PLS executed absolute
Axis 2, # 2 PLS positioning to application
Speed # 4 PLS/s with it when to start again This program is judged
after it stops on the way. whether it was stopped by
using the location complete
[G200] signal during the location
//Did 1 axis and 2 axes execute on the way.
//positioning completion? It is made to execute the
M2401*M2421 motion control step of again
after internal relay (M100)
of the stop waits to turn it
[G156] This program substitutes [G202] off when positioning
//Did you turn on PX4, and turn "The internal relay (M100) !M100 //Did you turn off a stop? completion is not turned on
//off a stop? for the stop turns off." into after the motion control is
!PX4*!M100 the AND status in WAIT executed.
transition which wants it to
stop.
P20
P0
APP - 31
APPENDICES
MEMO
APP - 32
WARRANTY
Please confirm the following product warranty details before using this product.
IB(NA)-0300042-D
IB(NA)-0300042-D(1004)MEE
MODEL: Q173-P-SV13/22-SFC-E
MODEL CODE: 1XB781
HEAD OFFICE : TOKYO BUILDING, 2-7-3 MARUNOUCHI, CHIYODA-KU, TOKYO 100-8310, JAPAN
NAGOYA WORKS : 1-14 , YADA-MINAMI 5-CHOME , HIGASHI-KU, NAGOYA , JAPAN
When exported from Japan, this manual does not require application to the
Ministry of Economy, Trade and Industry for service transaction permission.