w508 NX Nj-Series Motion Control Instructions Reference Manual en
w508 NX Nj-Series Motion Control Instructions Reference Manual en
NJ/NX-series
Motion Control
Instructions Reference Manual
NX701-17
NX701-16
NX1P2-11
NX1P2-10
NX1P2-90
NJ501-5
NJ501-4
NJ501-3
NJ301-12
NJ301-11
NJ101-10
W508-E1-15
NOTE
All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in
any form, or by any means, mechanical, electronic, photocopying, recording, or otherwise, without the prior
written permission of OMRON.
No patent liability is assumed with respect to the use of the information contained herein. Moreover, because
OMRON is constantly striving to improve its high-quality products, the information contained in this manual is
subject to change without notice. Every precaution has been taken in the preparation of this manual. Neverthe-
less, OMRON assumes no responsibility for errors or omissions. Neither is any liability assumed for damages
resulting from the use of the information contained in this publication.
Trademarks
• Sysmac and SYSMAC are trademarks or registered trademarks of OMRON Corporation in Japan and other
countries for OMRON factory automation products.
• Microsoft, Windows, Windows Vista, Excel, and Visual Basic are either registered trademarks or trademarks of
Microsoft Corporation in the United States and other countries.
• EtherCAT® is registered trademark and patented technology, licensed by Beckhoff Automation GmbH, Germany.
• ODVA, CIP, CompoNet, DeviceNet, and EtherNet/IP are trademarks of ODVA.
Other company names and product names in this document are the trademarks or registered trademarks of their
respective companies.
Copyrights
Microsoft product screen shots reprinted with permission from Microsoft Corporation.
Introduction
Introduction
Thank you for purchasing an NJ/NX-series CPU Unit.
This manual describes the motion control instructions. Please be sure you sufficiently understand the
operations and handling procedures, and use the Motion Control Function Module (abbreviated as “MC
Function Module”) correctly.
Use this manual together with the user’s manuals for the NJ/NX-series CPU Unit.
When you have finished reading this manual, keep it in a safe location where it will be readily available
for future use.
Intended Audience
This manual is intended for the following personnel, who must also have knowledge of electrical sys-
tems (an electrical engineer or the equivalent).
• Personnel in charge of introducing FA systems.
• Personnel in charge of designing FA systems.
• Personnel in charge of installing and maintaining FA systems.
• Personnel in charge of managing FA systems and facilities.
For programming, this manual is intended for personnel who understand the programming language
specifications in international standard IEC 61131-3 or Japanese standard JIS B 3503.
Applicable Products
This manual covers the following products.
NX-series CPU Units
• NX701-17
• NX701-16
• NX1P2-11
• NX1P2-111
• NX1P2-10
• NX1P2-101
• NX1P2-90
• NX1P2-901
Part of the specifications and restrictions for the CPU Units are given in other manuals. Refer to Rele-
vant Manuals on page 2 and Related Manuals on page 26.
Relevant Manuals
The following table provides the relevant manuals for the NJ/NX-series CPU Units.
Read all of the manuals that are relevant to your system configuration and application before you use
the NJ/NX-series CPU Unit.
Most operations are performed from the Sysmac Studio Automation Software. Refer to the Sysmac Stu-
dio Version 1 Operation Manual (Cat. No. W504) for information on the Sysmac Studio.
Manual
Basic information
Hardware User’s Manual
NX-series CPU Unit
Hardware User's Manual
NX-series NX1P2 CPU Unit
Hardware User’s Manual
NJ-series CPU Unit
Software User’s Manual
NJ/NX-series CPU Unit
Built-in I/O and Option Board User's Manual
NX-series NX1P2 CPU Unit
Instructions Reference Manual
NJ/NX-series
Motion Control User’s Manual
NJ/NX-series CPU Unit
Motion Control Instructions Reference Manual
NJ/NX-series
Built-in EtherCAT Port User’s Manual
NJ/NX-series CPU Unit
Built-in EtherNet/IP Port User’s Manual
NJ/NX-series CPU Unit
User’s Manual
NJ-series Database Connection CPU Units
User’s Manual
NJ-series SECS/GEM CPU Units
CPU Unit User’s Manual
NJ-series NJ Robotics
Troubleshooting Manual
NJ/NX-series
Purpose of use
Manual
Basic information
*1 Refer to the NJ/NX-series Troubleshooting Manual (Cat. No. W503) for the error management concepts and an overview
of the error items. Refer to the manuals that are indicated with triangles for details on errors for the corresponding Units.
Manual Structure
Page Structure
The following page structure is used in this manual.
Input Variables
Output Variables
Name Meaning Data type Valid range Description
Status Servo ON BOOL TRUE or FALSE TRUE when the device is ready for operation.
Busy Executing BOOL TRUE or FALSE TRUE when the instruction is acknowledged.
Error Error BOOL TRUE or FALSE TRUE while there is an error.
ErrorID Error Code WORD * Contains the error code when an error occurs.
A value of 16#0000 indicates normal execution.
In-Out Variables
* Specify an Axis Variable that was created in the Axis Basic Settings of the Sysmac Studio. (The default axis variable names
are MC_Axis***.)
• When Enable changes to FALSE, the ready status is cleared for the axis specified by Axis.
You cannot control the axis after the ready status is cleared because it will not acknowledge opera-
tion commands. Also, an error occurs if a motion command is executed for an axis for which the
is given.
ready status is cleared. You can execute the MC_Power (Power Servo) and MC_Reset (Reset Axis
Error) instructions even for axes that are not ready.
• You can use this instruction to disable the operation of axes while they are in motion. In this case,
3 Level-1 section number
CommandAborted will change to TRUE. Output of the operation command will stop and the axis will
not longer be ready for operation. The level-1 section number
Function
• If home is not defined for a Servomotor with an absolute encoder, compensation is performed using
the absolute encoder home offset to define home when the axis is ready to operate.
For details on the absolute encoder home offset, refer to the NJ-series CPU Unit Motion Control
is given.
User’s Manual (Cat. No. W507).
Enable
Status
Busy
Note: This page is for illustration only. It does not represent a specific page in this manual.
Special Information
Special information in this manual is classified as follows:
Additional Information
Additional information to read as required.
This information is provided to increase understanding or make operation easier.
Version Information
Information on differences in specifications and functionality for CPU Units with different unit versions
and for different versions of the Sysmac Studio are given.
2
1 Introduction to Motion Control Instructions
3
I
5 Common Command Instructions
A Appendices
I Index
CONTENTS
Introduction............................................................................................................... 1
Relevant Manuals...................................................................................................... 2
Versions................................................................................................................... 22
MC_GearInPos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-243
Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-243
Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-246
Sample Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-254
MC_GearOut . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-264
Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-264
Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-266
MC_MoveLink . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-269
Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-269
Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-272
Sample Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-282
MC_CombineAxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-292
Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-292
Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-295
MC_Phasing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-304
Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-304
Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-306
MC_TorqueControl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-312
Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-312
Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-314
MC_SetTorqueLimit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-323
Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-323
Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-324
MC_ZoneSwitch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-330
Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-330
Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-332
MC_TouchProbe . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-336
Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-336
Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-339
Sample Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-351
MC_AbortTrigger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-358
Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-358
Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-360
MC_AxesObserve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-363
Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-363
Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-365
MC_SyncMoveVelocity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-369
Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-369
Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-371
MC_SyncMoveAbsolute . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-379
Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-379
Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-381
MC_Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-386
Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-386
Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-387
MC_ChangeAxisUse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-390
Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-390
Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-391
MC_DigitalCamSwitch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-394
Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-395
Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-396
Sample Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-406
MC_TimeStampToPos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-413
Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-413
Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-414
Sample Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-417
MC_PeriodicSyncVariables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-425
Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-425
Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-426
Sample Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-430
MC_SyncOffsetPosition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-433
Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-433
Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-435
MC_ReadAxisParameter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-62
Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-62
Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-64
Appendices
A-1 Error Codes ..............................................................................................................................A-2
A-2 Error Code Details .................................................................................................................A-25
A-3 Instructions for Which Multi-execution Is Supported ......................................................A-108
A-3-1 Axis and Axes Group Status................................................................................................... A-109
A-3-2 State Transitions and Instructions for which Multi-execution Is Supported ............................. A-111
A-4 Version Information .............................................................................................................A-117
Index
Warranties
Exclusive Warranty
Omron’s exclusive warranty is that the Products will be free from defects in materials and workman-
ship for a period of twelve months from the date of sale by Omron (or such other period expressed in
writing by Omron). Omron disclaims all other warranties, express or implied.
Limitations
OMRON MAKES NO WARRANTY OR REPRESENTATION, EXPRESS OR IMPLIED, ABOUT
NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE OF
THE PRODUCTS. BUYER ACKNOWLEDGES THAT IT ALONE HAS DETERMINED THAT THE
PRODUCTS WILL SUITABLY MEET THE REQUIREMENTS OF THEIR INTENDED USE.
Omron further disclaims all warranties and responsibility of any type for claims or expenses based
on infringement by the Products or otherwise of any intellectual property right.
Buyer Remedy
Omron’s sole obligation hereunder shall be, at Omron’s election, to (i) replace (in the form originally
shipped with Buyer responsible for labor charges for removal or replacement thereof) the non-com-
plying Product, (ii) repair the non-complying Product, or (iii) repay or credit Buyer an amount equal
to the purchase price of the non-complying Product; provided that in no event shall Omron be
responsible for warranty, repair, indemnity or any other claims or expenses regarding the Products
unless Omron’s analysis confirms that the Products were properly handled, stored, installed and
maintained and not subject to contamination, abuse, misuse or inappropriate modification. Return of
any Products by Buyer must be approved in writing by Omron before shipment. Omron Companies
shall not be liable for the suitability or unsuitability or the results from the use of Products in combi-
nation with any electrical or electronic components, circuits, system assemblies or any other materi-
als or substances or environments. Any advice, recommendations or information given orally or in
writing, are not to be construed as an amendment or addition to the above warranty.
Application Considerations
Suitability of Use
Omron Companies shall not be responsible for conformity with any standards, codes or regulations
which apply to the combination of the Product in the Buyer’s application or use of the Product. At
Buyer’s request, Omron will provide applicable third party certification documents identifying ratings
and limitations of use which apply to the Product. This information by itself is not sufficient for a com-
plete determination of the suitability of the Product in combination with the end product, machine, sys-
tem, or other application or use. Buyer shall be solely responsible for determining appropriateness of
the particular Product with respect to Buyer’s application, product or system. Buyer shall take applica-
tion responsibility in all cases.
NEVER USE THE PRODUCT FOR AN APPLICATION INVOLVING SERIOUS RISK TO LIFE OR
PROPERTY WITHOUT ENSURING THAT THE SYSTEM AS A WHOLE HAS BEEN DESIGNED TO
ADDRESS THE RISKS, AND THAT THE OMRON PRODUCT(S) IS PROPERLY RATED AND
INSTALLED FOR THE INTENDED USE WITHIN THE OVERALL EQUIPMENT OR SYSTEM.
Programmable Products
Omron Companies shall not be responsible for the user’s programming of a programmable Product, or
any consequence thereof.
Disclaimers
Performance Data
Data presented in Omron Company websites, catalogs and other materials is provided as a guide for
the user in determining suitability and does not constitute a warranty. It may represent the result of
Omron’s test conditions, and the user must correlate it to actual application requirements. Actual perfor-
mance is subject to the Omron’s Warranty and Limitations of Liability.
Change in Specifications
Product specifications and accessories may be changed at any time based on improvements and other
reasons. It is our practice to change part numbers when published ratings or features are changed, or
when significant construction changes are made. However, some specifications of the Product may be
changed without any notice. When in doubt, special part numbers may be assigned to fix or establish
key specifications for your application. Please consult with your Omron’s representative at any time to
confirm actual specifications of purchased Product.
Safety Precautions
Refer to the following manuals for safety precautions.
• NX-series CPU Unit Hardware User’s Manual (Cat. No. W535)
• NX-series NX1P2 CPU Unit Hardware User’s Manual (Cat. No. W578)
• NJ-series CPU Unit Hardware User’s Manual (Cat. No. W500)
Conformance to EU Directives
Applicable Directives
• EMC Directives
• Low Voltage Directive
Concepts
EMC Directive
OMRON devices that comply with EU Directives also conform to the related EMC standards so that
they can be more easily built into other devices or the overall machine. The actual products have
been checked for conformity to EMC standards.*
Whether the products conform to the standards in the system used by the customer, however, must
be checked by the customer. EMC-related performance of the OMRON devices that comply with EU
Directives will vary depending on the configuration, wiring, and other conditions of the equipment or
control panel on which the OMRON devices are installed. The customer must, therefore, perform
the final check to confirm that devices and the overall machine conform to EMC standards.
* Applicable EMC (Electromagnetic Compatibility) standards are as follows:
EMS (Electromagnetic Susceptibility): EN 61131-2
EMI (Electromagnetic Interference): EN 61131-2 (Radiated emission: 10-m regulations)
Conformance to EU Directives
The NJ/NX-series Controllers comply with EU Directives. To ensure that the machine or device in
which the NJ/NX-series Controller is used complies with EU Directives, the Controller must be
installed as follows:
• The NJ/NX-series Controller must be installed within a control panel.
• You must use the power supply in SELV specifications for the DC power supplies connected to
DC Power Supply Units and I/O Units.
• NJ/NX-series Controllers that comply with EU Directives also conform to the Common Emission
Standard (EN 61000-6-4). Radiated emission characteristics (10-m regulations) may vary
depending on the configuration of the control panel used, other devices connected to the control
panel, wiring, and other conditions.
You must therefore confirm that the overall machine or equipment complies with EU Directives.
Conformance to KC Standards
Observe the following precaution if you use NX-series Units in Korea.
Noise Filter
Manufacturer Model
Cosel Co., Ltd. TAH-06-683
Versions
Hardware revisions and unit versions are used to manage the hardware and software in NJ/NX-series
Units and EtherCAT slaves. The hardware revision or unit version is updated each time there is a
change in hardware or software specifications. Even when two Units or EtherCAT slaves have the
same model number, they will have functional or performance differences if they have different hard-
ware revisions or unit versions.
Checking Versions
You can check versions on the ID information indications or with the Sysmac Studio.
ID information indication
Note The hardware revision is not displayed for the Unit that the hardware revision is in blank.
MAC address
PORT1 :
PORT2 :
Hardware
Unit version Ver.1. HW Rev. revision
LOT No. DDMYY xxxx
ID information indication
Note The hardware revision is not displayed for the Unit that the hardware revision is in blank.
ID information indication
Note The hardware revision is not displayed for the Unit that the hardware revision is in blank.
1 Right-click CPU Rack under Configurations and Setup − CPU/Expansion Racks in the
Multiview Explorer and select Production Information.
The Production Information Dialog Box is displayed.
2 Right-click any open space in the Unit Editor and select Production Information.
The Production Information Dialog Box is displayed.
1 Click the Show Detail or Show Outline Button at the lower right of the Production Information
Dialog Box.
The view will change between the production information details and outline.
The information that is displayed is different for the Outline View and Detail View. The Detail View
displays the unit version, hardware version, and software versions. The Outline View displays only
the unit version.
Note The hardware revision is separated by "/" and displayed on the right of the hardware version. The hardware
revision is not displayed for the Unit that the hardware revision is in blank.
1 Double-click EtherCAT under Configurations and Setup in the Multiview Explorer. Or, right-
click EtherCAT under Configurations and Setup and select Edit from the menu.
The EtherCAT Tab Page is displayed.
2 Right-click the master on the EtherCAT Tab Page and select Display Production Information.
The Production Information Dialog Box is displayed.
The unit version is displayed after “Rev.”
Related Manuals
The followings are the manuals related to this manual. Use these manuals for reference.
Revision History
A manual revision code appears as a suffix to the catalog number on the front and back covers of the
manual.
Additional Information
PLCopen®
PLCopen® is a promotion body for IEC 61131-3 that has its headquarters in Europe and a world-
wide membership structure. IEC 61131-3 is an international standard for PLC programming.
PLCopen® Japan is the promotion committee for the Japanese market and consists of members
that have concerns related to the Japanese market.
• The website of headquarters of PLCopen® in Europe is http://www.plcopen.org/.
State Transitions
State transitions are defined for axes, axes groups, and instruction execution. For details on the state
and state transitions of the MC Function Module, refer to the NJ/NX-series CPU Unit Motion Control
User’s Manual (Cat. No. W507).
Error Processing
You execute motion control instructions to implement motion control with the MC Function Module.
When motion control instructions are executed, input parameters and instruction processing are
checked for errors. If an error occurs in an instruction, the Error output variable from the instruction
changes to TRUE and an error code is output to ErrorID output variable.
There are two ways that you can use to program processing of errors for motion control instructions.
Pwr1_Err EQ NoAxisErr
EQ
Pwr1_ErrID In1
WORD#16#5460 In2
In3
In4
In5
Off EQ ConnectErr
EQ
MC_Axis000.MFaultLvl.Code In1
WORD#16#8440 In2
In3
In4
In5
Data type
Definition
PLCopen® MC Function Module
TRIGGER_REF _sTRIGGER_REF This is a structure that contains information on trigger inputs.
• Trigger specifications
• Detection pattern information (positive, negative, both, edge,
level, pattern recognition, etc.)
INPUT_REF --- This is a structure that contains information relating to the input
specifications. It may include virtual data. This data type is not
used by the MC Function Module.
OUTPUT_REF _sOUTPUT_REF This is a structure relating to physical outputs. A CPU Unit with
unit version 1.06 or later and Sysmac Studio version 1.07 or
higher are required to use the MC Function Module data type.
As shown in the above table, the MC Function Module uses some data types that are defined by PLCo-
pen® and some that are defined specifically for the MC Function Module.
Refer to the NJ/NX-series CPU Unit Motion Control User's Manual (Cat. No. W507) for definitions of the
data types and structures that are handled by the MC Motion Module.
Additional Information
Input variables
• The axis variable name of the Servo Drive or other device to control is specified with the in-out vari-
able Axis.
• Motion conditions, such as the target position or target velocity, are specified with input variables.
• The status of the instruction or the status of the Servo Drive is output with output variables.
• If input parameters are omitted, input variables are set to default values.
Task Types
Motion control instructions can be used in the primary periodic task, in a priority-5 periodic task, or in a
priority-16 periodic task. If you use motion control instructions in any other task, an error will occur
when you build the program.
Additional Information
Design efficiency is improved through program structuring, and program visibility is improved if a
process with multiple operations is treated as a single function block.
MC
MCR
If a motion control instruction is located in the master control region, and the MC input condition is
FALSE, the following will occur.
• Motion control instructions for which input variable Enable or Execute is connected directly to the
left bus bar are executed with a FALSE value for Enable or Execute.
• Inline ST sections are executed normally.
• The values of the output parameters are updated as normal even when the Enable or Execute
input variables to the motion control instructions are FALSE.
PW1 PW1
MC_Power MC_Power
Axis Axis Equivalent Axis Axis
IN G0 IN
Enable Status Status_PW Enable Status Status_PW
Busy Busy_PW Busy Busy_PW
MCR
IN
PW1.Busy_PW
PW1.Status_PW
Servo ON/OFF
1
Rel1 Rel1
MC_MoveRelative MC_MoveRelative
Axis Axis Equivalent Axis Axis
IN G0 IN
Execute Done Done_1 Execute Done Done_1
Busy Busy_1 Busy Busy_1
Active Active_1 Active Active_1
MCR
G0
IN
Rel1.Execute
Rel1.Done_1
Additional Information
• The function of the MC (Master Control Start) instruction is disabled in ST. All instructions in
ST are executed normally.
For details on the MC and MCR instructions, refer to the NJ/NX-series Instructions Reference
Manual (Cat. No. W502).
Additional Information
To switch the execution of an execute-type instruction with the condition expression, place only
the Execute input parameter in the ST structure. Place the execute-type instruction itself outside
of the ST structure.
For details on the ST structure instructions, refer to the NJ/NX-series Instructions Reference
Manual (Cat. No. W502).
Control Instructions
Sign Exponent Mantissa
REAL data (32 bits)
s e f
31 30 23 22 0
Sign Exponent Mantissa
63 62 52 51 0
1
2 Binary Expression
The number 86.625 is 1010110.101 as a binary number.
4 Exponent Expression
From the previous equation, e-127 = 6. Therefore e = 133. The number 133 is 10000101 as a
binary number. This expresses the exponent.
5 Mantissa Expression
Numbers following the decimal point in 1.010110101 are 010110101. This number is expressed
using 23 bits, but here there are insufficient digits. Therefore zeros are added. The 23-bit figure
becomes f. Therefore f = 01011010100000000000000.
Therefore, −86.625 is expressed as shown in the following figure.
Sign Exponent Mantissa
REAL data (32 bits) 1 10000101 01011010100000000000000
31 30 23 22 0
Valid Ranges
The valid ranges of REAL and LREAL are shown in the following table.
Data type −∞ Negative numbers 0 Positive number +∞
REAL −∞ −3.402823e+38 to 0 +1.175495e-38 to +∞
−1.175495e-38 +3.402823e+38
LREAL −∞ −1.79769313486231e+308 to 0 +2.22507385850721e−308 to +∞
−2.22507385850721e−308 +1.79769313486231e+308
−∞ 0 +∞
Special Numbers
Positive infinity, negative infinity, +0, −0, and nonnumeric data are called special numbers. Nonnu-
meric data is data that cannot be expressed in floating-point decimal format. They are not treated as
numbers. Mathematically, +0 and −0 both mean the same as 0, but in data processing it is treated
differently.
A detailed explanation is given later. The sign ‘s’, exponent ‘e’, and mantissa ‘f’ for special numbers
take on the following values.
Data type Special number Sign s Exponent e Mantissa f
REAL +∞ 0 255 0
−∞ 1 255 0
+0 0 0 0
−0 1 0 0
Nonnumeric data --- 255 Not 0
LREAL +∞ 0 2047 0
−∞ 1 2047 0
+0 0 0 0
−0 1 0 0
Nonnumeric data --- 2047 Not 0
Control Instructions
Numbers that are very close to 0 (with very small absolute values) cannot be expressed using the
floating-point decimal format. Subnormal numbers were introduced to expand the validity of num-
bers near 0. Subnormal numbers can be used to express numbers whose absolute values are
smaller than numbers expressed in the normal data format.
Additional Information
Values expressed in the normal data format are called normalized numbers or normal numbers. 1
Numbers with exponent e=0 and mantissa f ≠ 0 are considered subnormal numbers and their values
are expressed in the following manner.
2 Binary Expression
The number 0.75 is 0.11 as a binary number.
3 Mantissa Calculation
From (0.11)2 × 2−127 = 2−126(f × 2−23), f = (0.11)2 × 222.
4 Mantissa Expression
From the previous equation, f = 01100000000000000000000.
Therefore, 0.75 × 2−127 is expressed as shown in the following figure.
Sign Exponent Mantissa
REAL data (32 bits) 0 00000000 01100000000000000000000
31 30 23 22 0
Subnormal numbers have fewer effective digits than normalized numbers. Therefore, if the calculation
of a normalized number results in an subnormal number, or if an intermediate result is an subnormal
number, the number of effective digits of the calculated result may be less than that of the normalized
number.
Data Processing
The floating-point decimal format is an approximate expression of a value, with a slight error from
the actual value. There is a limit to the valid range of the value. For these reasons, the following pro-
cess should be used for calculation.
Rounding
If the actual value exceeds the effective digits of the mantissa, the value must be rounded according
to the following rules.
• Of the values that can be expressed in floating-point decimal format, the value that is closest to
the actual value is taken as the calculation result.
• If there are two values that are equally close to the actual value that can be expressed in floating-
point decimal format, the value with the lowest significant 0 bit is taken as the calculation result.
When there are two values that are equally close to the actual value, the actual value is exactly in
the middle of the two values.
Move2
Axis 1 Axis
Blending
For details on multi-execution of motion control instructions, refer to the NJ/NX-series CPU Unit Motion
Control User’s Manual (Cat. No. W507).
Additional Information
If the MC_SetOverride (Set Override Factors) instruction is executed simultaneously in the same
way as the instructions shown above, the override value is valid even when it is placed on the
bottom. When different override values are set with the MC_SetOverride (Set Override Factors)
instruction, the following type of programming is recommended.
A
MOVE
50 rate
B
MOVE
70 rate
MC_SetOverride
C
Axis 1 Axis
rate
Additional Information
• To enable accessing output variables for motion control instructions even after the operating
mode changes, assign variables that have output parameters with a Retain attribute. By
accessing the assigned output parameter, you can access the output variable immediately
before the operating mode changes.
• The Servo ON/OFF status will continue even if the operating mode is changed.
2-1 Variables
There are two types of variables for the MC Function Module.
The first type is system-defined variables, which you use to monitor axis status and some of the param-
eter settings. System-defined variables that are used by the MC Function Module are called system-
defined variables for motion control.
The second type is variables that are used to input arguments to motion control instructions and to out-
put execution status from motion control instructions. Some input variables to motion control instruction
are enumerated variables. With enumerated variables, selections are made from a set of enumerators.
This section describes the variable types, the valid ranges of motion control instruction input variables,
and the enumerated variables.
For details on system-defined variables for motion control, refer to the NJ/NX-series CPU Unit
Motion Control User's Manual (Cat. No. W507).
Additional Information
2-1 Variables
In-out variables Specify data to process with the
instruction
Additional Information
MC Common Variables
MC Common Variables
The variable name _MC_COM is used for the MC Common Variables. The data type is _sCOM-
MON_REF, which is a structure. This section describes the configuration of the MC Common Variables
and provides details on the members.
Name Data type Meaning Function
_MC_COM _sCOMMON_REF MC Common Variable
Status _sCOMMON_REF_STA MC Common Status
RunMode BOOL MC Run TRUE during MC Function Module opera-
tion.
TestMode BOOL MC Test Run TRUE during test mode operation from the
Sysmac Studio.
CamTableBusy BOOL Cam Table File Save TRUE while the Cam Table is being saved
Busy or on standby.
GenerateCamBusy*1 BOOL Cam Table Creation Busy TRUE while the cam table is being cre-
ated.
PFaultLvl _sMC_REF_EVENT MC Common Partial Fault
Active BOOL MC Common Partial Fault TRUE while there is an MC common partial
Occurrence fault.
Code WORD MC Common Partial Fault Contains the code for an MC common par-
Code tial fault. The upper four digits of the event
code have the same value.
MFaultLvl _sMC_REF_EVENT MC Common Minor Fault
Active BOOL MC Common Minor Fault TRUE while there is an MC common minor
Occurrence fault.
Code WORD MC Common Minor Fault Contains the code for an MC common
Code minor fault. The upper four digits of the
event code have the same value.
Obsr _sMC_REF_EVENT MC Common Observation
Active BOOL MC Common Observation TRUE while there is an MC common
Occurrence observation.
Code WORD MC Common Observation Contains the code for an MC common
Code observation. The upper four digits of the
event code have the same value.
*1 A CPU Unit with unit version 1.08 or later and Sysmac Studio version 1.09 or higher are required.
Axis Variables
The variable names of the system-defined Axis Variables are _MC_AX[0..255], _MC1_AX[0..255], and
_MC2_AX[0..255]. This section describes the configuration of the Axis Variables and provides details
on the members using _MC_AX[0..255] as an example. The same information applies to
_MC1_AX[0..255] and _MC2_AX[0..255].
Name Data type Meaning Function
_MC_AX[0..255] _sAXIS_REF Axis Variable
Status _sAXIS_REF_STA Axis Status
Ready BOOL Axis Ready-to-execute TRUE when preparations for axis execution are
finished and the axis is stopped. This variable
gives the same status as _MC_AX[*].Sta-
tus.Standstill (TRUE: standstill).
Disabled BOOL Axis Disabled TRUE while the Servo is OFF for the axis. This
includes the following status.
The following axis status are mutually exclusive.
Only one of them can be TRUE at a time.
Disabled, Standstill, Discrete, Continuous, Syn-
chronized, Homing, Stopping, ErrorStop, or
Coordinated
Standstill BOOL Standstill TRUE while the Servo is ON for the axis.
Discrete BOOL Discrete Motion TRUE while position control is executed toward
the target position.
This includes when the velocity is 0 because the
override factor was set to 0 during a discrete
motion.
Continuous BOOL Continuous Motion TRUE during continuous motion without a target
position.
This state exists during velocity control and
torque control.
This includes when the velocity is 0 because the
target velocity is set to 0 and when the velocity is
0 due to an override factor set to 0 during contin-
uous motion.
Synchronized BOOL Synchronized Motion TRUE during execution of synchronized control.
This includes waiting for synchronization after
changing to synchronized control instructions.
Homing BOOL Homing TRUE when homing for the MC_Home or
MC_HomeWithParameter instruction.
Stopping BOOL Deceleration Stopping TRUE until the axis stops for a MC_Stop or
MC_TouchProbe instruction. This includes when
Execute is TRUE after the axis stops for an
MC_Stop instruction. Axis motion instructions
are not executed while decelerating to a stop.
(CommandAborted is TRUE.)
ErrorStop BOOL Error Deceleration Stopping This status exists when the axis is stopping or
stopped for execution of the MC_ImdediateStop
instruction or a minor fault (while
_MC_AX[*].MFaultLvl.Active is TRUE (Axis
Minor Fault Occurrence).
Axis motion instructions are not executed in this
state (CommandAborted is TRUE).
Coordinated BOOL Coordinated Motion TRUE when an axes group is enabled by a
multi-axes coordinated control instruction.
2-1 Variables
InPosWaiting BOOL In-position Waiting TRUE when waiting for in-position state. The in-
position check is performed when positioning for
the in-position check.
Homed BOOL Home Defined TRUE when home is defined.*3
TRUE: Home defined.
FALSE: Home not defined. 2
InHome BOOL In Home Position TRUE when the axis is in the range for home. It
gives an AND of the following conditions.
• Home defined
Axis Variables
• The actual current position is in the zero posi-
tion range with home as the center.
TRUE also when the zero position is passed by
while the axis is moving in command status.
VelLimit*4 BOOL Command Velocity Satura- TRUE while the axis velocity is held to the maxi-
tion mum velocity during synchronized control.
Dir _sAXIS_REF_DIR Command Direction*5
Posi BOOL Positive Direction TRUE when there is a command in the positive
direction.
Nega BOOL Negative Direction TRUE when there is a command in the negative
direction.
DrvStatus _sAX- Servo Drive Status*6
IS_REF_STA_DRV
ServoOn BOOL Servo ON TRUE when the Servomotor is powered.
Ready BOOL Servo Ready TRUE when the Servo is ready.
MainPower BOOL Main Power TRUE when the Servo Drive main power is ON.
P_OT BOOL Positive Limit Input TRUE when the positive limit input is enabled.
N_OT BOOL Negative Limit Input TRUE when the negative limit input is enabled.
HomeSw BOOL Home Proximity Input TRUE when the home proximity input is
enabled.
Home BOOL Home Input TRUE when the home input is enabled.*7
ImdStop BOOL Immediate Stop Input TRUE when the immediate stop input is
enabled.
Latch1 BOOL External Latch Input 1 TRUE when latch input 1 is enabled.
Latch2 BOOL External Latch Input 2 TRUE when latch input 2 is enabled.
DrvAlarm BOOL Drive Error Input TRUE while there is a Servo Drive error.
DrvWarning BOOL Drive Warning Input TRUE while there is a Servo Drive warning.
ILA BOOL Drive Internal Limiting TRUE when the Servo Drive limiting function
actually limits the axis.*8
CSP BOOL Cyclic Synchronous Posi- TRUE when the Servo is ON at the Servo Drive
tion (CSP) Control Mode and the current mode is CSP Mode.*9
CSV BOOL Cyclic Synchronous Velocity TRUE when the Servo is ON at the Servo Drive
(CSV) Control Mode and the current mode is CSV Mode.*9
CST BOOL Cyclic Synchronous Torque TRUE when the Servo is ON at the Servo Drive
(CST) Control Mode and the current mode is CST Mode.*9
2-1 Variables
Cfg _sAXIS_REF_CFG Axis Basic Settings*12
AxNo UINT Axis Number Contains the logical number of the axis.
This number is accessed to recognize the axis
number when accessing _sAXIS_REF.
AxEnable _eMC_AXIS_USE Axis Use Shows if the axis is enabled or disabled.
0: _mcNoneAxis (Undefined Axis) 2
1: _mcUnusedAxis (Unused Axis)
2: _mcUsedAxis (Used Axis)
AxType _eMC_AXIS_TYPE Axis Type Contains the axis type.
Axis Variables
I/O wiring is not required for virtual axes.
0: _mcServo (Servo Axis)
1: _mcEncdr (Encoder Axis)
2: _mcVirServo (Virtual Servo Axis)
3: _mcVirEncdr (Virtual Encoder Axis)
NodeAddress UINT Node Address Contains the EtherCAT slave address.*13
A value of 16#FFFF indicates that there is no
address.
ExecID*14 UNIT Execution ID Contains the task execution ID.
0: Not assigned to task (undefined axis).
1: Assigned to primary periodic task
2: Assigned to priority-5 periodic task
Scale _sAXIS_REF_SCALE Unit Conversion Settings*15
Num UDINT Command Pulse Count Per Contains the number of pulses per motor rota-
Motor Rotation tion for command positions.
The command value is converted to a number of
pulses based on the electronic gear ratio.
Den LREAL Work Travel Distance Per Contains the workpiece travel distance per
Motor Rotation motor rotation for command positions.*16
Units _eMC_UNITS Unit of Display Contains the display unit for command positions.
0: _mcPls(pulse)
1: _mcMm(mm)
2: _mcUm(μm)
3: _mcNm(nm)
4: _mcDeg(degree)
5: _mcInch(inch)
CountMode*14 _eMC_COUNT_MODE Count Mode Contains the count mode.
0: _mcCountModeLinear (Linear Mode)
1: _mcCountModeRotary (Rotary Mode)
MaxPos*14 LREAL Maximum current position Contains the maximum value of the current posi-
tion indication.*17
MinPos*14 LREAL Minimum current position Contains the minimum value of the current posi-
tion indication.*18
*4 Use VelLimit only for a slave axis that is currently in synchronized control.
*5 Gives the command travel direction.
*6 Gives the status of the Servo Drive or other device.
*7 This variable shows the status of the signal that is set for the Encoder Phase Z Detection setting of the digital inputs in the
Detailed Settings Area of the Axis Basic Settings Display of the Sysmac Studio. You may not be able to map this signal to
a PDO for a servo driver from another manufacturer. Refer to the manual for the servo driver.
*8 This variable shows the status of bit 11(internal limit active) of the Status word (6041 hex) mapped to a PDO. The condi-
tion for it to change to TRUE depends on the specifications of the Servo Drive. Refer to the manual for the servo driver.
This corresponds to one of the following limits in the OMRON 1S-series Servo Drive or G5-series Servo Drive.
Torque limit
Velocity limit
Drive prohibit input
Software limits
*9 These variables are based on the value of the Modes of operation display (6061 hex) mapped to a PDO. The conditions
for CSP, CSV, and CST to change to TRUE depend on the specifications of the Servo Drive. Refer to the manual for the
servo driver. If the Modes of Operation Display (6061 hex) is not mapped to a PDO, the values of these variables depend
on the unit version of the CPU Unit as follows:
For a CPU Unit with unit version 1.09 or earlier, they are always FALSE.
For a CPU Unit with unit version 1.10 or later, they are TRUE when the status of the Statusword (6041 hex) that was
mapped to a PDO is Operation Enabled.
*10 Operation when process data communications is not established between the CPU Unit and an EtherCAT slave assigned
to an axis or between the CPU Unit and an NX Unit depends on the version of the CPU Unit as follows:
For CPU Unit version 1.09 or earlier, the actual current position and command current position in the Axis Variable will be
either 0 or the lower limit value. The lower limit value is used when the Count Mode is set to Rotary Mode and 0 is not
included in the positioning range.
For CPU Unit version 1.10 or later, the actual current position and command current position in the Axis Variable will be
the actual current position from just before process data communications changed to a non-established state.
*11 A CPU Unit with unit version 1.06 or later and Sysmac Studio version 1.07 or higher are required to use this variable.
*12 This variable shows the settings in the Axis Basic Settings.
*13 For an NX-series Position Interface Unit, this is the node address of the EtherCAT Coupler Unit under which the Position
Interface Unit is mounted.
*14 A CPU Unit with unit version 1.10 or later and Sysmac Studio version 1.12 or higher are required to use this variable.
*15 This variable shows the settings of the electronic gear ratio.
*16 The parameter is disabled if you set to use a reducer in the unit conversion settings, which is the function added for CPU
Units with unit version 1.11 or later. To confirm alternatively enabled parameters, i.e. Work Travel Distance Per Rotation,
Work Gear Ratio, and Motor Gear Ratio, use the MC_ReadAxisParameter (Read Axis Parameters) instruction.
*17 If the Count Mode is set to Linear Mode, the position just before an overflow is given. In Rotary Mode, the modulo maxi-
mum position is given.
*18 If the Count Mode is set to Linear Mode, the position just before an underflow is given. In Rotary Mode, the modulo mini-
mum position is given.
2-1 Variables
_MC2_GRP[0..63]. In the descriptions of functions, _MC_AX[*] is used as an example, but the same
information applies to _MC1_AX[*] and _MC2_AX[*].
Name Data type Meaning Function
_MC_GRP[0..63] _sGROUP_REF Axes Group Variable
Status _sGROUP_REF_STA Axes Group Status
Ready BOOL Ready-to-execute TRUE when the axes group is stopped and is 2
ready to execute. The condition for being
ready to execute is an AND of the following
conditions.
2-1 Variables
2: _mcXYZU (four axes)
Axis[0] UINT Composition Axis for Axis Gives the axis number that is assigned to axis
A0 A0.
Axis[1] UINT Composition Axis for Axis Gives the axis number that is assigned to axis
A1 A1.
Axis[2] UINT Composition Axis for Axis Gives the axis number that is assigned to axis
A2 A2. 2
Axis[3] UINT Composition Axis for Axis Gives the axis number that is assigned to axis
A3 A3.
Input Variables
Name Meaning Data type Valid range Default Description
Execute Execute BOOL TRUE or FALSE FALSE The instruction is executed
when Execute changes to
TRUE. Other input vari-
ables are also input when
Execute changes to TRUE.
If input values are changed,
they will be updated when
Execute changes to TRUE
again. The output variables
are valid as long as Execute
remains TRUE even after
the instruction is completed.
Then, all output variables
except for Error and ErrorID
are disabled when Execute
changes to FALSE. If Exe-
cute changes to FALSE
before the instruction is
completed, output vari-
ables are valid for at least
one period.
Enable Enable BOOL TRUE or FALSE FALSE The instruction function is
enabled when Enable
changes to TRUE and dis-
abled when it changes to
FALSE. While Enable is
TRUE, the other input vari-
ables are input every
period. If Enable changes to
FALSE, all output variables
except for Error and ErrorID
are disabled.
PositiveEnable Positive BOOL TRUE or FALSE FALSE • MC_MoveJog Instruction
Direction When this variable
Enable changes to TRUE, the
axis starts moving in the
positive direction. When it
changes to FALSE, the
axis stops moving. The
Velocity, Acceleration,
and Deceleration input
variables to the
MC_MoveJog instruction
are read when Posi-
tiveEnable changes to
TRUE.
• MC_SetTorqueLimit
Instruction
When this variable
changes to TRUE, the
positive torque limit is
enabled. When it changes
to FALSE, the positive
torque limit is disabled.
2-1 Variables
axis stops moving. The
Velocity, Acceleration,
and Deceleration input
variables to the
MC_MoveJog instruction
are read when Nega-
tiveEnable changes to
TRUE.
2
• MC_SetTorqueLimit
Instruction
When this variable
changes to TRUE, the
2-1 Variables
specified offset value.
SlaveOffset Slave Offset LREAL Negative number, positive number, 0 The displacement of the
or 0 slave axis is shifted using
the specified offset value.
CamTransition Cam Transi- _eMC_CAM_ 0: _mcCTNone 0*1 (Reserved)
(Reserved) tion Selec- TRANSITION
tion 2
OutMode Sync End _eMC_OUT_MODE 0: _mcStop 0*1 (Reserved)
(Reserved) Mode Selec-
tion
2-1 Variables
negative torque will be the
Maximum Negative Torque
Limit.
The value will be 0 if 0 or a
negative value is specified.
WindowOnly Window Only BOOL TRUE or FALSE FALSE Specify whether to enable
or disable the window
mask. 2
FirstPosition First Position LREAL Negative number, positive number, 0 Specify the first position.
or 0
LastPosition Last Position LREAL Negative number, positive number, 0 Specify the last position.
2-1 Variables
Tracks or disable each track. There
are a maximum of 16
tracks. Specify enable or
disable for track 0 with bit
00 and track 15 with bit 15.
0: Disable
1: Enable
ValueSource Input Infor- _sMC_SOURCE --- --- (Reserved)
2
(Reserved) mation
TimeStamp *16 Time Stamp ULINT Non-negative number 0 Specifies the time stamp for
which to calculate the posi-
*1 The default value for an enumeration variable is actually not the number, but the enumerator.
*2 You can use instructions, such as the MC_MoveJog or MC_MoveVelocity instruction, to set the velocity to 0.
*3 The command unit is millimeters, micrometers, nanometers, degrees, inches, or pulses.
*4 The unit is command units/s2.
*5 The unit is command units/s3.
*6 This unit is command units.
*7 To use _mcLatestCommand, the following condition must be met for the master and slave axes.
The axis number set for the master axis in the system-defined variable for motion control must be lower than the axis
number set for the slave axis in the system-defined variable for motion control.
*8 The task period is the primary period if the task is the primary periodic task and the task period of the priority-5 periodic
task if the task is the priority-5 periodic task.
*9 A CPU Unit with unit version 1.02 or later and Sysmac Studio version 1.03 or higher are required to use this data type. For
any previous version combinations, the data type is UINT and the valid range is positive numbers.
*10 A CPU Unit with unit version 1.02 or later and Sysmac Studio version 1.03 or higher are required to use this data type. For
any previous version combinations, the data type is UINT.
*11 This parameter is enabled only for torque control.
*12 A CPU Unit with unit version 1.01 or later and Sysmac Studio version 1.02 or higher are required to use this setting.
*13 A CPU Unit with unit version 1.10 or later and Sysmac Studio version 1.12 or higher are required to use this variable.
*14 A CPU Unit with unit version 1.03 or later and Sysmac Studio version 1.04 or higher are required to use this variable.
*15 A CPU Unit with unit version 1.04 or later and Sysmac Studio version 1.05 or higher are required to use this variable.
*16 A CPU Unit with unit version 1.06 or later and Sysmac Studio version 1.07 or higher are required to use this variable.
*17 NX1P2 CPU Units and NJ-series CPU Units do not have this input variable.
− 0 +
2-1 Variables
acceleration)*10 the interpolation accelera- number. If the interpola-
tion time*11 is less than tion acceleration time*11 is
125 μs, it will always be greater than 250 s, it will
125 μs. always be 250 s.
Error when negative num-
ber.
Deceleration Interpolation Decelera- 0 or (0.000 000 000 000 000 Set to the maximum inter- Set to 0.000 000 000 000 4 2
tion 04 ≤ and ≤ Maximum interpola- polation deceleration. If pulses/s2 when positive
tion deceleration)*12 the interpolation decelera- number. If the interpola-
tion time*11 is less than tion deceleration time*11 is
125 μs, it will always be
*1 The maximum value that you can set is as follows when the value is converted to pulses:
For a CPU Unit with unit version 1.02 or earlier, the value is 400,000,000 [pulses/s].
For a CPU Unit with unit version 1.03 or later, the value is 500,000,000 [pulses/s].
For a CPU Unit with unit version 1.11 or later, the value is 2,147,483,647 [pulses/s].
*2 If a negative number or 0 is specified when negative numbers and 0 are not included in the effective range, an error
occurs.
*3 The upper limit of the Maximum Acceleration in the axis parameters is 3,200,000,000,000 pulses/s2.
*4 Calculated as follows: Acceleration time = Velocity/Acceleration rate, Deceleration time = Velocity/Deceleration rate, and
Acceleration/deceleration time = Acceleration time + Deceleration time.
*5 The upper limit of the Maximum Deceleration in the axis parameters is 3,200,000,000,000 pulses/s2.
*6 The acceleration jerk application time and the deceleration jerk application time are the times that jerk is applied.
Calculated as follows: Acceleration jerk application time = Acceleration rate/Jerk and Deceleration jerk application time =
Deceleration rate/Jerk.
*7 Position must be an absolute value in pulses and must be no more than 40 bits signed.
*8 The unit is %.
*9 The upper limit of the Maximum Interpolation Velocity in the axis parameters is the twice as high as the upper limit of the
Maximum Velocity in the axis parameters.
*10 The upper limit of the Maximum Interpolation Acceleration in the axis parameters is 6,400,000,000,000 pulses/s2.
*11 Calculated as follows: Interpolation acceleration time = Interpolation velocity/Interpolation acceleration rate, Interpolation
deceleration time = Interpolation velocity/Interpolation deceleration rate, and Acceleration/deceleration time = Accelera-
tion time + Deceleration time.
*12 The upper limit of the Maximum Interpolation Deceleration in the axis parameters is 6,400,000,000,000 pulses/s2.
*13 The interpolation acceleration jerk application time and the interpolation deceleration jerk application time are the times
that interpolation jerk is applied.
Calculated as follows: Interpolation acceleration jerk application time = Interpolation acceleration rate/Jerk and Interpola-
tion deceleration jerk application time = Interpolation deceleration rate/Jerk.
Enumerations
This ENUM data is used by input variables to motion control instructions. An enumeration input variable
is not actually set to the number, but to the enumerator.
Corresponding instruction
Data type Valid range Description
variable
_eMC_BUFFER_ 0: _mcAborting Specifies the operation for multi-execution BufferMode (Buffer Mode
MODE 1: _mcBuffered of motion control instructions. Selection)
2: _mcBlendingLow 0: Aborting
3: _mcBlendingPrevious 1: Buffered
4: _mcBlendingNext 2: Blending low
5: _mcBlendingHigh 3: Blending previous
4: Blending next
5: Blending high
_eMC_CIRC_ 0: _mcBorder Specifies the method for circular interpola- CircMode (Circular Interpola-
MODE 1: _mcCenter tion. tion Mode)
2: _mcRadius 0: Border point
1: Center
2: Radius
_eMC_CAM_ 0: _mcCTNone Specifies the slave axis command value CamTransition (Cam Transi-
TRANSITION output method when the cam is restarted. tion Selection)
0: No limit or correction
_eMC_CIRC_ 0: _mcCW Specifies the path direction. PathChoice
PATHCHOICE 1: _mcCCW 0: CW
1: CCW
_eMC_COMBINE_ 0: _mcAddAxes Specifies the combining method. CombineMode
MODE 1: _mcSubAxes 0: Addition
1: Subtraction
_eMC_COORD_SYS- 0: _mcACS Specifies the coordinate system. CoordSystem (Coordinate
TEM 0: Axis coordinate system (ACS) System)
Corresponding instruction
Data type Valid range Description
variable
_eMC_ 0: _mcChkVel Specifies the parameter to write. ParameterNumber
PARAMETER_ 1: _mcChkAcc 0: Velocity Warning Value/Interpolation
NUMBER 2: _mcChkDec Velocity Warning Value
3: _mcPosiChkTrq*1 1: Acceleration Warning Value/Interpola-
4: _mcNegaChkTrq*1 tion Acceleration Warning Value
2-1 Variables
5: _mcFELmt 2: Deceleration Warning Value/Interpola-
6: _mcChkFELmt tion Deceleration Warning Value
7: _mcSwLmtMode 3: Positive Torque Warning Value
8: _mcPosiSwLmt 4: Negative Torque Warning Value
9: _mcNegaSwLmt 5: Following Error Over Value
10: _mcInPosTime 6: Following Error Warning Value
11: _mcInPosRange*2 7: Software Limits
12: _mcStartVel*3 8: Positive Software Limit 2
9: Negative Software Limit
10: In-position Check Time
11: In-position Range
12: Start Velocity
Corresponding instruction
Data type Valid range Description
variable
_eMC_TRIGGER_ 0: _mcEncoderMark Specifies the trigger signal in Drive Mode. InputDrive (Trigger Input Sig-
INPUT_DRIVE 1: _mcEXT 0: Z-phase signal nal)
1: External input
_eMC_HOMING_MODE 0: _mcHomeSwTurnHomeSw Specify the new setting of the Homing ---
*6 Off Method.
1: _mcHomeSwTurnHomeSwOn 0: Proximity reverse turn/home proximity
4: _mcHomeSwOff input OFF
5: _mcHomeSwOn 1: Proximity reverse turn/home proximity
input ON
8: _mcLimitInputOff
4: Home proximity input OFF
9: _mcHomeSwTurnHomeMask
5: Home proximity input ON
11: _mcLimitInputOnly
8: Limit input OFF
12: _mcHomeSwTurnHolding
Time 9: Proximity reverse turn/home input
mask distance
13: _mcNoHomeSwHolding
HomeInput 11: Limit inputs only
4: _mcModifiedTrapezoid 2: Parabolic
5: _mcModifiedSine 3: Modified constant velocity
9: _mcSimpleHarmonic 7: Trapecloid
Corresponding instruction
Data type Valid range Description
variable
_eMC_ 0: _mcAccDecOverBuffer Sets the operation for when the maximum ---
ACCDECOVER*7 1: _mcAccDecOverRapid acceleration/deceleration rate would be
exceeded after excessive accelera-
2: _mcAccDecOverError
tion/deceleration during accelera-
Stop
tion/deceleration control of the axis
2-1 Variables
because stopping at the target position is
given priority.
0: Use rapid acceleration/deceleration.
(Blending is changed to Buffered.)
1: Use rapid acceleration/deceleration.*8
2: Minor fault stop*9
_eMC_ 0: _mcReverseMode Specifies the operation for reversing rota- --- 2
REVERSE_MODE*7 DecelerationStop tion for multi-execution of instructions, re-
1: _mcReverseMode execution of instructions, and interrupt
ImmediateStop feeding.
2-1 Variables
InCam Cam Motion BOOL TRUE or FALSE TRUE when the cam table start point is
executed.
InTorque Target Torque Reached BOOL TRUE or FALSE TRUE when the target torque is reached.
InFeed Feeding BOOL TRUE or FALSE TRUE while feeding after receiving a
latch input.
InZone In Zone BOOL TRUE or FALSE TRUE when the axes position is within 2
the zone range.
Valid*4 Enabled BOOL TRUE or FALSE TRUE when the axes group is being con-
trolled.
*1 Error is not reset to FALSE until you execute one of the following instructions: MC_Reset, MC_GroupReset, or Reset-
MCError. This behavior is different from the PLCopen® specifications. With PLCopen® specifications, it changes to
FALSE when Execute changes to FALSE. When Error is TRUE, the motion control instruction is not executed. Instruc-
tions are not executed after an error is cleared even if Execute is TRUE. Execute must change from FALSE to TRUE to
execute the instruction. Enable-type motion control instructions are executed whenever their Enable variable is TRUE.
*2 The upper four digits of the event code have the same value. Refer to A-1 Error Codes for details.
*3 This unit is command units. The command unit is millimeters, micrometers, nanometers, degrees, inches, or pulses.
*4 A CPU Unit with unit version 1.01 or later and Sysmac Studio version 1.02 or higher are required to use this variable.
*5 A CPU Unit with unit version 1.06 or later and Sysmac Studio version 1.07 or higher are required to use this variable.
*6 A CPU Unit with unit version 1.08 or later and Sysmac Studio version 1.09 or higher are required to use this variable.
*7 Refer to A-1 Error Codes for details.
*8 A CPU Unit with unit version 1.10 or later and Sysmac Studio version 1.12 or higher are required to use this variable.
Additional Information
To enable accessing output variables for motion control instructions even after the operating
mode is changed, assign variables that have output parameters with a retain attribute.
By accessing the assigned output parameter, you can access the output variable immediately
before the operating mode changed.
2-1 Variables
AxesGroup Axes Group _sGROUP_REF --- Specifies the axes group.
Auxiliary Auxiliary Axis _sAXIS_REF --- Specifies the auxiliary axis.
Master Master Axis _sAXIS_REF --- Specifies the master axis.
Slave Slave Axis _sAXIS_REF --- Specifies the slave axis.
CamTable Cam Table ARRAY[0..N] OF --- Specifies the cam data structure _sMC_-
_sMC_CAM_REF CAM_REF array variable as the cam 2
table.*1
TriggerInput Trigger Input Condition _sTRIGGER_REF --- Sets the trigger condition.
TriggerVariable Trigger Variable BOOL TRUE or FALSE Specifies a trigger input variable when
*1 N in the array variable is set automatically by the Sysmac Studio. Specify a cam data variable that was created on the
Sysmac Studio.
*2 For details on the data types of variables, refer to Parameter Data Types and Valid Ranges on page 5-14 under MC_Write
on page 5-12.
*3 A CPU Unit with unit version 1.01 or later and Sysmac Studio version 1.02 or higher are required to use this variable.
*4 A CPU Unit with unit version 1.03 or later and Sysmac Studio version 1.04 or higher are required to use this variable.
*5 A CPU Unit with unit version 1.06 or later and Sysmac Studio version 1.07 or higher are required to use this variable.
*6 A CPU Unit with unit version 1.08 or later and Sysmac Studio version 1.09 or higher are required to use this variable.
*7 If you use a user-defined variable, create an array variable with a starting element number of 0 and a maximum of 358
array elements N.
2-2 Instructions
There are three types of motion control instructions. They are given in the following table.
2-2 Instructions
Type Outline
Common commands Common instructions for the MC Function Module
Axis commands Instructions for MC Function Module to perform single-axis
control
Axes group commands Instructions for MC Function Module to perform multi-axes
coordinated control
2
For details on common commands, refer to Section 5 Common Command Instructions. For axis com-
mands, refer to Section 3 Axis Command Instructions. For axes groups, refer to Section 4 Axes Group
Instructions.
Common Commands
With the NX-series Position Interface Units, some motion control instructions are subject to functional
restrictions and some motion control instructions cannot be used. Refer to the NX-series Position Inter-
face Units User’s Manual (Cat. No. W524) for details.
Common Commands
This section describes the common instructions for the MC Function Module. The Classification Col-
umn gives "Administration" for non-motion instructions and "Motion" for motion instructions.
P: Instructions defined in PLCopen® technical specifications.
O: Instructions defined for the MC Function Module.
Single-
Instruction Instruction name Outline Classification
axis *1
MC_SetCamTableProp- Set Cam Table Prop- The end point index of the cam table that is speci- Administration O
erty erties fied in the input parameter is changed.
MC_SaveCamTable Save Cam Table Saves the cam table specified with the input param- Administration O
eter.
MC_Write Write MC Setting Writes part of the parameter settings for motion Administration O
control.
MC_GenerateCam- Generate Cam Table Creates a cam table for the cam properties and Administration O
Table*2 cam nodes specified in the I/O parameters.
MC_WriteAxisParame- Write Axis Parameters Writes the settings of the axis parameters in the Administration O
ter*2 motion control parameters.
MC_ReadAxisParame- Read Axis Parame- Reads the settings of the axis parameters from the Administration O
ter*2 ters motion control parameters.
*1 Instructions usable with single-axis position control axis are marked with .
*2 A CPU Unit with unit version 1.08 or later and Sysmac Studio version 1.09 or higher are required.
For details on the axis states due to instruction execution, refer to the NJ/NX-series CPU Unit Motion
Control User’s Manual (Cat. No. W507).
Axis Commands
This section describes the instructions that are used to perform single-axis control for the MC Function
Module. The Classification Column gives "Administration" for non-motion instructions and "Motion" for
motion instructions.
P: Instructions defined in PLCopen® technical specifications.
O: Instructions defined for the MC Function Module.
Single-
Instruction Instruction name Outline Classification
axis*1
MC_Power Power Servo Makes the Servo Drive ready to operate. Administration P
MC_MoveJog Jog Performs jogging according to the specified target Motion O
velocity.
MC_Home Home Operates the motor to determine home using the Motion P
limit signals, home proximity signal, and home sig-
nal.
MC_HomeWithParame- Home with Parame- Sets the homing parameter and operates the motor Motion O
ter *2 ters to determine home. It uses the limit signals, home
proximity signal, and home signal.
MC_Move Positioning Performs absolute positioning or relative position- Motion O
ing.
MC_MoveAbsolute Absolute Positioning Performs positioning for the specified absolute tar- Motion P
get position.
MC_MoveRelative Relative Positioning Performs positioning for the specified travel dis- Motion P
tance from the command current position.
MC_MoveVelocity Velocity Control Performs velocity control with the Position Control Motion P
Mode of the Servo Drive.
MC_MoveZeroPosition High-speed Home Performs positioning with an absolute position of 0 Motion O
as the target position to return to home.
MC_MoveFeed Interrupt Feeding Positioning is performed for the specified travel dis- Motion O
tance from the position where an external device
triggers an interrupt input.
MC_Stop Stop Decelerates an axis to a stop. Motion P
MC_ImmediateStop Immediate Stop Stops an axis according to the stopping mode that Motion O
is set with the StopMode (Stopping Mode Selection)
input variable regardless of the status of the axis.
MC_SetPosition Set Position Changes the command current position or the Administration P
actual current position as required for an axis.
MC_SetOverride Set Override Factors Changes the target velocity for an axis. Administration P
MC_ResetFollowingError Reset Following Error Resets the following error between the command Motion O
Counter position and the actual position.
MC_CamIn Start Cam Operation Starts cam operation with a specified cam table. Motion P
MC_CamOut End Cam Operation Ends cam operation for the axis specified with the Motion P
input parameter.
MC_GearIn Start Gear Operation Specifies the gear ratio between the master axis Motion P
and the slave axis and starts gear operation.
MC_GearInPos Positioning Gear Specifies the gear ratio between the master axis Motion P
Operation and the slave axis and starts electronic gear opera-
tion. Specifies the positions of the master axis and
slave axis to start synchronization.
MC_GearOut End Gear Operation Cancels MC_GearIn and MC_GearInPos instruc- Motion P
tions.
MC_MoveLink Synchronous Posi- Performs positioning in sync with the specified mas- Motion O
tioning ter axis.
MC_CombineAxes Combine Axes Outputs the sum or difference of the command Motion O
positions of two axes as the command position.
MC_Phasing Shift Master Axis Shifts the phase of the master axis currently in syn- Motion P
Phase chronized control.
Single-
Instruction Instruction name Outline Classification
axis*1
MC_TorqueControl Torque Control Uses the Torque Control Mode of the Servo Drive to Motion P
control the torque.
MC_SetTorqueLimit Set Torque Limit Limits the torque output from the Servo Drive Administration O
through the torque limit function of the Servo Drive.
2-2 Instructions
MC_ZoneSwitch Zone Monitor Determines if the command position or actual cur- Administration O
rent position of an axis is within a specified zone.
MC_TouchProbe Enable External Latch Records the position of an axis when a trigger sig- Administration P
nal occurs.
MC_AbortTrigger Disable External Disables the current latch. Administration P
Latch
MC_AxesObserve Monitor Axis Follow-
ing Error
Monitors the deviation between the command posi-
tions or feedback positions for the specified two
Administration O 2
axes to see if it exceeds the allowed value.
MC_SyncMoveVelocity Cyclic Synchronous Outputs the value set for the target velocity every Motion O
Velocity Control task period*2 to the Servo Drive in Cyclic Synchro-
MC_DigitalCamSwitch*5 Enable Digital Cam Turns a digital output ON or OFF according to the Administration P
Switch axis position.
MC_TimeStampToPos*5 Time Stamp to Axis Calculates the position of the axis for the specified Administration O
Position Calculation time stamp.
MC_PeriodicSyncVari- Periodic Axis Variable Periodically synchronizes Axes Variables between Administration O
ables*6 Synchronization tasks.
between Tasks
MC_SyncOffsetPostion*7 Cyclic Synchronous Compensates the position of a slave axis currently Motion O
Position Offset Com- in synchronized control.
pensation
*1 Instructions usable with single-axis position control axis are marked with .
*2 A CPU Unit with unit version 1.03 or later and Sysmac Studio version 1.04 or higher are required to use this instruction.
*3 The task period is the primary period if the task is the primary periodic task and the task period of the priority-5 periodic
task if the task is the priority-5 periodic task.
*4 A CPU Unit with unit version 1.04 or later and Sysmac Studio version 1.05 or higher are required to use this instruction.
*5 A CPU Unit with unit version 1.06 or later and Sysmac Studio version 1.07 or higher are required to use this instruction.
*6 You cannot use this instruction in an NX1P2 CPU Unit and an NJ-series CPU Unit.
*7 A CPU Unit with unit version 1.10 or later and Sysmac Studio version 1.12 or higher are required to use this instruction.
For details on the axis states due to instruction execution, refer to the NJ/NX-series CPU Unit Motion
Control User’s Manual (Cat. No. W507).
Refer to the compliance list for items that conform to PLCopen® technical specifications. The compli-
ance list can be accessed on the PLCopen® website.
* A CPU Unit with unit version 1.01 or later and Sysmac Studio version 1.02 or higher are required.
For details on the axes group states due to instruction execution, refer to the NJ/NX-series CPU Unit
Motion Control User’s Manual (Cat. No. W507).
Refer to the compliance list for items that conform to PLCopen® technical specifications. The compli-
ance list can be accessed on the PLCopen® website.
Controlword (6040 hex), Target Position (607A hex), Target Velocity (60FF hex), Tar-
RxPDO: 261th Receive
get Torque (6071 hex), Modes of Operation (6060 hex), Touch Probe Function (60B8
PDO Mapping (1704
hex)
hex), Max Profile Velocity (607F hex), Positive Torque Limit Value (60E0 hex), and 2
Negative Torque Limit Value (60E1 hex)
Error Code(603F hex), Status Word (6041 hex), Position Actual Value (6064 hex),
TxPDO: 259th Trans-
Torque Actual Value (6077 hex), Modes of Operation Display (6061 hex), Touch Probe
Required Objects
mit PDO Mapping
Status (60B9 hex), Touch Probe Pos1 Pos Value (60BA hex), Touch Probe Pos2 Pos
(1B02 hex)
Value (60BC hex), and Digital Inputs (60FD hex)
Additional Information
To perform fully-closed control with an OMRON G5-series R88D-KN-ECT Servo Drive, set
1701 hex as an RxPDO or select a total object size of 12 bytes or less for 1600 hex (for version
2.1 or later).
For details on setting the PDO map, refer to the NJ/NX-series CPU Unit Motion Control User’s Manual
(Cat. No. W507).
Refer to I/O Entry Mappings in the NX-series Position Interface Units User’s Manual (Cat. No. W524)
for information on using the NX-series Position Interface Units.
Required Objects
There are objects that are required for Servo axes and an object that is required for encoder axes. If
even one of the required objects is not set, a Required Process Data Object Not Set error (error code
3460 hex) occurs.
Servo Axes
The following objects must be set to use motion control instructions for a Servo axis.
Version Information
• If you are using a CPU Unit with unit version 1.09 or earlier and you are not using an OMRON
1S-series Servo Drive with built-in EtherCAT communications or G5-series Servo Drive with
built-in EtherCAT communications for the servo axis, Modes of Operation (6060 hex) and
Modes of Operation Display (6061 hex) are required.
• If you are using a CPU Unit with unit version 1.10 or later, operation is as described in the fol-
lowing table depending on whether Modes of Operation (6060 hex) and Modes of Operation
Display (6061 hex) are mapped.
Modes of Operation Display (6061 Modes of Operation Display (6061
hex) mapped hex) not mapped
Modes of Operation • You can execute instructions that • You can execute instructions that
(6060 hex) mapped use CSP,*1 CSV,*2 or CST.*3 use CSP. If you execute any
• The servo is OFF in any control instruction that uses any other con-
mode other than CSP, CSV, or trol mode, a Process Data Object
CST. Setting Missing error (error code
3461 hex) occurs.
• The MC Function Module assumes
that the CSP Servo Drive control
mode is used. Command the
Servo Drive to use CSP.
Modes of Operation • You can execute instructions that • You can execute instructions that
(6060 hex) not use CSP. If you execute any use CSP. If you execute any
mapped instruction that uses any other con- instruction that uses any other con-
trol mode, a Process Data Object trol mode, a Process Data Object
Setting Missing error (error code Setting Missing error (error code
3461 hex) occurs. 3461 hex) occurs.
• The servo is OFF in any control
mode other than CSP.
*1 CSP is the Cyclic Synchronous Position Control Mode of the Servo Drive.
*2 CSV is the Cyclic Synchronous Velocity Control Mode of the Servo Drive.
*3 CST is the Cyclic Synchronous Torque Control Mode of the Servo Drive.
Encoder Axes
The following object must be set to use motion control instructions for an encoder axis.
Servo Axes
There are objects that you must set to use specific instructions for Servo axes. Refer to the following
tables and set the required objects. There are no additional object settings required for Servo axis oper-
ation for any instructions that are not listed in the following table.
2
Output Settings
*1 If you set Modes of Operation (6060 hex), also set Modes of Operation Display (6061 hex). Normal operation is not pos-
sible if only one of these objects is set.
*2 Setting is not required for Homing Operation Modes 11, 12, and 14.
*3 Setting is required when Mode is set to Drive Mode.
*4 Setting is required when LinkOption (Synchronization Start Condition) is set to_mcTriggerDetection and Mode is set to
Drive Mode.
*5 This setting is checked only when an OMRON 1S-series Servo Drive with built-in EtherCAT communications or G5-series
Servo Drive with built-in EtherCAT communications is used.
Input Settings
Function
*1 If you set Modes of Operation Display (6061 hex), also set Modes of Operation (6060 hex). Normal operation is not pos-
sible if only one of these objects is set.
*2 Setting is not required for Homing Operation Modes 11, 12, and 14.
*3 Setting is required when Mode is set to Drive Mode.
*4 Setting is required when Mode is set to Drive Mode and LatchID is set to _mcLatch1 (Latch 1).
*5 Setting is required when Mode is set to Drive Mode and LatchID is set to _mcLatch2 (Latch 2).
*6 Setting is required when LinkOption (Synchronization Start Condition) is set to_mcTriggerDetection and Mode is set to
Drive Mode.
*7 Setting is required when LinkOption (Synchronization Start Condition) is set to _mcTriggerDetection, Mode is set to Drive
Mode, and LatchID is set to _mcLatch1 (Latch 1).
*8 Setting is required when LinkOption (Synchronization Start Condition) is set to _mcTriggerDetection, Mode is set to Drive
Mode, and LatchID is set to _mcLatch2 (Latch 2).
Encoder Axes
There are objects that you must set to use specific instructions for encoder axes. Refer to the following
tables and set the required objects. There are no additional object settings required for encoder axis
operation for any instructions that are not listed in the following table.
Function
Instruction Software Switch of Encoder’s Input Slave
Touch probe function (4020 hex)
(4020 hex)
MC_TouchProbe Conditionally required*1 Conditionally required*2 2
*1 Setting is required when Mode is set to Drive Mode.
*2 Setting is required when an OMRON GX-series encoder slave is used and Mode is set to Drive Mode.
Function
MC_Power . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3
MC_MoveJog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-8
MC_Home . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-16
MC_HomeWithParameter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-38
MC_Move . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-44
MC_MoveAbsolute . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-49
MC_MoveRelative . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-76
MC_MoveVelocity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-83
MC_MoveZeroPosition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-98
MC_MoveFeed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-105
MC_Stop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-133
MC_ImmediateStop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-142
MC_SetPosition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-147
MC_SetOverride . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-153
MC_ResetFollowingError . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-158
MC_CamIn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-165
MC_CamOut . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-219
MC_GearIn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-224
MC_GearInPos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-243
MC_GearOut . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-264
MC_MoveLink . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-269
MC_CombineAxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-292
MC_Phasing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-304
MC_TorqueControl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-312
MC_SetTorqueLimit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-323
MC_ZoneSwitch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-330
MC_TouchProbe . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-336
MC_AbortTrigger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-358
MC_AxesObserve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-363
MC_SyncMoveVelocity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-369
MC_SyncMoveAbsolute . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-379
MC_Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-386
MC_ChangeAxisUse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-390
MC_DigitalCamSwitch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-394
MC_TimeStampToPos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-413
MC_PeriodicSyncVariables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-425
MC_SyncOffsetPosition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-433
MC_Power
The MC_Power instruction makes a Servo Drive ready to operate.
Instruction Name FB/FUN Graphic expression ST expression
MC_Power Power Servo FB MC_Power_instance MC_Power_instance (
Axis :=parameter,
MC_Power
Enable :=parameter,
Axis Axis
Status =>parameter,
MC_Power
Enable Status
Busy =>parameter,
Busy
Error =>parameter,
Error
ErrorID =>parameter
ErrorID
);
3
Variables
Variables
Input Variables
Output Variables
Name Meaning Data type Valid range Description
Status Servo ON BOOL TRUE or FALSE TRUE when the device is ready for operation.
Busy Executing BOOL TRUE or FALSE TRUE when the instruction is acknowledged.
Error Error BOOL TRUE or FALSE TRUE while there is an error.
ErrorID Error Code WORD * Contains the error code when an error occurs.
A value of 16#0000 indicates normal execution.
In-Out Variables
* Specify a user-defined Axis Variable that was created in the Axis Basic Settings of the Sysmac Studio (default: MC_Axis***)
or a system-defined axis variable name (_MC_AX[*], _MC1_AX[*], or _MC2_AX[*]).
Function
• When Enable changes to TRUE, the axis specified by Axis is made ready to operate.
You can control the axis when it is ready to operate.
• When Enable changes to FALSE, the ready status is cleared for the axis specified by Axis.
You cannot control the axis after the ready status is cleared because it will not acknowledge opera-
tion commands. Also, an error occurs if a motion command is executed for an axis for which the
ready status is cleared. You can execute the MC_Power (Power Servo) and MC_Reset (Reset Axis
Error) instructions even for axes that are not ready.
• You can use this instruction to disable the operation of axes while they are in motion. In this case,
CommandAborted will change to TRUE. Output of the operation command will stop and the axis will
not longer be ready for operation.
• If home is not defined for a Servomotor with an absolute encoder, compensation is performed using
the absolute encoder home offset to define home when the axis is ready to operate. For a CPU Unit
with unit version 1.10 or later, home is also defined when EtherCAT process data communications
change from a non-established to an established state.
For details on the absolute encoder home offset, refer to the NJ/NX-series CPU Unit Motion Control
User’s Manual (Cat. No. W507) or NY-series Industrial Panel PC / Industrial Box PC Motion Control
User’s Manual (Cat. No. W559).
Additional Information
Execution of an execute-type motion control instruction is started when the power flow that is
connected to the Execute input changes to TRUE and continues until the control operation for
the instruction is completed. Even if master control is reset after execution of the instruction is
started, execution of the instruction is continued until the control operation for the instruction is
completed.
To interlock an execute-type motion control instruction, place the MC_Power (Power Servo)
instruction inside the master control region, as shown in the following figure. That will ensure that
the Servo is turned OFF when MC_On changes to FALSE.
MC_Power
Master control started.
MC_On MC
In
0 MCNo
3
Servo turned ON.
PWR1
Function
MC_Power
Pwr1_En MC_Axis000 Axis Axis Pwr1_Status
Enable Status
Busy Pwr1_Bsy
Error Pwr1_Err
ErrorID Pwr1_ErrID
Timing Charts
• When Enable changes to TRUE, Busy (Executing) changes to TRUE to indicate that the instruction
was acknowledged.
• After the axis becomes ready for operation, Status (Servo ON) changes to TRUE.
• When Enable changes to FALSE, Busy (Executing) changes to FALSE. Status (Servo ON) changes
to FALSE when ready status is cleared. Status (Servo ON) outputs the axis ready status regardless
of whether Enable is TRUE or FALSE.
Enable
Status
Busy
If another MC_Power instruction is executed for the same axis, the last instruction takes priority.
Power A
MC_Power
A Axis1 Axis Axis
Enable Status
Busy
Error
Multiple MC_Power instructions ErrorID
executed for the same axis
Power B
MC_Power
B Axis1 Axis Axis
Enable Status
Busy
Error
ErrorID
Power A
Enable
Status
Busy
Power B
Enable
Status
MC_Power
Busy
Error
ErrorID 0 3
Error Codes
Function
Refer to A-1 Error Codes for instruction errors.
MC_MoveJog
The MC_MoveJog instruction jogs an axis according to the specified target velocity.
Instruction Name FB/FUN Graphic expression ST expression
MC_MoveJog Jog FB MC_MoveJog_instance MC_MoveJog_instance (
Axis :=parameter,
MC_MoveJog PositiveEnable :=parameter,
Axis Axis
NegativeEnable
PositiveEnable Busy
:=parameter,
NegativeEnable CommandAborted
Velocity :=parameter,
Velocity Error
Acceleration :=parameter,
Acceleration ErrorID
Deceleration :=parameter,
Deceleration Busy =>parameter,
CommandAborted
=>parameter,
Error =>parameter,
ErrorID =>parameter
);
Variables
Input Variables
* Refer to Unit Conversion Settings in the NJ/NX-series CPU Unit Motion Control User's Manual (Cat. No. W507) or NY-series
Industrial Panel PC / Industrial Box PC Motion Control User’s Manual (Cat. No. W559) for information on command units.
Output Variables
Name Meaning Data type Valid range Description
Busy Executing BOOL TRUE or FALSE TRUE when the instruction is acknowledged.
CommandAborted Command BOOL TRUE or FALSE TRUE when the instruction is aborted.
Aborted
Error Error BOOL TRUE or FALSE TRUE while there is an error.
ErrorID Error Code WORD * Contains the error code when an error occurs.
A value of 16#0000 indicates normal execution.
MC_MoveJog
* Refer to A-1 Error Codes.
Function
CommandAborted • When this instruction is aborted because • When PositiveEnable changes to FALSE.
another motion control instruction was • When NegativeEnable changes to FALSE.
executed with the Buffer Mode set to • After one period when PositiveEnable and
Aborting. NegativeEnable are FALSE.
• When this instruction is canceled due to
an error.
• When this instruction is executed while
there is an error.
• When you start this instruction during
MC_Stop instruction execution.
Error When there is an error in the execution con- When the error is cleared.
ditions or input parameters for the instruc-
tion.
In-Out Variables
* Specify a user-defined Axis Variable that was created in the Axis Basic Settings of the Sysmac Studio (default: MC_Axis***)
or a system-defined axis variable name (_MC_AX[*], _MC1_AX[*], or _MC2_AX[*]).
Function
• The MC_MoveJog instruction performs jogging according to the specified Velocity (Target Velocity).
• To jog in the positive direction, change PositiveEnable (Positive Direction Enable) to TRUE. To jog in
the negative direction, change NegativeEnable (Negative Direction Enable) to TRUE.
• If PositiveEnable (Positive Direction Enable) and NegativeEnable (Negative Direction Enable) are
changed to TRUE at the same time, PositiveEnable (Positive Direction Enable) takes priority. As a
result, the axis will jog in the positive direction.
• If the command velocity of the MC_MoveJog (Jog) instruction exceeds the maximum jog velocity that
is set in the axis parameters, the maximum jog velocity is used.
To use the master control instructions (MC and MCR) for the MC_MoveJog (Jog) instruction, do
not program the instructions as shown below. If you do, master control is applied only to Posi-
tiveEnable (Positive Direction Enable), i.e., it is not applied to NegativeEnable (Negative Direc-
tion Enable).
Master control started.
MC_On MC
In
0 MCNo
MC_MoveJog Instruction
MC_MoveJog_instance
MC_MoveJog
POS_EN MC_Axis000 Axis Axis J_DONE
PositiveEnable Busy
NEGA_EN NegativeEnable CommandAborted J_CA
VEL Velocity Error J_ERR
ACC Acceleration ErrorID J_ERRID
DEC Deceleration
Always use the master control instructions for the MC_Power instruction.
MC_On MC
In
0 MCNo
MC_MoveJog
Enable Status
Busy Pwr1_Bsy
Error Pwr1_Err
ErrorID Pwr1_ErrID
Function
0 MCNo
MC_MoveJog Instruction
MC_MoveJog_instance
MC_MoveJog
POS_EN MC_Axis000 Axis Axis J_DONE
PositiveEnable Busy
NEGA_EN NegativeEnable CommandAborted J_CA
VEL Velocity Error J_ERR
ACC Acceleration ErrorID J_ERRID
DEC Deceleration
Timing Charts
• Busy (Executing) changes to TRUE as soon as PositiveEnable (Positive Direction Enable) or Nega-
tiveEnable (Negative Direction Enable) changes to TRUE.
• The axis starts deceleration as soon as PositiveEnable (Positive Direction Enable) or NegativeEnable
(Negative Direction Enable) changes to FALSE. Busy (Executing) changes to FALSE when the axis
stops completely.
• If another instruction aborts this instruction, CommandAborted changes to TRUE and Busy (Execut-
ing) changes to FALSE.
PositiveEnable
NegativeEnable
Busy
CommandAborted
Error
ErrorID 16#0000
Velocity
Target velocity
Acceleration
Deceleration
Time
Decelerates to a stop
when another instruction
causes an error.
You can specify the Velocity (Target Velocity), Acceleration (Acceleration Rate), and Deceleration
(Deceleration Rate) as input variables. Input variables Velocity (Target Velocity), Acceleration (Acceler-
ation Rate), and Deceleration (Deceleration Rate) are updated in the motion only when PositiveEnable
(Positive Direction Enable) or NegativeEnable (Negative Direction Enable) changes to TRUE. There-
fore, the axis velocity will not change even if Velocity (Target Velocity) changes while PositiveEnable
(Positive Direction Enable) or NegativeEnable (Negative Direction Enable) remains TRUE.
PositiveEnable
NegativeEnable
MC_MoveJog
Velocity 0
Busy
CommandAborted
Error
3
ErrorID 16#0000
Function
Velocity
Time
PositiveEnable
NegativeEnable
Busy
CommandAborted
Error
ErrorID 16#0000
Velocity
Time
PositiveEnable
NegativeEnable
Busy
CommandAborted
Error
ErrorID 16#0000
Velocity Velocity2
Velocity1
Time
PositiveEnable
NegativeEnable
Busy
CommandAborted
Error
ErrorID
MC_MoveJog
16#0000
Velocity
Time 3
Function
Multi-execution of Motion Control Instructions
For details on multi-execution of motion control instructions, refer to the NJ/NX-series CPU Unit Motion
Control User’s Manual (Cat. No. W507) or NY-series Industrial Panel PC / Industrial Box PC Motion
Control User’s Manual (Cat. No. W559).
Errors
If an error occurs during instruction execution, Error will change to TRUE and the axes will stop. You
can find out the cause of the error by referring to the value output by ErrorID (Error Code).
PositiveEnable
NegativeEnable
Busy
CommandAborted
Error
Error Codes
Refer to A-1 Error Codes for instruction errors.
MC_Home
The MC_Home instruction operates the motor to determine home. It uses the limit signals, home prox-
imity signal, and home signal.
Instruction Name FB/FUN Graphic expression ST expression
MC_Home Home FB MC_Home_instance MC_Home_instance (
Axis :=parameter,
MC_Home Execute :=parameter,
Axis Axis
Done =>parameter,
Execute Done
Busy =>parameter,
Busy
CommandAborted
CommandAborted
=>parameter,
Error
Error =>parameter,
ErrorID ErrorID =>parameter
);
Variables
Input Variables
Output Variables
Name Meaning Data type Valid range Description
Done Done BOOL TRUE or FALSE TRUE when the instruction is completed.
Busy Executing BOOL TRUE or FALSE TRUE when the instruction is acknowledged.
CommandAborted Command BOOL TRUE or FALSE TRUE when the instruction is aborted.
Aborted
Error Error BOOL TRUE or FALSE TRUE while there is an error.
ErrorID Error Code WORD * Contains the error code when an error occurs.
A value of 16#0000 indicates normal execution.
MC_Home
executed with the Buffer Mode set to • After one period when Execute is FALSE.
Aborting.
• When this instruction is canceled due to
an error.
• When this instruction is executed while
there is an error. 3
• When you start this instruction during
MC_Stop instruction execution.
Function
Error When there is an error in the execution con- When the error is cleared.
ditions or input parameters for the instruc-
tion.
In-Out Variables
* Specify a user-defined Axis Variable that was created in the Axis Basic Settings of the Sysmac Studio (default: MC_Axis***)
or a system-defined axis variable name (_MC_AX[*], _MC1_AX[*], or _MC2_AX[*]).
Function
• Homing starts when Execute changes to TRUE for the axis specified in Axis.
• Set the parameters used by the home instruction in the axis parameters.
• There are 10 Homing Operation Modes for the home instruction.
Set the desired method in axis parameter Homing Method in the Sysmac Studio.
For details on mapping data objects, refer to 2-3 PDO Mapping and to the NJ/NX-series CPU Unit
Motion Control User’s Manual (Cat. No. W507) or NY-series Industrial Panel PC / Industrial Box PC
Motion Control User’s Manual (Cat. No. W559).
Refer to I/O Entry Mappings in the NX-series Position Interface Units User’s Manual (Cat. No. W524)
for information on using the NX-series Position Interface Units.
MC_Home
• Proximity reverse turn/home input mask distance
• Limit inputs only
• Proximity reverse turn/holding time
• No home proximity input/holding home input
• Zero position preset 3
The following tables shows the homing parameters that are used for each Homing Operation Mode.
Function
(Yes: Parameter is used, No: Parameter is not used.)
Homing parameters
Operation Selection at Negative Limit Input
Operation Selection at Positive Limit Input
Homing Deceleration
Home Input Signal
Homing Velocity
Home Offset
Proximity reverse turn/home prox- Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes No Yes No Yes Yes
imity input OFF
Proximity reverse turn/home prox- Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes No Yes No Yes Yes
imity input ON
Home proximity input OFF Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes No Yes No Yes Yes
Home proximity input ON Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes No Yes No Yes Yes
Limit input OFF Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes No Yes No Yes Yes
Proximity reverse turn/home input Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes No Yes Yes
mask distance
Limit inputs only No Yes Yes Yes Yes Yes Yes Yes Yes Yes No Yes No Yes Yes
Proximity reverse turn/holding time No Yes Yes Yes Yes Yes Yes Yes Yes Yes No Yes Yes Yes Yes
No home proximity input/holding Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes No Yes No Yes Yes
home input
Zero position preset No No No No No No No No No No No Yes No No No
Refer to Homing Definition Operation on page 3-23 for details on operation in the Homing Modes.
Additional Information
If you use NX-series Position Interface Units, do not select holding for the Homing Operation
Mode. Refer to the NX-series Position Interface Units User’s Manual (Cat. No. W524) for details.
ON
Home proximity input signal
OFF
Limit in direction opposite ON
to detection direction OFF
ON
Limit in detection direction
OFF
Home instruction Homing velocity
Homing approach velocity
Start Stops.
• An error occurs and the axis stops if the axis is set to reverse direction or the limit input operation in
both directions and home cannot be detected after moving from the limit input opposite to the home
input detection direction to the other limit input.
ON
Home proximity input signal
OFF
Limit in direction opposite ON
to detection direction OFF
ON
Limit in detection direction
OFF
Home instruction Homing velocity
Homing approach velocity
Start Stops.
MC_Home
• 9: Proximity reverse turn/home input mask distance
• 12: Proximity reverse turn/holding time
Function
Operation command (1) Start (3)
Negative direction Positive direction
Start (2) Start
(1), (3): The home proximity signal is OFF, so the axis starts moving in the homing start direction.
(2): The home proximity signal is ON, so the axis starts moving in the direction opposite to the
home input detection direction.
(2)
Operation command Start Start
Negative direction Positive direction
(1) Start (3)
(1), (3): The home proximity signal is OFF, so the axis starts moving in the homing start direction.
(2): The home proximity signal is ON, so the axis starts moving in the direction opposite to the
home input detection direction.
ON
Home proximity input signal
OFF
ON
Home input signal
OFF
Homing velocity
Homing approach velocity
Operation command
Negative direction Positive direction
Start Stops.
The following timing chart shows the operation when the home input detection direction is TRUE (nega-
tive direction).
ON
Home proximity input signal
OFF
ON
Home input signal
OFF
Homing velocity
Operation command
Stops.
Negative direction Positive direction
Start
Homing Velocity
This is the high velocity during homing.
MC_Home
This is the velocity when you set a homing compensation value. For details on the operation, refer to
Homing Compensation on page 3-32.
Instruction Details 3
Function
This section describes the 10 Homing Operation Modes.
2 After the axis reaches the homing approach velocity, the axis stops at the first home input signal
after the home proximity input signal turns OFF. This defines home.
ON
Home proximity input signal
OFF
ON
Home input signal
OFF
Homing velocity
Homing approach velocity
Command output
Negative direction Positive direction
Start Stops
Homing velocity
• If you start homing while the home proximity input signal is ON, the operation will start at the hom-
ing velocity in the direction opposite to the home input detection direction. After the home proxim-
ity input turns OFF, the homing operation will start at the homing velocity in the home input
detection direction.
• Homing is started and home is defined when the home input signal turns ON after the home prox-
imity input signal turns ON and OFF while the velocity is below the homing approach velocity.
2 After the axis reaches the homing approach velocity, the axis stops at the first home input signal.
This defines home.
After the home proximity input signal turns ON, its status does not affect operation.
ON
Home proximity input signal
OFF
ON
Home input signal
OFF
Homing velocity
Homing approach velocity
Stops.
Negative direction Positive direction
Start
Command output
Homing velocity
• If you start homing while the home proximity input signal is ON, the operation will start at the hom-
ing velocity in the direction opposite to the home input detection direction. After the home proxim-
ity input turns OFF, the homing operation will start at the homing velocity in the home input
detection direction.
• Homing is started and home is defined when the home input signal turns ON after the home prox-
imity input signal turns ON while the velocity is below the homing approach velocity.
2 After the axis reaches the homing approach velocity, the axis stops at the first home input signal
after the home proximity input signal turns OFF. This defines home.
Home input detection direction
ON
Negative limit input signal
OFF
ON
Home proximity input signal
OFF
ON
Home input signal
OFF
Homing velocity
Homing approach velocity
Homing velocity
• If you start homing while the home proximity input signal is ON, the axis performs the following
operation depending on the setting of the homing start direction.
MC_Home
approach velocity.
2 After the axis reaches the homing approach velocity, the axis stops at the first home input signal.
This defines home.
After the home proximity input signal turns ON, its status does not affect operation.
3
Home input detection direction
Function
ON
Negative limit input signal
OFF
ON
Positive limit input signal
OFF
ON
Home proximity input signal
OFF
ON
Home input signal
OFF
Homing velocity
Homing approach velocity
Homing velocity
Homing start direction Homing approach velocity
Homing velocity
• If you start homing while the home proximity input signal is ON, the axis performs the following
operation depending on the setting of the homing start direction.
2 After the axis reaches the homing approach velocity, the axis stops at the first home input signal
after the limit signal turns OFF. This defines home.
Home input detection direction
ON
Negative limit input signal
OFF
ON
Home input signal
OFF
Homing velocity
Homing approach velocity
Command output
Negative direction Positive direction
Start Stops.
Homing approach velocity
• If you perform homing while the limit input on the opposite side of the home input detection direc-
tion is ON, the homing operation starts at the home approach velocity in the home input detection
direction.
• Homing is started and home is defined when the home input signal turns ON after the limit signal
in the direction opposite to the home input detection direction turns ON and OFF again while the
velocity is below the homing approach velocity.
2 The axis moves by the home input mask distance after the home proximity input signal turns ON
and stops at the first home input signal. This defines home.
After the home proximity input signal turns ON, its status does not affect operation. If the speci-
fied travel distance is too short and travel would be completed before the axis decelerates to the
homing approach velocity, an Invalid Home Input Mask Distance error (error code: 742B hex)
occurs when you start homing.
Home input detection direction
ON
Home proximity input signal
OFF
ON
Home input signal
OFF
Homing velocity
Homing approach velocity
Command output
Negative direction Positive direction
Start Stops.
After the proximity input, motion is
according to the home input mask distance.
• If you start homing while the home proximity input signal is ON, the operation will start at the hom-
ing velocity in the direction opposite to the home input detection direction. After the home proxim-
ity input signal turns OFF, the homing operation will start at the homing approach velocity in the
home input detection direction.
• Homing is started and home is defined when the home input signal turns ON after the axis travels
the home input mask distance after the home proximity input signal turns ON while the velocity is
below the homing approach velocity.
2 After the axis stops, the axis moves in the other direction at the homing velocity and decelerates
to a stop when the limit signal turns ON.
MC_Home
After the axis stops, the axis moves in the other direction at the homing approach velocity. The
position where the limit signal turns OFF is defined as home and an immediate stop is per-
formed (i.e., a stop using remaining pulses). The axis does not return to the home position.
Home input detection direction
Range of movement
ON 3
Negative limit input signal
OFF
ON
Function
Positive limit input signal
OFF
Homing velocity
Homing approach velocity
Negative direction Positive direction
Start Home Stops using
remaining pulses.
• If you use only the limit signals to perform homing, the point at which the limit signal turns OFF
during operation in the home input detection direction is set as the home detection position.
• If you start homing while the limit signal in the home input detection direction is ON, the operation
will start at the homing velocity in the direction opposite to the home input detection direction.
When the limit signal in the direction opposite to the home input detection direction turns ON, the
axis decelerates to a stop.
• Even if the limit signal turns OFF before the axis decelerates to a stop after the limit signal is
detected, home is not defined and the axis continues to decelerate. In this case, no error will
occur.
• Home is defined if the limit signal turns OFF before the homing approach velocity is reached after
the axis reverses or after starting while the limit signal is input.
Differences between Homing Operation Mode 11 and Other Homing Operation Modes
For Homing Operation Mode 11, the MC Function Module detects when the limit signal turns OFF to
define home. It differs from a Homing Operation Mode that uses the home input as an external latch
signal in the following ways.
Make sure that you understand these differences with other Homing Operation Modes before you
use Homing Operation Mode 11.
• The MC Function Module detects the limit input without an external latch function, such as one
provided by a Servo Drive. MC Function Module processing is the processing performed at the
primary period interval for the primary periodic task and at the task period of the priority-5 periodic
task for the priority-5 periodic task. Therefore, the precision of the home definition will depend on
the homing approach velocity and the control period of the primary periodic task or priority-5 peri-
odic task.
• The axis does not return to the home position. If the homing compensation value is 0, processing
for homing will end with the axis at a different position (i.e., not at home).
• Homing compensation is not performed if the homing compensation value is set to 0. If the hom-
ing compensation value is 0, processing for homing ends with the axis at a different position (i.e.,
not at home), as explained above. If the homing compensation value is not 0, then homing com-
pensation is performed with the homing compensation value as a relative position from home in
the same way as for other homing operation modes.
• The home offset is used to change the position of home. If the stop position is offset from home by
distance D, as shown in the following figure, the position after the completion of processing for
homing will be L + D if the home offset is L and the homing compensation value is 0.
Range where negative
limit signal is ON
Operating direction
Refer to Holding Operation for OMRON 1S-series Servo Drives on page 3-32 or Holding Opera-
MC_Home
tion for OMRON G5-series Servo Drives on page 3-33 for information on the holding operation.
Function
Home proximity input signal
OFF
Home is defined upon elapse of the set time.
Homing velocity
Homing approach velocity
Command output
Negative direction Positive direction
Start Stops.
Homing velocity
Homing approach velocity
Homing velocity
Torque limit
Torque limit is continued even after the set time elapses.
Command torque from previous operation
• If you start homing while the home proximity input signal is ON, the operation will start at the hom-
ing velocity in the direction opposite to the home input detection direction. After the home proxim-
ity input signal turns OFF, the homing operation will start at the homing approach velocity in the
home input detection direction.
• Releasing the torque limit also differs between OMRON 1S-series as well as G5-series Servo
Drives and other Servo Drives.
1S-series, G5-series: Automatically released when the axis moves in the direction oppo-
site to homing for the first time after homing.
Other Servo Drives: If a torque limit is used, release the torque limit when the axis
moves in the direction opposite to homing for the first time after
homing. Use the EC_CoESDOWrite (CoE SDO Write) instruction
to change the torque limit.
• An error will not occur and home is defined even if the holding time elapses after the home prox-
imity input signal is detected and before velocity reaches the homing approach velocity.
• Home is also defined if the holding time elapses after the home proximity input signal turns ON
before the homing approach velocity is reached.
Refer to Holding Operation for OMRON 1S-series Servo Drives on page 3-32 or Holding Opera-
tion for OMRON G5-series Servo Drives on page 3-33 for information on the holding operation.
ON
Home input signal
OFF
• Releasing the torque limit also differs between OMRON 1S-series as well as G5-series Servo
Drives and other Servo Drives.
1S-series, G5-series: Automatically released when the axis moves in the direction oppo-
site to homing for the first time after homing.
Other Servo Drives: If a torque limit is used, release the torque limit when the axis
moves in the direction opposite to homing for the first time after
homing. Use the EC_CoESDOWrite (CoE SDO Write) instruction
to change the torque limit.
• Home is also defined if the home input signal turns ON before the homing approach velocity is
reached after homing starts.
Execute
Busy
Done
CommandAborted
MC_Home
Error
ErrorID 16#0000
Homing
3
Homed (Home Defined)
Function
Command current position 5 0
1 The actual position where the home input signal was detected is latched and the axis stops
immediately.
2 After the immediate stop, the axis moves with absolute travel in the reverse direction to the posi-
tion that was latched in step 1.
ON
Home proximity input signal
OFF
ON
Home input signal
OFF
Velocity
Homing velocity
Actual position latch
Immediate stop Homing
compensation
Homing approach velocity velocity
Stops. Homing
compensation value
Start
Absolute travel to position where In-position check applied.
home input signal was detected
• Waiting for the in-position state is always performed for this instruction regardless of the setting of
the In-position Check Time axis parameter.
Be particularly careful when performing absolute travel to the home input signal detection position
if the In-position Check Time is set to 0 because the instruction will continue waiting for the in-
position status. Make sure that the signal is received within the in-position range. In-position wait-
ing is not performed for the homing compensation value operation even if the in-position check
time is set to 0. The status of in-position waiting can be checked with the InPosWaiting (In-position
Waiting) system-defined variable for motion control.
Homing Compensation
When you set a homing compensation value, the axis will move by the homing compensation value
after the home input is detected to define home. Adjusting the workpiece is sometimes difficult after
home has been defined in the mechanical system. You can use the homing compensation to fine-
tune the position of home after it is defined. The travel velocity at this time is the homing compensa-
tion velocity. The axis starts moving 500 ms after it stopped when the home input was detected.
The sign of the homing compensation value indicates the direction relative to the coordinate axis. If
it is negative, the axis moves in the negative direction.
ON
Home proximity input signal
OFF
ON
Home input signal
OFF
Velocity
Homing
Homing velocity compensation
velocity
Override Factors
Overrides are disabled for this instruction.
Additional Information
• The torque limits are continued even after a normal completion of homing.
• The torque limits are automatically released when an instruction that moves the axis in the
opposite direction is executed.
MC_Home
• Set the Torque Limit - Switch Selection to 2 to apply a torque limit in the home input detection
direction during the holding operation for homing and to use the torque limit directions and values
that are set with the MC_SetTorqueLimit instruction for other operation.
In that case, the values of the input variables to the MC_SetTorqueLimit instruction are ignored
during the holding operation for homing.
• If the Torque Limit - Switch Selection is set to 0, the values of the input variables to the MC_Set-
3
TorqueLimit instruction are always used. You must set torque limits that are suitable for both for
the holding operation during homing and for other operations.
Function
Torque Limit - Switch Selection (3330-01 hex)
2 0
Positive Homing The Torque Limit - Positive Torque The PositiveValue (Positive Torque
Torque Limit Limit Value 2 (3330-05 hex) for the Limit) for the MC_SetTorqueLimit
Servo Drive is used. instruction is used.
Operations The PositiveValue (Positive Torque
other than Limit) for the MC_SetTorqueLimit
Homing instruction is used.
Negative Homing The Torque Limit - Negative Torque The NegativeValue (Negative Torque
Torque Limit Limit Value 2 (3330-06 hex) for the Limit) for the MC_SetTorqueLimit
Servo Drive is used. instruction is used.
Operations The NegativeValue (Negative Torque
other than Limit) for the MC_SetTorqueLimit
Homing instruction is used.
Additional Information
• The torque limits are continued even after a normal completion of homing.
• The torque limits are automatically released when an instruction that moves the axis in the
opposite direction is executed.
For details on torque limits, refer to MC_SetTorqueLimit on page 3-323. For the settings for the G5-
series Servo Drive, refer to the AC Servomotors/Servo Drives G5-series with Built-in EtherCAT
Communications User’s Manual (Cat. No. I576) or the AC Servomotors/Servo Drives G5-series with
Built-in EtherCAT Communications Linear Motor Type User’s Manual (Cat. No. I577).
Timing Charts
The following charts show the timing of homing.
No Homing Compensation
Execute
Busy
Done
MC_Home
CommandAborted
Error
ErrorID 16#0000 3
Homing
Function
Homed (Home Defined)
Velocity
Time
Busy
Done
CommandAborted
Error
ErrorID 16#0000
Homing
Velocity
Time
Busy
Done
CommandAborted
Error
ErrorID 16#0000
Homing
Velocity
Time
Done
Busy
CommandAborted
Error
Homing
Velocity
Time
MC_Home
Control User’s Manual (Cat. No. W559).
Error Codes
Refer to A-1 Error Codes for instruction errors. 3
Function
MC_HomeWithParameter
The MC_HomeWithParameter instruction sets the homing parameter and operates the motor to determine
home. It uses the limit signals, home proximity signal, and home signal.
FB/
Instruction Name Graphic expression ST expression
FUN
MC_HomeWith Home with FB MC_HomeWithParameter_instance MC_HomeWithParameter
Parameter Parameters _instance (
MC_HomeWithParameter Axis :=parameter,
Axis Axis
HomingParameter :=parameter,
HomingParameter HomingParameter Execute :=parameter,
Execute Done Done =>parameter,
Busy Busy =>parameter,
CommandAborted CommandAborted =>parameter,
Error Error =>parameter,
ErrorID ErrorID =>parameter,
);
Version Information
A CPU Unit with unit version 1.03 or later and Sysmac Studio version 1.04 or higher are required
to use this instruction.
Variables
Input Variables
Output Variables
MC_HomeWithParameter
• When Error changes to TRUE.
• When CommandAborted changes to TRUE.
CommandAborted • When this instruction is aborted because another • When Execute is TRUE and changes to
motion control instruction was executed with the FALSE.
Buffer Mode set to Aborting. • After one period when Execute is FALSE.
• When this instruction is canceled due to an error.
• When this instruction is executed while there is an
error.
• When you start this instruction during MC_Stop
instruction execution. 3
Error When there is an error in the execution conditions or When the error is cleared.
input parameters for the instruction.
Variables
In-Out Variables
_sHOMING_REF
Name Meaning Data type Valid range Function
Homing Homing _eMC_ 0: _mcHomeSwTurn Specify the new setting of the Homing
Mode Method HOMING_ HomeSwOff Method.
MODE 1: _mcHomeSwTurn 0: Proximity reverse turn/home proximity
HomeSwOn input OFF
4:_mcHomeSwOff 1: Proximity reverse turn/home proximity
5:_mcHomeSwOn input ON
8:_mcLimitInputOff 4: Home proximity input OFF
9:_mcHomeSwTurn 5: Home proximity input ON
HomeMask 8: Limit input OFF
11:_mcLimitInputOnly 9: Proximity reverse turn/home input mask
12:_mcHomeSwTurn distance
HoldingTime 11: Limit inputs only
13:_mcNoHomeSw 12: Proximity reverse turn/holding time
HoldingHomeInput 13: No home proximity input/holding home
14:_mcHomePreset input
14: Zero position preset
HomeInput Home Input _eMC_ 0:_mcZPhase Select the input to use for the home input sig-
Signal HOME_ 1:_mcExternalSignal nal.
INPUT 0: Use the Z-phase input as home.
1: Use external home input. *1
MC_HomeWithParameter
to within the range of 40-bit data for pulses.
The unit is command units.*2
PushTime Homing UINT 0 to 10,000 Set the holding time when you set the Hom-
Holding Time ing Operation Mode to the proximity reverse
turn/holding time.
The unit is milliseconds.
Compensation Homing LREAL Negative number, positive Set the homing compensation value that is
Compensa- number, or 0 applied after the home is defined.
tion Value In Rotary Mode, set the homing compensa-
tion value so that the absolute value of the 3
homing compensation value is less than the
absolute value of the difference between the
Function
modulo maximum position and modulo mini-
mum position. Also set the value to within the
range of 40-bit data for pulses.
The unit is command units.*2
Compensa- Homing LREAL Positive number Set the velocity to use for homing compensa-
tionVel Compensa- tion.
tion Velocity Set the value to less than the maximum
velocity.
The unit is command units/s.*2
*1 This setting can be used for an OMRON 1S-series Servo Drive and G5-series Servo Drive. The input allocated to latch 1
for the Servo Drive is used as the external home input. In the default setting of the OMRON 1S-series Servo Drives and
G5-series Servo Drives, the external latch input 1 is allocated to latch 1.
For details, refer to the AC Servomotors/Servo Drives 1S-series with Built-in EtherCAT Communications User’s Manual
(Cat. No. I586), AC Servomotors/Servo Drives G5-series with Built-in EtherCAT Communications User’s Manual (Cat. No.
I576) or the AC Servomotors/Servo Drives G5-series with Built-in EtherCAT Communications Linear Motor Type User’s
Manual (Cat. No. I577).
*2 Refer to Unit Conversion Settings in the NJ/NX-series CPU Unit Motion Control User’s Manual (Cat. No. W507) or NY-
series Industrial Panel PC / Industrial Box PC Motion Control User’s Manual (Cat. No. W559) for information on command
units.
Function
• Homing starts when Execute changes to TRUE for the axis specified in Axis.
• Set the parameters used by the HomeWithParameter instruction in the HomingParameter in-out vari-
able.
• The axis parameters are not changed when this instruction is executed.
• The only difference between this instruction and the MC_Home instruction is how the parameters are
set. For this instruction, the parameters are set in the HomingParameter in-out variable. For the
MC_Home instruction, the parameters are set in the Homing Settings of the axis parameters in the
Sysmac Studio.
Refer to MC_Home on page 3-16 for all instruction specifications except for how to set the parameters.
The following table shows the homing parameters that are used for each homing method.
(Yes: Parameter is used, No: Parameter is not used.)
Home Input Signal Homing parameter
Homing Velocity
Homing Acceleration
Homing Deceleration
Homing Jerk
Home Offset
Proximity reverse turn/home Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes No Yes No Yes Yes
proximity input OFF
Proximity reverse turn/home Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes No Yes No Yes Yes
proximity input ON
Home proximity input OFF Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes No Yes No Yes Yes
Home proximity input ON Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes No Yes No Yes Yes
Limit input OFF Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes No Yes No Yes Yes
Proximity reverse turn/home Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes No Yes Yes
input mask distance
Limit inputs only No Yes Yes Yes Yes Yes Yes Yes Yes Yes No Yes No Yes Yes
Proximity reverse turn/hold- No Yes Yes Yes Yes Yes Yes Yes Yes Yes No Yes Yes Yes Yes
ing time
No home proximity Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes No Yes No Yes Yes
input/holding home input
Zero position preset No No No No No No No No No No No Yes No No No
Additional Information
If you use NX-series Position Interface Units, do not select holding for the Homing Operation
Mode. Refer to the NX-series Position Interface Units User’s Manual (Cat. No. W524) for details.
MC_HomeWithParameter
Error Codes
Refer to A-1 Error Codes for instruction errors.
Function
MC_Move
The MC_Move instruction performs absolute positioning or relative positioning.
Instruction Name FB/FUN Graphic expression ST expression
MC_Move Positioning FB MC_Move_instance MC_Move_instance (
Axis :=parameter,
MC_Move Execute :=parameter,
Axis Axis
Position :=parameter,
Execute Done
Velocity :=parameter,
Position Busy
Acceleration :=parameter,
Velocity Active
Deceleration :=parameter,
Acceleration Command Aborted
Jerk :=parameter,
Deceleration Error
Direction :=parameter,
Jerk ErrorID BufferMode :=parameter,
Direction MoveMode :=parameter,
BufferMode Done =>parameter,
MoveMode Busy =>parameter,
Active =>parameter,
CommandAborted
=>parameter,
Error =>parameter,
ErrorID =>parameter
);
Variables
Input Variables
MC_Move
BufferMode Buffer Mode _eMC_BUFFER 0: _mcAborting 0*3 Specifies the operation when
Selection _ MODE 1: _mcBuffered executing more than one
2: _mcBlendingLow motion instruction.
3: _mcBlendingPrevious 0: Aborting
4: _mcBlendingNext 1: Buffered
5: _mcBlendingHigh 2: Blending low 3
3: Blending previous
4: Blending next
5: Blending high
Variables
MoveMode Travel Mode _eMC_MOVE_ 0: _mcAbsolute 0*3 Select the travel method.
MODE 1: _mcRelative 0: Absolute positioning
1: Relative positioning
*1 Refer to Unit Conversion Settings in the NJ/NX-series CPU Unit Motion Control User's Manual (Cat. No. W507) or NY-
series Industrial Panel PC / Industrial Box PC Motion Control User’s Manual (Cat. No. W559) for information on command
units.
*2 Always set the target velocity. A Target Velocity Setting Out of Range error (error code: 5422 hex) occurs when the
instruction is executed if the target velocity is not set.
*3 The default value for an enumeration variable is actually not the number, but the enumerator.
*4 When MoveMode is set to relative positioning, the travel direction is determined by the sign of the position.
Output Variables
Name Meaning Data type Valid range Description
Done Done BOOL TRUE or FALSE TRUE when the instruction is completed.
Busy Executing BOOL TRUE or FALSE TRUE when the instruction is acknowledged.
Active Controlling BOOL TRUE or FALSE TRUE when the axis is being controlled.
CommandAborted Command BOOL TRUE or FALSE TRUE when the instruction is aborted.
Aborted
Error Error BOOL TRUE or FALSE TRUE while there is an error.
ErrorID Error Code WORD * Contains the error code when an error occurs.
A value of 16#0000 indicates normal execution.
In-Out Variables
* Specify a user-defined Axis Variable that was created in the Axis Basic Settings of the Sysmac Studio (default: MC_Axis***)
or a system-defined axis variable name (_MC_AX[*], _MC1_AX[*], or _MC2_AX[*]).
Function
• You can use the MC_Move instruction to perform absolute positioning or relative positioning.
• If you specify absolute positioning for MoveMode (Travel Mode), the operation is the same as for the
MC_MoveAbsolute (Absolute Positioning) instruction. If you specify relative positioning for Move-
Mode (Travel Mode), the operation is the same as the MC_MoveRelative (Relative Positioning)
instruction.
• If relative positioning is used, Direction is not used.
• For details, refer to MC_MoveAbsolute on page 3-49 or MC_MoveRelative on page 3-76.
Instruction Details
This section describes the instruction in detail.
In-position Check
An in-position check is performed for this instruction according to the settings in In-position Range
MC_Move
and In-position Check Time axis parameters.
Function
ing the motion control instruction. For details on re-execution of motion control instructions, refer to the
NJ/NX-series CPU Unit Motion Control User’s Manual (Cat. No. W507) or NY-series Industrial Panel PC
/ Industrial Box PC Motion Control User’s Manual (Cat. No. W559).
For details on BufferMode (Buffer Mode Selection), refer to the NJ/NX-series CPU Unit Motion Con-
trol User's Manual (Cat. No. W507) or NY-series Industrial Panel PC / Industrial Box PC Motion Con-
trol User’s Manual (Cat. No. W559).
Errors
Timing Chart When Error Occurs
If an error occurs during instruction execution, Error will change to TRUE and the axis will stop. You
can find out the cause of the error by referring to the value output by ErrorID (Error Code).
Execute
Done
Busy
Active
CommandAborted
Error
Error Codes
Refer to A-1 Error Codes for instruction errors.
MC_MoveAbsolute
The MC_MoveAbsolute instruction moves the axis to a specified absolute target position.
FB/
Instruction Name Graphic expression ST expression
FUN
MC_MoveAbsolute
MC_MoveAbsolute Absolute FB MC_MoveAbsolute_instance MC_MoveAbsolute_instance (
Positioning Axis :=parameter,
MC_MoveAbsolute Execute :=parameter,
Axis Axis
Position :=parameter,
Execute Done
Velocity :=parameter,
Position Busy
Acceleration :=parameter,
Velocity Active
Deceleration :=parameter,
Acceleration CommandAborted
Jerk :=parameter,
Deceleration Error Direction :=parameter,
Jerk ErrorID BufferMode :=parameter,
3
Direction Done =>parameter,
BufferMode Busy =>parameter,
Variables
Active =>parameter,
CommandAborted
=>parameter,
Error =>parameter,
ErrorID =>parameter
);
Variables
Input Variables
*1 Refer to Unit Conversion Settings in the NJ/NX-series CPU Unit Motion Control User's Manual (Cat. No. W507) or NY-
series Industrial Panel PC / Industrial Box PC Motion Control User’s Manual (Cat. No. W559) for information on command
units.
*2 Always set the target velocity. If the axis is moved without setting a target velocity, an error will occur.
*3 The default value for an enumeration variable is actually not the number, but the enumerator.
Output Variables
Name Meaning Data type Valid range Description
Done Done BOOL TRUE or FALSE TRUE when the instruction is completed.
Busy Executing BOOL TRUE or FALSE TRUE when the instruction is acknowledged.
Active Controlling BOOL TRUE or FALSE TRUE when the axis is being controlled.
CommandAborted Command BOOL TRUE or FALSE TRUE when the instruction is aborted.
Aborted
Error Error BOOL TRUE or FALSE TRUE while there is an error.
ErrorID Error Code WORD * Contains the error code when an error occurs.
A value of 16#0000 indicates normal execution.
* Refer to A-1 Error Codes.
MC_MoveAbsolute
• When you start this instruction during
MC_Stop instruction execution.
Error When there is an error in the execution con- When the error is cleared.
ditions or input parameters for the instruc-
tion.
In-Out Variables 3
Function
Axis Axis _sAXIS_REF --- Specify the axis.*
* Specify a user-defined Axis Variable that was created in the Axis Basic Settings of the Sysmac Studio (default: MC_Axis***)
or a system-defined axis variable name (_MC_AX[*], _MC1_AX[*], or _MC2_AX[*]).
Function
• The absolute target position is specified to perform positioning.
• Absolute positioning starts when Execute changes to TRUE.
• You can execute this instruction even if home is not defined.
• You can specify the Velocity (Target Velocity), Acceleration (Acceleration Rate), Deceleration (Decel-
eration Rate), and Jerk as input variables.
The following chart shows an operation example of absolute positioning.
Velocity
Target
velocity Acceleration Deceleration
Time
0 Command current Target distance
position
When the Acceleration (Acceleration Rate) or Deceleration (Deceleration Rate) is 0 and the instruction
is executed, the axis will reach the target velocity without accelerating or decelerating.
The following chart shows an operation example of when the acceleration rate is 0.
Velocity
Target
velocity Deceleration
Time
0 Command current Target position
position
Specify Jerk when you want to accelerate or decelerate smoothly. The following chart shows an opera-
tion example when Jerk is specified.
Velocity
Target
velocity
Time
0 Command current Target position
position
For details on Jerk, refer to the NJ/NX-series CPU Unit Motion Control User’s Manual (Cat. No. W507)
or NY-series Industrial Panel PC / Industrial Box PC Motion Control User’s Manual (Cat. No. W559).
When the positioning is started with Position (Target Position) set to the command current position, the
axis will not move but Done will change to TRUE.
Instruction Details
This section describes the instruction in detail.
Direction
Direction specifies the direction for starting positioning when the Count Mode is Rotary Mode. Direc-
tion is not used if the Count Mode is Linear Mode. Positioning starts in the positive direction towards
the target position when the positive direction is specified for Direction. The following chart shows an
operation example when positioning starts with a command position of 50 and moves toward −20.
Modulo maximum
position setting Command current
value: 100 position: 50
Modulo minimum
position setting
value: −70 Moves in positive direction.
Positioning starts in the negative direction towards the target position when the negative direction is
specified for Direction. The following chart shows an operation example when positioning starts with
a command position of 50 and moves toward −20.
Modulo maximum
position setting
Command current
value: 100
position: 50
MC_MoveAbsolute
Target position: Target position:
−20 −20
0
Modulo minimum
position setting
value: −70 Moves in negative direction. 3
Positioning starts towards the target position within the ring counter range when No direction is
Function
specified for Direction. Therefore, the size relationship between the command current position and
the target position determines the direction of travel.
The following chart shows an operation example when positioning starts with a command position of
50 and moves toward −20.
Modulo maximum
position setting Command current
value: 100 position: 50
Modulo minimum
position setting
Moves towards the ring
value: −70
counter range.
When No direction is specified for Direction, you can specify a Position (Target Position) outside the
range specified by the modulo maximum position and modulo minimum position setting values.
When Position (Target Position) is outside the range specified by the modulo maximum position and
modulo minimum position setting values, positioning is performed using the travel distance exceed-
ing the modulo maximum position setting value as a relative distance. This allows positioning of mul-
tiple ring rotations. Positioning is the same when Position (Target Position) is below the modulo
minimum position setting value as well. The following chart shows an operation example for when
the command current position is −20 and Position (Target Position) is 290.
Modulo maximum
position setting
value: 100
Modulo minimum
position setting
value: −70
190
Performs relative positioning with the target distance as
(290 (Target position) − 100 (Upper limit)) = 190.
When the shortest way is specified for Direction, positioning starts in the direction with the shortest
distance between the command current position and the target position. The following chart shows
an operation example when positioning starts with a command position of 50 and moves toward
−20.
Modulo maximum
position setting Command current
value: 100 position: 50
Modulo minimum
position setting
value: −70 Moves in the direction with
the shortest travel distance.
Movement is in the same direction as the current direction if the travel distance is the same in the
positive and the negative direction.
MC_MoveAbsolute
for Direction, you can specify a Position (Target Position) outside the range specified by the
modulo maximum position and modulo minimum position setting values.
• If the current direction is specified for Direction, operation is in the same command direction as
the previous motion. Therefore, depending on the instructions that are used together, the
direction may not be the same as the direction that was specified with the input to the motion
control instruction for the previous motion. When you specify the current direction, check the
current direction with Dir.Posi (Positive Direction) and Dir.Nega (Negative Direction) in the Axis
Variable.
3
In-position Check
Function
An in-position check is performed for this instruction according to the settings in In-position Range
and In-position Check Time axis parameters.
Timing Charts
• Busy (Executing) changes to TRUE at the same time as Execute changes to TRUE. Active (Con-
trolling) changes to TRUE in the next period.
• Done changes to TRUE when Position (Target Position) is reached and positioning is completed.
• If another instruction aborts this instruction, CommandAborted changes to TRUE and Busy (Execut-
ing) and Active (Controlling) change to FALSE.
Execute
Done
Busy
Active
CommandAborted
Error
ErrorID 16#0000
Velocity Multi-execution of
another instruction
Time
For details on re-execution of motion control instructions, refer to the NJ/NX-series CPU Unit Motion
Control User’s Manual (Cat. No. W507) or NY-series Industrial Panel PC / Industrial Box PC Motion
Control User’s Manual (Cat. No. W559).
MC_MoveAbsolute
axis parameter.
Buffered Buffers this instruction and executes it automatically after the current
instruction is completed.
Blending Starts the buffered instruction at the velocity (transit velocity) at which the
current instruction reaches the target position. The operation of the current
instruction is changed so that the axes reach the target position at the tran-
sit velocity. There are four methods to specify the transit velocity. These are
described below. 3
Blending low The lower of the target velocities of the current instruction and the buffered
instruction is used as the transit velocity.
Function
Blending previous The target velocity of the current instruction is used as the transit velocity.
Blending next The target velocity of the buffered instruction is used as the transit velocity.
Blending high The higher of the target velocities of the current instruction and the buffered
instruction is used as the transit velocity.
For details on BufferMode (Buffer Mode Selection), refer to the NJ/NX-series CPU Unit Motion Con-
trol User's Manual (Cat. No. W507) or NY-series Industrial Panel PC / Industrial Box PC Motion Con-
trol User’s Manual (Cat. No. W559).
Errors
If an error occurs during instruction execution, Error will change to TRUE and the axis will stop. You can
find out the cause of the error by referring to the value output by ErrorID (Error Code).
Done
Busy
Active
CommandAborted
Error
Error Codes
Refer to A-1 Error Codes for instruction errors.
Sample Programming 1
This section shows sample programming for positioning by periodic multi-execution of instructions.
Parameter Settings
The minimum settings required for this sample programming are given below.
MC_MoveAbsolute
Setting Axis Parameters
Axis Type
Sample Programming 1
Axis Count Mode
Axis 1 Linear Mode
Unit of Display
Operation Example
In this sample, BufferMode (Buffer Mode Selection) is set to Buffered for MC_MoveAbsolute (Absolute
Positioning) instructions and the axis is moved to the final target position by executing multiple instruc-
tions.
When the axis reaches the final target position, it is returned to home with the MC_ZeroPosition (High-
speed Home) instruction.
Multi-execution of instructions is performed when the Active (Controlling) output variable from the previ-
ous instruction is TRUE. For single-axis operation, multi-execution is possible for only one instruction.
Operation Pattern
Multi-execution of Multi-execution of Multi-execution of
instructions instructions instructions
Operation started. Operation started. Operation started. Operation started.
Velocity (mm/s)
30.00
20.00
10.00
(2) (3)
(1)
Positive direction
0
50.00 100.00 200.00 Axis 1 (mm)
(4)
250.00
High-speed Home instruction executed.
Ladder Diagram
Main Variables
Timing Chart
Pwr_Status
Hm_D
Hm_Bsy
Mv_Abs1_D
Mv_Abs1_Bsy
Mv_Abs1_Act
Mv_Abs2_D
Mv_Abs2_Bsy
Mv_Abs2_Act
Mv_Abs3_D
Mv_Abs3_Bsy
Mv_Abs3_Act
Mv_Zero_D
Mv_Zero_Bsy
Mv_Zero_Act
Sample Programming
If StartPg is TRUE, check that the Servo Drive is ready.
StartPg MC_Axis000.DrvStatus.ServoReady Lock1
MC_MoveAbsolute
MC_Power
Lock1 MC_Axis000 Axis Axis Pwr_Status
Enable Status
Busy Pwr_Bsy
Error Pwr_Err
ErrorID Pwr_ErrID
If a minor fault level error occurs for axis 1, the error handler for the device (FaultHandler) is executed. 3
Program the FaultHandler according to the device.
MC_Axis000.MFaultLvl.Active FaultHandler
Sample Programming 1
EN FaultHandler
If the Servo is ON and home is not defined, the Home instruction is executed.
HM
MC_Home
Pwr_Status MC_Axis000.Details.Homed MC_Axis000 Axis Axis Hm_D
Execute Done
Busy Hm_Bsy
CommandAborted Hm_Ca
Error Hm_Err
ErrorID Hm_ErrID
After absolute positioning 1 is started, absolute positioning 2 is started with multi-execution of instructions.
MV_ABS2
MC_MoveAbsolute
Mv_Abs1_Act MC_Axis000 Axis Axis Mv_Abs2_D
Execute Done
LREAL#100.0 Position Busy Mv_Abs2_Bsy
LREAL#20.0 Velocity Active Mv_Abs2_Act
LREAL#1000.0 Acceleration CommandAborted Mv_Abs2_Ca
LREAL#1000.0 Deceleration Error Mv_Abs2_Err
Jerk ErrorID Mv_Abs2_ErrID
_eMC_DIRECTION#_mcNoDirection Direction
_eMC_BUFFER_MODE#_mcBuffered BufferMode
After absolute positioning 2 is started, absolute positioning 3 is started with multi-execution of instructions.
MV_ABS3
MC_MoveAbsolute
Mv_Abs2_Act MC_Axis000 Axis Axis Mv_Abs3_D
Execute Done
LREAL#200.0 Position Busy Mv_Abs3_Bsy
LREAL#30.0 Velocity Active Mv_Abs3_Act
LREAL#1000.0 Acceleration CommandAborted Mv_Abs3_Ca
LREAL#1000.0 Deceleration Error Mv_Abs3_Err
Jerk ErrorID Mv_Abs3_ErrID
_eMC_DIRECTION#_mcNoDirection Direction
_eMC_BUFFER_MODE#_mcBuffered BufferMode
Main Variables
Timing Chart
Pwr_Status
Hm_Ex
Hm_D
Hm_Bsy
Mv_Abs1_Ex
MC_MoveAbsolute
Mv_Abs1_D
Mv_Abs1_Bsy
Mv_Abs1_Act
Mv_Abs2_Ex
Mv_Abs2_D
Mv_Abs2_Bsy 3
Mv_Abs2_Act
Mv_Abs3_Ex
Sample Programming 1
Mv_Abs3_D
Mv_Abs3_Bsy
Mv_Abs3_Act
Mv_Zero_Ex
Mv_Zero_D
Mv_Zero_Bsy
Mv_Zero_Act
Sample Programming
// Processing when input parameters are not set
IF InitFlag = FALSE THEN
// MV_ABS1 parameters
Mv_Abs1_Pos := LREAL#50.0;
Mv_Abs1_Vel := LREAL#10.0;
Mv_Abs1_Acc := LREAL#1000.0;
Mv_Abs1_Dec := LREAL#1000.0;
Mv_Abs1_Dir := _eMC_DIRECTION#_mcNoDirection;
// MV_ABS2 parameters
Mv_Abs2_Pos := LREAL#100.0;
Mv_Abs2_Vel := LREAL#20.0;
Mv_Abs2_Acc := LREAL#1000.0;
Mv_Abs2_Dec := LREAL#1000.0;
Mv_Abs2_Dir := _eMC_DIRECTION#_mcNoDirection;
Mv_Abs2_Bm := _eMC_BUFFER_MODE#_mcBuffered;
// MV_ABS3 parameters
Mv_Abs3_Pos := LREAL#200.0;
Mv_Abs3_Vel := LREAL#30.0;
Mv_Abs3_Acc := LREAL#1000.0;
Mv_Abs3_Dec := LREAL#1000.0;
Mv_Abs3_Dir := _eMC_DIRECTION#_mcNoDirection;
Mv_Abs3_Bm := _eMC_BUFFER_MODE#_mcBuffered;
// MV_ZERO parameters
Mv_Zero_Vel := LREAL#250;
Mv_Zero_Acc := LREAL#1000.0;
Mv_Zero_Dec := LREAL#1000.0;
Mv_Zero_Bm := _eMC_BUFFER_MODE#_mcBuffered;
END_IF;
// If StartPg is TRUE and the Servo Drive is ready, the Servo is turned ON.
// If the Servo Drive is not ready, the Servo is turned OFF.
IF (StartPg=TRUE)
AND (MC_Axis000.DrvStatus.Ready=TRUE) THEN
Pwr_En:=TRUE;
ELSE
Pwr_En:=FALSE;
END_IF;
// If the Servo is ON and home is not defined, the Home instruction is executed.
IF (Pwr_Status=TRUE) AND (MC_Axis000.Details.Homed=FALSE) THEN
Hm_Ex:=TRUE;
END_IF;
//MC_Power
PWR(
Axis := MC_Axis000,
Enable := Pwr_En,
Status => Pwr_Status,
Busy => Pwr_Bsy,
Error => Pwr_Err,
ErrorID => Pwr_ErrID
);
MC_MoveAbsolute
//MC_Home
HM(
Axis := MC_Axis000,
Execute := Hm_Ex,
Done => Hm_D,
Busy => Hm_Bsy,
CommandAborted => Hm_Ca,
Error => Hm_Err, 3
ErrorID => Hm_ErrID
);
Sample Programming 1
//MC_MoveAbsolute
MV_ABS1(
Axis := MC_Axis000,
Execute := Mv_Abs1_Ex,
Position := Mv_Abs1_Pos,
Velocity := Mv_Abs1_Vel,
Acceleration := Mv_Abs1_Acc,
Deceleration := Mv_Abs1_Dec,
Direction := Mv_Abs1_Dir,
Done => Mv_Abs1_D,
Busy => Mv_Abs1_Bsy,
Active => Mv_Abs1_Act,
CommandAborted => Mv_Abs1_Ca,
Error => Mv_Abs1_Err,
ErrorID => Mv_Abs1_ErrID
);
MV_ABS2(
Axis := MC_Axis000,
Execute := Mv_Abs2_Ex,
Position := Mv_Abs2_Pos,
Velocity := Mv_Abs2_Vel,
Acceleration := Mv_Abs2_Acc,
Deceleration := Mv_Abs2_Dec,
Direction := Mv_Abs2_Dir,
BufferMode := Mv_Abs2_Bm,
Done => Mv_Abs2_D,
Busy => Mv_Abs2_Bsy,
Active => Mv_Abs2_Act,
CommandAborted => Mv_Abs2_Ca,
Error => Mv_Abs2_Err,
ErrorID => Mv_Abs2_ErrID
);
MV_ABS3(
Axis := MC_Axis000,
Execute := Mv_Abs3_Ex,
Position := Mv_Abs3_Pos,
Velocity := Mv_Abs3_Vel,
Acceleration := Mv_Abs3_Acc,
Deceleration := Mv_Abs3_Dec,
Direction := Mv_Abs3_Dir,
BufferMode := Mv_Abs3_Bm,
Done => Mv_Abs3_D,
Busy => Mv_Abs3_Bsy,
Active => Mv_Abs3_Act,
CommandAborted => Mv_Abs3_Ca,
Error => Mv_Abs3_Err,
ErrorID => Mv_Abs3_ErrID
);
//MC_MoveZeroPosition
MV_ZERO(
Axis := MC_Axis000,
Execute := Mv_Zero_Ex,
Velocity := Mv_Zero_Vel,
Acceleration := Mv_Zero_Acc,
Deceleration := Mv_Zero_Dec,
BufferMode := Mv_Zero_Bm,
Done => Mv_Zero_D,
Busy => Mv_Zero_Bsy,
Active => Mv_Zero_Act,
CommandAborted => Mv_Zero_Ca,
Error => Mv_Zero_Err,
ErrorID => Mv_Zero_ErrID
);
Sample Programming 2
In this sample, when the Count Mode is set to Rotary Mode and positioning is performed toward the tar-
get position, the shortest direction, clockwise or counterclockwise, is automatically determined and
positioning is performed.
This section shows sample programming for shortest-way control of the rotation direction of a tool
changer.
MC_MoveAbsolute
Parameter Settings
The minimum settings required for this sample programming are given below.
Axis Type 3
Axis Axis Type
Axis 1 Servo axis
Sample Programming 2
Count Mode
Axis Count Mode
Axis 1 Rotary Mode
Ring Counter
Modulo maximum Modulo minimum
Axis
position position
Axis 1 360 0
Unit of Display
Axis Unit of Display
Axis 1 degree
Operation Example
In this sample, multi-execution of absolute positioning instructions is used to position in a range of 0° to
360°. The actual position returns to 0° once it exceeds the range of 0° to 360°.
Multi-execution of instructions is performed when the Active (Controlling) output variable from the previ-
ous instruction is TRUE. For single-axis operation, multi-execution is possible for only one instruction.
In this sample, multi-execution of instructions is executed with BufferMode (Buffer Mode Selection) set
to Buffered.
0°
360°
290° 300°
90°
120°
180°
Shortest-way positioning is performed.
If you specify 0° (home), 90°, 120°, or 290°, the axis will move to that position. The rotation direction
in this instance is in the shorter rotation direction. The travel velocity is 250°/s.
The sample programming performs positioning with a shortest way specification from 290° to 90° to
120° and then to home (0°).
Ladder Diagram
Main Variables
Timing Chart
Pwr_Status
Hm_D
Hm_Bsy
Mv_Abs1_D
Mv_Abs1_Bsy
Mv_Abs1_Act
Mv_Abs2_D
Mv_Abs2_Bsy
Mv_Abs2_Act
Mv_Abs3_D
Mv_Abs3_Bsy
Mv_Abs3_Act
Mv_Abs4_D
Mv_Abs4_Bsy
Mv_Abs4_Act
Command velocity
MC_Axis000
Time
Sample Programming
If StartPg is TRUE, check that the Servo Drive is ready.
StartPg MC_Axis000.DrvStatus.Ready Lock1
MC_MoveAbsolute
MC_Power
Lock1 MC_Axis000 Axis Axis Pwr_Status
Enable Status
Busy Pwr_Bsy
Error Pwr_Err
ErrorID Pwr_ErrID
If a minor fault level error occurs for axis 1, the error handler for the device (FaultHandler) is executed. 3
Program the FaultHandler according to the device.
MC_Axis000.MFaultLvl.Active FaultHandler
Sample Programming 2
EN FaultHandler
If the Servo is ON and home is not defined, the Home instruction is executed.
HM
MC_Home
Pwr_Status MC_Axis000.Details.Homed MC_Axis000 Axis Axis Hm_D
Execute Done
Busy Hm_Bsy
CommandAborted Hm_Ca
Error Hm_Err
ErrorID Hm_ErrID
Absolute positioning 2 is executed with multi-execution of instructions to move from 290.0° to 90.0°.
The shortest way is used for the motion direction.
MV_ABS2
MC_MoveAbsolute
Mv_Abs1_Act MC_Axis000 Axis Axis Mv_Abs2_D
Execute Done
LREAL#90.0 Position Busy Mv_Abs2_Bsy
LREAL#250.0 Velocity Active Mv_Abs2_Act
LREAL#1000.0 Acceleration CommandAborted Mv_Abs2_Ca
LREAL#1000.0 Deceleration Error Mv_Abs2_Err
Jerk ErrorID Mv_Abs2_ErrID
_eMC_DIRECTION#_mcShortestWay Direction
_eMC_BUFFER_MODE#_mcBuffered BufferMode
Absolute positioning 3 is executed with multi-execution of instructions to move from 90.0° to 120.0°.
The shortest way is used for the motion direction.
MV_ABS3
MC_MoveAbsolute
Mv_Abs2_Act MC_Axis000 Axis Axis Mv_Abs3_D
Execute Done
LREAL#120.0 Position Busy Mv_Abs3_Bsy
LREAL#250.0 Velocity Active Mv_Abs3_Act
LREAL#1000.0 Acceleration CommandAborted Mv_Abs3_Ca
LREAL#1000.0 Deceleration Error Mv_Abs3_Err
Jerk ErrorID Mv_Abs3_ErrID
_eMC_DIRECTION#_mcShortestWay Direction
_eMC_BUFFER_MODE#_mcBuffered BufferMode
Absolute positioning 4 is executed with multi-execution of instructions to move from 120.0° to 0.0°.
The shortest way is used for the motion direction.
MV_ABS4
MC_MoveAbsolute
Mv_Abs3_Act MC_Axis000 Axis Axis Mv_Abs4_D
Execute Done
LREAL#0.0 Position Busy Mv_Abs4_Bsy
LREAL#250.0 Velocity Active Mv_Abs4_Act
LREAL#1000.0 Acceleration CommandAborted Mv_Abs4_Ca
MC_MoveAbsolute
LREAL#1000.0 Deceleration Error Mv_Abs4_Err
Jerk ErrorID Mv_Abs4_ErrID
_eMC_DIRECTION#_mcShortestWay Direction
_eMC_BUFFER_MODE#_mcBuffered BufferMode
Sample Programming 2
Name Data type Default Comment
MC_Axis000 _sAXIS_REF --- Axis Variable for axis 1.
MC_Axis000.MFaultLvl.Active BOOL FALSE TRUE while there is a minor fault level error for
axis 1.
MC_Axis000.Details.Homed BOOL FALSE TRUE when home is defined for axis 1.
Pwr_Status BOOL FALSE This variable is assigned to the Status output
variable from the PWR instance of the MC_Power
instruction. This variable changes to TRUE when
the Servo is turned ON.
StartPg BOOL FALSE The Servo is turned ON if this variable is TRUE
and EtherCAT process data communications are
established.
Hm_Ex BOOL FALSE The HM instance of MC_Home is executed when
this variable changes to TRUE.
Mv_Abs1_Ex BOOL FALSE The MV_ABS1 instance of MC_MoveAbsolute is
executed when this variable changes to TRUE.
Mv_Abs2_Ex BOOL FALSE The MV_ABS2 instance of MC_MoveAbsolute is
executed when this variable changes to TRUE.
Mv_Abs3_Ex BOOL FALSE The MV_ABS3 instance of MC_MoveAbsolute is
executed when this variable changes to TRUE.
Mv_Abs4_Ex BOOL FALSE The MV_ABS4 instance of MC_MoveAbsolute is
executed when this variable changes to TRUE.
InitFlag BOOL FALSE This variable indicates if it is necessary to set the
input parameters. Input parameters are set when
this variable is FALSE. When setting the input
parameters is completed, this variable changes to
TRUE.
Timing Chart
Pwr_Status
Hm_Ex
Hm_D
Hm_Bsy
Mv_Abs1_Ex
Mv_Abs1_D
Mv_Abs1_Bsy
Mv_Abs1_Act
Mv_Abs2_Ex
Mv_Abs2_D
Mv_Abs2_Bsy
Mv_Abs2_Act
Mv_Abs3_Ex
Mv_Abs3_D
Mv_Abs3_Bsy
Mv_Abs3_Act
Mv_Abs4_Ex
Mv_Abs4_D
Mv_Abs4_Bsy
Mv_Abs4_Act
Command velocity
MC_Axis000
Time
Sample Programming
// Processing when input parameters are not set
IF InitFlag = FALSE THEN
// MV_ABS1 parameters
Mv_Abs1_Pos := LREAL#290.0;
Mv_Abs1_Vel := LREAL#250.0;
Mv_Abs1_Acc := LREAL#1000.0;
Mv_Abs1_Dec := LREAL#1000.0;
Mv_Abs1_Dir := _eMC_DIRECTION#_mcShortestWay;
// MV_ABS2 parameters
Mv_Abs2_Pos := LREAL#90.0;
Mv_Abs2_Vel := LREAL#250.0;
Mv_Abs2_Acc := LREAL#1000.0;
Mv_Abs2_Dec := LREAL#1000.0;
Mv_Abs2_Dir := _eMC_DIRECTION#_mcShortestWay;
Mv_Abs2_Bm := _eMC_BUFFER_MODE#_mcBuffered;
// MV_ABS3 parameters
Mv_Abs3_Pos := LREAL#120.0;
Mv_Abs3_Vel := LREAL#250.0;
Mv_Abs3_Acc := LREAL#1000.0;
Mv_Abs3_Dec := LREAL#1000.0;
Mv_Abs3_Dir := _eMC_DIRECTION#_mcShortestWay;
Mv_Abs3_Bm := _eMC_BUFFER_MODE#_mcBuffered;
// MV_ABS4 parameters
Mv_Abs4_Pos := LREAL#0.0;
Mv_Abs4_Vel := LREAL#250.0;
MC_MoveAbsolute
Mv_Abs4_Acc := LREAL#1000.0;
Mv_Abs4_Dec := LREAL#1000.0;
Mv_Abs4_Dir := _eMC_DIRECTION#_mcShortestWay;
Mv_Abs4_Bm := _eMC_BUFFER_MODE#_mcBuffered;
END_IF; 3
Sample Programming 2
// If StartPg is TRUE and the Servo Drive is ready, the Servo is turned ON.
// If the Servo Drive is not ready, the Servo is turned OFF.
IF (StartPg=TRUE)
AND (MC_Axis000.DrvStatus.Ready=TRUE) THEN
Pwr_En:=TRUE;
ELSE
Pwr_En:=FALSE;
END_IF;
// If the Servo is ON and home is not defined, the Home instruction is executed.
IF (Pwr_Status=TRUE) AND (MC_Axis000.Details.Homed=FALSE) THEN
Hm_Ex:=TRUE;
END_IF;
// MC_Power
PWR(
Axis := MC_Axis000,
Enable := Pwr_En,
// MC_Home
HM(
Axis := MC_Axis000,
Execute := Hm_Ex,
Done => Hm_D,
Busy => Hm_Bsy,
CommandAborted => Hm_Ca,
Error => Hm_Err,
ErrorID => Hm_ErrID
);
MC_MoveAbsolute
Axis := MC_Axis000,
Execute := Mv_Abs4_Ex,
Position := Mv_Abs4_Pos,
Velocity := Mv_Abs4_Vel,
Acceleration := Mv_Abs4_Acc,
Deceleration := Mv_Abs4_Dec,
Direction := Mv_Abs4_Dir,
BufferMode := Mv_Abs4_Bm,
Done => Mv_Abs4_D, 3
Busy => Mv_Abs4_Bsy,
Active => Mv_Abs4_Act,
Sample Programming 2
CommandAborted => Mv_Abs4_Ca,
Error => Mv_Abs4_Err,
ErrorID => Mv_Abs4_ErrID
);
MC_MoveRelative
The MC_MoveRelative instruction moves the axis the specified travel distance from the command cur-
rent position.
FB/
Instruction Name Graphic expression ST expression
FUN
MC_MoveRelative Relative FB MC_MoveRelative_instance MC_MoveRelative_instance (
Positioning Axis :=parameter,
MC_MoveRelative
Execute :=parameter,
Axis Axis
Distance :=parameter,
Execute Done
Velocity :=parameter,
Distance Busy
Acceleration :=parameter,
Velocity Active
Deceleration :=parameter,
Acceleration CommandAborted
Jerk :=parameter,
Deceleration Error
BufferMode :=parameter,
Jerk ErrorID
Done =>parameter,
BufferMode Busy =>parameter,
Active =>parameter,
CommandAborted
=>parameter,
Error =>parameter,
ErrorID =>parameter
);
Variables
Input Variables
MC_MoveRelative
5: Blending high
*1 Refer to Unit Conversion Settings in the NJ/NX-series CPU Unit Motion Control User's Manual (Cat. No. W507) or NY-
series Industrial Panel PC / Industrial Box PC Motion Control User’s Manual (Cat. No. W559) for information on command
units.
*2 Always set the target velocity. If the axis is moved without setting a target velocity, an error will occur.
*3 The default value for an enumeration variable is actually not the number, but the enumerator.
3
Output Variables
Variables
Name Meaning Data type Valid range Description
Done Done BOOL TRUE or FALSE TRUE when the instruction is completed.
Busy Executing BOOL TRUE or FALSE TRUE when the instruction is acknowledged.
Active Controlling BOOL TRUE or FALSE TRUE when the axis is being controlled.
CommandAborted Command BOOL TRUE or FALSE TRUE when the instruction is aborted.
Aborted
Error Error BOOL TRUE or FALSE TRUE while there is an error.
ErrorID Error Code WORD * Contains the error code when an error occurs.
A value of 16#0000 indicates normal execution.
In-Out Variables
Name Meaning Data type Valid Ranges Description
Axis Axis _sAXIS_REF --- Specify the axis.*
* Specify a user-defined Axis Variable that was created in the Axis Basic Settings of the Sysmac Studio (default: MC_Axis***)
or a system-defined axis variable name (_MC_AX[*], _MC1_AX[*], or _MC2_AX[*]).
Function
• The travel distance from the command current position is specified to perform positioning.
• Relative positioning starts when Execute changes to TRUE.
• You can specify the Velocity (Target Velocity), Acceleration (Acceleration Rate), Deceleration (Decel-
eration Rate), and Jerk as input variables.
The following chart shows an operation example of relative positioning.
Velocity
Target
velocity Acceleration Deceleration
Time
0 Command current position
Travel distance
When the acceleration rate or deceleration rate is 0 and the instruction is executed, it will reach the tar-
get velocity without accelerating or decelerating.
The following chart shows an operation example of when the acceleration rate is 0.
Velocity
Target
velocity Acceleration
Time
0 Command current position
Travel distance
Specify Jerk when you want to accelerate or decelerate smoothly. The following chart shows an opera-
tion example when Jerk is specified.
Velocity
Target
velocity
Time
0 Command current position
Travel distance
For details on Jerk, refer to the NJ/NX-series CPU Unit Motion Control User’s Manual (Cat. No. W507)
or NY-series Industrial Panel PC / Industrial Box PC Motion Control User’s Manual (Cat. No. W559).
Instruction Details
When the Count Mode is Rotary Mode, you can specify a Distance (Travel Distance) that exceeds the
relative distance range from the Modulo Minimum Position Setting Value axis parameter to the Modulo
Maximum Position Setting Value axis parameter so that you can perform multiple ring rotation position-
ing. The following chart shows an operation example when the command current position is −20 and
MC_MoveRelative
Distance (Travel Distance) is 300.
Modulo maximum
position setting
value: 100
Command
current Position after
positioning: −60
3
position: −20
0
Function
Modulo minimum
position setting
value: −70
300
Performs relative positioning with travel distance of 300.
When Distance (Travel Distance) is 0 and the instruction is executed, the axis will not move, but Done
will change to TRUE.
Time Time
Relative position Relative position Relative position specified
specified for specified for
for re-execution of instruction
original instruction instruction
In-position Check
An in-position check is performed for this instruction according to the settings in In-position Range
and In-position Check Time axis parameters.
Timing Charts
• Busy (Executing) changes to TRUE at the same time as Execute changes to TRUE. Active (Con-
trolling) changes to TRUE in the next period.
• Done changes to TRUE when Distance (Target Distance) is reached and positioning is completed.
• If another instruction aborts this instruction, CommandAborted changes to TRUE and Busy (Execut-
ing) and Active (Controlling) change to FALSE.
Execute
Done
Busy
Active
CommandAborted
Error
ErrorID 16#0000
Multi-execution of
Velocity
instructions
Time
Time
0 Command current position
First travel
distance
Second travel
distance
Third travel
distance
Instruction re-executed.
MC_MoveRelative
elocity
Changed target velocity
First position
of original
instruction Target pos
Time
3
For details on re-execution of motion control instructions, refer to the NJ/NX-series CPU Unit Motion
Function
Control User’s Manual (Cat. No. W507) or NY-series Industrial Panel PC / Industrial Box PC Motion
Control User’s Manual (Cat. No. W559).
For details on BufferMode (Buffer Mode Selection), refer to the NJ/NX-series CPU Unit Motion Con-
trol User's Manual (Cat. No. W507) or NY-series Industrial Panel PC / Industrial Box PC Motion Con-
trol User’s Manual (Cat. No. W559).
Errors
If an error occurs during instruction execution, Error will change to TRUE and the axis will stop. You can
find out the cause of the error by referring to the value output by ErrorID (Error Code).
Done
Busy
Active
CommandAborted
Error
Error code
Refer to A-1 Error Codes for instruction errors.
MC_MoveVelocity
The MC_MoveVelocity instruction performs velocity control with the Position Control Mode of the Servo
Drive.
Instruction Name FB/FUN Graphic expression ST expression
MC_MoveVelocity
MC_MoveVelocity Velocity FB MC_MoveVelocity_instance MC_MoveVelocity_instance (
Control Axis :=parameter,
MC_MoveVelocity Execute :=parameter,
Axis Axis
Velocity :=parameter,
Execute InVelocity
Acceleration :=parameter,
Velocity Busy
Deceleration :=parameter,
Acceleration Active
Jerk :=parameter,
Deceleration CommandAborted
Direction :=parameter,
Jerk Error
Direction ErrorID
Continuous :=parameter, 3
BufferMode :=parameter,
Continuous InVelocity =>parameter,
BufferMode Busy =>parameter,
Variables
Active =>parameter,
CommandAborted
=>parameter,
Error =>parameter,
ErrorID =>parameter
);
Variables
Input Variables
*1 Refer to Unit Conversion Settings in the NJ/NX-series CPU Unit Motion Control User's Manual (Cat. No. W507) or NY-
series Industrial Panel PC / Industrial Box PC Motion Control User’s Manual (Cat. No. W559) for information on command
units.
*2 The default value for an enumeration variable is actually not the number, but the enumerator.
Output Variables
Name Meaning Data type Valid range Description
InVelocity Target BOOL TRUE or FALSE TRUE when the target velocity is reached.
Velocity
Reached
Busy Executing BOOL TRUE or FALSE TRUE when the instruction is acknowledged.
Active Controlling BOOL TRUE or FALSE TRUE when the axis is being controlled.
CommandAborted Command BOOL TRUE or FALSE TRUE when the instruction is aborted.
Aborted
Error Error BOOL TRUE or FALSE TRUE while there is an error.
ErrorID Error Code WORD * Contains the error code when an error occurs.
A value of 16#0000 indicates normal execution.
In-Out Variables
* Specify a user-defined Axis Variable that was created in the Axis Basic Settings of the Sysmac Studio (default: MC_Axis***)
or a system-defined axis variable name (_MC_AX[*], _MC1_AX[*], or _MC2_AX[*]).
MC_MoveVelocity
Function
• Pseudo velocity control is performed with position control.
• The velocity control operation starts when Execute changes to TRUE.
3
Instruction Details
This section describes the instruction in detail.
Function
Direction
Specify the travel direction with Direction. When Direction specifies the positive direction, the axis
moves in the positive direction. When it specifies the negative direction, the axis moves in the nega-
tive direction. When it specifies the current direction, the axis motion depends on whether the axis is
stopped or not. If the axis is stopped, it will move in the direction in which it was traveling previously.
If the power was turned ON or after restarting, the axis moves in the positive direction. If you execute
this instruction during multi-execution of motion control instructions for the axis, the axis will move in
the direction that it is currently traveling.
Timing Charts
• Busy (Executing) changes to TRUE at the same time as Execute changes to TRUE. Active (Con-
trolling) changes to TRUE in the next period.
• InVelocity (Target Velocity Reached) changes to TRUE when Velocity (Target Velocity) is reached.
• If another instruction aborts this instruction, CommandAborted changes to TRUE and Busy (Execut-
ing), Active (Controlling), and InVelocity (Target Velocity Reached) change to FALSE.
Execute
InVelocity
Busy
Active
CommandAborted
Error
ErrorID 16#0000
Decelerates to a stop
Velocity when another instruction
causes an error.
Target velocity
Time
The InVelocity (Target Velocity Reached) output variable indicates when the velocity has reached
the same velocity for this instruction and the re-executed motion control instruction. Therefore, after
InVelocity (Target Velocity Reached) changes to TRUE, even if the velocity is changed by the over-
ride factor, InVelocity (Target Velocity Reached) will not change to FALSE. If the override factor
changes before InVelocity (Target Velocity Reached) changes to TRUE, InVelocity (Target Velocity
Reached) will change to TRUE when the new target velocity is reached.
You can specify Acceleration (Acceleration Rate), Deceleration (Deceleration Rate) and Jerk as
input variables. When the Velocity (Target Velocity) is 0 and the instruction is executed, the axis will
enter continuous operation without motion.
The following chart shows an operation example of when Velocity (Target Velocity) is 0.
Execute
Busy
MC_MoveVelocity
Active
InVelocity
CommandAborted
Error
ErrorID
3
16#0000
Function
Velocity
Target velocity
Time
When the Acceleration (Acceleration Rate) or Deceleration (Deceleration Rate) is 0 and the instruc-
tion is executed, the axis will reach the target velocity without accelerating or decelerating.
The following chart shows an operation example of when the acceleration rate is 0.
Velocity
Target
velocity
Time
0
Specify Jerk when you want to accelerate or decelerate smoothly. The following chart shows an
operation example when Jerk is specified.
Velocity
Target
velocity
Time
0
For details on Jerk, refer to the NJ/NX-series CPU Unit Motion Control User’s Manual (Cat. No.
W507) or NY-series Industrial Panel PC / Industrial Box PC Motion Control User’s Manual (Cat. No.
W559).
For details on BufferMode (Buffer Mode Selection), refer to the NJ/NX-series CPU Unit Motion Con-
trol User's Manual (Cat. No. W507) or NY-series Industrial Panel PC / Industrial Box PC Motion Con-
trol User’s Manual (Cat. No. W559).
Error
If an error occurs during instruction execution, Error will change to TRUE and the axis will stop. You can
find out the cause of the error by referring to the value output by ErrorID (Error Code).
MC_MoveVelocity
InVelocity
Busy
Active
CommandAborted
3
Error
Function
ErrorID 16#0000 Error code
Error Codes
Refer to A-1 Error Codes for instruction errors.
Sample Programming
This section shows sample programming for velocity control, such as for a spinner or centrifuge.
Parameter Settings
The minimum settings required for this sample programming are given below.
Axis Type
Axis Axis Type
Axis 1 Servo axis
Operation Example
Sensor 1
Operation Pattern
Velocity
Second velocity
Third velocity
First velocity
Time
Sensor2
Sensor3
Stop command
When the Sensor2 bit changes to TRUE, the override factor is set to 500% and the velocity is
changed.
MC_MoveVelocity
Ladder Diagram
Main Variables
Sample Programming
MC_Axis000.Details.Homed BOOL FALSE TRUE when home is defined for axis 1.
Pwr_Status BOOL FALSE This variable is assigned to the Status output
variable from the PWR instance of the MC_Power
instruction. This variable changes to TRUE when
the Servo is turned ON.
StartPg BOOL FALSE The Servo is turned ON if this variable is TRUE
and EtherCAT process data communications are
established.
Vel_Act BOOL FALSE This variable is assigned to the Active output vari-
able from the VEL instance of the MC_MoveVe-
locity instruction. It is TRUE during velocity
control by the VEL instance.
Set_Ov_Velfct LREAL 0 This is the velocity override factor.
StopTrig BOOL FALSE When this variable is TRUE, MC_Stop is exe-
cuted.
Sensor1 BOOL FALSE TRUE when chemical solution supply is detected.
If the Servo is ON for axis 1, the MC_MoveVeloc-
ity (Velocity Control) instruction is executed.
Sensor2 BOOL FALSE If this variable is TRUE, the override factor is set
to 500%. After this variable changes to TRUE, it
remains TRUE until Sensor3 changes to TRUE,
at which time it changes to FALSE.
Sensor3 BOOL FALSE If this variable is TRUE, the override factor is set
to 200%. After this variable changes to TRUE, it
remains TRUE.
Timing Chart
Pwr_Status
Sensor1
Vel_Bsy
Vel_Act
Set_Ov_Bsy
Set_Ov_End
Sensor2
Sensor3
StopTrig
Stp_D
Stp_Act
Command velocity
MC_Axis000
Time
Sample Programming
If StartPg is TRUE, check that the Servo Drive is ready.
StartPg MC_Axis000.DrvStatus.Ready Lock1
If a minor fault level error occurs for axis 1, the error handler for the device (FaultHandler) is executed.
Program the FaultHandler according to the device.
MC_Axis000.MFaultLvl.Active FaultHandler
EN FaultHandler
When Sensor1 changes to TRUE, the MC_MoveVelocity (Velocity Control) instruction is executed.
VEL
MC_MoveVelocity
Pwr_Status Sensor1 MC_Axis000 Axis Axis Vel_InVel
Execute InVelocity
LREAL#1048576.0 Velocity Busy Vel_Bsy
LREAL#1048576.0 Acceleration Active Vel_Act
LREAL#1048576.0 Deceleration CommandAborted Vel_Ca
Jerk Error Vel_Err
_eMC_DIRECTION#_mcPositiveDirection Direction ErrorID Vel_ErrID
Continuous
BufferMode
During execution of the MC_MoveVelocity (Velocity Control) instruction, the override factor is changed
according to the status of the Sensor2 and Sensor3 bits.
Vel_Act
MC_MoveVelocity
The MC_SetOverride (Set Override Factors) instruction is executed during execution of the
MC_MoveVelocity (Velocity Control) instruction.
SET_OV
MC_SetOverride
Vel_Act MC_Axis000 Axis Axis Set_Ov_End
Enable Enabled
Set_Ov_Velfct VelFactor Busy Set_Ov_Bsy
AccFactor Error Set_Ov_Err
JerkFactor ErrorID Set_Ov_ErrID 3
Sample Programming
When the stop command (StopTrig) changes to TRUE, the MC_Stop instruction is executed.
STP
MC_Stop
StopTrig MC_Axis000 Axis Axis Stp_D
Execute Done
LREAL#524288.0 Deceleration Busy Stp_Bsy
Jerk Active Stp_Act
BufferMode CommandAborted Stp_Ca
Error Stp_Err
ErrorID Stp_ErrID
Contents of Inline ST
IF (Sensor2=FALSE) AND (Sensor3=FALSE) THEN
Set_Ov_Velfct := LREAL#100.0;
ELSIF (Sensor2=TRUE) AND (Sensor3=FALSE) THEN
Set_Ov_Velfct := LREAL#500.0;
ELSIF (Sensor2=FALSE) AND (Sensor3=TRUE) THEN
Set_Ov_Velfct := LREAL#200.0;
ELSE
Set_Ov_Velfct := LREAL#200.0;
END_IF;
Timing Chart
Pwr_Status
Sensor1
Vel_Ex
Vel_Act
Set_Ov_En
MC_MoveVelocity
Set_Ov_End
Sensor2
Sensor3
StopTrig
Stp_Ex
Stp_D 3
Stp_Act
Sample Programming
Command velocity
MC_Axis000
Time
Sample Programming
// Processing when input parameters are not set
IF InitFlag = FALSE THEN
// MC_MoveVelocity parameters
Vel_Vel := LREAL#1048576.0;
Vel_Acc := LREAL#1048576.0;
Vel_Dec := LREAL#1048576.0;
Vel_Dir := _eMC_DIRECTION#_mcPositiveDirection;
// MC_SetOverride parameters
Set_Ov_Velfct := LREAL#100.0;
// MC_Stop parameters
Stp_Dec := LREAL#524288.0;
END_IF;
// If StartPg is TRUE and the Servo Drive is ready, the Servo for axis 1 is turned ON.
// If the Servo Drive is not ready, the Servo is turned OFF.
IF (StartPg=TRUE)
AND (MC_Axis000.DrvStatus.Ready=TRUE) THEN
Pwr_En:=TRUE;
ELSE
Pwr_En:=FALSE;
END_IF;
// If a minor fault level error occurs for axis 1, the error handler for the device (FaultHandler) is executed.
// Program the FaultHandler according to the device.
IF MC_Axis000.MFaultLvl.Active=TRUE THEN
FaultHandler();
END_IF;
// If the Servo is ON for axis 1 and the Sensor1 bit is TRUE, the MC_MoveVelocity instruction is executed.
IF (Pwr_Status=TRUE) AND (Sensor1=TRUE) THEN
Vel_Ex := TRUE;
END_IF;
// During execution of the MC_MoveVelocity instruction, the override factor is changed according to the status of
the Sensor2 and Sensor3 bits.
IF Vel_Act=TRUE THEN
IF (Sensor2=FALSE) AND (Sensor3=FALSE) THEN
Set_Ov_Velfct := LREAL#100.0;
ELSIF (Sensor2=TRUE) AND (Sensor3=FALSE) THEN
Set_Ov_Velfct := LREAL#500.0;
ELSIF (Sensor2=FALSE) AND (Sensor3=TRUE) THEN
Set_Ov_Velfct := LREAL#200.0;
ELSE
Set_Ov_Velfct := LREAL#200.0;
END_IF;
END_IF;
// The MC_SetOverride instruction is executed during velocity control for the MC_MoveVelocity instruction.
IF Vel_Act=TRUE THEN
Set_Ov_En := TRUE;
END_IF;
//MC_Power
PWR(
Axis := MC_Axis000,
Enable := Pwr_En,
Status => Pwr_Status,
Busy => Pwr_Bsy,
Error => Pwr_Err,
ErrorID => Pwr_ErrID
);
//MC_MoveVelocity
VEL(
Axis := MC_Axis000,
Execute := Vel_Ex,
Velocity := Vel_Vel,
Acceleration := Vel_Acc,
Deceleration := Vel_Dec,
Direction := Vel_Dir,
InVelocity => Vel_Invel,
Busy => Vel_Bsy,
Active => Vel_Act,
CommandAborted => Vel_Ca,
Error => Vel_Err,
ErrorID => Vel_ErrID
);
//MC_SetOverride
SET_OV(
Axis := MC_Axis000,
Enable := Set_Ov_En,
VelFactor := Set_Ov_Velfct,
AccFactor := Set_Ov_Accfct,
JerkFactor := Set_Ov_Jfct,
Busy => Set_Ov_Bsy,
Enabled => Set_Ov_End,
Error => Set_Ov_Err,
MC_MoveVelocity
ErrorID => Set_Ov_ErrID
);
//MC_Stop
STP(
Axis := MC_Axis000,
Execute := Stp_Ex,
Deceleration := Stp_Dec,
Done => Stp_D, 3
Busy => Stp_Bsy,
Active => Stp_Act,
Sample Programming
CommandAborted => Stp_Ca,
Error => Stp_Err,
ErrorID => Stp_ErrID
);
MC_MoveZeroPosition
The MC_MoveZeroPosition instruction performs positioning with an absolute position of 0 as the target
position to return to home.
FB/
Instruction Name Graphic expression ST expression
FUN
MC_MoveZeroPosition High- FB MC_MoveZeroPosition_instance MC_MoveZeroPosition_instance (
speed Axis :=parameter,
Home MC_MoveZeroPosition Execute :=parameter,
Axis Axis
Velocity :=parameter,
Execute Done
Acceleration :=parameter,
Velocity Busy
Deceleration :=parameter,
Acceleration Active
Jerk :=parameter,
Deceleration CommandAborted
BufferMode :=parameter,
Jerk Error
Done =>parameter,
BufferMode ErrorID Busy =>parameter,
Active =>parameter,
CommandAborted =>parameter,
Error =>parameter,
ErrorID =>parameter
);
Variables
Input Variables
*1 Always set the target velocity. If the axis is moved without setting a target velocity, an error will occur.
*2 Refer to Unit Conversion Settings in the NJ/NX-series CPU Unit Motion Control User's Manual (Cat. No. W507) or NY-
series Industrial Panel PC / Industrial Box PC Motion Control User’s Manual (Cat. No. W559) for information on command
units.
*3 The default value for an enumeration variable is actually not the number, but the enumerator.
Output Variables
Name Meaning Data type Valid range Description
Done Done BOOL TRUE or FALSE TRUE when the instruction is completed.
Busy Executing BOOL TRUE or FALSE TRUE when the instruction is acknowledged.
Active Controlling BOOL TRUE or FALSE TRUE when the axis is being controlled.
MC_MoveZeroPosition
CommandAborted Command BOOL TRUE or FALSE TRUE when the instruction is aborted.
Aborted
Error Error BOOL TRUE or FALSE TRUE while there is an error.
ErrorID Error Code WORD * Contains the error code when an error occurs.
A value of 16#0000 indicates normal execution.
Variables
Done When positioning is completed. • When Execute is TRUE and changes to
FALSE.
• After one period when Execute is FALSE.
Busy When Execute changes to TRUE. • When Done changes to TRUE.
• When Error changes to TRUE.
• When CommandAborted changes to TRUE.
Active When the axis starts moving. • When Done changes to TRUE.
• When Error changes to TRUE.
• When CommandAborted changes to TRUE.
CommandAborted • When this instruction is aborted because • When Execute is TRUE and changes to
another motion control instruction was FALSE.
executed with the Buffer Mode set to • After one period when Execute is FALSE.
Aborting.
• When this instruction is canceled due to
an error.
• When this instruction is executed while
there is an error.
• When you start this instruction during
MC_Stop instruction execution.
Error When there is an error in the execution con- When the error is cleared.
ditions or input parameters for the instruc-
tion.
In-Out Variables
* Specify a user-defined Axis Variable that was created in the Axis Basic Settings of the Sysmac Studio (default: MC_Axis***)
or a system-defined axis variable name (_MC_AX[*], _MC1_AX[*], or _MC2_AX[*]).
Function
• The axis moves to home.
• You can specify the Velocity (Target Velocity), Acceleration (Acceleration Rate), Deceleration (Decel-
eration Rate), and Jerk as input variables.
Instruction Details
This section describes the instruction in detail.
Direction Designation
When the Count Mode is set to Rotary Mode, positioning is performed in the direction with the short-
est distance to home (shortest-way positioning). The following chart shows an operation example of
this instruction according to the command current position.
Modulo maximum Command current position: 90
position setting
value: 100
Command Home: 0
current
0
position: −30
0
Modulo minimum
position setting
value: −50
Override Factors
Override factors are enabled for this instruction.
In-position Check
An in-position check is performed for this instruction according to the settings in In-position Range
and In-position Check Time axis parameters.
Operation Example
Velocity
Target velocity
Acceleration Deceleration
MC_MoveZeroPosition
Time
Command current position 0
When the acceleration rate or deceleration rate is 0 and the instruction is executed, it will reach the
target velocity without accelerating or decelerating.
The following chart shows an operation example of when the acceleration rate is 0.
Velocity 3
Function
Target velocity
Deceleration
Time
Command current position 0
Specify Jerk when you want to accelerate or decelerate smoothly. The following chart shows an
operation example when Jerk is specified.
Velocity
Target velocity
Time
Command current position 0
For details on Jerk, refer to the NJ/NX-series CPU Unit Motion Control User’s Manual (Cat. No.
W507) or NY-series Industrial Panel PC / Industrial Box PC Motion Control User’s Manual (Cat. No.
W559).
Timing Charts
A timing chart for execution of the MC_MoveZeroPosition (High-speed Home) instruction is shown
below.
Execute
Busy
Active
Done
CommandAborted
Error
ErrorID 16#0000
Velocity
Time
For details on re-execution of motion control instructions, refer to the NJ/NX-series CPU Unit Motion
Control User’s Manual (Cat. No. W507) or NY-series Industrial Panel PC / Industrial Box PC Motion
Control User’s Manual (Cat. No. W559).
MC_MoveZeroPosition
You can switch to this instruction or buffer this instruction if you execute it during execution of
another instruction. You can buffer one instruction per axis. Specify the operation of this instruction
using BufferMode (Buffer Mode Selection) for multi-execution of instructions.
Buffer Mode Selection Description
Aborting Aborts the instruction being executed and switches to this instruction. a
If the direction of axis motion is reversed by switching instructions, the motion will be
reversed according to the Operation Selection at Reversing axis parameter.
Buffered Buffers this instruction and executes it automatically after the current instruction is 3
completed.
For details on BufferMode (Buffer Mode Selection), refer to the NJ/NX-series CPU Unit Motion Con-
Function
trol User's Manual (Cat. No. W507) or NY-series Industrial Panel PC / Industrial Box PC Motion Con-
trol User’s Manual (Cat. No. W559).
Execute
Done
Busy
Active
CommandAborted
Error
ErrorID 16#0000
Execution of MC_Set Position
Velocity
Time
Errors
If an error occurs during instruction execution, Error will change to TRUE and the axis will stop. You can
find out the cause of the error by referring to the value output by ErrorID (Error Code).
Done
Busy
Active
CommandAborted
Error
Error Codes
Refer to A-1 Error Codes for instruction errors.
MC_MoveFeed
The MC_MoveFeed instruction performs positioning for the specified travel distance from the position
where an external device triggers an interrupt input. Interrupt feeding is possible for absolute position-
ing, relative positioning, and velocity control.
Instruction Name FB/FUN Graphic expression ST expression
MC_MoveFeed
MC_MoveFeed Interrupt FB MC_MoveFeed_instance MC_MoveFeed_instance (
Feeding Axis :=parameter,
MC_MoveFeed
TriggerInput :=parameter,
Axis Axis
TriggerVariable :=parameter,
TriggerInput TriggerInput
Execute :=parameter,
TriggerVariable TriggerVariable
WindowOnly :=parameter,
Execute Done
FirstPosition :=parameter,
WindowOnly InFeed
FirstPosition Busy
LastPosition :=parameter, 3
ReferenceType
LastPosition Active :=parameter,
ReferenceType CommandAborted Position :=parameter,
Position Error Velocity :=parameter,
Velocity ErrorID Acceleration :=parameter,
Acceleration Deceleration :=parameter,
Deceleration Jerk :=parameter,
Jerk Direction :=parameter,
Direction MoveMode :=parameter,
MoveMode FeedDistance :=parameter,
FeedDistance FeedVelocity :=parameter,
FeedVelocity BufferMode :=parameter,
BufferMode ErrorDetect :=parameter,
ErrorDetect Done =>parameter,
InFeed =>parameter,
Busy =>parameter,
Active =>parameter,
CommandAborted
=>parameter,
Error =>parameter,
ErrorID =>parameter
);
Variables
Input Variables
MC_MoveFeed
the interrupt input and specify
a negative value to feed in the
opposite direction. The unit is
command units.*1
FeedVelocity Feed Velocity LREAL Positive number 0 Specify the target travel veloc-
ity after the interrupt feed
input. The unit is command 3
units/s.*1
BufferMode Buffer Mode _eMC_BUFFER_ 0: _mcAborting 0*2 Specify the behavior when
Variables
Selection MODE 1: _mcBuffered executing more than one
motion instruction.
0: Aborting
1: Buffered
ErrorDetect Error BOOL TRUE or FALSE FALSE Specify whether to detect an
Detection error when there is no inter-
Selection rupt feed input.
TRUE: Detect errors.
FALSE: Do not detect errors.
*1 Refer to Unit Conversion Settings in the NJ/NX-series CPU Unit Motion Control User's Manual (Cat. No. W507) or NY-
series Industrial Panel PC / Industrial Box PC Motion Control User’s Manual (Cat. No. W559) for information on command
units.
*2 The default value for an enumeration variable is actually not the number, but the enumerator.
*3 The task period is the primary period if the task is the primary periodic task and the task period of the priority-5 periodic
task if the task is the priority-5 periodic task.
*4 A value of 0 can be set if MoveMode is set to velocity control.
*5 The axis moves to the specified position when MoveMode is set to absolute positioning and when the Count Mode is Lin-
ear Mode.
When MoveMode is set to relative positioning, the travel direction is determined by the sign of the position.
_mcShortestWay and _mcNoDirection cannot be selected when MoveMode is set to velocity control, regardless of the
Counter Mode.
Output Variables
Name Meaning Data type Valid range Description
Done Done BOOL TRUE or FALSE TRUE when the instruction is completed.
InFeed Feeding BOOL TRUE or FALSE TRUE while feeding after receiving a latch input.
Busy Executing BOOL TRUE or FALSE TRUE when the instruction is acknowledged.
Active Controlling BOOL TRUE or FALSE TRUE when the axis is being controlled.
CommandAborted Command BOOL TRUE or FALSE TRUE when the instruction is aborted.
Aborted
Error Error BOOL TRUE or FALSE TRUE while there is an error.
ErrorID Error Code WORD * Contains the error code when an error occurs.
A value of 16#0000 indicates normal execution.
* There may be a delay of up to several task periods from when the interrupt input turns ON until InFeed changes to TRUE.
The task period is the primary period if the task is the primary periodic task and the task period of the priority-5 periodic task
if the task is the priority-5 periodic task.
In-Out Variables
*1 Specify a user-defined Axis Variable that was created in the Axis Basic Settings of the Sysmac Studio (default:
MC_Axis***) or a system-defined axis variable name (_MC_AX[*], _MC1_AX[*], or _MC2_AX[*]).
*2 Define a user-defined variable with a data type of _sTRIGGER_REF..
_sTRIGGER_REF
Name Meaning Data type Valid range Function
Mode Mode _eMC_TRIG- 0: _mcDrive Specify the trigger mode.
GER_ MODE 1: _mcController 0: Drive Mode
1: Controller Mode
LatchID Latch ID _eMC_TRIG- 0: _mcLatch1 Specify which of the two latch functions
Selection GER_ LATCHID 1: _mcLatch2 to use in Drive Mode.
0: Latch 1
1: Latch 2
MC_MoveFeed
InputDrive Trigger Input _eMC_TRIG- 0: _mcEncoderMark Specify the Servo Drive trigger signal
Signal GER_ 1: _mcEXT to use in Drive Mode.
INPUT_DRIVE 0: Z-phase signal
1: External input
3
Function
• When Execute changes to TRUE, the axis travels with absolute travel, relative travel, or velocity con-
Function
trol depending on the MoveMode setting.
• The target position is set in Position (Target Position) for absolute travel. The target distance is set in
Position (Target Distance) for relative travel.
Both travel methods use Velocity (Target Velocity) for travel operation.
• Relative positioning is performed with FeedVelocity from the actual position where the external input
turned ON during travel for the feed distance that is specified with FeedDistance.
• If no interrupt signal is input before the axis reaches the default target position during interrupt feed-
ing in absolute or relative travel mode, the axis stops at the target position. You can specify whether
there is an error output when the axis stops for ErrorDetect (i.e., when there is no interrupt input.) If
you specify an error output, CommandAborted changes to TRUE, and Busy (Executing) and Active
(Controlling) change to FALSE.
• To use interrupt masks, change WindowOnly to TRUE, then specify FirstPosition and LastPosition.
Interrupt feeding is performed for the first interrupt signal generated by the actual position between
the FirstPosition and the LastPosition.
Additional Information
Refer to MC_MoveAbsolute on page 3-49 for absolute travel, MC_MoveRelative on page 3-76
for relative travel, MC_MoveVelocity on page 3-83 for velocity control, and WindowOnly on page
3-112 for WindowOnly.
Instruction Details
This section describes the instruction in detail.
Specifying Axis
• Specify the axis for which to latch the position to Axis.
Mode
• The mode can be set to Drive Mode to specify a signal from the Servo Drive or NX-series Pulse
Output Unit as the trigger, or to Controller Mode to specify a trigger with TriggerVariable.
• The trigger occurs on the rising edge of the trigger signal. The axis position is latched on the first
trigger (FALSE to TRUE) after the MC_TouchProbe instruction is executed.
• While this instruction is Busy (Executing), a change in TriggerVariable is taken as a trigger even if
Execute is FALSE.
Drive Mode
For trigger detection and latching of the actual position, the latched actual position is more pre-
cise in Drive Mode (which is a Servo Drive function) than it is in Controller Mode.
Trigger detection
Time
MC_MoveFeed
value (60BA hex), and Touch probe pos2 pos value (60BC hex)
If even one of the required objects is not set, a Process Data Object Setting Missing error
(error code 3461 hex) occurs. For details on mapping object data, refer to 2-3 PDO Mapping
and to the NJ/NX-series CPU Unit Motion Control User’s Manual (Cat. No. W507) or NY-series
Industrial Panel PC / Industrial Box PC Motion Control User’s Manual (Cat. No. W559).
3
Controller Mode
• You can specify a BOOL variable in the Controller Mode.
Function
• Use TriggerVariable to specify the BOOL variable that you want to use as a trigger.
• The Controller Mode causes a longer delay compared to the Drive Mode. This is due to the
I/O refresh delay that occurs when the trigger input signal is updated in the BOOL variable.
Time
LatchID
• Specify which of the two to use with LatchID. You can use only one of the latches with any one
axis.
• LatchID indicates latch circuit 1 and latch circuit 2 in the Servo Drive or NX-series Pulse Output
Unit.
For information on LatchID, refer to the NJ/NX-series CPU Unit Motion Control User's Manual (Cat.
No. W507) or NY-series Industrial Panel PC / Industrial Box PC Motion Control User’s Manual (Cat.
No. W559).
InputDrive
• You can select _mcEncoderMark (Z Phase) or _mcEXT (External Input) as triggers.
• Select _mcEncoderMark (Z phase) to use the Z phase of the Servo Drive or NX-series Pulse Out-
put Unit as the trigger.
Select _mcEXT (external input) to use the external trigger signal of the Servo Drive or NX-series
Pulse Output Unit as the trigger.
• For an OMRON 1S-series Servo Drive, there are two options for _mcEXT: Ext1, and Ext2. For an
OMRON G5-series Servo Drive, there are three options for _mcEXT: Ext1, Ext2, and Ext3. Use
Sysmac Studio to make the setting.
The two triggers set in the Servo Drive can have the same setting.
• Refer to the NX-series Position Interface Units User’s Manual (Cat. No. W524) for information on
using the NX-series Pulse Output Unit.
WindowOnly
• WindowOnly specifies whether the window is enabled or disabled.
• If you specify Disable, triggers are detected for all axis positions.
• If you specify Enable, triggers are detected only when the axis position is within the range speci-
fied by FirstPosition and LastPosition.
The following timing chart shows the difference in operation depending on the WindowOnly setting.
TriggerInput
Execute
WindowOnly
Done
Busy
RecordedPosition 0 Position
CommandAborted
Error
ErrorID 16#0000
Axis position
LastPosition
FirstPosition
Position
TriggerInput
Execute
WindowOnly
MC_MoveFeed
Done
Busy
RecordedPosition 0 Position
CommandAborted 3
Error
Function
ErrorID 16#0000
Axis position
LastPosition
Position
FirstPosition
The range that is defined by FirstPosition and LastPosition depends on the Count Mode, as given
below.
Linear Mode
• FirstPosition must be less than or equal to the window range and the window range must be less
than or equal to LastPosition.
• An error will occur if the FirstPosition is greater than the LastPosition.
• An error will also occur if a position beyond the position range of Linear Mode is specified.
• FirstPosition and LastPosition are LREAL variables. Do not set them to the same values.
Refer to Treatment of REAL and LREAL Data on page 1-12 for information on LREAL data.
The window only range in Linear Mode is shown below.
FirstPosition LastPosition
0x8000000000 0x7fffffffff
Window
Window only range
Note The window only range can include the FirstPosition and LastPosition.
Rotary Mode
• The FirstPosition can be less than, equal to, or greater than the LastPosition.
• If the FirstPosition is greater than the LastPosition, the setting range includes the modulo maxi-
mum position and modulo minimum position setting values.
• An error will occur if you specify a value beyond the modulo maximum position and modulo mini-
mum position setting values.
FirstPosition <
= LastPosition
− + − +
LastPosition 0 LastPosition 0
FirstPosition
Window only range
: The positions indicated with
filled dots are included.
FirstPosition
FeedDistance
Specify a positive value for FeedDistance to perform feed in the same direction as the motion before
the interrupt input. Specify a negative value for FeedDistance to perform feed in the opposite direc-
tion as the motion before the interrupt input.
For example, if you specify a positive value for FeedDistance when the motion was in the negative
direction before the interrupt input, feeding is performed in the negative direction. If you specify a
negative value for FeedDistance, feeding is performed in the positive direction.
Timing Charts
• Busy (Executing) changes to TRUE at the same time as Execute changes to TRUE. Active (Con-
trolling) changes to TRUE in the next period.
• After an interrupt input, InFeed changes to TRUE and when FeedDistance is reached and positioning
is completed, Done changes to TRUE.
• If another instruction aborts this instruction, CommandAborted changes to TRUE and Busy (Execut-
ing) and Active (Controlling) change to FALSE.
MC_MoveFeed
When MoveMode (Travel Mode) is _mcAbsolute or _mcRelative
Execute
Done
InFeed 3
Busy
Function
Active
CommandAborted
Error
ErrorID 16#0000
Interrupt input*
Velocity
Time
* There may be a delay of up to several control periods from when the interrupt input turns ON until InFeed
changes to TRUE.
Additional Information
Done
InFeed
Busy
Active
CommandAborted
Error
ErrorID 16#0000
Interrupt input
Velocity
Time
Done
InFeed
Busy
Active
CommandAborted
Error
ErrorID 16#0000
Interrupt input
Velocity
Time
Additional Information
The deceleration rate when the axis reverses after an interrupt input follows the Deceleration
(Deceleration Rate) input variable.
MC_MoveFeed
Done
InFeed
Busy
Active
3
CommandAborted
Function
Error
ErrorID 16#0000
Interrupt input
Velocity
Time
Done
InFeed
Busy
Active
CommandAborted
Error
ErrorID 16#0000
Interrupt input
Velocity
Time
Done
InFeed
Busy
Active
CommandAborted
Error
ErrorID 16#0000
Interrupt input
Velocity
Time
Done
InFeed
Busy
Active
MC_MoveFeed
CommandAborted
Error
ErrorID 16#0000
3
Interrupt input
Position
Function
LastPosition
FirstPosition
Time
Velocity
Time
For details on BufferMode (Buffer Mode Selection), refer to the NJ/NX-series CPU Unit Motion Con-
trol User's Manual (Cat. No. W507) or NY-series Industrial Panel PC / Industrial Box PC Motion Con-
trol User’s Manual (Cat. No. W559).
Errors
If an error occurs during instruction execution, Error will change to TRUE and the axis will stop. You can
find out the cause of the error by referring to the value output by ErrorID (Error Code).
Execute
MC_MoveFeed
Done
Busy
Active
3
CommandAborted
Error
Function
ErrorID 16#0000 Error code
Error Codes
Refer to A-1 Error Codes for instruction errors.
Sample Programming
This section shows sample programming where control changes from velocity control to interrupt feed-
ing.
Parameter Settings
The minimum settings required for this sample programming are given below.
Axis Types
Axis Axis Type
Axis 1 Servo axis
Axis 2 Servo axis
Count Modes
Axis Count Mode
Axis 1 Rotary Mode
Axis 2 Linear Mode
Ring Counters
Modulo maximum Modulo mini-
Axis
position mum position
Axis 1 360 0
Units of Display
Axis Unit of Display
Axis 1 degree
Axis 2 mm
Operation Example
Axis 2
Sensor 1
Axis 1
Operation Pattern
Velocity control Position control
Velocity
Time
Sensor operation
MC_MoveFeed
Stamp
1 Conveyor Operation
Axis 1, which moves the conveyer belt, performs velocity control before interrupt feeding. 3
2 Feeding
Sample Programming
Sensor 1 is connected to latch 1.
When Sensor1 turns ON, operation changes to feeding and the axis stops at the specified posi-
tion.
Ladder Diagram
Main Variables
Timing Chart
Sensor 1
Hm1_D
Hm2_D
Mv_Feed_D
Mv_Feed_InFeed
Mv_Feed_Bsy
Mv_Feed_Act
Mv_Abs_D
Mv_Abs_Bsy
Mv_Abs_Act
Mv_Zero_D
Mv_Zero_Bsy
Mv_Zero_Act
Velocity
MC_Axis000
command current velocity
Velocity Time
MC_Axis001
command current velocity
Time
Sample Programming
If StartPg is TRUE, check that the Servo Drives for each axis are ready.
StartPg MC_Axis000.DrvStatus.Ready Lock1
MC_Axis001.DrvStatus.Ready Lock2
If the Servo Drives are ready, the Servos are turned ON for each axis.
PWR1
MC_MoveFeed
MC_Power
Lock1 MC_Axis000 Axis Axis Pwr1_Status
Enable Status
Busy Pwr1_Bsy
Error Pwr1_Err
ErrorID Pwr1_ErrID
3
Sample Programming
PWR2
MC_Power
Lock2 MC_Axis001 Axis Axis Pwr2_Status
Enable Status
Busy Pwr2_Bsy
Error Pwr2_Err
ErrorID Pwr2_ErrID
If a minor fault level error occurs for the axis composition, the error handler for the device (FaultHandler) is executed.
Program the FaultHandler according to the device.
MC_Axis000.MFaultLvl.Active FaultHandler
EN FaultHandler
MC_Axis001.MFaultLvl.Active
If the Servo is ON for axis 1 and home is not defined, the Home instruction is executed.
HM1
MC_Home
Pwr1_Status MC_Axis000.Details.Homed MC_Axis000 Axis Axis Hm1_D
Execute Done
Busy Hm1_Bsy
CommandAborted Hm1_Ca
Error Hm1_Err
ErrorID Hm1_ErrID
If the Servo is ON for axis 2 and home is not defined, the Home instruction is executed.
HM2
MC_Home
Pwr2_Status MC_Axis001.Details.Homed MC_Axis001 Axis Axis Hm2_D
Execute Done
Busy Hm2_Bsy
CommandAborted Hm2_Ca
Error Hm2_Err
ErrorID Hm2_ErrID
The parameters are set for interrupt feeding, absolute positioning, and high-speed homing.
InitFlag
MC_MoveFeed
ReferenceType CommandAborted Mv_Feed_Ca
Mv_Feed_Pos Position Error Mv_Feed_Err
Mv_Feed_Vel Velocity ErrorID Mv_Feed_ErrID
Mv_Feed_Acc Acceleration
Mv_Feed_Dec Deceleration
Jerk
Direction
Mv_Feed_Mm MoveMode 3
Mv_Feed_FeedDis FeedDistance
Mv_Feed_FeedVel FeedVelocity
Sample Programming
BufferMode
ErrorDetect
If home is defined for axis 2 and interrupt feeding is completed for axis 1, absolute positioning is performed for axis 2.
MV_ABS
MC_MoveAbsolute
MC_Axis001.Details.Homed Mv_Feed_D MC_Axis001 Axis Axis Mv_Abs_D
Execute Done
Mv_Abs_Pos Position Busy Mv_Abs_Bsy
Mv_Abs_Vel Velocity Active Mv_Abs_Act
Mv_Abs_Acc Acceleration CommandAborted Mv_Abs_Ca
Mv_Abs_Dec Deceleration Error Mv_Abs_Err
Mv_Abs_Jrk Jerk ErrorID Mv_Abs_ErrID
Direction
BufferMode
After absolute positioning is completed, the High-speed Home instruction is executed to move to home.
MV_ZERO
MC_MoveZeroPosition
Mv_Abs_Act MC_Axis001 Axis Axis Mv_Zero_D
Execute Done
Mv_Zero_Vel Velocity Busy Mv_Zero_Bsy
Mv_Zero_Acc Acceleration Active Mv_Zero_Act
Mv_Zero_Dec Deceleration CommandAborted Mv_Zero_Ca
Mv_Zero_Jrk Jerk Error Mv_Zero_Err
Mv_Zero_Bm BufferMode ErrorID Mv_Zero_ErrID
Contents of Inline ST
// MV_FEED parameters
Mv_Feed_TrigRef.Mode := _eMC_TRIGGER_MODE#_mcDrive;
Mv_Feed_TrigRef.LatchID := _eMC_TRIGGER_LATCH_ID#_mcLatch1;
Mv_Feed_TrigRef.InputDrive := _eMC_TRIGGER_INPUT_DRIVE#_mcEXT;
Mv_Feed_TrigVar := FALSE;
Mv_Feed_Pos := LREAL#2000.0;
Mv_Feed_Vel := LREAL#1000.0;
Mv_Feed_Acc := LREAL#10000.0;
Mv_Feed_Dec := LREAL#10000.0;
Mv_Feed_Mm := _eMC_MOVE_MODE#_mcVelocity;
Mv_Feed_FeedDis := LREAL#500.0;
Mv_Feed_FeedVel := LREAL#500.0;
// MV_ABS parameters
Mv_Abs_Pos := LREAL#1000.0;
Mv_Abs_Vel := LREAL#500.0;
Mv_Abs_Acc := LREAL#10000.0;
Mv_Abs_Dec := LREAL#10000.0;
Mv_Abs_Jrk := LREAL#10000.0;
// MV_ZERO parameters
Mv_Zero_Vel := LREAL#500.0;
Mv_Zero_Acc := LREAL#10000.0;
Mv_Zero_Dec := LREAL#10000.0;
Mv_Zero_Jrk := LREAL#10000.0;
Mv_Zero_Bm := _eMC_BUFFER_MODE#_mcBuffered;
Timing Chart
Sensor 1
Hm1_D
Hm2_D
Mv_Feed_Ex
Mv_Feed_D
Mv_Feed_InFeed
MC_MoveFeed
Mv_Feed_Bsy
Mv_Feed_Act
Mv_Abs_Ex
Mv_Abs_D
Mv_Abs_Bsy 3
Mv_Abs_Act
Mv_Zero_Ex
Sample Programming
Mv_Zero_D
Mv_Zero_Bsy
Mv_Zero_Act
Velocity
MC_Axis000
command current velocity
Velocity Time
MC_Axis001
command current velocity
Time
Sample Programming
// Processing when input parameters are not set
IF InitFlag=FALSE THEN
// MV_FEED parameters
Mv_Feed_TrigRef.Mode := _eMC_TRIGGER_MODE#_mcDrive;
Mv_Feed_TrigRef.LatchID := _eMC_TRIGGER_LATCH_ID#_mcLatch1;
Mv_Feed_TrigRef.InputDrive := _eMC_TRIGGER_INPUT_DRIVE#_mcEXT;
Mv_Feed_TrigVar := FALSE;
Mv_Feed_Pos := LREAL#2000.0;
Mv_Feed_Vel := LREAL#1000.0;
Mv_Feed_Acc := LREAL#10000.0;
Mv_Feed_Dec := LREAL#10000.0;
Mv_Feed_Mm := _eMC_MOVE_MODE#_mcVelocity;
Mv_Feed_FeedDis := LREAL#500.0;
Mv_Feed_FeedVel := LREAL#500.0;
// MV_ABS parameters
Mv_Abs_Pos := LREAL#1000.0;
Mv_Abs_Vel := LREAL#500.0;
Mv_Abs_Acc := LREAL#10000.0;
Mv_Abs_Dec := LREAL#10000.0;
Mv_Abs_Jrk := LREAL#10000.0;
// MV_ZERO parameters
Mv_Zero_Vel := LREAL#500.0;
Mv_Zero_Acc := LREAL#10000.0;
Mv_Zero_Dec := LREAL#10000.0;
Mv_Zero_Jrk := LREAL#10000.0;
Mv_Zero_Bm := _eMC_BUFFER_MODE#_mcBuffered;
END_IF;
// If StartPg is TRUE and the Servo Drive is ready, the Servo for axis 1 is turned ON.
// If the Servo Drive is not ready, the Servo is turned OFF.
IF (StartPg=TRUE)
AND (MC_Axis000.DrvStatus.Ready=TRUE) THEN
Pwr1_En:=TRUE; // Turn ON the Servo.
ELSE
Pwr1_En:=FALSE; // Turn OFF the Servo.
END_IF;
// If StartPg is TRUE and the Servo Drive is ready, the Servo for axis 2 is turned ON.
// If the Servo Drive is not ready, the Servo is turned OFF.
IF (StartPg=TRUE)
AND (MC_Axis001.DrvStatus.Ready=TRUE) THEN
Pwr2_En:=TRUE; // Turn ON the Servo for axis 2.
ELSE
Pwr2_En:=FALSE; // Turn OFF the Servo for axis 2.
END_IF;
// If the Servo is ON for axis 1 and home is not defined, the Home instruction is executed for axis 1.
IF (Pwr1_Status=TRUE) AND (MC_Axis000.Details.Homed=FALSE) THEN
Hm1_Ex:=TRUE;
END_IF;
// If the Servo is ON for axis 2 and home is not defined, the Home instruction is executed for axis 2.
IF (Pwr2_Status=TRUE) AND (MC_Axis001.Details.Homed=FALSE) THEN
Hm2_Ex:=TRUE;
END_IF;
// If home is defined for axis 2 and interrupt feeding is completed for axis 1, absolute positioning is performed for
axis 2.
IF (MC_Axis001.Details.Homed=TRUE) AND (Mv_Feed_D=TRUE) THEN
Mv_Abs_Ex := TRUE;
END_IF;
MC_MoveFeed
// MC_Power for axis 1
PWR1(
Axis := MC_Axis000,
Enable := Pwr1_En,
Status => Pwr1_Status,
Busy => Pwr1_Bsy, 3
Error => Pwr1_Err,
ErrorID => Pwr1_ErrID
Sample Programming
);
// MC_MoveFeed
MV_FEED(
Axis := MC_Axis000,
TriggerInput := Mv_Feed_TrigRef,
TriggerVariable := Mv_Feed_TrigVar,
Execute := Mv_Feed_Ex,
Position := Mv_Feed_Pos,
Velocity := Mv_Feed_Vel,
Acceleration := Mv_Feed_Acc,
Deceleration := Mv_Feed_Dec,
MoveMode := Mv_Feed_Mm,
FeedDistance := Mv_Feed_FeedDis,
FeedVelocity := Mv_Feed_FeedVel,
Done => Mv_Feed_D,
InFeed => Mv_Feed_InFeed,
Busy => Mv_Feed_Bsy,
Active => Mv_Feed_Act,
CommandAborted => Mv_Feed_Ca,
Error => Mv_Feed_Err,
ErrorID => Mv_Feed_ErrID
);
// MC_MoveAbsolute
MV_ABS(
Axis := MC_Axis001,
Execute := Mv_Abs_Ex,
Position := Mv_Abs_Pos,
Velocity := Mv_Abs_Vel,
Acceleration := Mv_Abs_Acc,
Deceleration := Mv_Abs_Dec,
Jerk := Mv_Abs_Jrk,
Done => Mv_Abs_D,
Busy => Mv_Abs_Bsy,
Active => Mv_Abs_Act,
CommandAborted => Mv_Abs_Ca,
Error => Mv_Abs_Err,
ErrorID => Mv_Abs_ErrID
);
// MC_MoveZeroPosition
MV_ZERO(
Axis := MC_Axis001,
Execute := Mv_Zero_Ex,
Velocity := Mv_Zero_Vel,
Acceleration := Mv_Zero_Acc,
Deceleration := Mv_Zero_Dec,
Jerk := Mv_Zero_Jrk,
BufferMode := Mv_Zero_Bm,
Done => Mv_Zero_D,
Busy => Mv_Zero_Bsy,
Active => Mv_Zero_Act,
CommandAborted => Mv_Zero_Ca,
Error => Mv_Zero_Err,
ErrorID => Mv_Zero_ErrID
);
MC_Stop
The MC_Stop instruction decelerates an axis to a stop.
Instruction Name FB/FUN Graphic expression ST expression
MC_Stop Stop FB MC_Stop_instance MC_Stop_instance (
Axis :=parameter,
MC_Stop Execute :=parameter,
Axis Axis
Deceleration :=parameter,
Execute Done
MC_Stop
Jerk :=parameter,
Deceleration Busy
BufferMode :=parameter,
Jerk Active
Done =>parameter,
BufferMode CommandAborted
Busy =>parameter,
Error
Active =>parameter,
ErrorID CommandAborted =>parameter,
Error =>parameter,
3
ErrorID =>parameter
);
Variables
Variables
Input Variables
Name Meaning Data type Valid range Default Description
Execute Execute BOOL TRUE or FALSE The instruction is executed when
FALSE Execute changes to TRUE.
Deceleration Deceleration LREAL Non-negative 0 Specify the deceleration rate. The
Rate number unit is command units/s2.*1
Jerk Jerk LREAL Non-negative 0 Specify the jerk. The unit is com-
number mand units/s3.*1
BufferMode Buffer Mode _eMC_BUFFER_ 0: _mcAborting 0*2 Specify the behavior when executing
Selection MODE more than one motion instruction.
0: Aborting
*1 Refer to Unit Conversion Settings in the NJ/NX-series CPU Unit Motion Control User's Manual (Cat. No. W507) or NY-
series Industrial Panel PC / Industrial Box PC Motion Control User’s Manual (Cat. No. W559) for information on command
units.
*2 The default value for an enumeration variable is actually not the number, but the enumerator.
Output Variables
Name Meaning Data type Valid range Description
Done Done BOOL TRUE or FALSE TRUE when the instruction is completed.
Busy Executing BOOL TRUE or FALSE TRUE when the instruction is acknowledged.
Active Controlling BOOL TRUE or FALSE TRUE when the axis is being controlled.
CommandAborted Command BOOL TRUE or FALSE TRUE when the instruction is aborted.
Aborted
Error Error BOOL TRUE or FALSE TRUE while there is an error.
ErrorID Error Code WORD * Contains the error code when an error occurs.
A value of 16#0000 indicates normal execution.
In-Out Variables
* Specify a user-defined Axis Variable that was created in the Axis Basic Settings of the Sysmac Studio (default: MC_Axis***)
or a system-defined axis variable name (_MC_AX[*], _MC1_AX[*], or _MC2_AX[*]).
Function
• The MC_Stop instruction decelerates an axis from the current velocity to a velocity of 0.
• The deceleration stop operation starts when Execute changes to TRUE.
• CommandAborted for the instruction that is currently in operation will change to TRUE when
MC_Stop is executed.
Instruction Details
This section describes the instruction in detail.
MC_Stop
Jerk Set to 0
The command value for the velocity is created with deceleration rate Dt.
Velocity
3
Vt
Function
Velocity Time
Decelera- Time
tion rate
-Dt
Jt = 0
Jerk Time
Vt: Velocity when deceleration starts, Dt: Specified deceleration rate, Jt: Specified jerk
Velocity
Vt
Velocity Time
-Dt
Jt
Jerk Time
-Jt
Vt: Velocity when deceleration starts, Dt: Specified deceleration rate, Jt: Specified jerk
Additional Information
If you set the deceleration to 0, an Immediate Stop instruction is executed. This will stop the axis
immediately without decelerating. An immediate stop occurs regardless of the setting of the
Acceleration/Deceleration Over Limit Selection only when the deceleration rate is set to 0.
For details on BufferMode (Buffer Mode Selection), refer to the NJ/NX-series CPU Unit Motion Con-
trol User's Manual (Cat. No. W507) or NY-series Industrial Panel PC / Industrial Box PC Motion Con-
trol User’s Manual (Cat. No. W559).
In-position Check
An in-position check is not performed when stopping for this instruction.
Timing Charts
• Busy (Executing) changes to TRUE at the same time as Execute changes to TRUE. Active (Con-
trolling) changes to TRUE in the next period.
• Done changes to TRUE when a velocity of 0 is reached.
• If another instruction aborts this instruction, CommandAborted changes to TRUE and Busy (Execut-
ing) and Active (Controlling) change to FALSE.
Execute
MC_Stop
Done
Busy
Active 3
CommandAborted
Function
Error
ErrorID 16#0000
Execute
Done
Busy
Active
CommandAborted
Error
ErrorID 16#0000
Velocity
Time
Velocity
Executed.
Vt Re-executed.
Velocity Time
Vt: Velocity when deceleration starts, Dt: Specified deceleration rate, Jt: Specified jerk
MC_Stop
MC_ResetFollowingError instruction is executed.
• Multi-execution of more than one MC_Stop Instruction is possible. Done from the first
MC_Stop instruction changes to TRUE.
• Done of the MC_Stop instruction changes to TRUE when one of the following conditions is met
after the MC_Stop instruction is executed.
3
• When the Enable input variable for the MC_Power instruction changes to FALSE (when the
Function
Servo is turned OFF)
• When _mcImmediateStop is selected for the StopMode input variable to the MC_TouchProbe
(Enable External Latch) instruction, the trigger condition is met, and the OMRON 1S-series
Servo Drive or G5-series Servo Drive stops immediately
Errors
Operation will stop if an error (e.g., axis error) occurs during instruction execution.
Specify the stopping method in the axis parameters. The stopping method can be immediate stop,
deceleration stop, or Servo OFF. If you specify a deceleration stop, the axis will continue decelerating
until it stops.
For details on setting the Stop Mode in the axis parameters, refer to the NJ/NX-series CPU Unit Motion
Control User's Manual (Cat. No. W507) or NY-series Industrial Panel PC / Industrial Box PC Motion
Control User’s Manual (Cat. No. W559).
MC_MoveVelocity
Execute
Busy
Active
CommandAborted
Error
ErrorID 16#0000
MC_Stop
Execute
Done
Busy
Active
CommandAborted
Error
Velocity
The current instruction is stopped for an
error if an axis error occurs.
Time
Version Information
Operation when an error is reset depends on the unit version of the CPU Unit as follows:
Note that you must reset errors only after the axis has stopped. Do not reset errors during axis
motion.
• A CPU Unit with unit version 1.10 or later:
If you clear the error for this instruction, the instruction will not start until Execute changes to
TRUE again.
Ver. 1.10 or Later
MC_Stop
Execute
Done
Busy
3
Active
CommandAborted
Function
Error reset.
Error
Execute
Done
Busy
Active
CommandAborted
Error
Error reset.
Error Codes
Refer to A-1 Error Codes for instruction errors.
MC_ImmediateStop
The MC_ImmediateStop instruction stops an axis according to the stopping mode that is set with the
StopMode (Stopping Mode Selection) input variable regardless of the status of the axis.
FB/
Instruction Name Graphic expression ST expression
FUN
MC_ImmediateStop Immediate FB MC_ImmediateStop_instance MC_ImmediateStop_instance (
Stop Axis :=parameter,
MC_ImmediateStop Execute :=parameter,
Axis Axis
StopMode :=parameter,
Execute Done
Done =>parameter,
StopMode Busy
Busy =>parameter,
CommandAborted
CommandAborted
Error
=>parameter,
ErrorID Error =>parameter,
ErrorID =>parameter
);
Variables
Input Variables
Name Meaning Data type Valid range Default Description
Execute Execute BOOL TRUE or FALSE FALSE The instruction is executed when
Execute changes to TRUE.
StopMode Stopping _eMC_ 1: _mcImmediateStop 1* Select the stopping mode.
Mode STOP_- 2: _mcImmediateStopFEReset 1: Perform an immediate stop.
Selection MODE 2: Perform an immediate stop and
3: _mcFreeRunStop
reset the following error counter.
3: Perform an immediate stop and
turn OFF the Servo.
* The default value for an enumeration variable is actually not the number, but the enumerator.
Output Variables
Name Meaning Data type Valid range Description
Done Done BOOL TRUE or TRUE when the instruction is completed.
FALSE
Busy Executing BOOL TRUE or TRUE when the instruction is acknowledged.
FALSE
CommandAborted Command BOOL TRUE or TRUE when the instruction is aborted.
Aborted FALSE
Error Error BOOL TRUE or TRUE while there is an error.
FALSE
ErrorID Error Code WORD * Contains the error code when an error occurs. A value
of 16#0000 indicates normal execution.
MC_ImmediateStop
• When CommandAborted changes to
TRUE.
CommandAborted • When this instruction is canceled because • When Execute is TRUE and changes to
another MC_Stop instruction was executed with FALSE.
the Buffer Mode set to Aborting. • After one period when Execute is FALSE.
• When this instruction is canceled due to an error.
Error When there is an error in the execution conditions or When the error is cleared.
input parameters for the instruction.
3
In-Out Variables
Function
Name Meaning Data type Valid range Description
Axis Axis _sAXIS_REF --- Specify the axis.*
* Specify a user-defined Axis Variable that was created in the Axis Basic Settings of the Sysmac Studio (default: MC_Axis***)
or a system-defined axis variable name (_MC_AX[*], _MC1_AX[*], or _MC2_AX[*]).
Function
• You can execute the MC_ImmediateStop instruction under any conditions.
For example, you can use this instruction to stop an axis immediately even if it is decelerating to a
stop for an error.
You cannot execute the MC_Stop while Status.ErrorStop (Error Deceleration Stopping) is TRUE, but
you can execute the MC_ImmediateStop.
• When this instruction is executed, the axis stops immediately according to StopMode (Stopping
Mode Selection). CommandAborted changes to TRUE for the instruction that is currently in opera-
tion.
• Status.ErrorStop (Error Deceleration Stopping) in the axis status changes to TRUE when this instruc-
tion is executed and an Immediate Stop Instruction Executed error (error code: 5485 hex) occurs.
Timing Charts
• Busy (Executing) changes to TRUE when Execute changes to TRUE.
• Done changes to TRUE when processing of the Immediate Stop instruction is completed.
MC_Move Instruction
Execute
Done
Busy
Active
CommandAborted
Error
ErrorID 16#0000
MC_ImmediateStop Instruction
Execute
Done
Busy
CommandAborted
Error
ErrorID 16#0000
Velocity
Time
MC_ImmediateStop
Axes Group Moving
If the instruction is executed for an axis that is in an axes group motion, an error will occur for the
axis and an immediate stop is performed. An error will also occur for the axis group, and the axis
group motion will stop.
Function
• During execution of the MC_ResetFollowingError (Reset Following Error Counter) instruction
• During an immediate stop for the MC_TouchProbe (Enable External Latch) instruction
• While Execute is TRUE for one or more MC_Stop instructions
You can execute this instruction for an axis for which Status.Stopping (Deceleration Stopping) is
TRUE.
When this instruction is executed, CommandAborted from the following instructions changes to
TRUE.
• MC_Stop instruction
• MC_ResetFollowingError (Reset Following Error Counter) instruction
• MC_TouchProbe (Enable External Latch) instruction (during the immediate stop)
Error
The axis will stop immediately even if an error (e.g., axis error) occurs during instruction execution.
For details on setting the Stop Mode in the axis parameters, refer to the NJ/NX-series CPU Unit Motion
Control User's Manual (Cat. No. W507) or NY-series Industrial Panel PC / Industrial Box PC Motion
Control User’s Manual (Cat. No. W559).
Execute
Done
Busy
CommandAborted
Error
Error Codes
Refer to A-1 Error Codes for instruction errors.
MC_SetPosition
The MC_SetPosition instruction changes the command current position or the actual current position of
an axis as required.
Instruction Name FB/FUN Graphic expression ST expression
MC_SetPosition Set Position FB MC_SetPosition_instance MC_SetPosition_instance (
MC_SetPosition
Axis :=parameter,
MC_SetPosition Execute :=parameter,
Axis Axis
Position :=parameter,
Execute Done
ReferenceType
Position Busy
:=parameter,
ReferenceType CommandAborted
Relative :=parameter,
Relative Error
ExcutionMode :=parameter,
ExecutionMode ErrorID Done =>parameter, 3
Busy =>parameter,
CommandAborted
=>parameter,
Variables
Error =>parameter,
ErrorID =>parameter
);
Variables
Input Variables
Name Meaning Data type Valid range Default Description
Execute Execute BOOL TRUE or FALSE FALSE The instruction is executed
when Execute changes to
TRUE.
Position Target Posi- LREAL Negative number, 0 Specify the absolute target
tion positive number, or position. The unit is com-
0 mand units.*1
ReferecneType Position Type _eMC_REFERENCE_ 0: _mcCommand 0*2 Specifies the position type.
Selection TYPE 1: _mcFeedback 0: Command position (servo
axis or virtual servo axis)
1: Actual position (encoder
axis or virtual encoder
axis)
Relative Relative Posi- BOOL TRUE or FALSE FALSE (Reserved)
(Reserved) tion Selection
MC_Execution Execution _eMC_EXECUTION_ 0: _mcImmediately 0*2 (Reserved)
Mode Mode MODE
(Reserved)
*1 Refer to Unit Conversion Settings in the NJ/NX-series CPU Unit Motion Control User's Manual (Cat. No. W507) or NY-
series Industrial Panel PC / Industrial Box PC Motion Control User’s Manual (Cat. No. W559) for information on command
units.
*2 The default value for an enumeration variable is actually not the number, but the enumerator.
Output Variables
Name Meaning Data type Valid range Description
Done Done BOOL TRUE or FALSE TRUE when the instruction is completed.
Busy Executing BOOL TRUE or FALSE TRUE when the instruction is acknowledged.
CommandAborted Command BOOL TRUE or FALSE TRUE when the instruction is aborted.
Aborted
Error Error BOOL TRUE or FALSE TRUE while there is an error.
ErrorID Error Code WORD * Contains the error code when an error occurs.
A value of 16#0000 indicates normal execution.
In-Out Variables
* Specify a user-defined Axis Variable that was created in the Axis Basic Settings of the Sysmac Studio (default: MC_Axis***)
or a system-defined axis variable name (_MC_AX[*], _MC1_AX[*], or _MC2_AX[*]).
Function
• This instruction changes the command current position of the Servo axis to the specified target posi-
tion. If you execute this instruction on an encoder axis, the actual current position will change to the
specified target position.
• Specify the target position in absolute coordinates.
• The actual current position changes at the same time as the command current position changes. The
following error is kept the same before and after the change. If you execute this instruction on a com-
mand servo axis, the difference between the actual position and the actual current position will
remain the same before and after the change. Because of this, after you execute this instruction, the
actual current position of the axis takes the value calculated by the following equation.
Actual current position after change = Target position − Following error before change
• If you specify the actual position for a servo axis or the command position for an encoder axis, a posi-
tion type error will occur.
• When the Count Mode is set to Rotary Mode, set the target position to a value that is equal to or
greater than the modulo minimum position and less than the modulo maximum position. A ring
counter error will occur if the target position is outside this range.
• When the Count Mode is set to Linear Mode, you can set the target position to a value outside the
range defined by the software limits.
• You can use this instruction for an axis that is stopped or in motion.
MC_SetPosition
Home is undefined for the specified axis after this instruction ends. Because of this, you cannot
execute following functions or instructions after this instruction ends.
• Software limits
• MC_MoveZeroPosition (High-speed Home) instruction
• Multi-axes coordinated control instructions (linear or circular interpolation)
3
ReferenceType (Position Type Selection)
• Set ReferenceType to the command position to use a servo axis or virtual servo axis.
Function
• Set ReferenceType to the actual position to use an encoder axis or virtual encoder axis.
Timing Charts
Execution While Axis Is Stopped
The actual position starts changing when Execute changes to TRUE. Busy (Executing) changes to
TRUE when Execute changes to TRUE. Done changes to TRUE after the actual position is
changed.
Execute
Done
Busy
Execute
Done
Busy
Active
CommandAborted
Error
ErrorID 16#0000
Execute
Done
Busy
The actual position changes to
Velocity 800 mm and reverse operation
is performed to move to a
position of 400 mm.
Time
Additional Information
MC_SetPosition
For details on multi-execution of motion control instructions, refer to the NJ/NX-series CPU Unit Motion
Control User’s Manual (Cat. No. W507) or NY-series Industrial Panel PC / Industrial Box PC Motion
Control User’s Manual (Cat. No. W559).
Function
MC_HomeWithParameter (Home with Parameters) MC_MoveZeroPosition (High-speed Home) instruction
instruction
MC_CamIn (Start Cam Operation) Instruction MC_TorqueControl (Torque Control) Instruction
MC_GearIn (Start Gear Operation) Instruction MC_SyncMoveVelocity (Cyclic Synchronous Velocity
Control) instruction
MC_GearInPos (Positioning Gear Operation) instruc-
tion
Errors
If an error occurs during instruction execution, Error will change to TRUE and the axis will stop. You can
find out the cause of the error by referring to the value output by ErrorID (Error Code).
Additional Information
If you execute this instruction while the axis is in motion, the instruction of the axis currently in
motion will be restarted and the data required for positioning will be recalculated. If an error
occurs, it will be for the instruction of the axis currently in motion rather than for this instruction.
Execute
Busy
Error
Error Codes
Refer to A-1 Error Codes for instruction errors.
MC_SetOverride
The MC_SetOverride instruction changes the target velocity for an axis.
Instruction Name FB/FUN Graphic expression ST expression
MC_SetOverride Set Override FB MC_SetOverride_instance MC_SetOverride_instance (
Factors Axis :=parameter,
MC_SetOverride
MC_SetOverride
Enable :=parameter,
Axis Axis
VelFactor :=parameter,
Enable Enabled
AccFactor :=parameter,
VelFactor Busy
JerkFactor :=parameter,
AccFactor Error
Enabled =>parameter,
JerkFactor ErrorID
Busy =>parameter,
Error =>parameter,
ErrorID =>parameter 3
);
Variables
Variables
Input Variables
Name Meaning Data type Valid range Default Description
Enable Enable BOOL TRUE or FALSE FALSE The override factors are enabled when
Enable is TRUE. The override factors
return to 100% when Enable changes to
FALSE.
VelFactor Velocity Over- LREAL 0 to 500 100 Specify the velocity override factor. The
ride Factor valid range of the override factors is
between 0.01and 500.00. Values above
500.00 are treated as 500 and values
less then 0.01 (including negative val-
ues) are treated as 0.01. The override
factor will be 0 only when 0 is specified.
The unit is %.
AccFactor Accelera- LREAL 0 to 500 100 (Reserved)
(Reserved) tion/Decelera-
tion Override
Factor
JerkFactor Jerk Override LREAL 0 to 500 100 (Reserved)
(Reserved) Factor
Output Variables
Name Meaning Data type Valid range Description
Enabled Enable BOOL TRUE or FALSE TRUE when the axis is being controlled.
Busy Executing BOOL TRUE or FALSE TRUE when the instruction is acknowledged.
Error Error BOOL TRUE or FALSE TRUE while there is an error.
ErrorID Error Code WORD * Contains the error code when an error occurs.
A value of 16#0000 indicates normal execution.
In-Out Variables
* Specify a user-defined Axis Variable that was created in the Axis Basic Settings of the Sysmac Studio (default: MC_Axis***)
or a system-defined axis variable name (_MC_AX[*], _MC1_AX[*], or _MC2_AX[*]).
Function
• The MC_SetOverride instruction changes override factors related to the target velocity of the axis.
Changes the target velocity of the axes in operation by changing the override.
• The override factors apply only to the following instructions.
MC_Move (Positioning) instruction MC_MoveJog (Jog) instruction
MC_MoveAbsolute (Absolute Positioning) instruction MC_MoveFeed (Interrupt Feeding) instruction
MC_MoveRelative (Relative Positioning) instruction MC_MoveZeroPosition (High-speed Home) instruction
MC_MoveVelocity (Velocity Control) instruction
Additional Information
MC_SetOverride
Influence on Other Instructions
Use this instruction to temporarily change the target velocities of other instructions.
This instruction has no affect on instructions to which a target velocity is not input or instructions
for which the target velocity is updated every period, such the Cyclic Synchronous Velocity Con-
trol instruction. However, Enabled remains TRUE even if the MC_SetOverride (Set Override Fac-
tors) instruction is executed for an instruction to which it does not apply.
3
Timing Charts
Function
Overriding the MC_MoveAbsolute Instruction
An example of a time chart for using the Set Override Factors instruction for the MC_MoveAbsolute
(Absolute Positioning) instruction is given below.
Done
Busy
Active
CommandAborted
Current Instruction
Enable
Enabled
Busy
Velocity
Override factor: 200%
Time
If the MC_SetOverride instruction is disabled, the target velocity returns to an override factor of
100%.
Execute
InVelocity
Busy
Active
Current Instruction
Enable
Enabled
Busy
Velocity
Override factor: 200%
Time
Errors
If an error occurs during instruction execution, Error will change to TRUE. If a minor fault occurs, the
axis will stop.
You can find out the cause of the error by referring to the value output by ErrorID (Error Code). If you
remove the cause of error, Error will change to FALSE.
MC_SetOverride
Enable
VelFactor 200
Enabled
Busy
3
Error
Function
ErrorID 16#0000 Error code
Velocity
Override factor: 200%
Time
Error Codes
Refer to A-1 Error Codes for instruction errors.
MC_ResetFollowingError
The MC_ResetFollowingError instruction resets the following error between the command current posi-
tion and the actual current position.
FB/
Instruction Name Graphic expression ST expression
FUN
MC_ResetFollowingError Reset FB MC_ResetFollowingError_instance MC_ResetFollowingError_
Following instance (
Error Counter MC_ResetFollowingError Axis :=parameter,
Axis Axis
Execute :=parameter,
Execute Done
BufferMode :=parameter,
BufferMode Busy
Done =>parameter,
Active
Busy =>parameter,
CommandAborted
Active =>parameter,
Error
CommandAborted
ErrorID =>parameter,
Error =>parameter,
ErrorID =>parameter
);
Variables
Input Variables
Name Meaning Data type Valid range Default Description
Execute Execute BOOL TRUE or FALSE FALSE The instruction is executed when Exe-
cute changes to TRUE.
BufferMode Buffer Mode _eMC_ 0: _mcAborting 0* Specify the behavior when executing
Selection BUFFER_ more than one motion instruction.
MODE 0: Aborting
* The default value for an enumeration variable is actually not the number, but the enumerator.
Output Variables
Name Meaning Data type Valid range Description
Done Done BOOL TRUE or FALSE TRUE when the instruction is completed.
Busy Executing BOOL TRUE or FALSE TRUE when the instruction is acknowledged.
Active Controlling BOOL TRUE or FALSE TRUE when the axis is being controlled.
CommandAborted Command BOOL TRUE or FALSE TRUE when the instruction is aborted.
Aborted
Error Error BOOL TRUE or FALSE TRUE while there is an error.
ErrorID Error Code WORD * Contains the error code when an error occurs.
A value of 16#0000 indicates normal execution.
MC_ResetFollowingError
• When Error changes to TRUE.
• When CommandAborted changes to
TRUE.
Active When the instruction is started. • When Done changes to TRUE.
• When Error changes to TRUE.
• When CommandAborted changes to
TRUE.
CommandAborted • When the MC_ResetFollowingError instruction is • When Execute is TRUE and changes to
aborted because another motion control instruc- FALSE.
tion was executed with the Buffer Mode set to • After one period when Execute is FALSE.
3
Aborting.
• When this instruction is canceled due to an error.
Function
• When this instruction is executed while there is an
error.
Error When there is an error in the execution conditions or When the error is cleared.
input parameters for the instruction.
In-Out Variables
* Specify a user-defined Axis Variable that was created in the Axis Basic Settings of the Sysmac Studio (default: MC_Axis***)
or a system-defined axis variable name (_MC_AX[*], _MC1_AX[*], or _MC2_AX[*]).
Function
• The MC_ResetFollowingError instruction resets the following error between the command current
position and the actual current position in the MC Function Module to 0 in Cyclic Synchronous Posi-
tion (CSP) Control Mode.
• When Execute changes to TRUE, the actual current position at that point is used as the command
position (i.e., the target position).
For example, when a following error occurs in the holding operation shown below, you can execute
this instruction to implement a position command in the reverse direction and therefore set the follow-
ing error to 0.
CommandAborted for the instruction for which the following error occurred changes to TRUE and
instruction execution is aborted.
Position
Command position
Target position in the holding
direction (position command value)
Holding stop position
Actual position
(actual position of motor)
Velocity Time
Command
Target velocity in the holding direction velocity
(velocity command value)
Time
Start Holding Reset Following
Error Counter executed.
• When the following error is set to 0, the maximum velocity that is set in the axis parameters is used to
implement a position command. The maximum acceleration and deceleration rates are not used.
• When the command to the new target position is completed, the Done output variable changed to
TRUE.
• This instruction implements a command position in the reverse direction to the direction in which the
following error occurred, but the Operation Selection at Reversing axis parameter is not used.
Instruction Details
This section describes the instruction in detail.
MC_ResetFollowingError
Velocity Control) instruction and then execute the MC_ResetFollowingError instruction before the
change to Position Control Mode is actually completed, the timing for resetting the following error to
0 depends on the unit version of the CPU Unit as described below.
Function
Refer to MC_TorqueControl on page 3-312 and MC_SyncMoveVelocity on page 3-369 for details on
changing the control mode.
Timing Charts
Timing charts for when this instruction is executed during holding status for the MC_MoveAbsolute
(Absolute Positioning) instruction are given below.
MC_MoveAbsolute instruction
Execute
Done
Busy
Active
CommandAborted
Error
ErrorID 16#0000
MC_ResetFollowingError instruction
Execute
Done
Busy
Active
CommandAborted
Error
ErrorID 16#0000
Position
Command position
Actual position
Time
Velocity Holding status
Command velocity
Actual velocity
Time
MC_ResetFollowingError
Multi-execution of Motion Control Instructions
For details on multi-execution of motion control instructions, refer to the NJ/NX-series CPU Unit Motion
Control User’s Manual (Cat. No. W507) or NY-series Industrial Panel PC / Industrial Box PC Motion
Control User’s Manual (Cat. No. W559).
Function
cution of instructions.
Buffer Mode Selection Description
Aborting Cancels the instruction being executed and switches to this instruction.
For details on BufferMode (Buffer Mode Selection), refer to the NJ/NX-series CPU Unit Motion Con-
trol User's Manual (Cat. No. W507) or NY-series Industrial Panel PC / Industrial Box PC Motion Con-
trol User’s Manual (Cat. No. W559).
Errors
If an error occurs during instruction execution, an immediate stop is performed and CommandAborted
changes to TRUE. Also, if an error occurs when this instruction is executed, Error will change to TRUE.
You can find out the cause of the error by referring to the value output by ErrorID (Error Code).
Timing charts for when the MC_MoveAbsolute (Absolute Positioning) instruction is executed and an
error occurs when the MC_ResetFollowing Error is executed during holding status are given below.
MC_MoveAbsolute instruction
Execute
Done
Busy
Active
CommandAborted
Error
ErrorID 16#0000
MC_ResetFollowingError Instruction
Execute
Done
Busy
Active
CommandAborted
Error
Error Codes
Refer to A-1 Error Codes for instruction errors.
MC_CamIn
The MC_CamIn instruction starts a cam operation by using a specified cam table.
FB/
Instruction Name Graphic expression ST expression
FUN
MC_CamIn Start Cam FB MC_CamIn_instance MC_CamIn_instance (
Operation Master :=parameter,
MC_CamIn Slave :=parameter,
MC_CamIn
Master Master
CamTable :=parameter,
Slave Slave
Execute :=parameter,
CamTable CamTable
Periodic :=parameter,
Execute InCam
StartMode :=parameter,
Periodic InSync
StartPosition :=parameter,
StartMode EndOfProfile
MasterStartDistance :=parameter, 3
StartPosition Index MasterScaling :=parameter,
MasterStartDistance Busy SlaveScaling :=parameter,
MasterScaling Active MasterOffset :=parameter,
Variables
SlaveScaling CommandAborted SlaveOffset :=parameter,
MasterOffset Error ReferenceType :=parameter,
SlaveOffset ErrorID Direction :=parameter,
ReferenceType CamTransition :=parameter,
Direction BufferMode :=parameter,
CamTransition InCam =>parameter,
BufferMode InSync =>parameter,
EndOfProfile =>parameter,
Index =>parameter,
Busy =>parameter,
Active =>parameter,
CommandAborted =>parameter,
Error =>parameter,
ErrorID =>parameter
);
Variables
Input Variables
Name Meaning Data type Valid range Default Description
Execute Execute BOOL TRUE or FALSE FALSE The instruction is executed
when Execute changes to
TRUE.
Periodic Periodic BOOL TRUE or FALSE FALSE Specify whether to execute
Mode the specified cam table peri-
odically or only once.
FALSE: Non-periodic
TRUE: Periodic
StartMode Start Mode _eMC_ 0: _mcAbsolutePosition 0*1 Specify the coordinates
START_MODE 1: _mcRelativePosition used by MasterStartDis-
tance.
0: Absolute position
1: Relative position
*1 The default value for an enumeration variable is actually not the number, but the enumerator.
MC_CamIn
*2 Refer to Unit Conversion Settings in the NJ/NX-series CPU Unit Motion Control User's Manual (Cat. No. W507) or NY-
series Industrial Panel PC / Industrial Box PC Motion Control User’s Manual (Cat. No. W559) for information on command
units.
*3 The task period is the primary period if the task is the primary periodic task and the task period of the priority-5 periodic
task if the task is the priority-5 periodic task.
*4 A CPU Unit with unit version 1.06 or later and Sysmac Studio version 1.07 or higher are required for these settings. The
3
operation is the same regardless of which of the four types of blending is specified.
Variables
Output Variables
Name Meaning Data type Valid range Unit Description
InCam Cam Motion BOOL TRUE or --- TRUE when the cam table start point is exe-
FALSE cuted.
InSync In Sync BOOL TRUE or --- TRUE when the cam is in operation.
FALSE
EndOfProfile End of Cam BOOL TRUE or --- TRUE when the cam table end point is exe-
Cycle FALSE cuted.
Index Index UINT Nonnega- --- Contains the cam data index number.*1
tive value
Busy Executing BOOL TRUE or --- TRUE when the instruction is acknowledged.
FALSE
Active Controlling BOOL TRUE or --- TRUE when the axis is being controlled.
FALSE
Command Aborted Command BOOL TRUE or --- TRUE when the instruction is aborted.
Aborted FALSE
Error Error BOOL TRUE or --- TRUE while there is an error.
FALSE
ErrorID Error Code WORD *2 --- Contains the error code when an error occurs.
A value of 16#0000 indicates normal execu-
tion.
Note The update timing of the output variables may change depending on the mode that is set for cam switching. The default
timing is given above.
In-Out Variables
*1 Specify a user-defined Axis Variable that was created in the Axis Basic Settings of the Sysmac Studio (default:
MC_Axis***) or a system-defined axis variable name (_MC_AX[*], _MC1_AX[*], or _MC2_AX[*]).
*2 N in the array variable is set automatically by the Sysmac Studio. Specify a cam data variable that was created on Cam
Editor of the Sysmac Studio.
Function
• The MC_CamIn instruction executes a cam motion that synchronizes the master axis phase and
slave axis displacement according to a cam table.
MC_CamIn
• You must create the cam table specified for this instruction by using the Cam Editor and download it
to the Controller in advance.
• This instruction is executed when Execute changes to TRUE.
Function
Additional Information
Use the Synchronize Menu of the Sysmac Studio to download the project.
For details on cam tables, refer to the NJ/NX-series CPU Unit Motion Control User's Manual (Cat. No.
W507) or NY-series Industrial Panel PC / Industrial Box PC Motion Control User’s Manual (Cat. No.
W559).
Specify the phases and displacements in the cam table as relative quantities from a start point of 0.0.
The command positions for the master and slave axes are linear interpolations between two cam data
where the slave axis displacement corresponding to the master axis phase is calculated.
If there are only a few cam data, the intervals between phases are large and cam operation will not be
very precise. If there are many cam data, the intervals between phases are small and cam operation
will be very precise.
1 cycle Command position during electronic cam operation
Cam Table The phase is calculated from the master
350
Phase Displacement axis position for each cycle. The linear
Start 300 interpolation of cam data is used to
point 0 0 Index = 0 calculate displacements from the phases.
250 (These are the red dots on the line.)
Cam data 60 200 1
200
Displace-
120 100 2
ment 150
180 300 3
100
240 100 4
50
300 200 5
0
End point 360 0 6 0 60 120 180 240 300 360
Phase
Instruction Details
This section describes the instruction in detail.
Software Limits
MC_CamIn
If the slave axis exceeds the software limit during cam operation, an error occurs.
TYPE
Function
(*Cam data structure*)
_sMC_CAM_REF :
STRUCT
Phase : REAL; (*Phase*)
Distance : REAL; (*Displacement*)
END_STRUCT;
END_TYPE
VAR
(*Cam table*)
MyCam1 : ARRAY [0..999] OF _sMC_CAM_REF;
END_VAR
The following notation is used to specify MyCam1 for this instruction. In this example, the master
axis is Axis1 and the slave axis is Axis2.
MC_CamIn_instance
MC_CamIn
Axis1 Master Master Axis1
Axis2 Slave Slave Axis2
MyCam1 CamTable CamTable MyCam1
An error will occur if the specified cam table does not exist in the Controller. You can also specify the
same cam table for more than one axis.
The values in cam data variables can be written from the user program. However, any changes to
the values are lost when the power supply to the Controller is turned OFF or the cam data variables
are downloaded from the Sysmac Studio.
The values that are downloaded from the Sysmac Studio are always used when the power supply to
the Controller is turned ON or after the cam data variables are downloaded.
To save any changes, execute the MC_SaveCamTable instruction.
Changes to the cam data variables are retained when the operating mode of the CPU Unit is
changed.
Additional Information
When the MasterStartDistance (Master Following Distance) is then passed, the cam operation of the
slave axis starts and the InSync output variable changes to TRUE.
The MasterStartDistance (Master Following Distance) is specified either as an absolute position, or as
a relative distance from the StartPosition (Cam Table Start Position). Set whether to specify using an
absolute position or relative position with StartMode.
Connecting Connecting
Master axis Slave axis Cam curve Phase pitch
velocity acceleration
0.000 0.000 --- --- --- ---
80.000 80.000 Straight line 360.000 0.000 0.010
120.000 200.000 Straight line 1080.000 0.000 0.010
360.000 360.000 Straight line 240.000 0.000 0.010
The conditions for starting cam operation are given in the following table.
MC_CamIn
For condition 2, the InCam (Cam Motion) changes to TRUE when the master axis passes 0°. Then, the
InSync output variable changes to TRUE and the slave axis starts cam operation when the master axis
passes 80°*1. For condition 2, cam operation starts in the middle of the cam table, so the slave axis will
accelerate rapidly.
3
Master axis
command position
Function
360°
80°
Time
0°
Slave axis
command position
Operation for Condition 1
Time
0
InCam
InSync
Slave axis
command position
Operation for Condition 2
Time
0
InCam
InSync
*1. Because StartMode is set to _mcRelativePosition, the cam operation starts at StartPosition + MasterStart-Dis-
tance, or 80°.
Additional Information
For condition 2, the slave axis will accelerate rapidly if SlaveOffset is set to 0.
Slave axis
command Operation for Condition 2
position
Time
0
InCam
InSync
If SlaveOffset is set to -80, the slave axis starts synchronization from a displacement of Mas-
terStartDistance (Master Following Distance) and rapid acceleration is prevented.
Slave axis
command Operation for Condition 2
position
Time
0
InCam
InSync
For condition 1, the InCam (Cam Motion) and InSync output variables both change to TRUE and the
slave axis starts cam operation when the master axis passes 0°.
For condition 2, the InCam (Cam Motion) and InSync output variables both change to TRUE and the
slave axis starts cam operation when the master axis passes 40° (the value that is specified for StartPo-
sition (Cam Table Start Position)).
For condition 3, the InCam (Cam Motion) changes to TRUE when the master axis passes 40°. Then,
the InSync output variable changes to TRUE and the slave axis starts cam operation when the master
axis passes 120°*1.
*1. Because StartMode is set to _mcRelativePosition, the cam operation starts at StartPosition + MasterStart-Dis-
tance, or 120°.
Master axis
command position
360°
120°
40° Time
0°
MC_CamIn
Slave axis
command position Operation for Condition 1
Function
Time
0
InCam
InSync
Slave axis
command position
Operation for Condition 2
Time
0
InCam
InSync
Slave axis
command position Operation for Condition 3
Time
0
InCam
InSync
Example 3: Differences in Starting Cam Operation of the Slave Axis for Differences
in StartMode
You can use StartMode to specify whether the value that is specified for MasterStartDistance (Master
Following Distance) is treated as an absolute value or a relative value.
This example describes the differences in starting cam operation of the slave axis for differences in
StartMode. The cam table settings are the same as in the previous example.
The conditions for starting cam operation are given in the following table.
For both conditions 1 and 2, the InCam (Cam Motion) output variable changes to TRUE when the mas-
ter axis passes 40°.
For condition 1, StartMode is set to _mcAbsolutePosition (absolute position), so the InSync output vari-
able changes to TRUE and the slave axis starts cam operation when the master axis passes 80°.
For condition 2, StartMode is set to _mcRelativePosition (relative position), so the InSync output vari-
able changes to TRUE and the slave axis starts cam operation when the master axis passes 120° (=
40° + 80°).
Master axis
command position
360°
120°
80°
40° Time
0°
MC_CamIn
Slave axis
command position Operation for Condition 1
Time
Function
0
InCam
InSync
Slave axis
command position
Operation for Condition 2
Time
0
InCam
InSync
Displace-
ment
Starting
position
Displace-
ment
Starting
position
Scaling Factor
You can specify a scaling factor to scale up or scale down the master axis phase and slave axis dis-
placement of a specified cam table. You can apply separate factors to the master and slave axes.
Slave scaling
2.0
MC_CamIn
1.0
3
1.0 2.0
Master scaling
Function
Offset
You can shift the phase and displacement by an offset from the specified cam table.
You can specify separate offsets for the master axis phase and slave axis displacement.
MasterOffset > 0
Displacement
One period
MasterOffset = 100
MasterOffset < 0
Displacement
MasterOffset = -100
SlaveOffset > 0
Displacement
SlaveOffset = 50
SlaveOffset < 0
Displacement
Phase
SlaveOffset = −50
MC_CamIn
• _mcLatestCommand: Command position (value calculated in the same task period)
The command position of the master axis that was calculated in the same task period is used.
This enables the use of information that is more recent than for _mcCommand. However, the axis
number of the master axis must be set lower than the axis number of the slave axis. If the axis
number of the slave axis is lower than the axis number of the master axis, Error will change to
TRUE. A Master/Slave Axis Numbers Not in Ascending Order error (error code: 5438 hex) will be 3
output to ErrorID.
Function
Precautions for Correct Use
Here, the task period is the primary period if the task is the primary periodic task and the task
period of the priority-5 periodic task if the task is the priority-5 periodic task. In the same way, the
periodic task is the primary periodic task or the priority-5 periodic task.
Additional Information
The command position that is calculated in the same task period enables greater precision in
synchronization than the command position that was calculated in the previous task period.
However, the axis number set for the master axis in the system-defined variable for motion con-
trol must be lower than the axis number set for the slave axis in the system-defined variable for
motion control.
Direction
You can start cam operation for the slave axis only if the travel direction of the master axis matches
the setting in Direction. Direction is valid only while InSync is TRUE.
Slave
position
Time
Master
position
Time
_mcPositiveDirection
Cam operation starts when the master axis is moving in the positive direction.
Slave
position
Time
Master
position
Time
_mcNegativeDirection
Cam operation starts when the master axis is moving in the negative direction.
Slave
position
Time
Master
position
Time
Version Information
If MasterStartDistance (Master Following Distance) is exceeded while the master axis is moving
in the opposite direction from Direction (Direction) and InSync (In Sync) changes to TRUE, the
operation depends on the unit version of the CPU Unit as follows:
• CPU Units with Unit Version 1.10 or Later
When InSync (In Sync) changes to TRUE, the slave axis moves to the displacement according
to the phase in the cam table. If the master axis then moves in the direction specified in Direc-
tion (Direction), the slave axis starts cam operation.
• CPU Units with Unit Version 1.09 or Earlier
If the master axis moves in the direction specified in Direction (Direction) after InSync (In
Sync) changes to TRUE, the slave axis starts cam operation.
MC_CamIn
Master axis command position
360°
Function
80°
Time
0°
Slave axis command position
Ver. 1.10 or Later
Time
0
InCam
InSync
Time
0
InCam
InSync
StartPosition
MC_CamIn1
MC_CamIn
Active
InCam
InSync
EndOfProfile 3
MC_CamIn2
Function
Execute
Busy
Active
InCam
InSync
EndOfProfile
StartPosition
MC_CamIn1
Active
InCam
InSync
EndOfProfile
MC_CamIn2
Execute
Busy
Active
InCam
InSync
EndOfProfile
For details on BufferMode (Buffer Mode Selection), refer to the NJ/NX-series CPU Unit Motion Con-
trol User’s Manual (Cat. No. W507) or NY-series Industrial Panel PC / Industrial Box PC Motion Con-
trol User’s Manual (Cat. No. W559).
Index
Of the two cam data used to find the command positions of the master and slave axes, the one with
the smaller cam data index number is output to the Index output variable. Use this value for fine-tun-
ing the cam data with the Cam Editor or with the user program.
In-position Check
An in-position check is not performed for this instruction.
Override Factors
You cannot set override factors with the MC_SetOverride (Set Override Factors) instruction for this
instruction.
Timing Charts
Non-periodic Operation
The following timing chart shows the operation when Periodic (Periodic Mode) is FALSE (non-peri-
odic) for the MC_CamIn (Start Cam Operation) instruction.
MasterStartDistance
StartPosition
MC_CamIn
Slave axis position
Function
Execute
InCam
InSync
EndOfProfile
Busy
Active
Periodic Operation
The cam motion is repeatedly executed.
The slave axis decelerates to 0 when the cam operation is ended with the MC_CamOut (End Cam
Operation) instruction. The operation of the master axis is not affected.
The following timing chart shows the operation when Periodic (Periodic Mode) is TRUE (periodic) for
the MC_CamIn (Start Cam Operation) instruction and then the MC_CamOut (End Cam Operation)
instruction is executed.
MasterStartDistance
StartPosition
MC_CamIn
Execute
InCam
InSync
EndOfProfile
Busy
Active
MC_CamOut
Execute
Done
Busy
MC_Stop Instruction
If the MC_Stop instruction is executed for the master axis during cam operation, the sync between
the master axis and slave axis is maintained. If the MC_Stop instruction is executed for the slave
axis during cam operation, the sync between the master axis and slave axis ends.
The following timing chart displays the operation when Periodic (Periodic Mode) is TRUE (periodic)
for the MC_CamIn (Start Cam Operation) instruction and then the MC_Stop instruction is executed
for the slave axis.
MasterStartDistance
MC_CamIn
StartPosition
Deceleration stopping
3
MC_CamIn
Function
Execute
InCam
InSync
EndOfProfile
Busy
Active
MC_Stop
Execute
Done
Busy
Active
MasterStartDistance
StartPosition
Execute
InCam
InSync
Busy
Active
CommandAborted
For details on re-execution of motion control instructions, refer to the NJ/NX-series CPU Unit Motion
Control User’s Manual (Cat. No. W507) or NY-series Industrial Panel PC / Industrial Box PC Motion
Control User’s Manual (Cat. No. W559).
Re-execution Procedure
For the procedure to re-execute this instruction, refer to Sample Programming 1 on page 3-192 and
Sample Programming 2 on page 3-203.
MC_CamIn
Execution of Other Instructions during Instruction Execution
Multi-execution of instructions cannot be used for the MC_GenerateCamTable (Generate Cam
Table) instruction during execution of an MC_CamIn instruction for which the same cam table is
specified with CamTable.
To use multi-execution of motion instructions for this instruction, specify the slave axis. When multi- 3
execution of another instruction is performed while this instruction is in execution, the following limits
apply depending on the Buffer Mode.
Function
• When another instruction is executed by using multi-execution with BufferMode set to Aborting,
the cam motion is aborted and the next operation is started.
• When another instruction is executed with BufferMode set to Buffered, the command position of
the next operation is output when EndOfProfile (End of Cam Cycle) changes to TRUE.
Errors
If an error occurs during instruction execution, Error will change to TRUE. You can find out the cause of
the error by referring to the value output by ErrorID (Error Code).
Execute
InCam
InSync
Busy
Active
Error
Error Codes
Refer to A-1 Error Codes for instruction errors.
Sample Programming 1
This sample programming shows cam operation when periodic operation is specified. In this example,
the master axis is axis 1 and the slave axis is axis 2.
Additional Information
You can specify only the initial values for input variables that are reserved. In this sample, vari-
ables with initial values are defined for the instructions, but you do not need to assign variables
and parameters when you program them.
Parameter Settings
The minimum settings required for this sample programming are given below.
Axis Types
Axis Axis Type
Axis 1 Servo axis (master axis)
Axis 2 Servo axis (slave axis)
Count Modes
Axis Count Mode
Axis 1 Rotary Mode
Axis 2 Linear Mode
Ring Counter
Modulo maxi- Modulo mini-
Axis
mum position mum position
Axis 1 360 0
MC_CamIn
Units of Display
Axis Unit of Display
Axis 1 degree
Axis 2 mm
3
Operation Example
Sample Programming 1
Operation Pattern
Master axis command position
360°
60°
Time
Slave axis command position MC_CamOut executed.
1000
0 Time
Ladder Diagram
Main Variables
Timing Chart
Master axis
MC_Axis000.Cmd.Pos
Slave axis
MC_Axis001.Cmd.Pos
MC_CamIn
MC_MoveVelocity Instruction
Vel_InVel
MC_CamIn Instruction
3
Camin_InCam0
Camin_InSync
Sample Programming 1
Camin_EOP
Camin_Index
Camin_Bsy
Camin_Act
Camin_Ca
MC_CamOut Instruction
Camout_Ex
Camout_D
Camout_Bsy
Sample Programming
If StartPg is TRUE, check that the Servo Drive for axis 1 is ready.
If StartPg is TRUE, check that the Servo Drive for axis 2 is ready.
If the Servo Drive for axis 1 is ready, the Servo is turned ON.
PWR1
MC_Power
Lock1 MC_Axis000 Axis Axis Pwr1_S
Enable Status
Busy Pwr1_Bsy
Error Pwr1_Err
ErrorID Pwr1_ErrID
If the Servo Drive for axis 2 is ready, the Servo is turned ON.
PWR2
MC_Power
Lock2 MC_Axis001 Axis Axis Pwr2_S
Enable Status
Busy Pwr2_Bsy
Error Pwr2_Err
ErrorID Pwr2_ErrID
If a minor fault level error occurs for the axis composition, the error handler for the device (FaultHandler) is executed.
Program the FaultHandler according to the device.
MC_Axis000.MFaultLvl.Active FaultHandler
EN FaultHandler
MC_Axis001.MFaultLvl.Active
If the Servo is ON for axis 1 and home is not defined, the Home instruction is executed to define home.
HM1
MC_Home
Pwr1_S MC_Axis000.Details.Homed MC_Axis000 Axis Axis Hm1_D
Execute Done
Busy Hm1_Bsy
CommandAborted Hm1_Ca
Error Hm1_Err
ErrorID Hm1_ErrID
If the Servo is ON for axis 2 and home is not defined, the Home instruction is executed to define home.
HM2
MC_Home
Pwr2_S MC_Axis001.Details.Homed MC_Axis001 Axis Axis Hm2_D
Execute Done
Busy Hm2_Bsy
CommandAborted Hm2_Ca
Error Hm2_Err
ErrorID Hm2_ErrID
The MC_MoveVelocity (Velocity Control) instruction is executed after homing is completed for axis 1.
VEL
MC_MoveVelocity
Hm1_D MC_Axis000 Axis Axis Vel_InVel
Execute InVelocity
LREAL#1000.0 Velocity Busy Vel_Bsy
LREAL#100000.0 Acceleration Active Vel_Act
LREAL#100000.0 Deceleration CommandAborted Vel_Ca
Jerk Error Vel_Err
_eMC_DIRECTION#_mcPositiveDirection Direction ErrorID Vel_EIrrD
Continuous
BufferMode
The MC_CamIn (Start Cam Operation) instruction is executed if Vel_InVel is TRUE for the MC_MoveVelocity
(Velocity Control) instruction.
CAMIN
MC_CamIn
MC_Axis000 Master Master
MC_Axis001 Slave Slave
Vel_InVel CamProfile0 CamTable CamTable Camin_InCam0
Execute InCam
BOOL#TRUE Periodic InSync Camin_InSync
_eMC_START_MODE#_mcRelativePosition StartMode EndOfProfile Camin_EOP
LREAL#20.0 StartPosition Index Camin_Index
LREAL#40.0 MasterStartDistance Busy Camin_Bsy
MC_CamIn
LREAL#1.0 MasterScaling Active Camin_Act
LREAL#1.0 SlaveScaling CommandAborted Camin_Ca
LREAL#0.0 MasterOffset Error Camin_Err
LREAL#0.0 SlaveOffset ErrorID Camin_ErrID
_eMC_REFERENCE_TYPE#_mcCommand ReferenceType
_eMC_DIRECTION#_mcNoDirection Direction 3
CamTransition
BufferMode
Sample Programming 1
CamOut_Ex changes to TRUE if Camin_InCam0 is TRUE and MC_Axis001.Act.Pos exceeds 1000.
Camin_InCam0
The MC_CamOut (End Cam Operation) instruction is executed when Camout_Ex changes to TRUE.
The deceleration rate is specified by DecRate2.
CAMOUT
MC_CamOut
Camout_Ex MC_Axis001 Slave Slave Camout_D
Execute Done
DecRate2 Deceleration Busy Camout_Bsy
Jerk CommandAborted Camout_Ca
OutMode Error Camout_Err
ErrorID Camout_ErrID
Contents of Inline ST
IF MC_Axis001.Act.Pos>LREAL#1000.0 THEN
Camout_Ex := TRUE;
END_IF;
Timing Chart
Master axis
MC_Axis000.Cmd.Pos
Slave axis
MC_Axis001.Cmd.Pos
MC_CamIn
MC_MoveVelocity Instruction
Vel_InVel
MC_CamIn Instruction
3
Camin_Ex
Camin_InCam0
Sample Programming 1
Camin_InSync
Camin_EOP
Camin_Index
Camin_Bsy
Camin_Act
Camin_Ca
MC_CamOut Instruction
Camout_Ex
Camout_D
Camout_Bsy
Sample Programming
// Processing when input parameters are not set
IF InitFlag=FALSE THEN
// MC_CamIn parameters
Camin_EM := TRUE; // Periodic Mode
Camin_StMode := _eMC_START_MODE#_mcRelativePosition;
Camin_StPos := LREAL#20.0; // Master axis absolute position for start point
Camin_MStDis := LREAL#40.0; // Master axis position to start cam operation
Camin_MSc := LREAL#1.0; // Master axis scaling
Camin_SSc := LREAL#1.0; // Slave axis scaling
Camin_MO := LREAL#0.0; // Master offset
Camin_SO := LREAL#0.0; // Slave offset
Camin_RT := _eMC_REFERENCE_TYPE#_mcCommand; // Position type selection
Camin_Dir := _eMC_DIRECTION#_mcNoDirection; // Direction
// MC_MoveVelocity parameters
Vel_Vel := LREAL#1000.0;
Vel_Acc := LREAL#100000.0;
Vel_Dec := LREAL#100000.0;
Vel_Dir := _eMC_DIRECTION#_mcPositiveDirection;
// MC_CamOut parameters
Camout_Dec := DecRate2;
END_IF;
// If StartPg is TRUE and the Servo Drive is ready, the Servo for axis 1 is turned ON.
// If the Servo Drive is not ready, the Servo is turned OFF.
IF (StartPg=TRUE)
AND (MC_Axis000.DrvStatus.Ready=TRUE) THEN
Pwr1_En:=TRUE;
ELSE
Pwr1_En:=FALSE;
END_IF;
// If StartPg is TRUE and the Servo Drive is ready, the Servo for axis 2 is turned ON.
// If the Servo Drive is not ready, the Servo is turned OFF.
IF (StartPg=TRUE)
AND (MC_Axis001.DrvStatus.Ready=TRUE) THEN
Pwr2_En:=TRUE;
ELSE
Pwr2_En:=FALSE;
END_IF;
// If a minor fault level error occurs for axis 1 or axis 2, the error handler for the device is executed.
// Program the FaultHandler according to the device.
IF (MC_Axis000.MFaultLvl.Active=TRUE) OR (MC_Axis001.MFaultLvl.Active=TRUE) THEN
FaultHandler();
END_IF;
// If the Servo is ON for axis 1 and home is not defined, the Home instruction is executed for axis 1.
IF (Pwr1_S=TRUE) AND (MC_Axis000.Details.Homed=FALSE) THEN
Hm1_Ex:=TRUE;
END_IF;
// If the Servo is ON for axis 2 and home is not defined, the Home instruction is executed for axis 2.
IF (Pwr2_S=TRUE) AND (MC_Axis001.Details.Homed=FALSE) THEN
Hm2_Ex:=TRUE;
END_IF;
// CamOut is executed when Camin_InCam0 is TRUE and MC_Axis001.Act.Pos is greater than 1000.
IF (Camin_InCam0=TRUE) AND (MC_Axis001.Act.Pos>LREAL#1000.0) THEN
Camout_Ex := TRUE;
END_IF;
MC_CamIn
ErrorID => Pwr2_ErrID
);
Sample Programming 1
Busy => Hm1_Bsy,
CommandAborted => Hm1_Ca,
Error => Hm1_Err,
ErrorID => Hm1_ErrID
);
//MC_MoveVelocity
VEL(
Axis := MC_Axis000,
Execute := Vel_Ex,
Velocity := Vel_Vel,
Acceleration := Vel_Acc,
Deceleration := Vel_Dec,
Direction := Vel_Dir,
InVelocity => Vel_InVel,
Busy => Vel_Bsy,
Active => Vel_Act,
CommandAborted => Vel_Ca,
Error => Vel_Err,
ErrorID => Vel_ErrID
);
//MC_CamIn
CAMIN(
Master := MC_Axis000,
Slave := MC_Axis001,
CamTable := CamProfile0,
Execute := Camin_Ex,
Periodic := Camin_EM,
StartMode := Camin_StMode,
StartPosition := Camin_StPos,
MasterStartDistance := Camin_MStDis,
MasterScaling := Camin_MSc,
SlaveScaling := Camin_SSc,
MasterOffset := Camin_MO,
SlaveOffset := Camin_SO,
ReferenceType := Camin_RT,
Direction := Camin_Dir,
CamTransition := Camin_CT,
BufferMode := Camin_BM,
InCam => Camin_InCam0,
InSync => Camin_InSync,
EndOfProfile => Camin_EOP,
Index => Camin_Index,
Busy => Camin_Bsy,
Active => Camin_Act,
CommandAborted => Camin_Ca,
Error => Camin_Err,
ErrorID => Camin_ErrID
);
//MC_CamOut
CAMOUT(
Slave := MC_Axis001,
Execute := Camout_Ex,
Deceleration := Camout_Dec,
Done => Camout_D,
Busy => Camout_Bsy,
CommandAborted => Camout_Ca,
Error => Camout_Err,
ErrorID => Camout_ErrID
);
Sample Programming 2
This sample programming shows cam operation for a liquid filler.
Additional Information
You can specify only the initial values for input variables that are reserved. Parameters are not
specified in this sample.
MC_CamIn
Parameter Settings
The minimum settings required for this sample programming are given below.
Sample Programming 2
Axis Axis Type
Axis 1 Servo axis (master axis)
Axis 2 Servo axis (slave axis)
Axis 3 Servo axis (slave axis)
Axis 4 Servo axis (slave axis)
Axis 5 Servo axis (slave axis)
Count Modes
Axis Count Mode
Axis 1 Rotary Mode
Axis 2 Rotary Mode
Axis 3 Rotary Mode
Axis 4 Rotary Mode
Axis 5 Rotary Mode
Ring Counters
Modulo maxi- Modulo mini-
Axis
mum position mum position
Axis 1 360 0
Axis 2 360 0
Axis 3 360 0
Axis 4 360 0
Axis 5 360 0
Units of Display
Axis Unit of Display
Axis 1 degree
Axis 2 degree
Axis 3 degree
Axis 4 degree
Axis 5 degree
Operation Example
Operation Pattern
Axis 1
Axis 2
MasterOffset = 30
Axis 3
MasterOffset = 80
Axis 4
MasterOffset = 130
Axis 5
MasterOffset = 180
2 Periodic Operation
Each axis periodically executes the specified cam operation.
Ladder Diagram
Main Variables
MC_CamIn
StartPg BOOL FALSE The Servo is turned ON if this variable is TRUE and Eth-
erCAT process data communications are established.
Vel_InVel BOOL FALSE This variable is assigned to the InVelocity output vari-
able from the VEL instance of the MC_MoveVelocity
instruction. It is TRUE when the target velocity is
reached. 3
CamProfile0 ARRAY[0..360] OF --- This is the cam data variable. This variable is assigned
_sMC_CAM_REF to the CamTable input variables from the CAMIN1 to
Sample Programming 2
CAMIN4 instances of the MC_CamIn instruction. The
array elements ARRAY[0..N] are set with the Cam Edi-
tor.
Timing Chart
Axis 1
MC_Axis000.Cmd.Pos
Axis 2
MC_Axis001.Cmd.Pos
Axis 3
MC_Axis002.Cmd.Pos
Axis 4
MC_Axis003.Cmd.Pos
Axis 5
MC_Axis004.Cmd.Pos
MC_MoveVelocity Instruction
Vel_InVel
MC_CamIn Instruction
InCam *1
InSync *2
Busy *3
Active *4
Camin1_Eop
Camin2_Eop
Camin3_Eop
Camin4_Eop
*1 The timing is the same for the following: Camin1_InCam, Camin2_InCam, Camin3_InCam, and Camin4_In-
Cam.
*2 The timing is the same for the following: Camin1_InSync, Camin2_InSync, Camin3_InSync, and Camin4_In-
Sync. In this sample, MasterStartDistance is 0, so InSync changes to TRUE from when the master axis is 0°.
*3 The timing is the same for the following: Camin1_Bsy, Camin2_Bsy, Camin3_Bsy, and Camin4_Bsy.
*4 The timing is the same for the following: Camin1_Act, Camin2_Act, Camin3_Act, and Camin4_Act.
Sample Programming
If StartPg is TRUE, check that the Servo Drives for each axis are ready.
StartPg MC_Axis000.DrvStatus.Ready Lock1
MC_CamIn
StartPg MC_Axis002.DrvStatus.Ready Lock3
Sample Programming 2
StartPg MC_Axis004.DrvStatus.Ready Lock5
If the Servo Drives are ready, the Servos are turned ON for each axis.
PWR1
MC_Power
Lock1 MC_Axis000 Axis Axis Pwr1_Status
Enable Status
Busy Pwr1_Bsy
Error Pwr1_Err
ErrorID Pwr1_ErrID
PWR2
MC_Power
Lock2 MC_Axis001 Axis Axis Pwr2_Status
Enable Status
Busy Pwr2_Bsy
Error Pwr2_Err
ErrorID Pwr2_ErrID
PWR3
MC_Power
Lock3 MC_Axis002 Axis Axis Pwr3_Status
Enable Status
Busy Pwr3_Bsy
Error Pwr3_Err
ErrorID Pwr3_ErrID
PWR4
MC_Power
Lock4 MC_Axis003 Axis Axis Pwr4_Status
Enable Status
Busy Pwr4_Bsy
Error Pwr4_Err
ErrorID Pwr4_ErrID
PWR5
MC_Power
Lock5 MC_Axis004 Axis Axis Pwr5_Status
Enable Status
Busy Pwr5_Bsy
Error Pwr5_Err
ErrorID Pwr5_ErrID
If a minor fault level error occurs for the axis composition, the error handler for the device (FaultHandler) is executed.
Program the FaultHandler according to the device.
MC_Axis000.MFaultLvl.Active FaultHandler
EN FaultHandler
MC_Axis001.MFaultLvl.Active
MC_Axis002.MFaultLvl.Active
MC_Axis003.MFaultLvl.Active
MC_Axis004.MFaultLvl.Active
If the Servo is ON for axis 1 to axis 5 and the Home instruction is executed for each axis if home is not defined.
HM1
MC_Home
Pwr1_Status MC_Axis000.Details.Homed MC_Axis000 Axis Axis Hm1_D
Execute Done
Busy Hm1_Bsy
CommandAborted Hm1_Ca
Error Hm1_Err
ErrorID Hm1_ErrID
HM2
MC_Home
Pwr2_Status MC_Axis001.Details.Homed MC_Axis001 Axis Axis Hm2_D
Execute Done
Busy Hm2_Bsy
CommandAborted Hm2_Ca
Error Hm2_Err
ErrorID Hm2_ErrID
HM3
MC_Home
Pwr3_Status MC_Axis002.Details.Homed MC_Axis002 Axis Axis Hm3_D
Execute Done
Busy Hm3_Bsy
CommandAborted Hm3_Ca
Error Hm3_Err
ErrorID Hm3_ErrID
HM4
MC_Home
Pwr4_Status MC_Axis003.Details.Homed MC_Axis003 Axis Axis Hm4_D
Execute Done
Busy Hm4_Bsy
CommandAborted Hm4_Ca
Error Hm4_Err
ErrorID Hm4_ErrID
HM5
MC_Home
MC_CamIn
Pwr5_Status MC_Axis004.Details.Homed MC_Axis004 Axis Axis Hm5_D
Execute Done
Busy Hm5_Bsy
CommandAborted Hm5_Ca
Error Hm5_Err
ErrorID Hm5_ErrID
3
The MC_MoveVelocity (Velocity Control) instruction is executed after homing is completed for axis 1.
Sample Programming 2
VEL
MC_MoveVelocity
Hm1_D MC_Axis000 Axis Axis Vel_InVel
Execute InVelocity
LREAL#1000.0 Velocity Busy Vel_Bsy
LREAL#0.0 Acceleration Active Vel_Act
LREAL#0.0 Deceleration CommandAborted Vel_Ca
Jerk Error Vel_Err
_eMC_DIRECTION#_mcPositiveDirection Direction ErrorID Vel_ErrID
Continuous
BufferMode
The MC_CamIn (Start Cam Operation) instruction is executed for axis 2 (slave axis) if Vel_InVel is TRUE for the
MC_MoveVelocity (Velocity Control) instruction and homing is completed for axis 2.
CAMIN1
MC_CamIn
MC_Axis000 Master Master
MC_Axis001 Slave Slave
Vel_InVel MC_Axis001.Details.Homed CamProfile0 CamTable CamTable Camin1_InCam
Execute InCam
BOOL#FALSE Periodic InSync Camin1_InSync
_eMC_START_MODE#_mcAbsolutePosition StartMode EndOfProfile Camin1_Eop
LREAL#0.0 StartPosition Index Camin1_Index
LREAL#0.0 MasterStartDistance Busy Camin1_Bsy
LREAL#1.0 MasterScaling Active Camin1_Act
LREAL#1.0 SlaveScaling CommandAborted Camin1_Ca
LREAL#30.0 MasterOffset Error Camin1_Err
LREAL#0.0 SlaveOffset ErrorID Camin1_ErrID
_eMC_REFERENCE_TYPE#_mcCommand ReferenceType
_eMC_DIRECTION#_mcNoDirection Direction
CamTransition
BufferMode
The MC_CamIn (Start Cam Operation) instruction is executed for axis 3 (slave axis) if Vel_InVel is TRUE for the
MC_MoveVelocity (Velocity Control) instruction and homing is completed for axis 3.
CAMIN2
MC_CamIn
MC_Axis000 Master Master
MC_Axis002 Slave Slave
Vel_InVel MC_Axis002.Details.Homed CamProfile0 CamTable CamTable Camin2_InCam
Execute InCam
BOOL#FALSE Periodic InSync Camin2_InSync
_eMC_START_MODE#_mcAbsolutePosition StartMode EndOfProfile Camin2_Eop
LREAL#0.0 StartPosition Index Camin2_Index
LREAL#0.0 MasterStartDistance Busy Camin2_Bsy
LREAL#1.0 MasterScaling Active Camin2_Act
LREAL#1.0 SlaveScaling CommandAborted Camin2_Ca
LREAL#80.0 MasterOffset Error Camin2_Err
LREAL#0.0 SlaveOffset ErrorID Camin2_ErrID
_eMC_REFERENCE_TYPE#_mcCommand ReferenceType
_eMC_DIRECTION#_mcNoDirection Direction
CamTransition
BufferMode
The MC_CamIn (Start Cam Operation) instruction is executed for axis 4 (slave axis) if Vel_InVel is TRUE for the
MC_MoveVelocity (Velocity Control) instruction and homing is completed for axis 4.
CAMIN3
MC_CamIn
MC_Axis000 Master Master
MC_Axis003 Slave Slave
Vel_InVel MC_Axis003.Details.Homed CamProfile0 CamTable CamTable Camin3_InCam
Execute InCam
BOOL#FALSE Periodic InSync Camin3_InSync
_eMC_START_MODE#_mcAbsolutePosition StartMode EndOfProfile Camin3_Eop
LREAL#0.0 StartPosition Index Camin3_Index
LREAL#0.0 MasterStartDistance Busy Camin3_Bsy
LREAL#1.0 MasterScaling Active Camin3_Act
LREAL#1.0 SlaveScaling CommandAborted Camin3_Ca
LREAL#130.0 MasterOffset Error Camin3_Err
LREAL#0.0 SlaveOffset ErrorID Camin3_ErrID
_eMC_REFERENCE_TYPE#_mcCommand ReferenceType
_eMC_DIRECTION#_mcNoDirection Direction
CamTransition
BufferMode
The MC_CamIn (Start Cam Operation) instruction is executed for axis 5 (slave axis) if Vel_InVel is TRUE for the
MC_MoveVelocity (Velocity Control) instruction and homing is completed for axis 5.
CAMIN4
MC_CamIn
MC_Axis000 Master Master
MC_Axis004 Slave Slave
Vel_InVel MC_Axis004.Details.Homed CamProfile0 CamTable CamTable Camin4_InCam
Execute InCam
BOOL#FALSE Periodic InSync Camin4_InSync
_eMC_START_MODE#_mcAbsolutePosition StartMode EndOfProfile Camin4_Eop
LREAL#0.0 StartPosition Index Camin4_Index
LREAL#0.0 MasterStartDistance Busy Camin4_Bsy
MC_CamIn
LREAL#1.0 MasterScaling Active Camin4_Act
LREAL#1.0 SlaveScaling CommandAborted Camin4_Ca
LREAL#180.0 MasterOffset Error Camin4_Err
LREAL#0.0 SlaveOffset ErrorID Camin4_ErrID
_eMC_REFERENCE_TYPE#_mcCommand ReferenceType
_eMC_DIRECTION#_mcNoDirection Direction 3
CamTransition
BufferMode
Sample Programming 2
Structured Text (ST)
Main Variables
Timing Chart
Master axis
MC_Axis000.Cmd.Pos
Slave axis 1
MC_Axis001.Cmd.Pos
Slave axis 2
MC_Axis002.Cmd.Pos
Slave axis 3
MC_Axis003.Cmd.Pos
Slave axis 4
MC_Axis004.Cmd.Pos
MC_MoveVelocity Instruction
Vel_InVel
MC_CamIn Instruction
Ex *1
InCam *2
InSync *3
Busy *4
Active *5
Camin1_Eop
Camin2_Eop
Camin3_Eop
Camin4_Eop
*1 The timing is the same for the following: Camin1_InCam, Camin2_InCam, Camin3_InCam, and Camin4_In-
Cam.
*2 The timing is the same for the following: Camin1_InSync, Camin2_InSync, Camin3_InSync, and Camin4_In-
Sync. In this sample, MasterStartDistance is 0, so InSync changes to TRUE from when the master axis is 0°.
*3 The timing is the same for the following: Camin1_Bsy, Camin2_Bsy, Camin3_Bsy, and Camin4_Bsy.
*4 The timing is the same for the following: Camin1_Act, Camin2_Act, Camin3_Act, and Camin4_Act.
Sample Programming
// Processing when input parameters are not set
IF InitFlag=FALSE THEN
Camin1_Mo := LREAL#30.0;
Camin1_So := LREAL#0.0;
Camin1_Rt := _eMC_REFERENCE_TYPE#_mcCommand;
Camin1_Dir := _eMC_DIRECTION#_mcNoDirection;
Camin2_Em := TRUE;
Camin2_Sm := _eMC_START_MODE#_mcAbsolutePosition;
Camin2_Sp := LREAL#0.0;
Camin2_Msd := LREAL#0.0;
Camin2_Ms := LREAL#1.0;
Camin2_Ss := LREAL#1.0;
Camin2_Mo := LREAL#80.0;
Camin2_So := LREAL#0.0;
MC_CamIn
Camin2_Rt := _eMC_REFERENCE_TYPE#_mcCommand;
Camin2_Dir := _eMC_DIRECTION#_mcNoDirection;
Camin3_Em := TRUE;
Camin3_Sm := _eMC_START_MODE#_mcAbsolutePosition;
Camin3_Sp := LREAL#0.0;
Camin3_Msd := LREAL#0.0; 3
Camin3_Ms := LREAL#1.0;
Camin3_Ss := LREAL#1.0;
Sample Programming 2
Camin3_Mo := LREAL#130.0;
Camin3_So := LREAL#0.0;
Camin3_Rt := _eMC_REFERENCE_TYPE#_mcCommand;
Camin3_Dir := _eMC_DIRECTION#_mcNoDirection;
Camin4_Em := TRUE;
Camin4_Sm := _eMC_START_MODE#_mcAbsolutePosition;
Camin4_Sp := LREAL#0.0;
Camin4_Msd := LREAL#0.0;
Camin4_Ms := LREAL#1.0;
Camin4_Ss := LREAL#1.0;
Camin4_Mo := LREAL#180.0;
Camin4_So := LREAL#0.0;
Camin4_Rt := _eMC_REFERENCE_TYPE#_mcCommand;
Camin4_Dir := _eMC_DIRECTION#_mcNoDirection;
END_IF;
// If StartPg is TRUE and the Servo Drive is ready, the Servo for axis 1 is turned ON.
// If the Servo Drive is not ready, the Servo is turned OFF.
IF (StartPg=TRUE)
AND (MC_Axis000.DrvStatus.Ready=TRUE) THEN
Pwr1_En:=TRUE;
ELSE
Pwr1_En:=FALSE;
END_IF;
// If StartPg is TRUE and the Servo Drive is ready, the Servo for axis 2 is turned ON.
// If the Servo Drive is not ready, the Servo is turned OFF.
IF (StartPg=TRUE)
AND (MC_Axis001.DrvStatus.Ready=TRUE) THEN
Pwr2_En:=TRUE;
ELSE
Pwr2_En:=FALSE;
END_IF;
// If StartPg is TRUE and the Servo Drive is ready, the Servo for axis 3 is turned ON.
// If the Servo Drive is not ready, the Servo is turned OFF.
IF (StartPg=TRUE)
AND (MC_Axis002.DrvStatus.Ready=TRUE) THEN
Pwr3_En:=TRUE;
ELSE
Pwr3_En:=FALSE;
END_IF;
// If StartPg is TRUE and the Servo Drive is ready, the Servo for axis 4 is turned ON.
// If the Servo Drive is not ready, the Servo is turned OFF.
IF (StartPg=TRUE)
AND (MC_Axis003.DrvStatus.Ready=TRUE) THEN
Pwr4_En:=TRUE;
ELSE
Pwr4_En:=FALSE;
END_IF;
// If StartPg is TRUE and the Servo Drive is ready, the Servo for axis 5 is turned ON.
// If the Servo Drive is not ready, the Servo is turned OFF.
IF (StartPg=TRUE)
AND (MC_Axis004.DrvStatus.Ready=TRUE) THEN
Pwr5_En:=TRUE;
ELSE
Pwr5_En:=FALSE;
END_IF;
// If a minor fault level error occurs for axis 1 to axis 5, the error handler for the device (FaultHandler) is
executed.
// Program the FaultHandler according to the device.
IF (MC_Axis000.MFaultLvl.Active=TRUE)
OR (MC_Axis001.MFaultLvl.Active=TRUE)
OR (MC_Axis002.MFaultLvl.Active=TRUE)
OR (MC_Axis003.MFaultLvl.Active=TRUE)
OR (MC_Axis004.MFaultLvl.Active=TRUE) THEN
FaultHandler();
END_IF;
// If the Servo is ON for axis 1 and home is not defined, the Home instruction is executed for axis 1.
IF (Pwr1_Status=TRUE) AND (MC_Axis000.Details.Homed=FALSE) THEN
Hm1_Ex:=TRUE;
END_IF;
// If the Servo is ON for axis 2 and home is not defined, the Home instruction is executed for axis 2.
IF (Pwr2_Status=TRUE) AND (MC_Axis001.Details.Homed=FALSE) THEN
Hm2_Ex:=TRUE;
END_IF;
// If the Servo is ON for axis 3 and home is not defined, the Home instruction is executed for axis 3.
IF (Pwr3_Status=TRUE) AND (MC_Axis002.Details.Homed=FALSE) THEN
Hm3_Ex:=TRUE;
END_IF;
// If the Servo is ON for axis 4 and home is not defined, the Home instruction is executed for axis 4.
IF (Pwr4_Status=TRUE) AND (MC_Axis003.Details.Homed=FALSE) THEN
Hm4_Ex:=TRUE;
END_IF;
// If the Servo is ON for axis 5 and home is not defined, the Home instruction is executed for axis 5.
IF (Pwr5_Status=TRUE) AND (MC_Axis004.Details.Homed=FALSE) THEN
Hm5_Ex:=TRUE;
END_IF;
MC_CamIn
// If home is defined for axis 4 and Vel_InVel of MC_MoveVelocity is TRUE,
// the MC_CamIn instruction for axis 4 (slave axis) is executed.
IF (Vel_InVel=TRUE) AND (MC_Axis003.Details.Homed=TRUE) THEN
Camin3_Ex := TRUE;
END_IF;
Sample Programming 2
Camin4_Ex := TRUE;
END_IF;
PWR5(
Axis := MC_Axis004,
Enable := Pwr5_En,
Status => Pwr5_Status,
Busy => Pwr5_Bsy,
Error => Pwr5_Err,
ErrorID => Pwr5_ErrID
);
//MC_MoveVelocity
VEL(
Axis := MC_Axis000,
Execute := Vel_Ex,
Velocity := Vel_Vel,
Acceleration := Vel_Acc,
Deceleration := Vel_Dec,
Direction := Vel_Dir,
InVelocity => Vel_InVel,
Busy => Vel_Bsy,
Active => Vel_Act,
CommandAborted => Vel_Ca,
Error => Vel_Err,
MC_CamIn
ErrorID => Vel_ErrID
);
//MC_CamIn
CAMIN1(
Master := MC_Axis000, 3
Slave := MC_Axis001,
CamTable := CamProfile0,
Sample Programming 2
Execute := Camin1_Ex,
Periodic := Camin1_Em,
StartMode := Camin1_Sm,
StartPosition := Camin1_Sp,
MasterStartDistance := Camin1_Msd,
MasterScaling := Camin1_Ms,
SlaveScaling := Camin1_Ss,
MasterOffset := Camin1_Mo,
SlaveOffset := Camin1_So,
ReferenceType := Camin1_Rt,
Direction := Camin1_Dir,
InCam => Camin1_InCam,
InSync => Camin1_InSync,
EndOfProfile => Camin1_Eop,
Index => Camin1_Index,
Busy => Camin1_Bsy,
Active => Camin1_Act,
CommandAborted => Camin1_Ca,
Error => Camin1_Err,
ErrorID => Camin1_ErrID
);
CAMIN2(
Master := MC_Axis000,
Slave := MC_Axis002,
CamTable := CamProfile0,
Execute := Camin2_Ex,
Periodic := Camin2_Em,
StartMode := Camin2_Sm,
StartPosition := Camin2_Sp,
MasterStartDistance := Camin2_Msd,
MasterScaling := Camin2_Ms,
SlaveScaling := Camin2_Ss,
MasterOffset := Camin2_Mo,
SlaveOffset := Camin2_So,
ReferenceType := Camin2_Rt,
Direction := Camin2_Dir,
InCam => Camin2_InCam,
InSync => Camin2_InSync,
EndOfProfile => Camin2_Eop,
Index => Camin2_Index,
Busy => Camin2_Bsy,
Active => Camin2_Act,
CommandAborted => Camin2_Ca,
CAMIN3(
Master := MC_Axis000,
Slave := MC_Axis003,
CamTable := CamProfile0,
Execute := Camin3_Ex,
Periodic := Camin3_Em,
StartMode := Camin3_Sm,
StartPosition := Camin3_Sp,
MasterStartDistance := Camin3_Msd,
MasterScaling := Camin3_Ms,
SlaveScaling := Camin3_Ss,
MasterOffset := Camin3_Mo,
SlaveOffset := Camin3_So,
ReferenceType := Camin3_Rt,
Direction := Camin3_Dir,
InCam => Camin3_InCam,
InSync => Camin3_InSync,
EndOfProfile => Camin3_Eop,
Index => Camin3_Index,
Busy => Camin3_Bsy,
Active => Camin3_Act,
CommandAborted => Camin3_Ca,
Error => Camin3_Err,
ErrorID => Camin3_ErrID
);
CAMIN4(
Master := MC_Axis000,
Slave := MC_Axis004,
CamTable := CamProfile0,
Execute := Camin4_Ex,
Periodic := Camin4_Em,
StartMode := Camin4_Sm,
StartPosition := Camin4_Sp,
MasterStartDistance := Camin4_Msd,
MasterScaling := Camin4_Ms,
SlaveScaling := Camin4_Ss,
MasterOffset := Camin4_Mo,
SlaveOffset := Camin4_So,
ReferenceType := Camin4_Rt,
Direction := Camin4_Dir,
InCam => Camin4_InCam,
InSync => Camin4_InSync,
EndOfProfile => Camin4_Eop,
Index => Camin4_Index,
Busy => Camin4_Bsy,
Active => Camin4_Act,
CommandAborted => Camin4_Ca,
Error => Camin4_Err,
ErrorID => Camin4_ErrID
);
MC_CamOut
Cam operation is ended for the axis specified with the input parameter.
Instruction Name FB/FUN Graphic expression ST expression
MC_CamOut End Cam Operation FB MC_CamOut_instance MC_CamOut_instance (
Slave :=parameter,
MC_CamOut Execute :=parameter,
Slave Slave
MC_CamOut
Deceleration :=parameter,
Execute Done
Jerk :=parameter,
Deceleration Busy
OutMode :=parameter,
Jerk CommandAborted
Done =>parameter,
OutMode Error
Busy =>parameter,
ErrorID CommandAborted
=>parameter, 3
Error =>parameter,
ErrorID =>parameter
);
Variables
Variables
Input Variables
Name Meaning Data type Valid range Default Description
Execute Execute BOOL TRUE or FALSE FALSE The instruction is executed when Exe-
cute changes to TRUE.
Deceleration Deceleration LREAL Non-negative num- 0 Specify the deceleration rate. The unit
Rate ber is command units/s2.*1
Jerk Jerk LREAL 0 0 (Reserved)
(Reserved)
OutMode Sync End _eMC_ 0: _mcStop 0*2 (Reserved)
(Reserved) Mode Selec- OUT_
tion MODE
*1 Refer to Unit Conversion Settings in the NJ/NX-series CPU Unit Motion Control User's Manual (Cat. No. W507) or NY-
series Industrial Panel PC / Industrial Box PC Motion Control User’s Manual (Cat. No. W559) for information on command
units.
*2 The default value for an enumeration variable is actually not the number, but the enumerator.
Output Variables
Name Meaning Data type Valid range Description
Done Done BOOL TRUE or FALSE TRUE when the instruction is completed.
Busy Executing BOOL TRUE or FALSE TRUE when the instruction is acknowledged.
CommandAborted Command BOOL TRUE or FALSE TRUE when the instruction is aborted.
Aborted
Error Error BOOL TRUE or FALSE TRUE while there is an error.
ErrorID Error Code WORD * Contains the error code when an error occurs.
A value of 16#0000 indicates normal execution.
In-Out Variables
* Specify a user-defined Axis Variable that was created in the Axis Basic Settings of the Sysmac Studio (default: MC_Axis***)
or a system-defined axis variable name (_MC_AX[*], _MC1_AX[*], or _MC2_AX[*]).
Function
• The MC_CamOut instruction disables cam operation of the slave axis.
• When Execute changes to TRUE, the axis starts decelerating towards 0 velocity at the deceleration
rate specified with Deceleration (Deceleration Rate).
• When the command velocity reaches 0, the instruction is completed.
• If you execute this instruction on an axis that is not in cam operation, an error will occur.
Timing Charts
Master axis position
MasterStartDistance
StartPosition
MC_CamOut
Deceleration stopping
InCam
3
InSync
EndOfProfile
Function
Busy
Active
MC_CamOut
Execute
Done
Busy
InCam
InSync
Busy
Active
MC_CamOut
Execute
Done
Busy
CommandAborted
Errors
If an error occurs during instruction execution, Error will change to TRUE. You can find out the cause of
the error by referring to the value output by ErrorID (Error Code).
MasterStartDistance
MC_CamOut
StartPosition
MC_CamIn
Deceleration stopping 3
Execute
Function
InCam
InSync
Busy
Active
MC_CamOut
Execute
Done
Busy
CommandAborted
Error
Error Codes
Refer to A-1 Error Codes for instruction errors.
MC_GearIn
Specifies the gear ratio between the master axis and the slave axis and starts gear operation.
Instruction Name FB/FUN Graphic expression ST expression
MC_GearIn Start Gear FB MC_GearIn_instance MC_GearIn_instance (
Operation Master :=parameter,
MC_GearIn Slave :=parameter,
Master Master
Execute :=parameter,
Slave Slave
RatioNumerator :=parameter,
Execute InGear
RatioDenominator :=parameter,
RatioNumerator Busy
ReferenceType :=parameter,
RatioDenominator Active
Acceleration :=parameter,
ReferenceType CommandAborted
Deceleration :=parameter,
Acceleration Error Jerk :=parameter,
Deceleration ErrorID BufferMode :=parameter,
Jerk InGear =>parameter,
BufferMode Busy =>parameter,
Active =>parameter,
CommandAborted =>parameter,
Error =>parameter,
ErrorID =>parameter
);
Variables
Input Variables
Name Meaning Data type Valid range Default Description
Execute Execute BOOL TRUE or FALSE FALSE The instruction is executed when
Execute changes to TRUE.
Ratio Gear Ratio DINT*1 Positive or negative 10,000 Specify the numerator of the elec-
Numerator Numerator number*1 tronic gear ratio between the master
and slave axes.
Ratio Gear Ratio UDINT*2 Positive number 10,000 Specify the denominator of the elec-
Denominator Denominator tronic gear ratio between the master
and slave axes.
Reference Position Type _eMC_ REF- 0: _mcCommand 0*4 Specify the position type.
Type*3 Selection ERENCE_ 1: _mcFeedback 0: Command position (value calcu-
TYPE lated in the previous task
2: _mcLatestCommand
period*5)
1: Actual position (value obtained in
the same task period*5)
2: Command position (value calcu-
lated in the same task period*5)
Acceleration Acceleration LREAL Non-negative number 0 Specify the acceleration rate. The
Rate unit is command units/s2.*6
MC_GearIn
*1 A CPU Unit with unit version 1.02 or later and Sysmac Studio version 1.03 or higher are required to use this variable. For
any previous version combinations, the data type is UINT and the valid range is positive numbers.
*2 A CPU Unit with unit version 1.02 or later and Sysmac Studio version 1.03 or higher are required to use this variable. For
any previous version combinations, the data type is UINT.
*3 To use _mcLatestCommand, the following condition must be met for the master and slave axes.
When you use _mcLatestCommand, the axis number set for the Master (Master Axis) in the system-defined variable for 3
motion control must be lower than the axis number set for the Slave (Slave Axis) in the system-defined variable for motion
control.
Variables
*4 The default value for an enumeration variable is actually not the number, but the enumerator.
*5 The task period is the primary period if the task is the primary periodic task and the task period of the priority-5 periodic
task if the task is the priority-5 periodic task.
*6 Refer to Unit Conversion Settings in the NJ/NX-series CPU Unit Motion Control User's Manual (Cat. No. W507) or NY-
series Industrial Panel PC / Industrial Box PC Motion Control User’s Manual (Cat. No. W559) for information on command
units.
Output Variables
Name Meaning Data type Valid range Description
InGear Gear Ratio BOOL TRUE or TRUE when the slave axis reaches the target velocity.
Achieved FALSE
Busy Executing BOOL TRUE or TRUE when the instruction is acknowledged.
FALSE
Active Controlling BOOL TRUE or TRUE when the axis is being controlled.
FALSE
CommandAborted Command BOOL TRUE or TRUE when the instruction is aborted.
Aborted FALSE
Error Error BOOL TRUE or TRUE while there is an error.
FALSE
ErrorID Error Code WORD * Contains the error code when an error occurs.
A value of 16#0000 indicates normal execution.
In-Out Variables
* Specify a user-defined Axis Variable that was created in the Axis Basic Settings of the Sysmac Studio (default: MC_Axis***)
or a system-defined axis variable name (_MC_AX[*], _MC1_AX[*], or _MC2_AX[*]).
Function
• The MC_GearIn instruction performs gear operation for the slave axis specified with Slave. The fol-
lowing parameters are also specified: RatioNumerator (Gear Ratio Numerator), RatioDenominator
(Gear Ratio Denominator), ReferenceType (Position Type), Acceleration (Acceleration Rate), and
Deceleration (Deceleration Rate).
• For the master axis, you can specify the command position, actual position, or most recent command
position.
Specified with
ReferenceType. Gear function
Numerator
Actual position Command position
Denominator
Remainder
Command position
Most recent
command position
• After operation starts, the slave axis uses the velocity of the master axis multiplied by the gear ratio
for its target velocity, and accelerates/decelerates accordingly.
• The catching phase exists until the target velocity is reached. The InGear phase exists after that.
• If the gear ratio is positive, the slave axis and master axis move in the same direction.
Position
Catching phase InGear phase
Master
MC_GearIn
Travel distance of slave axis
RatioNumerator
= Travel distance of master axis ×
RatioDenominator
Slave 3
Function
Execute Time
• If the gear ratio is negative, the slave axis and master axis move in the opposite directions.
Position
Catching Phase InGear phase
Master
Slave
Execute Time
Additional Information
The command position that is calculated in the same task period enables greater precision in
synchronization than the command position that was calculated in the previous task period.
However, the axis number set for the Master (Master Axis) in the system-defined variable for
motion control must be lower than the axis number set for the Slave (Slave Axis) in the system-
defined variable for motion control.
Timing Charts
• Busy (Executing) changes to TRUE at the same time as Execute changes to TRUE. Active (Con-
trolling) changes to TRUE in the next period.
• InGear (Gear Ratio Reached) changes to TRUE when the target velocity is reached.
• If another instruction aborts this instruction, CommandAborted changes to TRUE and Busy (Execut-
ing), Active (Controlling), and InGear (Gear Ratio Reached) change to FALSE.
• Use the MC_GearOut (End Gear Operation) or MC_Stop instruction to stop electronic gear operation
before it is completed.
MC_GearIn
Execute
InGear
Busy
3
Active
CommandAborted
Function
Error
ErrorID 16#0000
InGearPhase Multi-execution of
Velocity another instruction
You can specify the Acceleration (Acceleration Rate) and Deceleration (Deceleration Rate) as input
variables.
Velocity Velocity
When the Acceleration (Acceleration Rate) or Deceleration (Deceleration Rate) is 0 and you execute
this instruction, the axis will reach the target velocity without accelerating or decelerating.
Velocity Velocity
Time Time
Execute
InGear
Busy
Active
CommandAborted
Error
ErrorID 16#0000
Velocity
Master axis velocity
MC_GearIn
re-executed.
Time
The following timing chart shows when the instruction is re-executed during the InGear phase to
change the RatioNumerator (Gear Ratio Numerator) and RatioDenominator (Gear Ratio Denominator).
The motion is the same as when Acceleration (Acceleration Rate) and Deceleration (Deceleration
Rate) are both set to 0.
Execute
InGear
Busy
Active
MC_GearIn
CommandAborted
Error
ErrorID 16#0000 3
Function
Velocity
MC_GearIn re-executed.
Master axis velocity
Time
For details on BufferMode (Buffer Mode Selection), refer to the NJ/NX-series CPU Unit Motion Con-
trol User's Manual (Cat. No. W507) or NY-series Industrial Panel PC / Industrial Box PC Motion Con-
trol User’s Manual (Cat. No. W559).
Errors
If an error occurs during instruction execution, Error will change to TRUE and the axis will stop. You can
find out the cause of the error by referring to the value output by ErrorID (Error Code).
Execute
InGear
Busy
Active
CommandAborted
Error
Additional Information
• The slave axis is not affected by the error status of the master axis during synchronized con-
trol. The error status of the master axis is cleared and the slave axis continues electronic gear
operation after the master axis operates normally.
• The master axis is not affected if an error occurs for the slave axis during startup or execution
of this instruction.
Error Codes
Refer to A-1 Error Codes for instruction errors.
Sample Programming
This section shows sample programming for operation proportional to a gear ratio.
Additional Information
You can specify only the initial values for input variables that are reserved. Parameters are not
specified in this sample.
MC_GearIn
Parameter Settings
The minimum settings required for this sample programming are given below.
Sample Programming
Axis Axis Type
Axis 1 Servo axis (master axis)
Axis 2 Servo axis (slave axis)
Axis 3 Servo axis (slave axis)
Count Modes
Axis Count Mode
Axis 1 Rotary Mode
Axis 2 Rotary Mode
Axis 3 Rotary Mode
Ring Counter
Modulo maxi- Modulo mini-
Axis
mum position mum position
Axis 1 360 0
Axis 2 360 0
Axis 3 360 0
Units of Display
Axis Unit of Display
Axis 1 mm
Axis 2 mm
Axis 3 mm
Operation Example
Axis 1
1:2 2:3
Axis 2 Axis 3
Ladder Diagram
Main Variables
Timing Chart
Pwr1_Status
Pwr2_Status
Pwr3_Status
Vel_InVel
Vel_Bsy
Vel_Act
Gearin1_InGear
MC_GearIn
Gearin1_Bsy
Gearin1_Act
Gearin1_Ca
Gearin2_InGear
3
Gearin2_Bsy
Gearin2_Act
Sample Programming
Gearout_Bsy
Gearout_D
Axis 1
Command position
1000
Actual position
Command velocity
Axis 2
Command velocity
Axis 3
Command velocity
Sample Programming
If StartPg is TRUE, check that the Servo Drives for each axis are ready.
MC_Axis001.DrvStatus.Ready Lock2
MC_Axis002.DrvStatus.Ready Lock3
If the Servo Drives are ready, the Servos are turned ON for each axis.
PWR1
MC_Power
Lock1 MC_Axis000 Axis Axis Pwr1_Status
Enable Status
Busy Pwr1_Bsy
Error Pwr1_Err
ErrorID Pwr1_ErrID
PWR2
MC_Power
Lock2 MC_Axis001 Axis Axis Pwr2_Status
Enable Status
Busy Pwr2_Bsy
Error Pwr2_Err
ErrorID Pwr2_ErrID
PWR3
MC_Power
Lock3 MC_Axis002 Axis Axis Pwr3_Status
Enable Status
Busy Pwr3_Bsy
Error Pwr3_Err
ErrorID Pwr3_ErrID
If a minor fault level error occurs for the axis composition, the error handler for the device (FaultHandler) is executed.
Program the FaultHandler according to the device.
MC_Axis000.MFaultLvl.Active FaultHandler
EN FaultHandler
MC_Axis001.MFaultLvl.Active
MC_Axis002.MFaultLvl.Active
The MC_MoveVelocity (Velocity Control) instruction is executed after the Servo is turned ON for the master axis (axis 1).
VEL
MC_MoveVelocity
Pwr1_Status MC_Axis000 Axis Axis Vel_InVel
Execute InVelocity
LREAL#2000.0 Velocity Busy Vel_Bsy
LREAL#2000.0 Acceleration Active Vel_Act
LREAL#2000.0 Deceleration CommandAborted Vel_Ca
Jerk Error Vel_Err
_eMC_DIRECTION#_mcPositiveDirection Direction ErrorID Vel_ErrID
Continuous
BufferMode
When the actual velocity for the master axis (axis 1) reaches the target velocity, gear operation is performed so that
the gear ratio of axis 2 (slave axis) is 1:2 and axis 3 (slave axis) is 2:3.
GEARIN1
MC_GearIn
MC_Axis000 Master Master
Vel_InVel Pwr2_Status MC_Axis001 Slave Slave Gearin1_InGear
Execute InGear
UINT#1 RatioNumerator Busy Gearin1_Bsy
UINT#2 RatioDenominator Active Gearin1_Act
_eMC_REFERENCE_TYPE#_mcFeedback ReferenceType CommandAborted Gearin1_Ca
LREAL#4000.0 Acceleration Error Gearin1_Err
LREAL#4000.0 Deceleration ErrorID Gearin1_ErrID
MC_GearIn
Jerk
BufferMode
GEARIN2
MC_GearIn
MC_Axis000 Master Master 3
Pwr3_Status MC_Axis002 Slave Slave Gearin2_InGear
Execute InGear
Sample Programming
UINT#2 RatioNumerator Busy Gearin2_Bsy
UINT#3 RatioDenominator Active Gearin2_Act
_eMC_REFERENCE_TYPE#_mcFeedback ReferenceType CommandAborted Gearin2_Ca
LREAL#4000.0 Acceleration Error Gearin2_Err
LREAL#4000.0 Deceleration ErrorID Gearin2_ErrID
Jerk
BufferMode
When the actual position of the master axis is 1000.0 or higher during gear operation of axis 2 (slave axis),
Gearout_Ex changes to TRUE.
When Gearout_Ex changes to TRUE, gear operation is stopped for the axis 2 (slave axis). The axis decelerates to
a stop. GEAROUT
MC_GearOut
Gearout_Ex MC_Axis001 Slave Slave Gearout_D
Execute Done
DecRate Deceleration Busy Gearout_Bsy
Jerk CommandAborted Gearout_Ca
OutMode Error Gearout_Err
ErrorID Gearout_ErrID
Contents of Inline ST
IF (Gearin1_Act=TRUE) AND (MC_Axis000.Act.Pos>=LREAL#1000.0) THEN
Gearout_Ex := TRUE;
END_IF;
Timing Chart
Pwr1_Status
Pwr2_Status
Pwr3_Status
Vel_Ex
Vel_InVel
Vel_Bsy
Vel_Act
MC_GearIn
Gearin1_Ex
Gearin1_InGear
Gearin1_Bsy
Gearin1_Act
3
Gearin1_Ca
Gearin2_Ex
Sample Programming
Gearin2_InGear
Gearin2_Bsy
Gearin2_Act
Gearout_Ex
Gearout_Bsy
Gearout_D
Axis 1
Command position
1000
Actual position
Command velocity
Axis 2
Command velocity
Axis 3
Command velocity
Sample Programming
// Processing when input parameters are not set
IF InitFlag = FALSE THEN
// MC_MoveVelocity parameters
Vel_Vel := LREAL#2000.0;
Vel_Acc := LREAL#2000.0;
Vel_Dec := LREAL#2000.0;
Vel_Dir := _eMC_DIRECTION#_mcPositiveDirection;
// MC_GearIn1 parameters
Gearin1_Rn := UINT#1;
Gearin1_Rd := UINT#2;
Gearin1_Rt := _eMC_REFERENCE_TYPE#_mcFeedback;
Gearin1_Acc := LREAL#4000.0;
Gearin1_Dec := LREAL#4000.0;
// MC_GearIn2 parameters
Gearin2_Rn := UINT#2;
Gearin2_Rd := UINT#3;
Gearin2_Rt := _eMC_REFERENCE_TYPE#_mcFeedback;
Gearin2_Acc := LREAL#4000.0;
Gearin2_Dec := LREAL#4000.0;
// MC_GearOut parameters
DecRate := LREAL#200.0;
Gearout_Dec := DecRate;
END_IF;
// If StartPg is TRUE and the Servo Drive is ready, the Servo for axis 1 is turned ON.
// If the Servo Drive is not ready, the Servo is turned OFF.
IF (StartPg=TRUE)
AND (MC_Axis000.DrvStatus.Ready=TRUE) THEN
Pwr1_En:=TRUE;
ELSE
Pwr1_En:=FALSE;
END_IF;
// If StartPg is TRUE and the Servo Drive is ready, the Servo for axis 2 is turned ON.
// If the Servo Drive is not ready, the Servo is turned OFF.
IF (StartPg=TRUE)
AND (MC_Axis001.DrvStatus.Ready=TRUE) THEN
Pwr2_En:=TRUE;
ELSE
Pwr2_En:=FALSE;
END_IF;
// If StartPg is TRUE and the Servo Drive is ready, the Servo for axis 3 is turned ON.
// If the Servo Drive is not ready, the Servo is turned OFF.
IF (StartPg=TRUE)
AND (MC_Axis002.DrvStatus.Ready=TRUE) THEN
Pwr3_En:=TRUE;
ELSE
Pwr3_En:=FALSE;
END_IF;
// If a minor fault level error occurs for axis 1 to axis 3, the error handler for the device (FaultHandler) is
executed.
// Program the FaultHandler according to the device.
IF (MC_Axis000.MFaultLvl.Active=TRUE) OR (MC_Axis001.MFaultLvl.Active=TRUE) OR
(MC_Axis002.MFaultLvl.Active=TRUE) THEN
FaultHandler();
END_IF;
MC_GearIn
// If InVelocity of MC_MoveVelocity is TRUE and the Servo for axis 2 is ON, MC_GearIn is executed with axis 1
as the master axis and axis 2 as the slave axis.
Sample Programming
as the master axis and axis 3 as the slave axis.
IF (Vel_InVel=TRUE) AND (Pwr3_Status=TRUE) THEN
Gearin2_Ex := TRUE;
END_IF;
// If the actual position of axis 1 is 1000.0 or higher during gear operation for axis 2,
// the GearOut instruction for axis 2 (slave axis) is executed.
IF (Gearin1_Act=TRUE) AND (MC_Axis000.Act.Pos>=LREAL#1000.0) THEN
Gearout_Ex := TRUE;
END_IF;
//MC_MoveVelocity
VEL(
Axis := MC_Axis000,
Execute := Vel_Ex,
Velocity := Vel_Vel,
Acceleration := Vel_Acc,
Deceleration := Vel_Dec,
Direction := Vel_Dir,
InVelocity => Vel_InVel,
Busy => Vel_Bsy,
Active => Vel_Act,
CommandAborted => Vel_Ca,
Error => Vel_Err,
ErrorID => Vel_ErrID
);
//MC_GearOut
GEAROUT(
Slave := MC_Axis001,
Execute := Gearout_Ex,
Deceleration := Gearout_Dec,
Done => Gearout_D,
Busy => Gearout_Bsy,
CommandAborted => Gearout_CA,
Error => Gearout_Err,
ErrorID => Gearout_ErrID
);
MC_GearInPos
The MC_GearInPos instruction performs electronic gear operation for the specified gear ratio between
the master axis and the slave axis. The positions at which to start synchronizing the master axis and
slave axis are specified.
FB/
Instruction Name Graphic expression ST expression
FUN
MC_GearInPos
MC_GearInPOS Positioning FB MC_GearInPos_instance MC_GearInPos_instance (
Gear Master :=parameter,
Operation MC_GearInPos Slave :=parameter,
Master Master
Execute :=parameter,
Slave Slave
RatioNumerator :=parameter,
Execute StartSync
RatioDenominator :=parameter,
RatioNumerator InSync
RatioDenominator Busy
ReferenceType :=parameter, 3
MasterSyncPosition :=parameter,
ReferenceType Active
SlaveSyncPosition :=parameter,
MasterSyncPosition CommandAborted Velocity :=parameter,
Variables
SlaveSyncPosition Error Acceleration :=parameter,
Velocity ErrorID Deceleration :=parameter,
Acceleration Jerk :=parameter,
Deceleration BufferMode :=parameter,
Jerk StartSync =>parameter,
BufferMode InSync =>parameter,
Busy =>parameter,
Active =>parameter,
CommandAborted =>parameter,
Error =>parameter,
ErrorID =>parameter
);
Variables
Input Variables
Name Meaning Data type Valid range Default Description
Execute Execute BOOL TRUE or FALSE FALSE The instruction is executed when
Execute changes to TRUE.
Ratio Gear Ratio DINT*1 Positive or negative 10,000 Specify the numerator of the elec-
Numerator Numerator number*1 tronic gear ratio between the master
and slave axes.
Ratio Gear Ratio UDINT*2 Positive number 10,000 Specify the denominator of the elec-
Denominator Denominator tronic gear ratio between the master
and slave axes.
Reference Position Type _eMC_ REF- 0: _mcCommand 0*4 Specify the position type.
Type*3 Selection ERENCE_ 1: _mcFeedback 0: Command position (value calcu-
TYPE lated in the previous task
2: _mcLatestCommand
period*5)
1: Actual position (value obtained in
the same task period*5)
2: Command position (value calcu-
lated in the same task period*5)
*1 A CPU Unit with unit version 1.02 or later and Sysmac Studio version 1.03 or higher are required to use this variable. For
any previous version combinations, the data type is UINT and the valid range is positive numbers.
*2 A CPU Unit with unit version 1.02 or later and Sysmac Studio version 1.03 or higher are required to use this variable. For
any previous version combinations, the data type is UINT.
*3 To use _mcLatestCommand, the following condition must be met for the master and slave axes.
When you use _mcLatestCommand, the axis number set for the Master (Master Axis) in the system-defined variable for
motion control must be lower than the axis number set for the Slave (Slave Axis) in the system-defined variable for motion
control.
*4 The default value for an enumeration variable is actually not the number, but the enumerator.
*5 The task period is the primary period if the task is the primary periodic task and the task period of the priority-5 periodic
task if the task is the priority-5 periodic task.
*6 Refer to Unit Conversion Settings in the NJ/NX-series CPU Unit Motion Control User's Manual (Cat. No. W507) or NY-
series Industrial Panel PC / Industrial Box PC Motion Control User’s Manual (Cat. No. W559) for information on command
units.
Output Variables
Name Meaning Data type Valid range Description
StartSync Following BOOL TRUE or FALSE TRUE when acceleration/deceleration is started for
synchronization.
InSync In Sync BOOL TRUE or FALSE TRUE when the slave axis reaches the slave sync
position.
Busy Executing BOOL TRUE or FALSE TRUE when the instruction is acknowledged.
Active Controlling BOOL TRUE or FALSE TRUE when the axis is being controlled.
CommandAborted Command BOOL TRUE or FALSE TRUE when the instruction is aborted.
Aborted
Error Error BOOL TRUE or FALSE TRUE while there is an error.
ErrorID Error Code WORD * Contains the error code when an error occurs.
A value of 16#0000 indicates normal execution.
MC_GearInPos
Active When an instruction is received. • When Error changes to TRUE.
• When CommandAborted changes to TRUE.
CommandAborted • When this instruction is aborted because another • When Execute is TRUE and changes to
motion control instruction was executed with the FALSE.
Buffer Mode set to Aborting. • After one period when Execute is FALSE.
• When this instruction is canceled due to an error.
• When this instruction is executed while there is an 3
error.
• When you start this instruction during MC_Stop
Variables
instruction execution.
• When the MC_GearOut instruction is executed.
Error When there is an error in the execution conditions or When the error is cleared.
input parameters for the instruction.
In-Out Variables
* Specify a user-defined Axis Variable that was created in the Axis Basic Settings of the Sysmac Studio (default: MC_Axis***)
or a system-defined axis variable name (_MC_AX[*], _MC1_AX[*], or _MC2_AX[*]).
Function
• The MC_GearInPos instruction performs gear operation for the slave axis specified with Slave. The
following parameters are also specified: RatioNumerator (Gear Ratio Numerator), RatioDenominator
(Gear Ratio Denominator), ReferenceType (Position Type), Acceleration (Acceleration Rate), and
Deceleration (Deceleration Rate).
• For the master axis, you can specify the command position, actual position, or most recent command
position.
Specified with
ReferenceType.
Gear function
Numerator
Actual position Command position
Denominator
Remainder
Command position
Most recent
command position
• After operation starts, the Slave (Slave Axis) accelerates and decelerates in sync with the Master
(Master Axis) in the catching operation.
• Catching phase exists until the slave axis reaches the slave sync position. For either, the position is
synchronized with the master axis.
• The Velocity (Target Velocity) input variable is the target velocity for the catching phase.
• The slave axis moves in the same direction as the master axis when operation is started.
An error occurs if the master axis velocity is 0 when started. If the master axis is moving in the posi-
tive direction and SlaveSyncPosition (Slave Sync Position) is smaller than the position of the slave
axis when the instruction was executed, the slave axis will reverse direction. If the master axis is mov-
ing in the negative direction and SlaveSyncPosition (Slave Sync Position) is larger than the position
of the slave axis when the instruction was executed, the slave axis will also reverse direction. For
either, the position is synchronized with the master axis.
• If the master axis velocity changes significantly between periods, the slave axis velocity will not be
constant.
• If the gear ratio is positive, the slave axis and master axis move in the same direction.
MasterSyncPosition
SlaveSyncPosition
MC_GearInPos
Instruction executed. Time
StartSync
3
InSync
Function
Busy
Active
• If the gear ratio is negative, the slave axis and master axis move in the opposite directions.
Catching phase InGear phase
MasterSyncPosition
SlaveSyncPosition
• The MC Function Module calculates the velocity profile for linear acceleration and deceleration
with the following three velocities using the Acceleration (Acceleration Rate) and Deceleration
(Deceleration Rate).
• The velocity of the Slave (Slave Axis) when an instruction is executed is the initial velocity.
• The velocity of the Master (Master Axis) when an instruction is executed multiplied by the gear
ratio is the final velocity.
• The Velocity (Target Velocity) is the target velocity.
If the travel distance during the catching phase is too short, the target velocity will not be reached.
Catching Time
phase InGear phase
Slave axis velocity
Velocity
T1 Time
For the Slave (Slave Axis) to catch up with the Master (Master Axis) for the MasterSyncPosition
(Master Sync Position) and SlaveSyncPosition (Slave Sync Position), the following condition must be
met for the Velocity (Target Velocity)
Master axis velocity when MC_GearInPos is executed × Gear ratio numerator
Velocity >
Gear ratio denominator
The information that is used as the mater axis velocity depends on the setting of ReferenceType
(Position Type Selection).
When _mcCommand or _mcLatestCommand is set: Use the command current velocity.
When _mcFeedback is set: Use the actual current position.
If the Slave (Slave Axis) cannot catch up with the Master (Master Axis) for the MasterSyncPosition
(Master Sync Position) and SlaveSyncPosition (Slave Sync Position), a Positioning Gear Operation
Insufficient Target Velocity error (error code 5447 hex) will occur. Also, if you set the Count Mode to
Rotary Mode, make sure that the synchronous operation starts within one cycle of the ring counter.
• When the Count Mode is set to Rotary Mode, the operation is different for different unit versions of
the CPU Unit as described below.
• CPU Units with Unit Version 1.10 or Later
When the Count Mode of the master axis is Rotary Mode, you can specify a MasterSyncPosition
(Master Sync Position) outside the range specified by the modulo maximum position and modulo
minimum position setting values. If you do, the relationship between the master axis current posi-
tion and the master sync position will be the same as when no direction is specified for Direction in
the MC_MoveAbsolute (Absolute Positioning) instruction. Refer to MC_MoveAbsolute on page 3-
49 for information on the MC_MoveAbsolute (Absolute Positioning) instruction. In the same way,
when the Count Mode of the slave axis is Rotary Mode, you can specify a SlaveSyncPosition
(Slave Sync Position) outside the range specified by the modulo maximum position and modulo
minimum position setting values.
• CPU Units with Unit Version 1.09 or Earlier
If you set the Count Mode to Rotary Mode, make sure that the synchronous operation starts within
one cycle of the ring counter.
MC_GearInPos
• _mcLatestCommand: Command position (value calculated in the same task period)
The command position of the master axis that was calculated in the same task period is used.
This enables the use of information that is more recent than for _mcCommand. However, the axis
number of the master axis must be set lower than the axis number of the slave axis.
If the axis number of the slave axis is lower than the axis number of the master axis, Error will
change to TRUE. A Master/Slave Axis Numbers Not in Ascending Order error (error code: 5438
hex) will be output to ErrorID. 3
Function
Here, the task period is the primary period if the task is the primary periodic task and the task
period of the priority-5 periodic task if the task is the priority-5 periodic task. In the same way, the
periodic task is the primary periodic task or the priority-5 periodic task.
Additional Information
The command position that is calculated in the same task period enables greater precision in
synchronization than the command position that was calculated in the previous task period.
However, the axis number set for the Master (Master Axis) in the system-defined variable for
motion control must be lower than the axis number set for the Slave (Slave Axis) in the system-
defined variable for motion control.
Timing Charts
• Electronic gear operation starts when Execute changes to TRUE.
• Busy (Executing) changes to TRUE when Execute changes to TRUE. After the operation is started,
Active (Controlling) and StartSync (Following) change to TRUE and the Slave (Slave Axis) starts the
gear operation.
• When the MasterSyncPosition (Master Sync Position) and SlaveSyncPosition (Slave Sync Position)
are reached, InSync changes to TRUE.
• If another instruction aborts this instruction, CommandAborted changes to TRUE and Busy (Execut-
ing), Active (Controlling), StartSync (Following), and InSync change to FALSE.
Execute
StartSync
InSync
Busy
Active
CommandAborted
Error
ErrorID 16#0000
Velocity
InSyncPhase
CatchingPhase
Time
The operation when this instruction is aborted by another instruction is shown below.
Execute
StartSync
InSync
Busy
Active
MC_GearInPos
CommandAborted
Error
ErrorID 16#0000
InSyncPhase Multi-execution of
Velocity
another instruction 3
Function
CatchingPhase
Time
Depending on setting of the SlaveSyncPosition, the axis may not reach the target velocity. An exam-
ple of this is shown below.
Execute
StartSync
InSync
Busy
Active
CommandAborted
Error
ErrorID 16#0000
Velocity
InSyncPhase
CatchingPhase
Time
The slave axis follows the master axis position before the InSync phase as well. An example of this
is shown below.
Execute
StartSync
InSync
Busy
Active
CommandAborted
Error
ErrorID 16#0000
Velocity
Master axis
InSyncPhase
Time
You can specify the Acceleration (Acceleration Rate) and Deceleration (Deceleration Rate) as input
variables. The following figures show operation examples of the electronic gear.
Velocity Velocity
Time Time
MC_GearInPos
Specify the operation of this instruction by using BufferMode (Buffer Mode Selection) for multi-exe-
cution of instructions.
Buffer Mode Selection Description
Aborting Aborts the instruction being executed and switches to this instruction.
If the direction of axis motion is reversed by switching instructions, the motion
will be reversed according to the Operation Selection at Reversing axis parame-
ter.
3
For details on BufferMode (Buffer Mode Selection), refer to the NJ/NX-series CPU Unit Motion Con-
Function
trol User's Manual (Cat. No. W507) or NY-series Industrial Panel PC / Industrial Box PC Motion Con-
trol User’s Manual (Cat. No. W559).
Errors
If an error occurs during instruction execution, Error will change to TRUE. You can find out the cause of
the error by referring to the value output by ErrorID (Error Code).
StartSync
InSync
Busy
Active
CommandAborted
Error
The slave axis is not affected by the error status of the master axis during synchronized control.
After the error status of the master axis is cleared, the slave axis continues electronic gear operation
when the master axis operates.
The master axis is not affected if an error occurs for the slave axis during startup or execution of this
instruction.
Error Codes
Refer to A-1 Error Codes for instruction errors.
Sample Programming
This section describes sample programming where the sync position for the master axis is Pos1 and
the sync position for the slave axis Pos2.
Parameter Settings
The minimum settings required for this sample programming are given below.
Axis Types
Axis Axis Types
Axis 1 Servo axis (master axis)
Axis 2 Servo axis (slave axis)
Count Modes
Axis Count Mode
Axis 1 Rotary Mode
Axis 2 Rotary Mode
Ring Counters
Modulo maxi- Modulo mini-
Axis
mum position mum position
Axis 1 360 0
Axis 2 360 0
Units of Display
Axis Unit of Display
Axis 1 degree
Axis 2 degree
Operation Example
Axis 1
1:2
Axis 2
Operation Pattern
Axis 1 position
Pos1
Time
Vel_InVel
MC_GearInPos
Axis 2 position
Pos2
Sample Programming
Time
Ladder Diagram
Main Variables
Timing Chart
Pwr1_Status
Pwr2_Status
Hm1_D
Hm1_Bsy
Hm2_D
Hm2_Bsy
Vel_InVel
Vel_Bsy
Vel_Act
Gearinpos_StSync
Gearinpos_InSync
Gearinpos_Bsy
Gearinpos_Act
Axis 1
Command position
Actual position
Command velocity
Actual velocity
Axis 2
Command position
Command velocity
Sample Programming
If StartPg is TRUE, check that the Servo Drives for each axis are ready.
StartPg MC_Axis000.DrvStatus.Ready Lock1
MC_Axis001.DrvStatus.Ready Lock2
If the Servo Drives are ready, the Servos are turned ON for each axis.
MC_GearInPos
PWR1
MC_Power
Lock1 MC_Axis000 Axis Axis Pwr1_Status
Enable Status
Busy Pwr1_Bsy
Error Pwr1_Err
ErrorID Pwr1_ErrID
3
PWR2
Sample Programming
MC_Power
Lock2 MC_Axis001 Axis Axis Pwr2_Status
Enable Status
Busy Pwr2_Bsy
Error Pwr2_Err
ErrorID Pwr2_ErrID
If a minor fault level error occurs for the axis composition, the error handler for the device (FaultHandler) is executed.
Program the FaultHandler according to the device.
MC_Axis000.MFaultLvl.Active FaultHandler
EN FaultHandler
MC_Axis001.MFaultLvl.Active
If the Servo is ON for the master axis (axis 1) and home is not defined, the Home instruction is executed to define home.
HM1
MC_Home
Pwr1_Status MC_Axis000.Details.Homed MC_Axis000 Axis Axis Hm1_D
Execute Done
Busy Hm1_Bsy
CommandAborted Hm1_Ca
Error Hm1_Err
ErrorID Hm1_ErrID
If the Servo is ON for the slave axis (axis 2) and home is not defined, the Home instruction is executed to define home.
HM2
MC_Home
Pwr2_Status MC_Axis001.Details.Homed MC_Axis001 Axis Axis Hm2_D
Execute Done
Busy Hm2_Bsy
CommandAborted Hm2_Ca
Error Hm2_Err
ErrorID Hm2_ErrID
The MC_MoveVelocity (Velocity Control) instruction is executed after homing is completed for the master axis (axis 1).
VEL
MC_MoveVelocity
Hm1_D MC_Axis000 Axis Axis Vel_InVel
Execute InVelocity
LREAL#90.0 Velocity Busy Vel_Bsy
LREAL#90.0 Acceleration Active Vel_Act
LREAL#90.0 Deceleration CommandAborted Vel_Ca
LREAL#0.0 Jerk Error Vel_Err
_eMC_DIRECTION#_mcPositiveDirection Direction ErrorID Vel_ErrID
Continuous
BufferMode
After homing is completed for axis 2 (slave axis), MC_GearInPos (Positioning Gear Operation) is executed to start
gear operation if Vel_InVel of MC_MoveVelocity is TRUE.
GEARINPOS
MC_GearInPos
MC_Axis000 Master Master
MC_Axis001.Details.Homed Vel_InVel MC_Axis001 Slave Slave Gearinpos_StSync
Execute StartSync
UINT#1 RatioNumerator InSync Gearinpos_InSync
UINT#2 RatioDenominator Busy Gearinpos_Bsy
_eMC_REFERENCE_TYPE#_mcFeedback ReferenceType Active Gearinpos_Act
Pos1 MasterSyncPosition CommandAborted Gearinpos_Ca
Pos2 SlaveSyncPosition Error Gearinpos_Err
LREAL#180.0 Velocity ErrorID Gearinpos_ErrID
LREAL#180.0 Acceleration
LREAL#180.0 Deceleration
Jerk
BufferMode
MC_GearInPos
Gearinpos_Ex BOOL FALSE The GEARIN1 instance of MC_GearInPos is exe-
cuted when this variable changes to TRUE.
Vel_Ex BOOL FALSE The VEL instance of MC_MoveVelocity is exe-
cuted when this variable changes to TRUE.
InitFlag BOOL FALSE This variable indicates if it is necessary to set the
input parameters. Input parameters are set when
this variable is FALSE. When setting the input 3
parameters is completed, this variable changes to
TRUE.
Sample Programming
Timing Chart
Pwr1_Status
Pwr2_Status
Hm1_Ex
Hm1_D
Hm1_Bsy
Hm2_Ex
Hm2_D
Hm2_Bsy
Vel_Ex
Vel_InVel
Vel_Bsy
Vel_Act
Gearinpos_Ex
Gearinpos_StSync
Gearinpos_InSync
Gearinpos_Bsy
Gearinpos_Act
Axis 1
Command position
Actual position
Command velocity
Actual velocity
Axis 2
Command position
Command velocity
Sample Programming
// Processing when input parameters are not set
IF InitFlag = FALSE THEN
// MC_MoveVelocity parameters
Vel_Vel := LREAL#90.0;
Vel_Acc := LREAL#90.0;
Vel_Dec := LREAL#90.0;
Vel_Dir := _eMC_DIRECTION#_mcPositiveDirection;
// MC_GearInPos parameters
Pos1 := LREAL#300.0;
Pos2 := LREAL#200.0;
Gearinpos_Rn := UINT#1;
Gearinpos_Rd := UINT#2;
Gearinpos_Rt := _eMC_REFERENCE_TYPE#_mcFeedback;
Gearinpos_Mtpos := Pos1;
Gearinpos_Svpos := Pos2;
Gearinpos_Vel := LREAL#180.0;
Gearinpos_Acc := LREAL#180.0;
Gearinpos_Dec := LREAL#180.0;
MC_GearInPos
END_IF;
// If StartPg is TRUE and the Servo Drive is ready, the Servo for axis 1 is turned ON.
// If the Servo Drive is not ready, the Servo is turned OFF.
IF (StartPg=TRUE)
AND (MC_Axis000.DrvStatus.Ready=TRUE) THEN
Pwr1_En:=TRUE;
ELSE 3
Pwr1_En:=FALSE;
END_IF;
Sample Programming
// If StartPg is TRUE and the Servo Drive is ready, the Servo for axis 2 is turned ON.
// If the Servo Drive is not ready, the Servo is turned OFF.
IF (StartPg=TRUE)
AND (MC_Axis001.DrvStatus.Ready=TRUE) THEN
Pwr2_En:=TRUE;
ELSE
Pwr2_En:=FALSE;
END_IF;
// If a minor fault level error occurs for axis 1 or axis 2, the error handler for the device (FaultHandler) is
executed.
// Program the FaultHandler according to the device.
IF (MC_Axis000.MFaultLvl.Active=TRUE) OR (MC_Axis001.MFaultLvl.Active=TRUE) THEN
FaultHandler();
END_IF;
// If the Servo is ON for axis 1 and home is not defined, the Home instruction is executed.
IF (Pwr1_Status=TRUE) AND (MC_Axis000.Details.Homed=FALSE) THEN
Hm1_Ex:=TRUE;
END_IF;
// If the Servo is ON for axis 2 and home is not defined, the Home instruction is executed.
IF (Pwr2_Status=TRUE) AND (MC_Axis001.Details.Homed=FALSE) THEN
Hm2_Ex:=TRUE;
END_IF;
// After homing is completed for axis 2, MC_GearInPos is executed when Vel_InVel of MC_MoveVelocity is
TRUE.
IF (MC_Axis001.Details.Homed=TRUE) AND (Vel_InVel=TRUE) THEN
Gearinpos_Ex := TRUE;
END_IF;
//MC_MoveVelocity
VEL(
Axis := MC_Axis000,
Execute := Vel_Ex,
Velocity := Vel_Vel,
Acceleration := Vel_Acc,
Deceleration := Vel_Dec,
Direction := Vel_Dir,
InVelocity => Vel_InVel,
Busy => Vel_Bsy,
Active => Vel_Act,
CommandAborted => Vel_Ca,
Error => Vel_Err,
ErrorID => Vel_ErrID
);
//MC_GearInPos
GEARINPOS(
Master := MC_Axis000,
Slave := MC_Axis001,
Execute := Gearinpos_Ex,
RatioNumerator := Gearinpos_Rn,
RatioDenominator := Gearinpos_Rd,
ReferenceType := Gearinpos_Rt,
MasterSyncPosition := Gearinpos_Mtpos,
SlaveSyncPosition := Gearinpos_Svpos,
Velocity := Gearinpos_Vel,
Acceleration := Gearinpos_Acc,
Deceleration := Gearinpos_Dec,
MC_GearInPos
3
Sample Programming
MC_GearOut
The MC_GearOut instruction stops operation for the MC_GearIn (Start Gear Operation) instruction or
MC_GearInPos (Positioning Gear Operation) instruction.
Instruction Name FB/FUN Graphic expression ST expression
MC_GearOut End Gear FB MC_GearOut_instance MC_GearOut_instance (
Operation Slave :=parameter,
MC_GearOut Execute :=parameter,
Slave Slave
Deceleration :=parameter,
Execute Done
Jerk :=parameter,
Deceleration Busy
OutMode :=parameter,
Jerk CommandAborted
Done =>parameter,
OutMode Error
Busy =>parameter,
ErrorID CommandAborted =>parameter,
Error =>parameter,
ErrorID =>parameter
);
Variables
Input Variables
Name Meaning Data type Valid range Default Description
Execute Execute BOOL TRUE or FALSE FALSE The instruction is executed when
Execute changes to TRUE.
Deceleration Deceleration LREAL Non-negative number 0 Specify the deceleration rate. The
Rate unit is command units/s2.*1
Jerk Jerk LREAL 0 0 (Reserved)
(Reserved)
OutMode Sync End _eMC_OUT_ 0: _mcStop 0*2 (Reserved)
(Reserved) Mode Selec- MODE
tion
*1 Refer to Unit Conversion Settings in the NJ/NX-series CPU Unit Motion Control User's Manual (Cat. No. W507) or NY-
series Industrial Panel PC / Industrial Box PC Motion Control User’s Manual (Cat. No. W559) for information on command
units.
*2 The default value for an enumeration variable is actually not the number, but the enumerator.
Output Variables
Name Meaning Data type Valid range Description
Done Done BOOL TRUE or FALSE TRUE when the instruction is completed.
Busy Executing BOOL TRUE or FALSE TRUE when the instruction is acknowledged.
CommandAborted Command BOOL TRUE or FALSE TRUE when the instruction is aborted.
Aborted
Error Error BOOL TRUE or FALSE TRUE while there is an error.
ErrorID Error Code WORD * Contains the error code when an error occurs.
A value of 16#0000 indicates normal execution.
MC_GearOut
CommandAborted • When this instruction is aborted because another • When Execute is TRUE and changes to
motion control instruction was executed with the FALSE.
Buffer Mode set to Aborting. • After one period when Execute is FALSE.
• When this instruction is canceled due to an error.
• When this instruction is executed while there is an
error.
• When you start this instruction during MC_Stop 3
instruction execution.
Error When there is an error in the execution conditions or When the error is cleared.
Variables
input parameters for the instruction.
In-Out Variables
* Specify a user-defined Axis Variable that was created in the Axis Basic Settings of the Sysmac Studio (default: MC_Axis***)
or a system-defined axis variable name (_MC_AX[*], _MC1_AX[*], or _MC2_AX[*]).
Function
• The MC_GearOut instruction stops the operation of the MC_GearIn (Start Gear Operation) or
MC_GearInPos (Positioning Gear Operation) instruction for the operation axis specified with Slave
and at the specified Deceleration (Deceleration Rate).
• This instruction does not affect the MC_GearIn (Start Gear Operation) or MC_GearInPos (Positioning
Gear Operation) operation of the master axis.
Timing Charts
• Busy (Executing) changes to TRUE when Execute changes to TRUE.
• Done changes to TRUE when the target velocity is reached.
• If another instruction aborts this instruction, CommandAborted changes to TRUE and Busy (Execut-
ing) changes to FALSE.
Execute
Done
Busy
CommandAborted
Error
ErrorID 16#0000
Velocity
Master axis velocity
Time
Done
Busy
CommandAborted
Error
ErrorID 16#0000
Velocity
Master axis velocity
Multi-execution of
another instruction
Time
Velocity
MC_GearOut executed.
MC_GearOut
Time
Function
is attempted.
Errors
If an error occurs during instruction execution, Error will change to TRUE. You can find out the cause of
the error by referring to the value output by ErrorID (Error Code).
Done
Busy
CommandAborted
Error
Velocity
Time
Error Codes
Refer to A-1 Error Codes for instruction errors.
MC_MoveLink
Positioning is performed in sync with the specified master axis.
FB/
Instruction Name Graphic expression ST expression
FUN
MC_MoveLink Synchro- FB MC_MoveLink_instance MC_MoveLink_instance (
nous Posi- Master :=parameter,
MC_MoveLink
tioning MC_MoveLink Slave :=parameter,
Master Master
TriggerInput :=parameter,
Slave Slave
TriggerVariable :=parameter,
TriggerInput TriggerInput
Execute :=parameter,
TriggerVariable TriggerVariable
ReferenceType :=parameter,
Execute Done
SlaveDistance :=parameter,
ReferenceType InSync
MasterDistance :=parameter, 3
SlaveDistance Busy MasterDistanceInACC :=parameter,
MasterDistance Active MasterDistanceInDEC :=parameter,
MasterDistanceInACC CommandAborted LinkOption :=parameter,
Variables
MasterDistanceInDEC Error MasterStartDistance :=parameter,
LinkOption ErrorID BufferMode :=parameter,
MasterStartDistance Done =>parameter,
BufferMode InSync =>parameter,
Busy =>parameter,
Active =>parameter,
CommandAborted =>parameter,
Error =>parameter,
ErrorID =>parameter
);
Variables
Input Variables
Name Meaning Data type Valid range Default Description
Execute Execute BOOL TRUE or FALSE FALSE The instruction is executed
when Execute changes to
TRUE.
Reference Position _eMC_ 0: _mcCommand 0*2 Specify the position type.
Type*1 Type Selec- REFERENCE 1: _mcFeedback 0: Command position
tion _TYPE 2: _mcLatestCommand (value calculated in the
previous task period*3)
1: Actual position (value
obtained in the same
task period*3)
2: Command position
(value calculated in the
same task period*3)
SlaveDistance Slave Axis LREAL Negative number, positive 0 Specify the travel distance
Travel Dis- number, or 0 of the slave axis. The unit is
tance command units.*4
*1 To use _mcLatestCommand, the following condition must be met for the master and slave axes.
When you use _mcLatestCommand, the axis number set for the Master (Master Axis) in the system-defined variable for
motion control must be lower than the axis number set for the Slave (Slave Axis) in the system-defined variable for motion
control.
*2 The default value for an enumeration variable is actually not the number, but the enumerator.
*3 The task period is the primary period if the task is the primary periodic task and the task period of the priority-5 periodic
task if the task is the priority-5 periodic task.
*4 Refer to Unit Conversion Settings in the NJ/NX-series CPU Unit Motion Control User's Manual (Cat. No. W507) or NY-
series Industrial Panel PC / Industrial Box PC Motion Control User’s Manual (Cat. No. W559) for information on command
units.
Output Variables
Name Meaning Data type Valid range Description
Done Done BOOL TRUE or FALSE TRUE when the instruction is completed.
InSync In Sync BOOL TRUE or FALSE TRUE when synchronization is started.
Busy Executing BOOL TRUE or FALSE TRUE when the instruction is acknowledged.
Active Controlling BOOL TRUE or FALSE TRUE when the axis is being controlled.
CommandAborted Command BOOL TRUE or FALSE TRUE when the instruction is aborted.
MC_MoveLink
Aborted
Error Error BOOL TRUE or FALSE TRUE while there is an error.
ErrorID Error Code WORD * Contains the error code when an error occurs.
A value of 16#0000 indicates normal execution.
Variables
Name Timing for changing to TRUE Timing for changing to FALSE
Done When the instruction is completed. • When Execute is TRUE and changes to
FALSE.
• After one period when Execute is
FALSE.
InSync When synchronization conditions are met. • When Done changes to TRUE.
• When Error changes to TRUE.
• When CommandAborted changes to
TRUE.
Busy When Execute changes to TRUE. • When Done changes to TRUE.
• When Error changes to TRUE.
• When CommandAborted changes to
TRUE.
Active When an instruction is received. • When Done changes to TRUE.
• When Error changes to TRUE.
• When CommandAborted changes to
TRUE.
CommandAborted • When this instruction is aborted because another • When Execute is TRUE and changes to
motion control instruction was executed with the Buf- FALSE.
fer Mode set to Aborting. • After one period when Execute is
• When this instruction is canceled due to an error. FALSE.
• When this instruction is executed while there is an
error.
• When you start this instruction during MC_Stop
instruction execution.
Error When there is an error in the execution conditions or When the error is cleared.
input parameters for the instruction.
In-Out Variables
*1 Specify a user-defined Axis Variable that was created in the Axis Basic Settings of the Sysmac Studio (default:
MC_Axis***) or a system-defined axis variable name (_MC_AX[*], _MC1_AX[*], or _MC2_AX[*]).
*2 Define a user-defined variable with a data type of _sTRIGGER_REF..
_sTRIGGER_REF
Name Meaning Data type Valid range Function
Mode Mode _eMC_Trigger_ 0: _mcDrive Specify the trigger mode.
Mode 1: _mcController 0: Drive Mode
1: Controller Mode
LatchID Latch ID _eMC_Trigger_ 0: _mcLatch1 Specify which of the two latch functions to use
Selection Latch_ID 1: _mcLatch2 in Drive Mode.
0: Latch 1
1: Latch 2
InputDrive Trigger _eMC_Trigger_ 0: _mcEncoderMark Specify the Servo Drive trigger signal to use in
Input Sig- Input _Drive 1: _mcEXT Drive Mode.
nal 0: Z-phase signal
1: External input
Function
• The MC_MoveLink instruction moves a slave axis in synchronization with a specified master axis.
• A type of electronic cam operation is performed, but synchronous positioning is performed between
the slave axis and the master axis.
• Use MC_Stop to stop the axis during motion for this instruction.
MC_MoveLink
Refer to I/O Entry Mappings in the NX-series Position Interface Units User’s Manual (Cat. No. W524)
for information on using the NX-series Position Interface Units.
Instruction Details
This section describes the instruction in detail. 3
Master (Master Axis)
Function
Specify the master axis with Master.
Additional Information
The command position that is calculated in the same task period enables greater precision in
synchronization than the command position that was calculated in the previous task period.
However, the axis number set for the Master (Master Axis) in the system-defined variable for
motion control must be lower than the axis number set for the Slave (Slave Axis) in the system-
defined variable for motion control.
MasterDistanceInDEC
MasterDistance
MasterDistanceInACC
Master
following
distance
Time
Slave axis position
SlaveDistance
Time
Slave axis velocity
Time
Master
following MasterDistanceInACC
distance
MasterDistance
MasterDistanceInDEC
MC_MoveLink
Time
Slave axis position
SlaveDistance 3
Function
Time
Slave axis velocity
Time
The relationship between the travel distance of the master axis and the travel distance of the slave
axis is shown in the following table.
Section Relationship between the master axis and slave axis travel distances
Accelera- Master axis Master Distance in Acceleration
tion Slave axis Master distance in acceleration
Slave axis 2
travel ×
distance
Master distance Master axis travel distance − Master distance in Master distance
in acceleration + acceleration − Master distance in deceleration + in deceleration
2 2
Constant Master axis Master axis travel distance − Master distance in acceleration − Master distance in
velocity deceleration
Slave axis Slave axis travel distance − Slave axis travel distance at the acceleration rate above
− Slave axis travel distance at the deceleration rate below
Decelera- Master axis Master Distance in Deceleration
tion Slave axis Master distance in deceleration
Slave axis 2
travel ×
distance Master distance Master axis travel distance − Master distance in Master distance
in acceleration + acceleration − Master distance in deceleration + in deceleration
2 2
When the constant velocity section of the master axis is negative, a constant velocity travel distance
error occurs and the axis stops. If you want to feed the slave axis at the same velocity as the master
axis, set the following value as the travel distance of the slave axis.
Master distance Master distance
Slave axis in acceleration + Master axis travel distance − Master distance in + in deceleration
=
travel distance
2 acceleration − Master distance in deceleration
2
MasterStartDistance
MasterStartDistance specifies the absolute position where the slave axis starts synchronization with
the master axis.
For details on BufferMode (Buffer Mode Selection), refer to the NJ/NX-series CPU Unit Motion Con-
MC_MoveLink
trol User's Manual (Cat. No. W507) or NY-series Industrial Panel PC / Industrial Box PC Motion Con-
trol User’s Manual (Cat. No. W559).
In-position Check
An in-position check is performed when the slave axis ends operation.
An in-position check is performed for this instruction according to the settings in In-position Range
and In-position Check Time axis parameters.
3
Function
Timing Charts
Executing MC_MoveLink
Busy
Active
InSync
Done
Master axis
Slave axis
Time
Slave axis
velocity
Time
TriggerInput
Done
InSync
Busy
Active
Master axis
Slave axis
Time
Sync Start Condition Setting = When the Master Axis Reaches the Master
Following Distance
Execute
Done
InSync
Busy
MC_MoveLink
Active
Master axis
Master
following 3
distance
Slave axis
Function
Slave Time
axis
velocity
Time
Done
Busy
Active
CommandAborted
Current Instruction
Execute
Done
InSync
Busy
Active
CommandAborted
Time
Execute
Done
MC_MoveLink
InSync
Busy
Active
CommandAborted 3
Error
Function
ErrorID 16#0000 Error code
Time
Errors
If an error occurs during instruction execution, Error will change to TRUE and the axis will stop. You can
find out the cause of the error by referring to the value output by ErrorID (Error Code). Refer to Re-exe-
cution of Motion Control Instructions on page 3-281 for the timing chart after an error occurs.
Error Codes
Refer to A-1 Error Codes for instruction errors.
Sample Programming
This sample programming shows the control of a cutter.
Parameter Settings
The minimum settings required for this sample programming are given below.
Axis Types
Axis Axis Type
Axis 1 Servo axis (master axis)
Axis 2 Servo axis (slave axis)
Count Modes
Axis Count Mode
Axis 1 Rotary Mode
Axis 2 Linear Mode
Ring Counter
Modulo maxi- Modulo mini-
Axis
mum position mum position
Axis 1 360 0
Units of Display
Axis Unit of Display
Axis 1 degree
Axis 2 mm
Operation Example
Axis 2
Servo axis Pneumatic actuator
Axis 1
Servo axis
Operation Patterns
Axis 1 position
M_DEC
M_Dist
MC_MoveLink
M_ACC
M_StartPos
Time
Axis 2 position 3
Sample Programming
Synchronization S_Dist
started.
Time
Ladder Diagram
Main Variables
Timing Chart
MC_Axis001.DrvStatus.Latch1
Mv_Link_D
Mv_Link_InSync
Mv_Link_Bsy
MC_Axis001.Cmd.Vel
Time
Sample Programming
If StartPg is TRUE, check that the Servo Drives for each axis are ready.
MC_Axis001.DrvStatus.Ready Lock2
If the Servo Drives are ready, the Servos are turned ON for each axis.
MC_MoveLink
PWR1
MC_Power
Lock1 MC_Axis000 Axis Axis Pwr1_Status
Enable Status
Busy Pwr1_Bsy
Error Pwr1_Err
ErrorID Pwr1_ErrID 3
PWR2
Sample Programming
MC_Power
Lock2 MC_Axis001 Axis Axis Pwr2_Status
Enable Status
Busy Pwr2_Bsy
Error Pwr2_Err
ErrorID Pwr2_ErrID
If a minor fault level error occurs for the axis composition, the error handler for the device (FaultHandler) is executed.
Program the FaultHandler according to the device.
MC_Axis000.MFaultLvl.Active FaultHandler
EN FaultHandler
MC_Axis001.MFaultLvl.Active
If the Servo is ON for axis 1 and home is not defined, the Home instruction is executed to define home.
HM1
MC_Home
Pwr1_Status MC_Axis000.Details.Homed MC_Axis000 Axis Axis Hm1_D
Execute Done
Busy Hm1_Bsy
CommandAborted Hm1_Ca
Error Hm1_Err
ErrorID Hm1_ErrID
If the Servo is ON for axis 2 and home is not defined, the Home instruction is executed to define home.
HM2
MC_Home
Pwr2_Status MC_Axis001.Details.Homed MC_Axis001 Axis Axis Hm2_D
Execute Done
Busy Hm2_Bsy
CommandAborted Hm2_Ca
Error Hm2_Err
ErrorID Hm2_ErrID
The parameters are set for the MC_MoveVelocity (Velocity Control) and MC_MoveLink (Synchronous Positioning) instructions.
InitFlag
The MC_MoveVelocity (Velocity Control) instruction is executed if home is defined for axis 1.
VEL
MC_MoveVelocity
MC_Axis000.Details.Homed MC_Axis000 Axis Axis Vel_InVel
Execute InVelocity
Vel_Vel Velocity Busy Vel_Bsy
Vel_Acc Acceleration Active Vel_Act
Vel_Dec Deceleration CommandAborted Vel_Ca
Jerk Error Vel_Err
Direction ErrorID Vel_EIrrD
Continuous
BufferMode
The MC_MoveLink (Synchronous Positioning) instruction is executed if home is defined for axis 2 (slave axis).
MV_LINK
MC_MoveLink
MC_Axis000 Master Master
MC_Axis001 Slave Slave
Mv_Link_TrigRef TriggerInput TriggerInput
MC_Axis001.Details.Homed Vel_InVel Mv_Link_TrigVar TriggerVariable TriggerVariable Mv_Link_D
Execute Done
ReferenceType InSync Mv_Link_InSync
Mv_Link_SlvDis SlaveDistance Busy Mv_Link_Bsy
Mv_Link_MasDis MasterDistance Active Mv_Link_Act
Mv_Link_MasDisInAcc MasterDistanceInACC CommandAborted Mv_Link_Ca
Mv_Link_MasDisInDec MasterDistanceInDEC Error Mv_Link_Err
Mv_Link_LnkOpt LinkOption ErrorID Mv_Link_ErrID
MasterStartDistance
BufferMode
Contents of Inline ST
// MC_MoveVelocity parameters
Vel_Vel := LREAL#1000.0;
Vel_Acc := LREAL#0.0;
Vel_Dec := LREAL#0.0;
// MC_MoveLink parameters
Mv_Link_TrigRef.Mode := _eMC_TRIGGER_MODE#_mcDrive;
Mv_Link_TrigRef.LatchID := _eMC_TRIGGER_LATCH_ID#_mcLatch1;
Mv_Link_TrigRef.InputDrive := _eMC_TRIGGER_INPUT_DRIVE#_mcEXT;
Mv_Link_TrigVar := FALSE;
Mv_Link_SlvDis := LREAL#1000.0;
Mv_Link_MasDis := LREAL#1000.0;
Mv_Link_MasDisInAcc := LREAL#100.0;
Mv_Link_MasDisInDec := LREAL#100.0;
Mv_Link_LnkOpt := _eMC_LINKOPTION#_mcTriggerDetection;
MC_MoveLink
Name Data type Default Comment
MC_Axis000 _sAXIS_REF --- Axis Variable for the master axis, axis 1.
MC_Axis000.MFaultLvl.Active BOOL FALSE TRUE while there is a minor fault level error for
axis 1.
MC_Axis000.Details.Homed BOOL FALSE TRUE when home is defined for axis 1. 3
MC_Axis001 _sAXIS_REF --- Axis Variable for the slave axis, axis 2.
MC_Axis001.MFaultLvl.Active BOOL FALSE TRUE while there is a minor fault level error for
Sample Programming
axis 2.
MC_Axis001.Details.Homed BOOL FALSE TRUE when home is defined for axis 2.
Pwr1_Status BOOL FALSE This variable is assigned to the Status output
variable from the PWR1 instance of the
MC_Power instruction. This variable changes to
TRUE when the Servo is turned ON.
Pwr2_Status BOOL FALSE This variable is assigned to the Status output
variable from the PWR2 instance of the
MC_Power instruction. This variable changes to
TRUE when the Servo is turned ON.
StartPg BOOL FALSE The Servo is turned ON if this variable is TRUE
and EtherCAT process data communications are
established.
Actuator BOOL FALSE TRUE when axis 1 and axis 2 are synchronized.
While Actuator is TRUE, the cutter moves down
vertically.
InitFlag BOOL FALSE This variable indicates if it is necessary to set the
input parameters. Input parameters are set when
this variable is FALSE. When setting the input
parameters is completed, this variable changes to
TRUE.
Timing Chart
MC_Axis001.DrvStatus.Latch1
Mv_Link_Ex
Mv_Link_D
Mv_Link_InSync
Mv_Link_Bsy
MC_Axis001.Cmd.Vel
Time
Sample Programming
// Processing when input parameters are not set
IF InitFlag=FALSE THEN
// MC_MoveVelocity parameters
Vel_Vel := LREAL#1000.0;
Vel_Acc := LREAL#0.0;
Vel_Dec := LREAL#0.0;
// MC_MoveLink parameters
Mv_Link_TrigRef.Mode := _eMC_TRIGGER_MODE#_mcDrive;
MC_MoveLink
Mv_Link_TrigRef.LatchID := _eMC_TRIGGER_LATCH_ID#_mcLatch1;
Mv_Link_TrigRef.InputDrive := _eMC_TRIGGER_INPUT_DRIVE#_mcEXT;
Mv_Link_TrigVar := FALSE;
Mv_Link_SlvDis := LREAL#1000.0;
Mv_Link_MasDis := LREAL#1000.0;
Mv_Link_MasDisInAcc := LREAL#100.0;
Mv_Link_MasDisInDec := LREAL#100.0; 3
Mv_Link_LnkOpt := _eMC_LINKOPTION#_mcTriggerDetection;
Sample Programming
InitFlag := TRUE;
END_IF;
// If StartPg is TRUE and the Servo Drive is ready, the Servo for axis 1 is turned ON.
// If the Servo Drive is not ready, the Servo is turned OFF.
IF (StartPg=TRUE)
AND (MC_Axis000.DrvStatus.Ready=TRUE) THEN
Pwr1_En:=TRUE; // Turn ON the Servo for axis 1.
ELSE
Pwr1_En:=FALSE; // Turn OFF the Servo for axis 1.
END_IF;
// If StartPg is TRUE and the Servo Drive is ready, the Servo for axis 2 is turned ON.
// If the Servo Drive is not ready, the Servo is turned OFF.
IF (StartPg=TRUE)
AND (MC_Axis001.DrvStatus.Ready=TRUE) THEN
Pwr2_En:=TRUE; // Turn ON the Servo for axis 2.
ELSE
Pwr2_En:=FALSE; // Turn OFF the Servo for axis 2.
END_IF;
// If the Servo is ON for axis 1 and home is not defined, the Home instruction is executed.
IF (Pwr1_Status=TRUE) AND (MC_Axis000.Details.Homed=FALSE) THEN
Hm1_Ex:=TRUE;
END_IF;
// If the Servo is ON for axis 2 and home is not defined, the Home instruction is executed.
IF (Pwr2_Status=TRUE) AND (MC_Axis001.Details.Homed=FALSE) THEN
Hm2_Ex:=TRUE;
END_IF;
// After home is defined for axis 1, MC_MoveVelocity is executed for axis 1.
IF MC_Axis000.Details.Homed=TRUE THEN
Vel_Ex:=TRUE;
END_IF;
// MC_MoveLink is executed for axis 2 if home is defined for axis 2 and the target velocity was reached for axis
1.
IF (MC_Axis001.Details.Homed=TRUE) AND (Vel_InVel=TRUE) THEN
Mv_Link_Ex:=TRUE;
END_IF;
// MC_Power1
PWR1(
Axis := MC_Axis000,
Enable := Pwr1_En,
Status => Pwr1_Status,
Busy => Pwr1_Bsy,
Error => Pwr1_Err,
ErrorID => Pwr1_ErrID
);
// MC_Power2
PWR2(
Axis := MC_Axis001,
Enable := Pwr2_En,
Status => Pwr2_Status,
Busy => Pwr2_Bsy,
Error => Pwr2_Err,
ErrorID => Pwr2_ErrID
);
// MC_Home1
HM1(
Axis := MC_Axis000,
Execute := Hm1_Ex,
Done => Hm1_D,
Busy => Hm1_Bsy,
CommandAborted => Hm1_Ca,
Error => Hm1_Err,
ErrorID => Hm1_ErrID
);
// MC_Home2
HM2(
Axis := MC_Axis001,
Execute := Hm2_Ex,
Done => Hm2_D,
Busy => Hm2_Bsy,
CommandAborted => Hm2_Ca,
Error => Hm2_Err,
ErrorID => Hm2_ErrID
);
// MC_MoveVelocity
VEL(
Axis := MC_Axis000,
Execute := Vel_Ex,
Velocity := Vel_Vel,
Acceleration := Vel_Acc,
Deceleration := Vel_Dec,
InVelocity => Vel_InVel,
Busy => Vel_Bsy,
// MC_MoveLink
MV_LINK(
Master := MC_Axis000,
Slave := MC_Axis001,
TriggerInput := Mv_Link_TrigRef,
MC_MoveLink
TriggerVariable := Mv_Link_TrigVar,
Execute := Mv_Link_Ex,
SlaveDistance := Mv_Link_SlvDis,
MasterDistance := Mv_Link_MasDis,
MasterDistanceInAcc := Mv_Link_MasDisInAcc,
MasterDistanceInDec := Mv_Link_MasDisInDec,
LinkOption := Mv_Link_LnkOpt,
Done => Mv_Link_D, 3
InSync => Mv_Link_InSync,
Busy => Mv_Link_Bsy,
Sample Programming
Active => Mv_Link_Act,
CommandAborted => Mv_Link_Ca,
Error => Mv_Link_Err,
ErrorID => Mv_Link_ErrID
);
MC_CombineAxes
The MC_CombineAxes instruction outputs the sum or difference of the command positions of two axes
as the command position.
FB/
Instruction Name Graphic expression ST expression
FUN
MC_CombineAxes Combine FB MC_CombineAxes_instance MC_CombineAxes_instance (
Axes Master :=parameter,
MC_CombineAxes Auxiliary :=parameter,
Master Master
Slave :=parameter,
Auxiliary Auxiliary
Execute :=parameter,
Slave Slave
CombineMode :=parameter,
Execute InCombination
RatioNumeratorMaster
CombineMode Busy
:=parameter,
RatioNumeratorMaster Active RatioDenominatorMaster
RatioDenominatorMaster CommandAborted :=parameter,
RatioNumeratorAuxiliary Error RatioNumeratorAuxiliary
RatioDenominatorAuxiliary ErrorID :=parameter,
ReferenceTypeMaster RatioDenominatorAuxiliary
ReferenceTypeAuxiliary :=parameter,
BufferMode ReferenceTypeMaster :=parameter,
ReferenceTypeAuxiliary
:=parameter,
BufferMode :=parameter,
InCombination =>parameter,
Busy =>parameter,
Active =>parameter,
CommandAborted =>parameter,
Error =>parameter,
ErrorID =>parameter
);
Variables
Input Variables
Name Meaning Data type Valid range Default Description
Execute Execute BOOL TRUE or FALSE FALSE The instruction is executed
when Execute changes to
TRUE.
CombineMode Combine _eMC 0: _mcAddAxes 0*1 Specify the combining method.
Mode _COMBINE_ 1: _mcSubAxes 0: Addition
MODE
1: Subtraction
Ratio Master Axis DINT*2 Positive or negative num- 10000 Reserved
Numerator Gear Ratio ber*2
Master Numerator
(Reserved)
Ratio Master Axis UDINT*3 Positive number 10000 Reserved
Denominator Gear Ratio
Master Denominator
(Reserved)
MC_CombineAxes
(Reserved)
Reference Master Axis _eMC_ 1: _mcFeedback 2*1 Specify the position type of the
TypeMaster Position Type REFERENCE_ 2: _mcLatestCommand master axis.
Selection TYPE 1: Actual position (value
obtained in the same task
period*4)
2: Command position (value
calculated in the same task 3
period*4)
Reference Auxiliary Axis _eMC_ 1: _mcFeedback 2*1 Specify the position type of the
Variables
TypeAuxiliary Position Type REFERENCE_ 2: _mcLatestCommand auxiliary axis.
Selection TYPE 1: Actual position (value
obtained in the same task
period*4)
2: Command position (value
calculated in the same task
period*4)
BufferMode Buffer Mode _eMC 0: _mcAborting 0*1 Specify the behavior when exe-
Selection _BUFFER_ cuting more than one motion
MODE instruction.
0: Aborting
*1 The default value for an enumeration variable is actually not the number, but the enumerator.
*2 A CPU Unit with unit version 1.02 or later and Sysmac Studio version 1.03 or higher are required to use this variable. For
any previous version combinations, the data type is UINT and the valid range is positive numbers.
*3 A CPU Unit with unit version 1.02 or later and Sysmac Studio version 1.03 or higher are required to use this variable. For
any previous version combinations, the data type is UINT.
*4 The task period is the primary period if the task is the primary periodic task and the task period of the priority-5 periodic
task if the task is the priority-5 periodic task.
Output Variables
Name Meaning Data type Valid range Description
InCombination Axes BOOL TRUE or TRUE when axes are combined.
Combined FALSE
Busy Executing BOOL TRUE or TRUE when the instruction is acknowledged.
FALSE
Active Controlling BOOL TRUE or TRUE when the axis is being controlled.
FALSE
CommandAborted Command BOOL TRUE or TRUE when the instruction is aborted.
Aborted FALSE
Error Error BOOL TRUE or TRUE while there is an error.
FALSE
ErrorID Error Code WORD * Contains the error code when an error occurs.
A value of 16#0000 indicates normal execution.
In-Out Variables
* Specify a user-defined Axis Variable that was created in the Axis Basic Settings of the Sysmac Studio (default: MC_Axis***)
or a system-defined axis variable name (_MC_AX[*], _MC1_AX[*], or _MC2_AX[*]).
Function
• The MC_CombineAxes instruction starts combining axes when Execute changes to TRUE.
MC_CombineAxes
executed for the Master (Master Axis), the Slave (Slave Axis) may follow the Master (Master
Axis) quickly.
If you want to use the MC_SetPosition instruction for the Master (Master Axis), disable the rela-
tionship between the Master (Master Axis) and Slave (Slave Axis) executing the instruction.
Refer to Precautions for Master and Auxiliary Axes in Synchronized Control on page 1-6 for pre-
cautions on the master axis. This precaution also applies to Auxiliary (Auxiliary Axis) in the same
way as for Master (Master Axis).
3
Instruction Details
Function
From the starting point, the relative value of the Auxiliary (Auxiliary Axis) position is added to or sub-
tracted from the relative value of the Master (Master Axis) position and is output as a relative value for
the Slave (Slave Axis) command position.
Master
Execute of
Velocity
MC_CombineAxes
changes to TRUE
Slave
Execute of
Time MC_CombineAxes
Velocity changes to TRUE
Position: 200 Position: 600
+
Auxiliary
Time
Position: 100 Position: 200
Master Execute of
Velocity MC_CombineAxes
changes to TRUE
Slave Execute of
Time Velocity MC_CombineAxes
Position: 200 Position: 600 changes to TRUE
-
Auxiliary
Execute of Time
Velocity MC_CombineAxes
changes to TRUE Position: 0 Position: 390
Time
Position: 100 Position: 110
• Adding or subtracting the position is performed as numerical operations without considering the
Unit of Display for the axis in the axis parameters.
• Execute the MC_Stop instruction to end this instruction.
In-position Check
An in-position check is not performed for this instruction.
Override Factors
You cannot perform an MC_SetOverride (Set Override Factors) override for this instruction.
MC_CombineAxes
The relationship between the axis types that you can monitor and position types that is monitored is
shown below.
ReferenceType
Axis Type
_mcFeedback _mcLatestCommand
Servo axis OK OK
Encoder axis OK No*
Virtual servo axis OK OK 3
Virtual encoder axis OK No*
* A Position Type Selection Out of Range error (error code: 5430 hex) occurs when the instruction is executed.
Function
Timing Charts
• Busy (Executing) changes to TRUE at the same time as Execute changes to TRUE. Active (Con-
trolling) changes to TRUE in the next period.
• InCombination (Axes Combined) changes to TRUE in the period where the combined output starts.
• If another instruction aborts this instruction, CommandAborted changes to TRUE and Busy (Execut-
ing), Active (Controlling), and InCombination (Axes Combined) change to FALSE.
InCombination
Busy
Active
Command Aborted
Error
ErrorID 16#0000
Time
InCombination
Busy
Active
MC_CombineAxes
Command Aborted
Error
ErrorID 16#0000
Function
Auxiliary axis position Time
Time
InCombination
Busy
Active
Command Aborted
Error
ErrorID 16#0000
Time
Slave axis position Multi-execution of
another instruction Operation for multi-
execution of instructions
Time
Errors
Timing Chart When Error Occurs
If an error occurs during instruction execution, Error will change to TRUE and the axis will stop. The
axis decelerates to a stop at the maximum deceleration rate that is set in the axis parameters. You
can find out the cause of the error by referring to the value output by ErrorID (Error Code).
MC_CombineAxes
Execute
InCombination
Busy
Active
Command Aborted 3
Error
Function
ErrorID 16#0000 Error ID
Time
Additional Information
• This instruction is not affected by errors in the Master (Master Axis) or the Auxiliary (Auxiliary
Axis).
• After the error is cleared and the Master (Master Axis) or the Auxiliary (Auxiliary Axis) is in
motion, the Slave (Slave Axis) will resume the combined positioning operation. The Master
(Master Axis) or the Auxiliary (Auxiliary Axis) are not affected if an error occurs for the slave
axis during startup or execution of this instruction, but this instruction is aborted.
If a minor fault level error occurs during instruction execution, CommandAborted will change to
TRUE and the axis will stop.
The axis decelerates to a stop at the maximum deceleration rate that is set in the axis parameters.
You can find out the cause of the error by referring to the value output to the MFalutLvl.Code Axis
Variable for the Slave (Slave Axis).
Execute
InCombination
Busy
Active
Command Aborted
Error
ErrorID 16#0000
Time
Slave axis position
Error occurs.
Time
If you clear the error for this instruction, the instruction will not start until Execute changes to TRUE
again.
Execute
InCombination
Busy
MC_CombineAxes
Active
Command Aborted
Error reset.
Error
Function
Auxiliary axis position
Time
Time
Error Codes
Refer to A-1 Error Codes for instruction errors.
MC_Phasing
The MC_Phasing instruction shifts the phase of the master axis currently in synchronized control.
Instruction Name FB/FUN Graphic expression ST expression
MC_Phasing Shift Master Axis FB MC_Phasing_instance MC_Phasing_instance (
Phase Master :=parameter,
MC_Phasing Slave :=parameter,
Master Master
Execute :=parameter,
Slave Slave
PhaseShift :=parameter,
Execute Done
Velocity :=parameter,
PhaseShift Busy
Acceleration :=parameter,
Velocity Active
Deceleration :=parameter,
Acceleration CommandAborted Jerk :=parameter,
Deceleration Error BufferMode :=parameter,
Jerk ErrorID Done =>parameter,
BufferMode Busy =>parameter,
Active =>parameter,
CommandAborted
=>parameter,
Error =>parameter,
ErrorID =>parameter
);
Variables
Input Variables
Name Meaning Data type Valid range Default Description
Execute Execute BOOL TRUE or FALSE FALSE The instruction is executed when
Execute changes to TRUE.
PhaseShift Phase Shift LREAL Negative number, posi- 0 Specify the master axis phase
Amount tive number, or 0 shift amount. The unit is com-
mand units.*1
Velocity Target LREAL Positive number 0 Specify the target velocity for the
Velocity phase shift amount.*2
Specify the target velocity. The
unit is command units/s.*1
Acceleration Acceleration LREAL Non-negative number 0 Specify the acceleration rate.
Rate The unit is command units/s2.*1
Deceleration Deceleration LREAL Non-negative number 0 Specify the deceleration rate.
Rate The unit is command units/s2.*1
Jerk Jerk LREAL Non-negative number 0 Specify the jerk. The unit is com-
mand units/s3.*1
BufferMode Buffer Mode _eM- 0: _mcAborting 0*3 Specify the behavior when exe-
Selection C_BUFFER_- cuting more than one motion
MODE instruction.
0: Aborting
*1 Refer to Unit Conversion Settings in the NJ/NX-series CPU Unit Motion Control User's Manual (Cat. No. W507) or NY-
series Industrial Panel PC / Industrial Box PC Motion Control User’s Manual (Cat. No. W559) for information on command
units.
*2 Always set the target velocity. A Target Velocity Setting Out of Range error (error code: 5422 hex) occurs when the
instruction is executed if the target velocity is not set.
*3 The default value for an enumeration variable is actually not the number, but the enumerator.
Output Variables
Name Meaning Data type Valid range Description
Done Done BOOL TRUE or TRUE when the instruction is completed.
FALSE
MC_Phasing
Busy Executing BOOL TRUE or TRUE when the instruction is acknowledged.
FALSE
Active Controlling BOOL TRUE or TRUE when the axis is being controlled.
FALSE
CommandAborted Command BOOL TRUE or TRUE when the instruction is aborted.
Aborted FALSE
3
Error Error BOOL TRUE or TRUE while there is an error.
FALSE
Variables
ErrorID Error Code WORD * Contains the error code when an error occurs.
A value of 16#0000 indicates normal execution.
In-Out Variables
* Specify a user-defined Axis Variable that was created in the Axis Basic Settings of the Sysmac Studio (default: MC_Axis***)
or a system-defined axis variable name (_MC_AX[*], _MC1_AX[*], or _MC2_AX[*]).
Function
• Except during execution of the MC_CombineAxes instruction, if the MC_Phasing instruction is exe-
cuted when single-axis synchronized control is in progress, the phase of the master axis is shifted
according to the settings of the PhaseShift (Phase Shift Amount), Velocity (Target Velocity), Acceler-
ation (Acceleration Rate), and Deceleration (Deceleration Rate).
• The command current position and actual current position of the master axis do not change, and the
relative shift between the command current position and actual current position of the master axis is
taken as the phase of the master axis. The slave axis is synchronized to the shifted master axis
phase.
• Done changes to TRUE when the PhaseShift (Phase Shift Amount) is reached.
• Shifting is ended when execution of the synchronized control instruction is completed. If a synchro-
nized control instruction is executed again, the previous amount of shift is not affected.
• You can shift the phase of the master axis for the following synchronized control instructions: MC_-
CamIn (Start Cam Operation), MC_GearIn (Start Gear Operation), MC_GearInPos (Positioning Gear
Operation), and MC_MoveLink (Synchronous Positioning).
• In the user program, place the MC_Phasing instruction after synchronized control instructions as
shown below.
GEARIN
MC_GearIn
MC_Axis000 Master Master
MC_Phasing
StartGear MC_Axis001 Slave Slave InG
Execute InGear
G_Num RatioNumerator Busy G_Bsy
G_Den RatioDenominator Active G_Act
_eMC_REFERENCE_TYPE#_mcCommand ReferenceType CommandAborted G_Ca
G_Acc Acceleration Error G_Err
G_Dec Deceleration ErrorID G_ErrID 3
G_Jerk Jerk
BufferMode
Function
PHASING
MC_Phasing
MC_Axis000 Master Master
G_Bsy StartPhase MC_Axis001 Slave Slave P_D
Execute Done
P_Shift PhaseShift Busy P_Bsy
P_Vel Velocity Active P_Act
P_Acc Acceleration CommandAborted P_Ca
P_Dec Deceleration Error P_Err
P_Jerk Jerk ErrorID P_ErrID
BufferMode
Instruction Details
This section describes the instruction in detail.
Execute
Done
Busy
Active
MC_Phasing
Command Aborted
Error
ErrorID 16#0000
3
Master axis position as Actual master axis position
viewed from the slave axis
Function
Master axis velocity as Time
Target velocity
viewed from the slave axis
Time
Slave axis position
Slave axis position
when phase offset is 0
Time
• If you set the phase shift amount to 0, the phase shift amount of the Master (Master Axis) will be 0
and the instruction ends normally.
• If you set the target velocity (shift velocity) to 0, a Slave (Slave Axis) error will occur because the
value is out of range.
• The sum of the specified target velocity (shift velocity) and the Master (Master Axis) velocity can
exceed the maximum velocity of the Master (Master Axis).
Additional Information
Error detection for the results of the MC_Phasing instruction is performed for the operation of the
synchronized Slave (Slave Axis). Therefore, error detection is not performed for the settings of
the Velocity (Target Velocity), Acceleration (Acceleration Rate), and Deceleration (Deceleration
Rate) variables when the MC_Phasing instruction is executed.
In-position Check
When the phase shift operation is completed, phase shift output is ended and an in-position check is
not performed.
Multi-execution of MC_Phasing
You can execute the MC_Phasing instruction even if the MC_Phasing instruction is already in exe-
cution for the specified slave axis.
Error
If an error occurs during instruction execution, Error will change to TRUE and the slave axis will stop.
You can find out the cause of the error by referring to the value output by ErrorID (Error Code).
CommandAborted of the MC_Phasing (Shift Master Axis Phase) instruction changes to TRUE when
the Slave (Slave Axis) is released from synchronization due to an error.
The error state of the master axis does not affect the operation of this instruction.
MC_Phasing
MC_CamIn (Start Cam Operation) Instruction
Execute
Busy
3
Active
Function
CommandAborted
Error
ErrorID 16#0000
Done
Busy
Active
CommandAborted
Error
Error Codes
Refer to A-1 Error Codes for instruction errors.
MC_TorqueControl
The MC_TorqueControl instruction uses the Torque Control Mode of the Servo Drive to control the
torque.
FB/
Instruction Name Graphic expression ST expression
FUN
MC_TorqueControl Torque FB MC_TorqueControl_instance MC_TorqueControl_instance (
Control Axis :=parameter,
MC_TorqueControl Execute :=parameter,
Axis Axis
Torque :=parameter,
Execute InTorque
TorqueRamp :=parameter,
Torque Busy
Velocity :=parameter,
TorqueRamp Active
Direction :=parameter,
Velocity CommandAborted
BufferMode :=parameter,
Direction Error
InTorque =>parameter,
BufferMode ErrorID Busy =>parameter,
Active =>parameter,
CommandAborted =>parameter,
Error =>parameter,
ErrorID =>parameter
);
Variables
Input Variables
Name Meaning Data type Valid range Default Description
Execute Execute BOOL TRUE or FALSE FALSE The instruction is executed when
Execute changes to TRUE.
Torque Target Torque LREAL 0 to 1000.0 300.0 Specify the target torque to output
to the Servo Drive in increments of
0.1%. Specify a percentage of the
rated torque, i.e., the rated torque
is 100.0%.*1 The unit is %.
TorqueRamp Torque Ramp LREAL Non-negative number 0 Specify the change rate of torque
from the current value to the target
torque. The unit is %/s.
Velocity Velocity Limit LREAL Non-negative number 0 Specify the target velocity. The
unit is command units/s.*2
Direction Direction _eMC_ 0: _mcPositiveDirection 0*3 Specify the direction of the target
DIRECTION 2: _mcNegativeDirection torque.
0: Positive direction
2: Negative direction
*1 If a value that is higher than 1,000.0% is specified, it will be treated as 1,000.0%. If a negative value is specified, it will be
treated as 0.0%.
MC_TorqueControl
*2 Refer to Unit Conversion Settings in the NJ/NX-series CPU Unit Motion Control User's Manual (Cat. No. W507) or NY-
series Industrial Panel PC / Industrial Box PC Motion Control User’s Manual (Cat. No. W559) for information on command
units.
*3 The default value for an enumeration variable is actually not the number, but the enumerator.
Output Variables
3
Name Meaning Data type Valid range Description
InTorque Target Torque BOOL TRUE or TRUE when the target torque is reached.
Variables
Reached FALSE
Busy Executing BOOL TRUE or TRUE when the instruction is acknowledged.
FALSE
Active Controlling BOOL TRUE or TRUE when the axis is being controlled.
FALSE
CommandAborted Command BOOL TRUE or TRUE when the instruction is aborted.
Aborted FALSE
Error Error BOOL TRUE or TRUE while there is an error.
FALSE
ErrorID Error Code WORD * Contains the error code when an error occurs.
A value of 16#0000 indicates normal execution.
In-Out Variables
* Specify a user-defined Axis Variable that was created in the Axis Basic Settings of the Sysmac Studio (default: MC_Axis***)
or a system-defined axis variable name (_MC_AX[*], _MC1_AX[*], or _MC2_AX[*]).
Function
• The MC_TorqueControl instruction controls the output torque of the Servomotor by directly specifying
the torque command value.
• Set the target torque in increments of 0.1%. If the second decimal place is specified, it will be
rounded off.
• Use MC_Stop instruction to stop the execution of this instruction.
• The Torque Control Mode of the Servo Drive is used to perform torque control.
• The previous Control Mode is maintained until it is changed.
Example: Changing from position control to torque control: Position control is performed until the
Servo Drive changes to torque control.
Changing from torque control to position control: Torque control is performed until the
Servo Drive changes to position control.
Instruction Details
This section describes the instruction in detail.
Specifying Axis
Axis specifies the axis for torque control.
TorqueRamp
Specify the slope from the currently specified command torque until the target torque is output.
Example 1: Direction = Positive Example 2: Direction = Negative
Torque Torque
Torque Time
MC_TorqueControl
TorqueRamp
TorqueRamp
Torque
Time
Function
The operation that is performed when the maximum torque of the motor is exceeded depends on
the Servo Drive.
Direction
Direction specifies the direction to output the target torque. If you want to output torque in the posi-
tive direction of the axis, set the positive direction. If you want to output torque to the negative direc-
tion of the axis, set the negative direction.
For details on BufferMode (Buffer Mode Selection), refer to the NJ/NX-series CPU Unit Motion Con-
trol User's Manual (Cat. No. W507) or NY-series Industrial Panel PC / Industrial Box PC Motion Con-
trol User’s Manual (Cat. No. W559).
Home Status
Home remains defined.
Software Limits
The software limits are applied.
They are applied even if one of the following is selected in the axis parameter: Deceleration stopping
enabled for command position or Immediate stopping enabled for command position (stop using
remaining pulses).
MC_TorqueControl
The operation for reversing for multi-execution of instructions is as follows:
• If the command position reverses for multi-execution of an instruction that uses CSP during execu-
tion of this instructions, the operation at reversing is performed according to the Operation Selec-
tion at Reversing axis parameter.
• If the torque command value reverses when multi-execution of this instruction is performed during
execution of an instruction that uses CSP or CSV, the torque command reverses according to
TorqueRamp. 3
• If the torque command value reverses when multi-execution of this instruction is performed during
execution of this instruction, the torque command reverses according to TorqueRamp.
Function
Timing Charts
Starting and Stopping the Instruction
Execute
InTorque
Busy
CommandAborted
Time
Torque control Position control
Torque
Command torque
Torque Torque control for the velocity
limit of the Servo Drive
Current torque
Time
Execute
Done
Busy
Active
CommandAborted
Execute
InTorque
Busy
Active
CommandAborted
Velocity
Axis current
velocity When the axis is held
against the workpiece
Time
Position control Torque control
Torque
Current torque
Command torque
Torque
Time
Done
MC_TorqueControl
Busy
Active
CommandAborted
Function
InTorque
Busy
Active
CommandAborted
Velocity
Axis current
velocity
When the axis is held
against the workpiece
Time
Position control Torque control
Torque
Current torque
Command torque
Torque
Time
MC_TorqueControl executed.
Current velocity
Position control Torque control
Current velocity
Command velocity
MC_TorqueControl
instruction is maintained until
torque control is started.
Torque Time
Function
instruction is executed is the current torque.
Torque Time
Torque control Position control
Command torque
Torque
Current torque
Current torque
Time
The command torque when the
position control instruction is
executed is used until position
control is started.
For details on re-execution of motion control instructions, refer to the NJ/NX-series CPU Unit Motion
Control User’s Manual (Cat. No. W507) or NY-series Industrial Panel PC / Industrial Box PC Motion
Control User’s Manual (Cat. No. W559).
For details on BufferMode (Buffer Mode Selection), refer to the NJ/NX-series CPU Unit Motion Con-
trol User's Manual (Cat. No. W507) or NY-series Industrial Panel PC / Industrial Box PC Motion Con-
trol User’s Manual (Cat. No. W559).
Errors
If an error occurs during instruction execution, Error will change to TRUE and the axis will stop. You
can find out the cause of the error by referring to the value output by ErrorID (Error Code).
Execute
InTorque
Busy
Active
CommandAborted
Error
Error Codes
Refer to A-1 Error Codes for instruction errors.
MC_SetTorqueLimit
The MC_SetTorqueLimit instruction limits the torque output from the Servo Drive through the torque
limit function of the Servo Drive.
MC_SetTorqueLimit
Precautions for Correct Use
You cannot use this instruction for an NX-series Pulse Output Unit.
FB/
Instruction Name Graphic expression ST expression
FUN
MC_SetTorqueLimit Set Torque FB MC_SetTorqueLimit_instance MC_SetTorqueLimit_instance (
Limit
MC_SetTorqueLimit
Axis :=parameter, 3
Enable :=parameter,
Axis Axis
PositiveEnable :=parameter,
Enable Enabled
PositiveValue :=parameter,
Variables
PositiveEnable Busy
NegativeEnable :=parameter,
PositiveValue Error
NegativeValue :=parameter,
NegativeEnable ErrorID
Enabled =>parameter,
NegativeValue Busy =>parameter,
Error =>parameter,
ErrorID =>parameter
);
Variables
Input Variables
Name Meaning Data type Valid range Default Description
Enable Enable BOOL TRUE or FALSE FALSE The instruction is executed when
Enable is TRUE.
PositiveEnable Positive BOOL TRUE or FALSE FALSE TRUE: Enables the positive torque
Direction limit.
Enable FALSE: Disables the positive
torque limit.
PositiveValue Positive LREAL 0.1 to 1000.0 or 0.0 300.0 Set the torque limit in the positive
Torque Limit direction in increments of 0.1%.
If a value that exceeds the Maxi-
mum Positive Torque Limit axis
parameter, the positive torque will
be the Maximum Positive Torque
Limit.
The value will be 0 if 0 or a negative
value is specified.
NegativeEnable Negative BOOL TRUE or FALSE FALSE TRUE: Enables the negative torque
Direction limit.
Enable FALSE: Disables the negative
torque limit.
Output Variables
Name Meaning Data type Valid range Description
Enabled Enable BOOL TRUE or TRUE when control is in progress.*1
FALSE
Busy Executing BOOL TRUE or TRUE when the instruction is acknowledged.
FALSE
Error Error BOOL TRUE or TRUE while there is an error.
FALSE
ErrorID Error Code WORD *2 Contains the error code when an error occurs.
A value of 16#0000 indicates normal execution.
*1 Enabled indicates the status of the instruction. It does not indicate the status of torque control by the Servo Drive.
*2 Refer to A-1 Error Codes.
In-Out Variables
* Specify a user-defined Axis Variable that was created in the Axis Basic Settings of the Sysmac Studio (default: MC_Axis***)
or a system-defined axis variable name (_MC_AX[*], _MC1_AX[*], or _MC2_AX[*]).
Function
• The MC_SetTorqueLimit instruction sets the torque limits that are used by the Servo Drive.
• When Enable is TRUE and PositiveEnable (Positive Direction Enable) changes to TRUE, control is
performed with PositiveValue (Positive Torque Limit).
When Enable is TRUE and NegativeEnable (Negative Direction Enable) changes to TRUE, control is
performed with NegativeValue (Negative Torque Limit).
• When PositiveEnable (Positive Direction Enable) changes to FALSE, the value of the Maximum Posi-
tive Torque Limit is set in the Servo Drive.
When NegativeEnable (Negative Direction Enable) changes to FALSE, the value of the Maximum
Negative Torque Limit is set in the Servo Drive.
• When Enable to this instruction changes to FALSE, the values of the Maximum Positive Torque Limit
and Maximum Negative Torque Limit are set in the Servo Drive. At the same time, Busy (Executing)
and Enabled change to FALSE.
• The torque limits are set as a percentage of the motor torque in 0.1% increments. If the second deci-
MC_SetTorqueLimit
mal place is specified, it will be rounded off.
Function
• Positive torque limit value (60E0 hex)
• Negative torque limit value (60E1 hex)
If even one of the required objects is not set, a Process Data Object Setting Missing error (error
code 3461 hex) occurs.
For details on mapping data objects, refer to 2-3 PDO Mapping and to the NJ/NX-series CPU Unit
Motion Control User’s Manual (Cat. No. W507) or NY-series Industrial Panel PC / Industrial Box PC
Motion Control User’s Manual (Cat. No. W559).
Additional Information
• The torque limits are continued even after a normal completion of homing.
• The torque limits are automatically released when an instruction that moves the axis in the
opposite direction is executed.
For details on homing, refer to MC_Home on page 3-16 and MC_HomeWithParameter on page
3-38.
For details, refer to the AC Servomotors/Servo Drives 1S-series with Built-in EtherCAT Communica-
tions User’s Manual (Cat. No. I586).
• If the Torque Limit Selection to 4, the values of the input variables to this instruction are always
used. You must set torque limits that are suitable for both for the holding operation during homing
and for other operations.
Torque Limit Selection (3521 hex)
6 (recommended) 4
Positive Torque Homing Torque Limit 3 (3525 hex) is used. The smaller of the PositiveValue
Limit Operations The smaller of the PositiveValue (Positive Torque Limit) for this
instruction and Torque Limit 1 (3013
MC_SetTorqueLimit
other than Hom- (Positive Torque Limit) for this
ing instruction and Torque Limit 1 (3013 hex) is used.
hex) is used.
Negative Torque Homing* Torque Limit 4 (3526 hex) is used. The smaller of the NegativeValue
Limit (Negative Torque Limit) for this
Operations The smaller of the NegativeValue
instruction and Torque Limit 2 (3522
other than Hom- (Negative Torque Limit) for this
hex) is used.
ing instruction and Torque Limit 2 (3522
hex) is used.
3
* Until the torque limit is automatically released.
For details, refer to the AC Servomotors/Servo Drives G5-series with Built-in EtherCAT Communica-
Function
tions User’s Manual (Cat. No. I576) or the AC Servomotors/Servo Drives G5-series with Built-in Eth-
erCAT Communications Linear Motor Type User’s Manual (Cat. No. I577).
* If Enabled from this instruction is FALSE, the torque limits do not function on the Servo Drive.
• This instruction is acknowledged for a virtual servo axis, but torque is not limited.
• An error occurs if the instruction is executed for an encoder or virtual encoder axis.
Timing Charts
The following chart shows the timing of the torque limits.
Enable
PositiveEnable
NegativeEnable
Busy
Enabled
Error
ErrorID 16#0000
Errors
If an error occurs during instruction execution, Error will change to TRUE and the axis will stop.
You can find out the cause of the error by referring to the value output by ErrorID (Error Code).
MC_SetTorqueLimit
Enable
PositiveEnable
NegativeEnable
Busy
3
Enabled
Error
Function
ErrorID 16#0000 Error code 16#0000
MC_Reset Instruction
Execute
Done
Busy
Error Codes
Refer to A-1 Error Codes for instruction errors.
MC_ZoneSwitch
The MC_ZoneSwitch instruction determines if the command current position or actual current position
of an axis is within a specified zone.
FB/
Instruction Name Graphic expression ST expression
FUN
MC_ZoneSwitch Zone Monitor FB MC_ZoneSwitch_instance MC_ZoneSwitch_instance (
Axis :=parameter,
MC_ZoneSwitch Enable :=parameter,
Axis Axis
FirstPosition :=parameter,
Enable Enabled
LastPosition :=parameter,
FirstPosition InZone
ReferenceType :=parameter,
LastPosition Busy
Enabled =>parameter,
ReferenceType Error
InZone =>parameter,
ErrorID Busy =>parameter,
Error =>parameter,
ErrorID =>parameter
);
Variables
Input Variables
Name Meaning Data type Valid range Default Description
Enable Enable BOOL TRUE or FALSE FALSE The instruction is executed
while Enable is TRUE.
FirstPosition First Position LREAL Negative number, 0 Specify the first position of the
positive number, or 0 zone range.*1
The unit is command units.*2
LastPosition Last Position LREAL Negative number, 0 Specify the last position of the
positive number, or 0 zone range.*3
The unit is command units.*1
ReferenceType Position Type _eMC_REFERENCE 0: _mcCommand 0*4 Specify the axis information to
Selection _TYPE 1: _mcFeedback monitor.
0: Command position (value
calculated in the previous
task period*5)
1: Actual position (value
obtained in the same task
period*5)
Output Variables
Name Meaning Data type Valid range Description
Enabled Enable BOOL TRUE or TRUE while the axis is being controlled.
FALSE
InZone In Zone BOOL TRUE or TRUE when the axes position is within the zone.
FALSE
Busy Executing BOOL TRUE or TRUE when the instruction is acknowledged.
MC_ZoneSwitch
FALSE
Error Error BOOL TRUE or TRUE while there is an error.
FALSE
ErrorID Error Code WORD * Contains the error code when an error occurs.
A value of 16#0000 indicates normal execution.
Variables
Name Timing for changing to TRUE Timing for changing to FALSE
Enabled When Enable changes to TRUE. When Enable changes to FALSE.
InZone When the zone is entered. • When the zone is exited.
• When Enable changes to FALSE.
Busy When Enable changes to TRUE. • When Error changes to TRUE.
• When Enable changes to FALSE.
Error When there is an error in the execution When the error is cleared.
conditions or input parameters for the
instruction.
In-Out Variables
* Specify a user-defined Axis Variable that was created in the Axis Basic Settings of the Sysmac Studio (default: MC_Axis***)
or a system-defined axis variable name (_MC_AX[*], _MC1_AX[*], or _MC2_AX[*]).
Function
• If the axis command position or actual current position is above the FirstPosition and below the Last
Position (i.e., if it is in the specified zone) when Enable of this instruction is TRUE, the output variable
InZone will change to TRUE.
You can use ReferenceType (Position Type Selection) to set either the command position or actual
position as the axis information to monitor.
• You can perform zone monitoring for any axis type.
• If FirstPosition or LastPosition is changed while Enable is TRUE, the new value is applied in the
period in which it is changed.
• You can set multiple zones for one axis, and these zones can overlap. You can also set zones outside
the software limits.
Instruction Details
Set the FirstPosition and LastPosition so that the following relationships are established for the Counter
Mode. An error occurs if the relationship is not established.
Linear Mode
Set FirstPosition to the same value or a smaller value than LastPosition.
FirstPosition LastPosition
- 0 +
InZone
Zone
Rotary Mode
In Rotary Mode, there is a difference depending on whether the modulo maximum position and
modulo minimum position setting values are included.
Modulo Maximum
Position
LastPosition
FirstPosition
Modulo Minimum
Position
InZone
MC_ZoneSwitch
Zone Zone Zone
− +
LastPosition = 330° 0
Zone
: The positions indicated with
filled dots are included.
3
FirstPosition = 210°
Function
When Maximum/Minimum Position Is Included
Set FirstPosition to a larger value than LastPosition.
Modulo Maximum
Position
FirstPosition
LastPosition
Modulo Minimum
Position
InZone
Zone Zone
- +
FirstPosition = 330° 0
Zone
LastPosition = 210°
Timing Charts
When the Zone Is Entered during Operation or When Enable Changes to
FALSE Within the Zone
Enable
Enabled
InZone
Busy
When Inside the Zone before the Instruction Is Executed and Then the Zone Is
Exited
Enable
Enabled
InZone
Exits zone.
Busy
Errors
If this instruction cannot be executed, an error occurs and Error of this instruction changes to TRUE.
You can find out the cause of the error by referring to the value output by ErrorID (Error Code).
Enabled
InZone
Busy
MC_ZoneSwitch
Error
Error Codes
Refer to A-1 Error Codes for instruction errors.
3
Function
MC_TouchProbe
The MC_TouchProbe instruction records the position of an axis when a trigger signal occurs.
FB/
Instruction Name Graphic expression ST expression
FUN
MC_TouchProbe Enable FB MC_TouchProbe_instance MC_TouchProbe_instance (
External Axis :=parameter,
Latch MC_TouchProbe TriggerInput :=parameter,
Axis Axis
TriggerVariable :=parameter,
TriggerInput TriggerInput
Execute :=parameter,
TriggerVariable TriggerVariable
WindowOnly :=parameter,
Execute Done
FirstPosition :=parameter,
WindowOnly Busy
LastPosition :=parameter,
FirstPosition RecordedPosition ReferenceType :=parameter,
LastPosition CommandAborted StopMode :=parameter,
ReferenceType Error Done =>parameter,
StopMode ErrorID Busy =>parameter,
RecordedPosition =>parameter,
CommandAborted =>parameter,
Error =>parameter,
ErrorID =>parameter
);
Variables
Input Variables
Name Meaning Data type Valid range Default Description
Execute Execute BOOL TRUE or FALSE FALSE The instruction is executed
when Execute changes to
TRUE.
WindowOnly Window BOOL TRUE or FALSE FALSE Specify whether to enable or
Only disable the window mask.
FirstPosition First Posi- LREAL Negative number, posi- 0 Specify the position to start
tion tive number, or 0 accepting the trigger. Use the
type of position that is speci-
fied in ReferenceType (Posi-
tion Type Selection).*1
The unit is command units.*2
LastPosition Last Posi- LREAL Negative number, posi- 0 Specify the position to stop
tion tive number, or 0 accepting the trigger. Use the
type of position that is speci-
fied in ReferenceType (Posi-
tion Type Selection).*1
The unit is command units.*2
ReferenceType Position _eMC_ 1: _mcFeedback 1*3 (Reserved)
(Reserved) Type Selec- REFERENCE_
tion TYPE
StopMode Stopping _eMC_STOP_ 1: _mcImmediateStop 4*3 Specify the stopping method.
Mode MODE 4: _mcNonStop 1: Perform an immediate stop
Selection
4: Do not stop
*2 Refer to Unit Conversion Settings in the NJ/NX-series CPU Unit Motion Control User's Manual (Cat. No. W507) or NY-
series Industrial Panel PC / Industrial Box PC Motion Control User’s Manual (Cat. No. W559) for information on command
units.
*3 The default value for an enumeration variable is actually not the number, but the enumerator.
Output Variables
Name Meaning Data type Valid range Description
MC_TouchProbe
Done Done BOOL TRUE or TRUE when the instruction is completed.
FALSE
Busy Executing BOOL TRUE or TRUE when the instruction is acknowledged.
FALSE
RecordedPosition Latched Posi- LREAL Negative Contains the latched position. The unit is in command
tion number, units.*1
positive
number, or 0 3
CommandAborted Command BOOL TRUE or TRUE when the instruction is aborted.
Aborted FALSE
Variables
Error Error BOOL TRUE or TRUE while there is an error.
FALSE
ErrorID Error Code WORD *2 Contains the error code when an error occurs.
A value of 16#0000 indicates normal execution.
*1 Refer to Unit Conversion Settings in the NJ/NX-series CPU Unit Motion Control User's Manual (Cat. No. W507) or NY-
series Industrial Panel PC / Industrial Box PC Motion Control User’s Manual (Cat. No. W559) for information on command
units.
*2 Refer to A-1 Error Codes.
* If you use an NX-series CPU Unit, there are no restrictions in the control mode. Therefore, CommandAborted does not
change to TRUE even in modes other than CSP Mode.
In-Out Variables
*1 Specify a user-defined Axis Variable that was created in the Axis Basic Settings of the Sysmac Studio (default:
MC_Axis***) or a system-defined axis variable name (_MC_AX[*], _MC1_AX[*], or _MC2_AX[*]).
*2 Create a user-defined variable with a data type of _sTRIGGER_REF.
_sTRIGGER_REF
Name Meaning Data type Valid range Function
Mode Mode _eMC_TRIGGER_ 0: _mcDrive Specify the trigger mode.
MODE 1: _mcController 0: Drive Mode
1: Controller Mode
LatchID Latch ID _eMC_TRIGGER_ 0: _mcLatch1 Specify which of the two latch
Selection LATCH_ID 1: _mcLatch2 functions to use in Drive Mode.
0: Latch 1
MC_TouchProbe
1: Latch 2
InputDrive Trigger Input _eMC_TRIGGER_ 0: _mcEncoderMark Specify the Servo Drive trigger
Signal INPUT_DRIVE 1: _mcEXT signal to use in Drive Mode.
0: Z-phase signal
1: External input
3
Function
Function
• Latching is used to control positioning based on the point where a trigger signal occurs, such as a
signal from a sensor input. The position of the axis is recorded (i.e., latched) when the trigger signal
occurs.
• The position of the axis that is specified with Axis is output to RecordedPosition (Latched Position)
according to the trigger settings.
As trigger settings, you can specify TriggerInput (Trigger Input Condition), WindowOnly, FirstPosition,
LastPosition, and StopMode.
• The output value of RecordedPosition (Latched Position) is held until the axis position is recorded
again by the same MC_TouchProbe (Enable External Latch) instance.
Refer to I/O Entry Mappings in the NX-series Position Interface Units User’s Manual (Cat. No. W524)
for information on using the NX-series Position Interface Units.
Refer to Fixed PDO Mapping in the GX-series EtherCAT Slave Units User’s Manual (Cat. No. W488)
for information on using encoder input slaves.
Instruction Details
This section describes the instruction in detail.
Specifying Axis
• Specify the axis for which to latch the position to Axis.
• If the specified Axis is enabled by the MC_GroupEnable (Enable Axes Group) instruction, the
MC_TouchProbe (Enable External Latch) instruction causes an error and is not executed.
• For each axis, you can specify LatchID to execute up to two MC_TouchProbe (Enable External
Latch) instructions at the same time.
• LatchID is also used to specify the latch to abort for the MC_AbortTrigger (Disable External Latch)
instruction.
Additional Information
• Latching a position is also possible if an encoder axis that is connected to an OMRON GX-
series GX-EC02 EtherCAT Encoder Input Slave is used.
• If you use an NX-series Pulse Output Unit, you can also perform latching with this instruction.
Refer to the NX-series Position Interface Units User’s Manual (Cat. No. W524) for details.
Mode
• The mode can be set to Drive Mode to specify a signal from the Servo Drive or other device
as the trigger, or to Controller Mode to specify a trigger with TriggerVariable.
• The trigger occurs on the rising edge of the trigger signal. The axis position is latched on the
first trigger (FALSE to TRUE) after the MC_TouchProbe instruction is executed.
• While this instruction is Busy (Executing), a change in TriggerVariable is taken as a trigger
even if Execute is FALSE.
Additional Information
Set Mode to _mcDrive (Servo Drive Mode) if you use an OMRON GX-series GX-EC02 Ether-
CAT Encoder Input Slave.
Drive Mode
For trigger detection and latching of the actual position, the latched actual position is more precise in
Drive Mode (which is a function of the Servo Drive or other device) than it is in Controller Mode.
Trigger detection
MC_TouchProbe
Time
Function
Additional Information
Set InputDrive to _mcEXT (External Input) if you use an OMRON GX-series GX-EC02 Ether-
CAT Encoder Input Slave.
The OMRON GX-series GX-EC02 EtherCAT Encoder Input Slaves cannot latch on the Z
phase. If you specify _mcEncoderMark (Z phase), an error occurs when the instruction is exe-
cuted. Error changes to TRUE and a Process Data Object Setting Missing error (error code:
3461 hex) is output to ErrorID when the instruction is executed.
Controller Mode
• You can specify a BOOL variable as the trigger in Controller Mode.
• Specify the BOOL variable that you want to use as a trigger for TriggerVariable.
• The Controller Mode causes a longer delay compared to the Drive Mode. This is due to the
I/O refresh delay that occurs when the trigger input signal is updated in the BOOL variable.
Time
LatchID
• You can execute up to two MC_TouchProbe instructions per axis. Use LatchID to specify
which of the two latches to use.
• If a LatchID specified for the same axis is already being executed, only the last instruction is
valid. CommandAborted of the previous instruction will change to TRUE.
• LatchID indicates latch circuit 1 and latch circuit 2 in the Servo Drive or other device.
For information on LatchID, refer to the NJ/NX-series CPU Unit Motion Control User's Manual (Cat.
No. W507) or NY-series Industrial Panel PC / Industrial Box PC Motion Control User’s Manual (Cat.
No. W559).
Additional Information
The enumerators correspond to the signal names of the OMRON GX-series GX-EC02 Ether-
CAT Encoder Input Slave as shown below.
Signal name on
Enumerator
Encoder Input Terminal
_mcLatch1 External latch input A
_mcLatch2 External latch input B
InputDrive
• You can select _mcEncoderMark (Z phase) or _mcEXT (External Input) as the trigger.
• Select _mcEncoderMark (Z phase) to use the Z phase of the Servo Drive or other device as
the trigger. Select _mcEXT to use an external signal input to the Servo Drive as the trigger.
• For an OMRON 1S-series Servo Drive, there are two options for _mcEXT: Ext1, and Ext2. For
an OMRON G5-series Servo Drive, there are three options for _mcEXT: Ext1, Ext2, and Ext3.
Use Sysmac Studio to make the setting. You can use the same setting for two triggers in the
Servo Drive.
WindowOnly
• WindowOnly specifies whether the window is enabled or disabled.
• If you specify Disable, triggers are detected for all axis positions.
• If you specify Enable, triggers are detected only when the axis position is within the range speci-
fied by FirstPosition and LastPosition.
The following timing chart shows the difference in operation depending on the WindowOnly setting.
TriggerInput
Execute
WindowOnly
MC_TouchProbe
Done
Busy
RecordedPosition 0 Position
CommandAborted
3
Error
Function
ErrorID 16#0000
Axis position
LastPosition
FirstPosition
Position
Trigger enabled
TriggerInput
Execute
WindowOnly
Done
Busy
RecordedPosition 0 Position
CommandAborted
Error
ErrorID 16#0000
Axis position
LastPosition
Position
FirstPosition
The range that is defined by FirstPosition and LastPosition depends on the Count Mode, as given
below.
Linear Mode
• The valid range of the window is as follows:
FirstPosition must be less than or equal to the window range and the window range must be less
than or equal to LastPosition.
• An error will occur if the FirstPosition is greater than the LastPosition.
• An error will also occur if a position beyond the position range of Linear Mode is specified.
• FirstPosition and LastPosition are LREAL variables. Do not set them to the same values.
Refer to Treatment of REAL and LREAL Data on page 1-12 for information on LREAL data.
FirstPosition LastPosition
0x80000000 0x7fffffff
Window
Window only range
Note The window only range can include the FirstPosition and LastPosition.
MC_TouchProbe
Rotary Mode
• The FirstPosition can be less than, equal to, or greater than the LastPosition.
• If the FirstPosition is greater than the LastPosition, the setting range includes the modulo maxi-
mum position and modulo minimum position setting values.
• An error will occur if you specify a value beyond the modulo maximum position and modulo mini-
mum position setting values.
FirstPosition ≤ LastPosition 3
− + − +
LastPosition
Function
LastPosition 0 0
FirstPosition
Window only range
: The positions indicated with
filled dots are included.
FirstPosition
Additional Information
• When an OMRON 1S-series Servo Drive is used, the operation will be the same as those
described in below for CPU Units with unit version 1.10 or later, regardless of actual unit ver-
sion of the CPU Unit that you use.
• When an OMRON G5-series Servo Drive is used, the operation will differ depending on the
unit version of the CPU Unit that you use, as described in below.
Trigger occurs.
Time
Decelerating to a stop for the error
Trigger occurs.
Time
Decelerating to a stop for an error
MC_TouchProbe
The MC Function Module processes the stop if an OMRON 1S-series Servo Drive or a servo
drive from another manufacturer is used. In either case, the axis will stop beyond the latched
position, and the axis will then return to the latched position for a command from the Control-
ler.
• If you use _mcImmediateStop (Immediate Stop) with a high command velocity, the distance to
return to the latched position will be long. Make sure that the command velocity is not too high.
• Specify _mcNonStop (No Stop) for an encoder axis. If _mcImmediateStop is specified, Error 3
will change to TRUE when the instruction is executed. At the same time, an Enable External
Latch Instruction Execution Disabled error (error code: 5492 hex) is output to ErrorID.
Function
• If _mcImmediateStop is used and both of the following processes are executed in the same
control period, an OMRON G5-series Servo Drive enters the Target Ignore state.
• Counter latch processing in the Servo Drive when the latch signal turns ON
• Latch release processing when CommandAborted changes to TRUE for the MC_Touch-
Probe (Enable External Latch) instruction
Make sure that CommandAborted for the instruction does not change to TRUE when the latch
signal turns ON.
MC_TouchProbe Instruction
TriggerInput
Execute
WindowOnly
Done
Busy
RecordedPosition 0
CommandAborted
Error
ErrorID 16#0000
MC_AbortTrigger Instruction
Execute
Done
Busy
CommandAborted
Error
ErrorID 16#0000
MC_TouchProbe
TriggerInput
Execute
WindowOnly
Done
Busy 3
RecordedPosition 0
Function
CommandAborted
Error
MC_TouchProbe A
*
TriggerInput
Execute
WindowOnly
Done
Busy
RecordedPosition 0
CommandAborted
Error
ErrorID 16#0000
MC_TouchProbe B
Execute
Done
Busy
CommandAborted
Error
ErrorID 16#0000
* Here, the trigger input signal of the Servo Drive or other device is used.
Additional Information
Error
If an error occurs during execution of the MC_TouchProbe instruction, Error will change to TRUE. You
can find out the cause of the error by referring to the value output by ErrorID (Error Code).
MC_TouchProbe
Done
Busy
CommandAborted
Error
3
ErrorID Error code
Sample Programming
Error Codes
Refer to A-1 Error Codes for instruction errors.
Sample Programming
This section shows sample programming for position latching control by an external sensor.
Parameter Settings
The minimum settings required for this sample programming are given below.
Axis Parameters
Axis Type
Axis Axis Type
Axis 1 Servo axis
Count Mode
Axis Count Mode
Axis 1 Rotary Mode
Ring Counter
Modulo maxi- Modulo mini-
Axis
mum position mum position
Axis 1 360 0
Unit of Display
Axis Unit of Display
Axis 1 degree
Operation Example
Sensor 1
Servo axis
Axis 1
Operation Pattern
Axis 1 position
Pos2
Latched position
Pos1
Time
Sensor 1 status
Time
2 Detecting Workpiece
Sensor 1 detects the workpiece.
Ladder Diagram
Main Variables
MC_TouchProbe
TRUE.
Sample Programming
If StartPg is TRUE, check that the Servo Drive is ready.
Sample Programming
If the Servo Drive for axis 1 is ready, the Servo is turned ON.
PWR
MC_Power
Lock1 MC_Axis000 Axis Axis Pwr_Status
Enable Status
Busy Pwr_Bsy
Error Pwr_Err
ErrorID Pwr_ErrID
If a minor fault level error occurs for axis 1, the error handler for the device (FaultHandler) is executed.
Program the FaultHandler according to the device.
MC_Axis000.MFaultLvl.Active FaultHandler
EN FaultHandler
If the Servo is ON and home is not defined, the Home instruction is executed.
HM
MC_Home
Pwr_Status MC_Axis000.Details.Homed MC_Axis000 Axis Axis Hm_D
Execute Done
Busy Hm_Bsy
CommandAborted Hm_Ca
Error Hm_Err
ErrorID Hm_ErrID
The parameters are set for the MC_MoveVelocity (Velocity Control) and MC_TouchProbe (Enable External Latch) instructions.
InitFlag
The MC_MoveVelocity (Velocity Control) instruction is executed if home is defined for axis 1.
VEL
MC_MoveVelocity
MC_Axis000.Details.Homed MC_Axis000 Axis Axis Vel_InVel
Execute InVelocity
Vel_Vel Velocity Busy Vel_Bsy
Vel_Acc Acceleration Active Vel_Act
Vel_Dec Deceleration CommandAborted Vel_Ca
Vel_Jrk Jerk Error Vel_Err
Direction ErrorID Vel_EIrrD
Continuous
BufferMode
Latch processing is executed after the MC_MoveVelocity (Velocity Control) instruction is started.
T_PROBE
MC_TouchProbe
MC_Axis000 Axis Axis
T_Probe_TrigRef TriggerInput TriggerInput
Vel_Act T_Probe_TrigVar TriggerVariable TriggerVariable T_Probe_D
Execute Done
T_Probe_Wo WindowOnly Busy T_Probe_Bsy
T_Probe_FstPos FirstPosition RecordedPosition T_Probe_RecPos
T_Probe_LstPos LastPosition CommandAborted T_Probe_Ca
ReferenceType Error T_Probe_Err
StopMode ErrorID T_Probe_ErrID
Contents of Inline ST
// MC_MoveVelocity parameters
Vel_Vel := LREAL#1000.0;
Vel_Acc := LREAL#1000.0;
Vel_Dec := LREAL#1000.0;
Vel_Jrk := LREAL#1000.0;
// MC_TouchProbe parameters
T_Probe_TrigRef.Mode := _eMC_TRIGGER_MODE#_mcDrive;
T_Probe_TrigRef.LatchID := _eMC_TRIGGER_LATCH_ID#_mcLatch1;
T_Probe_TrigRef.InputDrive := _eMC_TRIGGER_INPUT_DRIVE#_mcEXT;
T_Probe_TrigVar := FALSE;
T_Probe_Wo := TRUE;
T_Probe_FstPos := LREAL#1000.0;
T_Probe_LstPos := LREAL#2000.0;
MC_TouchProbe
MC_Axis000.Details.Homed BOOL FALSE TRUE when home is defined for axis 1.
Pwr_Status BOOL FALSE This variable is assigned to the Status output
variable from the PWR instance of the MC_Power
instruction. This variable changes to TRUE when
the Servo is turned ON.
Pos1 LREAL --- This variable specifies the first position of the win-
dow.
Pos2 LREAL --- This variable specifies the last position of the win- 3
dow.
StartPg BOOL FALSE The Servo is turned ON if this variable is TRUE
Sample Programming
and EtherCAT process data communications are
established.
InitFlag BOOL FALSE This variable indicates if it is necessary to set the
input parameters. Input parameters are set when
this variable is FALSE. When setting the input
parameters is completed, this variable changes to
TRUE.
Sample Programming
// Processing when input parameters are not set
IF InitFlag=FALSE THEN
// MC_MoveVelocity parameters
Vel_Vel := LREAL#1000.0;
Vel_Acc := LREAL#1000.0;
Vel_Dec := LREAL#1000.0;
Vel_Jrk := LREAL#1000.0;
// MC_TouchProbe parameters
T_Probe_TrigRef.Mode := _eMC_TRIGGER_MODE#_mcDrive;
T_Probe_TrigRef.LatchID := _eMC_TRIGGER_LATCH_ID#_mcLatch1;
T_Probe_TrigRef.InputDrive := _eMC_TRIGGER_INPUT_DRIVE#_mcEXT;
T_Probe_TrigVar := FALSE;
T_Probe_Wo := TRUE;
T_Probe_FstPos := LREAL#1000.0;
T_Probe_LstPos := LREAL#2000.0;
END_IF;
// If StartPg is TRUE and the Servo Drive is ready, the Servo is turned ON.
// If the Servo Drive is not ready, the Servo is turned OFF.
IF (StartPg=TRUE)
AND (MC_Axis000.DrvStatus.Ready=TRUE) THEN
Pwr_En:=TRUE;
ELSE
Pwr_En:=FALSE;
END_IF;
// If the Servo is ON and home is not defined, the Home instruction is executed.
IF (Pwr_Status=TRUE) AND (MC_Axis000.Details.Homed=FALSE) THEN
Hm_Ex:=TRUE;
END_IF;
//MC_Power
PWR(
Axis := MC_Axis000,
Enable := Pwr_En,
Status => Pwr_Status,
Busy => Pwr_Bsy,
Error => Pwr_Err,
ErrorID => Pwr_ErrID
);
//MC_Home
HM(
Axis := MC_Axis000,
Execute := Hm_Ex,
Done => Hm_D,
Busy => Hm_Bsy,
CommandAborted => Hm_Ca,
Error => Hm_Err,
ErrorID => Hm_ErrID
);
//MC_MoveVelocity
VEL(
Axis := MC_Axis000,
Execute := Vel_Ex,
Velocity := Vel_Vel,
Acceleration := Vel_Acc,
Deceleration := Vel_Dec,
Jerk := Vel_Jrk,
InVelocity => Vel_InVel,
Busy => Vel_Bsy,
Active => Vel_Act,
MC_TouchProbe
WindowOnly := T_Probe_Wo,
FirstPosition := T_Probe_FstPos,
LastPosition := T_Probe_LstPos,
Done => T_Probe_D,
Busy => T_Probe_Bsy,
RecordedPosition => T_Probe_RecPos,
CommandAborted => T_Probe_Ca, 3
Error => T_Probe_Err,
ErrorID => T_Probe_ErrID
);
Sample Programming
MC_AbortTrigger
The MC_AbortTrigger instruction aborts a current latch operation.
Instruction Name FB/FUN Graphic expression ST expression
MC_AbortTrigger Disable FB MC_AbortTrigger_instance MC_AbortTrigger_instance (
External Axis :=parameter,
Latch MC_AbortTrigger TriggerInput :=parameter,
Axis Axis
Execute :=parameter,
TriggerInput TriggerInput
Done =>parameter,
Execute Done
Busy =>parameter,
Busy
CommandAborted =>parameter,
CommandAborted
Error =>parameter,
Error
ErrorID =>parameter
ErrorID );
Variables
Input Variables
Name Meaning Data type Valid range Default Description
Execute Execute BOOL TRUE or FALSE FALSE The instruction is executed
when Execute changes to
TRUE.
Output Variables
Name Meaning Data type Valid range Description
Done Done BOOL TRUE or TRUE when the instruction is completed.
FALSE
Busy Executing BOOL TRUE or TRUE when the instruction is acknowledged.
FALSE
CommandAborted Instruction BOOL TRUE or TRUE when the instruction is aborted.
Aborted FALSE
Error Error BOOL TRUE or TRUE while there is an error.
FALSE
ErrorID Error Code WORD * Contains the error code when an error occurs. A value
of 16#0000 indicates normal execution.
MC_AbortTrigger
• When CommandAborted changes to TRUE.
CommandAborted • When this instruction is aborted because • When Execute is TRUE and changes to FALSE.
another motion control instruction was • After one period when Execute is FALSE.
executed with the Buffer Mode set to
Aborting.
• When this instruction is canceled due to
an error.
Error When there is an error in the execution of When the error is cleared. 3
or input parameters for the instruction.
Variables
In-Out Variables
*1 Specify a user-defined Axis Variable that was created in the Axis Basic Settings of the Sysmac Studio (default:
MC_Axis***) or a system-defined axis variable name (_MC_AX[*], _MC1_AX[*], or _MC2_AX[*]).
*2 Create a user-defined variable with a data type of _sTRIGGER_REF.
_sTRIGGER_REF
Name Meaning Data type Valid range Function
Mode Mode _eMC_TRIGGER_ 0: _mcDrive Specify the trigger mode.
MODE 1: _mcController 0: Drive Mode
1: Controller Mode
LatchID Latch ID _eMC_TRIGGER_ 0: _mcLatch1 Specify which of the two latch
Selection LATCH_ID 1: _mcLatch2 functions to use in Drive Mode.
0: Latch 1
1: Latch 2
InputDrive Trigger Input _eMC_TRIGGER_ 0: _mcEncoderMark Specify the Servo Drive trigger
Signal INPUT_DRIVE 1: _mcEXT signal to use in Drive Mode.
0: Z-phase signal
1: External input
Function
• The MC_AbortTrigger cancels a latch operation.
• You can specify the latch operation to abort by specifying the Axis and LatchID for the MC_AbortTrig-
ger (Disable External Latch) instruction.
• If you execute MC_AbortTrigger (Disable External Latch) for a trigger for which there is no latch
request, MC_AbortTrigger does nothing and ends normally. This is the same when MC_AbortTrigger
(Enable External Latch) is executed for a MC_TouchProbe instruction for which Done is TRUE.
Timing Charts
• Done for the MC_AbortTrigger (Disable External Latch) instruction changes to TRUE one period after
Execute changes to TRUE.
MC_TouchProbe
TriggerInput
Execute
MC_AbortTrigger
Done
Busy
Command Aborted
Error 3
ErrorID 16#0000
Function
MC_AbortTrigger
Execute
Done
Busy
Command Aborted
Error
ErrorID 16#0000
Errors
If an error occurs during execution of the MC_AbortTrigger (Disable) instruction. Error will change to
TRUE. You can find out the cause of the error by referring to the value output by ErrorID (Error Code).
MC_AbortTrigger
Execute
Done
Busy
Command Aborted
Error
Error Codes
Refer to A-1 Error Codes for instruction errors.
MC_AxesObserve
The MC_AxesObserve instruction monitors the deviation between the command position or feedback
position for the specified axis to see if it exceeds the allowed value.
FB/
Instruction Name Graphic expression ST expression
FUN
MC_AxesObserve
MC_AxesObserve Monitor Axis FB MC_AxesObserve_instance MC_AxesObserve_instance (
Following Master :=parameter,
MC_AxesObserve
Error Slave :=parameter,
Master Master
Enable :=parameter,
Slave Slave
ReferenceType :=parameter,
Enable Enabled
PermittedDeviation :=parameter,
ReferenceType Invalid
Enabled =>parameter,
PermittedDeviation Busy
DeviatedValue
Invalid =>parameter, 3
Busy =>parameter,
Error
DeviatedValue =>parameter,
ErrorID Error =>parameter,
Variables
ErrorID =>parameter
);
Variables
Input Variables
Name Meaning Data type Valid range Default Description
Enable Enable BOOL TRUE or FALSE FALSE The instruction is executed
when Enable is TRUE.
ReferenceType Position Type _eMC_ RERE- 0: _mcCommand 0*1 Specify the position type.
Selection RENCE_TYPE 1: _mcFeedback 0: Command position (value
calculated in the previous
task period*2)
1: Actual position (value
obtained in the same task
period*2)
Permitted Permitted LREAL Non-negative number 0 Specify the permitted maxi-
Deviation Following mum value of the following
Error error between the master
and slave axes. The unit is
command units.*3
*1 The default value for an enumeration variable is actually not the number, but the enumerator.
*2 The task period is the primary period if the task is the primary periodic task and the task period of the priority-5 periodic
task if the task is the priority-5 periodic task.
*3 Refer to Unit Conversion Settings in the NJ/NX-series CPU Unit Motion Control User's Manual (Cat. No. W507) or NY-
series Industrial Panel PC / Industrial Box PC Motion Control User’s Manual (Cat. No. W559) for information on command
units.
Output Variables
Name Meaning Data type Valid range Description
Enabled Enable BOOL TRUE or FALSE TRUE when the axis is being controlled.
Invalid Excessive BOOL TRUE or FALSE TRUE when the permitted following error between
Following axes is exceeded.
Error between
Axes
Busy Executing BOOL TRUE or FALSE TRUE when the instruction is acknowledged.
DeviatedValue Following LREAL Negative num- Contains the difference between the specified master
Error between ber, positive and slave axes. The unit is command units.*1
Axes number, or 0
Error Error BOOL TRUE or FALSE TRUE while there is an error.
ErrorID Error Code WORD *2 Contains the error code when an error occurs.
A value of 16#0000 indicates normal execution.
*1 Refer to Unit Conversion Settings in the NJ/NX-series CPU Unit Motion Control User's Manual (Cat. No. W507) or NY-
series Industrial Panel PC / Industrial Box PC Motion Control User’s Manual (Cat. No. W559) for information on command
units.
*2 Refer to A-1 Error Codes.
In-Out Variables
* Specify a user-defined Axis Variable that was created in the Axis Basic Settings of the Sysmac Studio (default: MC_Axis***)
or a system-defined axis variable name (_MC_AX[*], _MC1_AX[*], or _MC2_AX[*]).
Additional Information
Function
MC_AxesObserve
• If the command positions of the specified Master (Master Axis) and Slave (Slave Axis) or the differ-
ence between the actual positions exceeds the permitted following error, Invalid (Excessive Following
Error between Axes) changes to TRUE.
Invalid (Excessive Following Error between Axes) changes to TRUE when the following conditions
are met.
When |DeviatedValue (Following Error between Axes)| > PermittedDeviation (Permitted Following
Error)
• The operation of the axis is not affected by this instruction. 3
• Use the state of the Invalid (Excessive Following Error between Axes) output variable to program pro-
cesses, such as stopping an axis.
Function
Position
Master axis
Slave axis
0 Time
Instruction Details
This section describes the instruction in detail.
* A Position Type Selection Out of Range error (error code: 5430 hex) occurs when the instruction is executed.
Linear Mode
ReferenceType (Position Type Selection) Set to _mcCommand
DeviatedValue (Following Error between Axes) = Command current position of Master (Master Axis)
− Command current position of Slave (Slave Axis)
Rotary Mode
ReferenceType (Position Type Selection) Set to _mcCommand
The DeviatedValue (Following Error between Axes) is the shorter distance between the command
current position of the Master (Master Axis) and the command current position of the Slave (Slave
Axis) in the range of the ring counter. The sign of the DeviatedValue (Following Error between Axes)
is the sign for the shorter direction, as given below.
• If the command current position of the Master (Master Axis) is greater than or equal to the com-
mand current position of the Slave (Slave Axis), the value is positive.
• If the command current position of the Master (Master Axis) is less than the command current
position of the Slave (Slave Axis), the value is negative.
MC_AxesObserve
the Slave (Slave Axis), the value is negative.
DeviatedValue (Following Error between Axes) Calculation Example in Rotary Mode when Refer-
enceType (Position Type Selection) Is Set to _mcCommand
Function
Slave command current position: −20 Slave command current position: −20
0
If ReferenceType (Position Type Selection) is _mcFeedback in Rotary Mode, the “command current
position” in the above diagram would be the “actual current position.”
Timing Charts
An error for this instruction does not affect the operation of the axis or axes group. A timing chart is
given below for when PermittedDeviation (Permitted Following Error) is 10.0.
Enable
Enabled
Invalid
Busy
Error
Error ID 0
Deviated Value 0 0 0 10 12 -2 3 5 21 20 0 0 0 0 0 0 0
Master axis
command position 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52
Slave axis 21 20 24 16 16 32 29 29 15 18 40 42 23 25 28 30 31
command position
Errors
• If an error occurs during instruction execution, Error will change to TRUE.
• You can find out the cause of the error by referring to the value output by ErrorID (Error Code).
• Error information for this instruction is output to Minor Fault in the MC Common motion variable.
Enable
Enabled
InValid
Busy
Error
Error Codes
Refer to A-1 Error Codes for instruction errors.
MC_SyncMoveVelocity
The MC_SyncMoveVelocity instruction outputs the value set for the target velocity every task period to
the Servo Drive in Cyclic Synchronous Velocity Mode.
MC_SyncMoveVelocity
Precautions for Correct Use
• You cannot use this instruction for an NX-series Pulse Output Unit.
• Here, the task period is the primary period if the task is the primary periodic task and the task
period of the priority-5 periodic task if the task is the priority-5 periodic task.
FB/
Instruction Name
FUN
Graphic expression ST expression 3
MC_SyncMoveVelocity Cyclic FB MC_SyncMoveVelocity_instance MC_SyncMoveVelocity_
Synchronous instance (
Variables
Velocity MC_SyncMoveVelocity Axis :=parameter,
Axis Axis
Control Execute :=parameter,
Execute InVelocity
Velocity :=parameter,
Velocity Busy
CmdPosMode :=parameter,
CmdPosMode Active
BufferMode :=parameter,
BufferMode CommandAborted
InVelocity =>parameter,
Error
Busy =>parameter,
ErrorID Active =>parameter,
CommandAborted
=>parameter,
Error =>parameter,
ErrorID =>parameter
);
Variables
Input Variables
Name Meaning Data type Valid range Default Description
Execute Execute BOOL TRUE or FALSE FALSE The instruction is executed when
Execute changes to TRUE.
Velocity Target Veloc- LREAL Negative number, 0 Set the target velocity.
ity positive number, or 0 0: Set the velocity command value
to 0.
Positive value: Move in the posi-
tive direction.
Negative value: Move in the nega-
tive direction.
The unit is command units/s.*1
CmdPosMode Command _eMC_CMD- 0: _mcCount 0*2 0: Use the actual current position
Current Posi- POS_ and update the command current
tion Count MODE position.
Selection Home remains defined.
*1 Refer to Unit Conversion Settings in the NJ/NX-series CPU Unit Motion Control User’s Manual (Cat. No. W507) or NY-
series Industrial Panel PC / Industrial Box PC Motion Control User’s Manual (Cat. No. W559) for information on command
units.
*2 The default value for an enumeration variable is actually not the number, but the enumerator.
Output Variables
Name Meaning Data type Valid range Description
InVelocity Target Veloc- BOOL TRUE or TRUE when the command velocity reaches the target
ity Reached FALSE velocity.
Busy Executing BOOL TRUE or TRUE when the instruction is acknowledged.
FALSE
Active Controlling BOOL TRUE or TRUE when control is in progress.
FALSE
CommandAborted Command BOOL TRUE or TRUE when the instruction is aborted.
Aborted FALSE
Error Error BOOL TRUE or TRUE while there is an error.
FALSE
ErrorID Error Code WORD * Contains the error code when an error occurs.
A value of 16#0000 indicates normal execution.
In-Out Variables
* Specify a user-defined Axis Variable that was created in the Axis Basic Settings of the Sysmac Studio (default: MC_Axis***)
MC_SyncMoveVelocity
or a system-defined axis variable name (_MC_AX[*], _MC1_AX[*], or _MC2_AX[*]).
Function
• The MC_SyncMoveVelocity instruction outputs the target velocity from the user program every task
period to the Servo Drive in Cyclic Synchronous Velocity (CSV) Control Mode.
• When Execute changes to TRUE, the Control Mode of the Servo Drive is changed and a command
velocity is output. 3
• If this instruction is executed in the primary periodic task or a priority-5 periodic task, the target veloc-
ity is reached in the next task period.
Function
The following timing charts show an example of the operation for when this instruction is executed in
the primary periodic task. The same information applies when it is used in a priority-5 periodic task.
Time
Primary period
• If this instruction is executed in the priority-16 periodic task, the target velocity is reached in the next
task period.
Task period
Additional Information
The MC_SetOverride (Set Override Factors) instruction is not effective for the MC_SyncMoveVe-
locity (Cyclic Synchronous Velocity Control) instruction.
Instruction Details
This section describes the instruction in detail.
MC_SyncMoveVelocity
rent position. When switching to CSP Mode is completed, the command current position is set to the
command position.
Function
Time
CSP CSV Changing CSP
the Control
Mode
Additional Information
Of the OMRON G5-series Servo Drives, those for Linear Motors do not support the CSP Refer-
ence Position (4020 hex).
When Using a Servo Drive Other Than an OMRON 1S-series Servo Drive or
G5-series Servo Drive
An error may occur in processing to switch the Control Mode for some Servo Drives when this
instruction is executed or when an instruction that uses CSP Mode is executed during execution of
this instruction.
If that occurs, stop the axis (velocity of 0) and then execute this instruction or use multi-execution of
instructions that use the CSP Mode.
Stop Processing
The Control Mode and command velocities that are used to stop axis motion are described below.
For a deceleration stop, the target velocity of this instruction is used as the initial velocity and the
axis is decelerated to a stop with the deceleration rate for the specified Stop Mode.
Stopping for a Major Fault Level Error or a Partial Fault Level Error
The command velocity is changed to 0. The Control Mode is changed to CSP Mode when the
change criterion that is given below is satisfied.
However, depending on the error level, it may not be possible to switch the Control Mode normally,
and the axis may stop in CSV Mode.
Stopping When the Operating Mode of the CPU Unit Changes to PROGRAM
Mode
The command velocity is changed to 0 with the specified method. The Control Mode is changed to
CSP Mode when the change criterion that is given below is satisfied.
Change Criterion
Whether it is possible to change the Control Mode depends on Servo Drive specifications.
To ensure that the Control Mode is switched to CSP Mode during stop processing for stop instruc-
tions or errors, it is necessary to sufficiently decelerate the Servomotor first.
The Control Mode is changed to CSP Mode when the following criterion is met for three consecutive
periodic tasks after the command velocity changes to 0.
Actual current velocity ≤ Maximum velocity × 0.1
MC_SyncMoveVelocity
For example, it may not be possible when a partial fault level error occurs in the MC Function Mod-
ule.
Therefore, processing to change to CSP Mode is performed when the Status output variable from
the MC_Power (Power Servo) instruction changes to FALSE.
Function
trol Mode (error code: 7439 hex) occurs.
When an Error in Changing Servo Drive Control Mode (error code: 7439 hex) occurs, the command
velocity is changed to 0 and the Servo is turned OFF (free-run stop).
For details on the Error in Changing Servo Drive Control Mode (error code: 7439 hex), refer to the
NJ/NX-series CPU Unit Motion Control User’s Manual (Cat. No. W507) or NY-series Industrial Panel
PC / Industrial Box PC Motion Control User’s Manual (Cat. No. W559).
Home Status
If CmdPosMode (Command Current Position Count Selection) is set to _mcCount, the home will
remain defined.
Overrides
Overrides are disabled for this instruction.
Software Limits
Software limits are enabled for this instruction. These are enabled even for the following axis param-
eter settings.
• Deceleration stopping enabled for command position
• Immediate stopping enabled for command position (stop using remaining pulses)
Timing Charts
• Busy (Executing) changes to TRUE at the same time as Execute changes to TRUE. Active (Con-
trolling) changes to TRUE in the next period.
• InVelocity (Target Velocity Reached) changes to TRUE when the command velocity reaches Velocity
(Target Velocity).
• If another instruction aborts this instruction, CommandAborted changes to TRUE and Busy (Execut-
ing), Active (Controlling), and InVelocity (Target Velocity Reached) change to FALSE.
• The MC_Stop instruction is used to stop this instruction.
The following timing charts show operation for when this instruction is used in the primary periodic task.
MC_SyncMoveVelocity Instruction
Execute
InVelocity
Busy
Active
CommandAborted
Error
ErrorID 16#0000
MC_Stop Instruction
Execute
Done
Busy
Active
Velocity Decelerates to a
stop when MC_Stop
is executed.
Target velocity
Time
Target velocity is The target
changed each velocity does
primary period. not change.
Control Mode
CSP CSV CSP CSV
Additional Information
The MC Function Module sends a command to the Servo Drive to change the Control Mode as
shown in the above timing chart. The timing of implementing the change in the Servo Drive
depends on Servo Drive specifications.
MC_SyncMoveVelocity
Re-execution of Motion Control Instructions
This instruction cannot be re-executed.
A Motion Control Instruction Re-execution Disabled error (error code: 543B hex) occurs if re-execution
is attempted.
Function
Control User’s Manual (Cat. No. W559).
Errors
If an error occurs during instruction execution, Error will change to TRUE and the axis will stop.
You can find out the cause of the error by referring to the value output to ErrorID (Error Code).
InVelocity
Busy
Active
CommandAborted
Error
Error Codes
Refer to A-1 Error Codes for instruction errors.
MC_SyncMoveAbsolute
The MC_SyncMoveAbsolute instruction cyclically outputs the specified target position for the axis.
MC_SyncMoveAbsolute
FB/
Instruction Name Graphic expression ST expression
FUN
MC_SyncMove Cyclic Syn- FB MC_SyncMoveAbsolute_instance MC_SyncMoveAbsolute_instance (
Absolute chronous Axis :=parameter,
Absolute MC_SyncMoveAbsolute Execute :=parameter,
Axis Axis
Positioning Position :=parameter,
Execute InPosition
Direction :=parameter,
Position Busy
BufferMode :=parameter,
Direction Active InPosition =>parameter,
BufferMode CommandAborted
Error
Busy =>parameter, 3
Active =>parameter,
ErrorID CommandAborted =>parameter,
Error =>parameter,
Variables
ErrorID =>parameter
);
Version Information
A CPU Unit with unit version 1.03 or later and Sysmac Studio version 1.04 or higher are required
to use this instruction.
Variables
Input Variables
Output Variables
In-Out Variables
Valid
Name Meaning Data type Description
range
Axis Axis _sAXIS_REF --- Specify the axis. *
* Specify a user-defined Axis Variable that was created in the Axis Basic Settings of the Sysmac Studio (default: MC_Axis***)
or a system-defined axis variable name (_MC_AX[*], _MC1_AX[*], or _MC2_AX[*]).
Function
• The MC_GroupSyncMoveAbsolute instruction outputs the target position from the user program
every task period to the Servo Drive or other device in Cyclic Synchronous Position (CSP) Control
Mode. The target position is given as an absolute position.
• The upper limit of the velocity is the value that is set in the Maximum Velocity axis parameter. The
MC_SyncMoveAbsolute
maximum acceleration and deceleration rates are not used.
• If this instruction is executed in the primary periodic task or priority-5 periodic task, the target position
that is specified in the input parameters is output to the Servo Drive in the next task period.
The following timing charts show an example of the operation for when this instruction is executed in
the primary periodic task. The same information applies when it is used in a priority-5 periodic task.
Function
Time
Primary period
• If this instruction is executed in the priority-16 periodic task, the target position that is specified in the
input parameters is output to the Servo Drive in the next periodic task.
Task period
Instruction Details
This section describes the instruction in detail.
In-position Check
If Position (Target Position) is not changed, InPosition changes to TRUE when the difference between
the target position and the actual position is within the range that is set for the In-position Range axis
parameter.
Even if the target position is changed while InPosition is TRUE, it will remain TRUE for the remainder of
the period and change to FALSE the next period.
The setting of the In-position Check Time axis parameter is disabled.
Stop Processing
This section describes the methods that are used to stop axis operations.
Use the MC_Stop or MC_ImmediateStop instruction to stop operation. If one of these instructions is
executed, CommandAborted for this instruction will change to TRUE.
Applicable Axes
• You can use this instruction for a servo axis.
To use this instruction, change Enable for the MC_Power instruction to TRUE (Servo ON).
• A virtual servo axis will acknowledge this instruction at any time.
• An error occurs if the instruction is executed for an encoder or virtual encoder axis.
Overrides
Overrides are disabled for this instruction.
Timing Charts
• Busy (Executing) changes to TRUE at the same time as Execute changes to TRUE. Active (Con-
trolling) changes to TRUE in the next period.
• InPosition changes to TRUE when the actual current position is within the in-position range from
Position (Target Position).
MC_SyncMoveAbsolute
• If another instruction aborts this instruction, CommandAborted changes to TRUE and Busy (Execut-
ing), Active (Controlling), and InPosition change to FALSE.
• The MC_Stop instruction is used to stop this instruction.
The following timing charts show operation for when this instruction is executed in the primary periodic
task.
MC_SyncMoveAbsolute instruction
Execute
3
Position 20 30 40 50 60 40
Function
InPosition
Busy
Active
CommandAborted
Error
ErrorID 16#0000
MC_Stop Instruction
Execute
Busy
Active
Done
Command position
60
50
40
30
20
0
Time
Additional Information
The MC Function Module sends a command to the Servo Drive to change the Control Mode as
shown in the above timing chart. The timing of implementing the change in the Servo Drive
depends on Servo Drive specifications.
For details on BufferMode (Buffer Mode Selection), refer to the NJ/NX-series CPU Unit Motion Control
User’s Manual (Cat. No. W507) or NY-series Industrial Panel PC / Industrial Box PC Motion Control
User’s Manual (Cat. No. W559).
Errors
If an error occurs during instruction execution, Error will change to TRUE and the axes will stop.
You can find out the cause of the error by referring to the value output by ErrorID (Error Code).
MC_SyncMoveAbsolute
Timing Chart When Error Occurs
Execute
InPosition
Busy
Active
3
CommandAborted
Error
Function
ErrorID 16#0000 Error code
Error Codes
Refer to A-1 Error Codes for instruction errors.
MC_Reset
The MC_Reset instruction clears axis errors.
Instruction Name FB/FUN Graphic expression ST expression
MC_Reset Reset Axis FB MC_Reset_instance MC_Reset_instance (
Error Axis :=parameter,
MC_Reset Execute :=parameter,
Axis Axis
Done =>parameter,
Execute Done
Busy =>parameter,
Busy
Failure =>parameter,
Failure
Error =>parameter,
Error
ErrorID =>parameter
ErrorID );
Variables
Input Variables
Name Meaning Data type Valid range Default Description
Execute Execute BOOL TRUE or FALSE FALSE The instruction is executed
when Execute changes to
TRUE.
Output Variables
Name Meaning Data type Valid range Description
Done Done BOOL TRUE or TRUE when the instruction is completed.
FALSE
Busy Executing BOOL TRUE or TRUE when the instruction is acknowledged.
FALSE
Failure Failure End BOOL TRUE or TRUE when the instruction is not executed normally.
FALSE
Error Error BOOL TRUE or TRUE while there is an error.
FALSE
ErrorID Error Code WORD * Contains the error code when an error occurs.
A value of 16#0000 indicates normal execution.
MC_Reset
• When an error reset is executed during
an axis error for an axis common error.
Error When there is an error in the execution When the error is cleared.
conditions or input parameters for the
instruction.
3
In-Out Variables
Function
Name Meaning Data type Valid range Description
Axis Axis _sAXIS_REF --- Specify the axis.*
* Specify a user-defined Axis Variable that was created in the Axis Basic Settings of the Sysmac Studio (default: MC_Axis***)
or a system-defined axis variable name (_MC_AX[*], _MC1_AX[*], or _MC2_AX[*]).
Function
• The MC_Reset instruction starts error clear processing for the axis specified by Axis when Execute
changes to TRUE. The error processing resets axis errors and, if errors have occurred in the Servo
Drive, drive errors.
• You can use this instruction for any axis type.
• Error clear processing is executed only for axes with errors.
• If there is a drive error for an axis, the drive error is cleared first. Error clear processing is then per-
formed. Reset processing for the drive error is continued until the drive error is cleared or continues
for the Drive Error Reset Monitoring Time in the axis parameters.
• If this instruction is executed while the axis is decelerating to a stop for an error, the instruction is not
executed and Failure will change to TRUE. Failure will also change to TRUE if an axis error that
results from an MC common error cannot be cleared by this instruction. This is to ensure that the
error is not reset before the axis stops.
MC Common errors include MC Common Partial Faults and MC Common Minor Faults.
• Only errors that existed when Execute changes to TRUE are cleared. Errors that occur while clearing
errors are not cleared.
Additional Information
Timing Charts
Execute
Done
Busy
Failure
Error
Execute
Done
Busy
MC_Reset
Failure
Error
Function
Error Codes
Refer to A-1 Error Codes for instruction errors.
MC_ChangeAxisUse
The MC_ChangeAxisUse instruction temporarily changes the Axis Use axis parameter.
Instruction Name FB/FUN Graphic expression ST expression
MC_ChangeAxisUse Change FB MC_ChangeAxisUse_instance MC_ChangeAxisUse_instance (
Axis Use Axis :=parameter,
MC_ChangeAxisUse
Execute :=parameter,
Axis Axis
AxisUse :=parameter,
Execute Done
Done =>parameter,
AxisUse Busy
Busy =>parameter,
CommandAborted
CommandAborted =>parameter,
Error
Error =>parameter,
ErrorID
ErrorID =>parameter
);
Additional Information
• Use the Synchronize Menu of the Sysmac Studio to download the project.
• Refer to the NJ/NX-series CPU Unit Software User’s Manual (Cat. No. W501) or NY-series
Industrial Panel PC / Industrial Box PC Software User’s Manual (Cat. No. W558) for an appli-
cation example that uses this instruction.
Version Information
A CPU Unit with unit version 1.04 or later and Sysmac Studio version 1.05 or higher are required
to use this instruction.
Variables
Input Variables
Name Meaning Data type Valid range Default Description
Execute Execute BOOL TRUE or FALSE FALSE The instruction is executed
when Execute changes to
TRUE.
AxisUse Axis Use _eMC_AXIS_USE 1: _mcUnusedAxis 1* Specify a used axis or an
2: _mcUsedAxis unused axis.
1: Unused axis
2: Used axis
* The default value for an enumeration variable is actually not the number, but the enumerator.
Output Variables
Name Meaning Data type Valid range Description
Done Done BOOL TRUE or TRUE when the instruction is completed.
FALSE
Busy Executing BOOL TRUE or TRUE when the instruction is acknowledged.
FALSE
MC_ChangeAxisUse
CommandAborted Command BOOL TRUE or TRUE when the instruction is aborted.
Aborted FALSE
Error Error BOOL TRUE or TRUE while there is an error.
FALSE
ErrorID Error Code WORD * Contains the error code when an error occurs.
A value of 16#0000 indicates normal execution.
Function
Name Timing for changing to TRUE Timing for changing to FALSE
Done When the instruction is completed. • When Execute is TRUE and changes to FALSE.
• After one period when Execute is FALSE.
Busy When Execute changes to TRUE. • When Done changes to TRUE.
• When Error changes to TRUE.
• When CommandAborted changes to TRUE.
CommandAborted When this instruction is canceled due to an • When Execute is TRUE and changes to FALSE.
error in another instruction. • After one period when Execute is FALSE.
Error When there is an error in the execution When the error is cleared.
conditions or input parameters for the
instruction.
In-Out Variables
* Specify a user-defined Axis Variable that was created in the Axis Basic Settings of the Sysmac Studio (default: MC_Axis***)
or a system-defined axis variable name (_MC_AX[*], _MC1_AX[*], or _MC2_AX[*]).
Function
• When Execute changes to TRUE, the MC_ChangeAxisUse instruction temporarily changes the Axis
Use axis parameter to the specified setting.
• When execution of the instruction is completed, _MC_AX[*].Cfg.AxEnable (Axis Use) in the Axis Vari-
able changes to the specified setting.
• You can change the setting only for axes that have the Axis Use axis parameter set to Unused axis
(changeable to used axis) or Used axis. You cannot change the setting of the Axis Use axis parame-
ter to specify a used axis if that axis is set to Unused axis (unchangeable to used axis).
• You can execute this instruction when home is defined or when home is not defined. If home is
defined and the axis is changed to an unused axis, the home definition is lost.
• If you change an axis that uses an absolute encoder from a used axis to an unused axis, the absolute
encoder home offset value (which is saved to the battery-backup memory in the CPU Unit when the
power supply to the Controller is turned OFF) will be the value from just before the axis was changed
to an unused axis.
NJ501-/NY52-
Item
5 4 3
Settable axis numbers 0 to 63 0 to 31 0 to 15
Maximum number of used real axes 64 axes 32 axes 16 axes
Additional Information
For an NX-series CPU Unit, a variable name that starts with _MC_AX[*] may start with
_MC1_AX[*] or _MC2_AX[*] instead.
Timing Charts
MC_ChangeAxisUse Instruction
Execute
Done
MC_ChangeAxisUse
Busy
CommandAborted
Error
ErrorID 16#0000
Function
is attempted.
Errors
If an error occurs during instruction execution, Error will change to TRUE and the setting of the Axis
Use axis parameter will not change. You can find out the cause of the error by referring to the value out-
put by ErrorID (Error Code).
Execute
Done
Busy
CommandAborted
Error
Error Codes
Refer to A-1 Error Codes for instruction errors.
MC_DigitalCamSwitch
The MC_DigitalCamSwitch instruction turns a digital output ON or OFF according to the axis position.
Version Information
A CPU Unit with unit version 1.06 or later and Sysmac Studio version 1.07 or higher are required
to use this instruction.
Variables
Input Variables
MC_DigitalCamSwitch
Enable Enable BOOL TRUE or FALSE The instruction is executed while Enable is TRUE.
FALSE The values in Outputs will not change while Enable is
FALSE.*1
EnableMask Enable WORD 16#0000 to 16#0000 Specify whether to enable or disable each track.
Tracks FFFF There are a maximum of 16 tracks. Specify enable or
disable for track 0 with bit 00 and track 15 with bit 15.
0: Disable*2
1: Enable
ValueSource Input _sMC_- --- --- (Reserved)
(Reserved) Informa- SOURCE 3
tion
*1 The values in Outputs (Output Signals) are retained while Enable is FALSE.
Variables
When Enable in the NX_AryDOutTimeStamp instruction is FALSE, the digital output from the Digital Output Unit goes
OFF.
*2 When the value of a bit for a track number in EnableMask is 0, the elements for that track number in Outputs (Output Sig-
nals) will be OFF.
Output Variables
Data
Name Meaning Valid range Description
type
InOperation In Operation BOOL TRUE or FALSE TRUE while there are enabled output signals.
Busy Executing BOOL TRUE or FALSE TRUE when the instruction is acknowledged.
Error Error BOOL TRUE or FALSE TRUE while there is an error.
ErrorID Error Code WORD * Contains the error code when an error occurs. A
value of 16#0000 indicates normal execution.
* Refer to A-1 Error Codes.
In-Out Variables
Valid
Name Meaning Data type Description
range
Axis Axis _sAXIS_REF --- Specify the axis for which to access the position.*1
Switches Switches ARRAY[0..255] OF --- Specify an array variable of _sCAMSWITCH_REF
_sCAMSWITCH_REF*2 switch structures for use as switch ON/OFF pattern
data.
The array element numbers indicate the switch num-
bers.
Outputs Output Signals ARRAY[0..15] OF --- Specifies an array variable of _sOUTPUT_REF out-
_sOUTPUT_REF*2 *3 put signal structures for use as the output destina-
tions for digital ON/OFF time outputs that are
calculated based on switch ON/OFF pattern data.
The array element numbers indicate the track num-
bers.
You can specify this array variable as an in-out vari-
able for a NX_AryDOutTimeStamp instruction to
actually turn ON and OFF digital outputs.
TrackOptions Track Options ARRAY[0..15] OF --- Specify an array variable of _sTRACK_REF track
_sTRACK_REF*2 *3 option structures for use as switch operating condi-
tions. The array element numbers indicate the track
numbers.
*1 Specify a user-defined Axis Variable that was created in the Axis Basic Settings of the Sysmac Studio (default:
MC_Axis***) or a system-defined axis variable name (_MC_AX[*], _MC1_AX[*], or _MC2_AX[*]).
*2 An error will occur if the first element number in the array is not 0. An error will also occur if an array with more than one
dimension is specified.
*3 An error will occur if the number of elements in Outputs and the number of elements in TrackOptions are not the same.
Function
• The MC_DigitalCamSwitch instruction outputs the times when the actual position of an axis will reach
positions that are set in Switches as the times for turning a digital output ON and OFF.
• Always use this instruction together with the NX_AryDOutTimeStamp instruction and with a Digital
Output Unit that supports time stamp refreshing.
• The NX_AryDOutTimeStamp instruction turns the specified digital output ON or OFF at the specified
time stamp. If you use time stamp refreshing, you can turn digital output signals ON and OFF at the
required time without being affected by the timing of control processing.
MC_DigitalCamSwitch
• Object 6010 hex (Time Stamp) in the NX-series Encoder Input Unit is not assigned to a
PDO.
• The distributed clock in the EtherCAT Coupler Unit is disabled.
• An error does not occur for this instruction even if the time stamp is not updated. The ON/OFF
time will be calculated, but the result will not be the intended value.
Use this instruction only after you confirm in the MC Monitor Table or Watch Tab Page of the
Sysmac Studio that the TimeStamp member of the Axis Variable is being updated.
• If you use this instruction together with the NX_AryDOutTimeStamp instruction and with a Dig- 3
ital Output Unit that supports time stamp refreshing, the minimum ON/OFF range will be pro-
portional to the value of the task period and the value of the rotation rate.
For example, the minimum ON/OFF range would be 5° if one rotation of the rotary table is
Function
360°, the rotation rate is 800 r/min, and the task period is 500 μs. The minimum ON/OFF
range would become 10° if the task period was increased to 1,000 μs.
• Set the values of the FirstOnPosition, LastOnPosition, and Duration in the switch structure
variable so that the ON/OFF range of the digital output is larger than the minimum ON/OFF
range. If it is smaller than the minimum ON/OFF range, the actual digital output may not turn
ON or OFF.
• This instruction calculates the time stamp for when the specified position is reached based on
both the current position and current velocity of the axis. The accuracy of the calculated stamp
times is influenced by the encoder resolution and the rotation rate of the axis. The error will
increase if the encoder resolution is low or the rotation rate of the axis is slow. You can calcu-
late a guideline for the maximum error with the following formula.
Maximum error in time stamp (s)
= 180/(Encoder resolution (pulses/rotation) × rotation rate (r/min)
Some examples of the maximum error in time stamps for the encoder resolution and rotation
rate are given in the following table.
Encoder resolution Maximum error in calculated
Rotation rate (r/min)
(pulses/rotation) time stamps (μs)
3,600 400 ±125.0
800 ±62.5
131,072 400 ±3.4
800 ±1.7
If the axis accelerates or decelerates quickly, the calculation error may increase. Use this
instruction when the axis is at a constant velocity.
Verify operation sufficiently to confirm safety.
• If you specify an unused axis or if the MC Test Run is in progress, Busy will change to TRUE
and InOperation and Error will change to FALSE when Enable changes to TRUE.
• Do not create two instances with the same instance name. If you do, unintentional outputs may
occur.
Additional Information
Instruction Details
You can use this instruction to implement a mechanical cam switch that controls a sensor output signal
according to cam rotation angles in a program in the Controller. One track corresponds to one cam.
Track 2
Track 1
Track 0
Track 0
ON start position ON start position ON start position ON start position ON start position
ON end position ON end position ON end position ON end position ON end position
Track 1
ON start position
ON end position
Track 2
ON start position ON start position ON start position
ON end position ON end position ON end position
Position
TrackNumber corresponds to the cam number. The values of the FirstOnPosition (ON Start Position)
and LastOnPosition (ON End Position) correspond to the shape of the cam. The MC_DigitalCamSwitch
instruction calculates the ON time (OnTime) and OFF time (OffTime) to reach the specified ON start
position and ON end position and stores them in the parameter that is specified for Outputs (Output
Signals).
Outputs[0]
OnTime[0] OffTime[0] OnTime[1] OffTime[1] OnTime[2] OffTime[2] OnTime[3] OffTime[3] OnTime[4] OffTime[4]
Outputs[1]
OnTime[0] OffTime[0]
Outputs[2]
OnTime[0] OffTime[0] OnTime[1] OffTime[1] OnTime[2] OffTime[2]
Time
The NX_AryDOutTimeStamp instruction turns the actual digital outputs ON or OFF according to
ONTime and OffTime in the parameter that is specified for SetDOut (Output Pulses).
For SetDOut (Output Pulses), specify the elements of the array variable that is specified for the param-
eter for Outputs (Output Signals) in the MC_DigitalCamSwitch instruction.
For DOut (DOut Unit Output Bit), specify as the actual digital output, the device variable that is assigned
to the output bit of the Digital Output Unit that supports time stamp refreshing.
instMC_DigitalCamSwitch
MC_DigitalCamSwitch
MC_Axis001 Axis Axis MC_Axis001
Switches Switches Switches Switches
Outputs Outputs Outputs Outputs
InOperation
MC_DigitalCamSwitch
Vel.Act TrackOptions TrackOptions TrackOptions TrackOptions
Enable InOperation
EnableMask EnableMask Busy DCS_Busy
ValueSource Error DCS_Error
ErrorID DCS_ErrID
inst_NX_AryDOutTimeStamp1
InOperation NX_AryDOutTimeStamp
Enable ENO
Outputs[0] SetDOut SetDOut Outputs[0] 3
E001_Time_Stamp_of_Synchronous_Output SyncOutTime
N3_Output_Bit_00 DOut DOut N3_Output_Bit_00
Function
N3_Output_Bit_00_Time_Stamp TimeStamp TimeStamp N3_Output_Bit_00_Time_Stamp
Enable
• The instruction is executed while Enable is TRUE. The values in Outputs will not change while
Enable is FALSE.
Setting Example
Name Meaning Switch 0 Switch 1 Switch 2 Switch 3 ··· Switch 255
TrackNumber Track Number 0 0 0 1
FirstOnPosition ON Start Position 2000.0 2500.0 4000.0 3000.0
LastOnPosition ON End Position 3000.0 3000.0 1000.0 ---*1
AxisDirection Axis Direction Positive Negative No direction No direction
Selection direction direction specified specified
CamSwitchMode Switch Mode Position Position Position Time based
Selection based based based
Duration ON Duration ---*2 ---*2 ---*2 T#1350ms
*1 When the Switch Mode Selection is set for time-based operation, operation is performed with the ON Start Position and
ON Duration. The value of the ON End Position is ignored.
*2 When the Switch Mode Selection is set for position-based operation, operation is performed with the ON Start Position
and ON End Position. The value of the ON Duration is ignored.
The operation is as shown below when the axis continuously rotates in the positive direction. Here, the
Count Mode is set to Rotary Mode and the ring counter range is set to 0 to 5,000 in the axis parame-
ters.
1,350 ms
MC_DigitalCamSwitch
Track 1 Switch 3
Position
The operation is as shown below when the axis continuously rotates in the negative direction. The axis
parameter settings are the same as those that are given above.
3
Switch 1
Function
Track 0 Switch 2 Switch 2
1,350 ms
Track 1 Switch 3
Position
OnCompensation
FirstOnPosition after compensation
• If the value of OffCompensation results in exceeding FirstOnPosition, the output timing will be
unstable.
FirstOnPosition LastOnPosition
OffCompensation
LastOnPosition after compensation
MC_DigitalCamSwitch
Version Information
If the Count Mode is set to Rotary Mode, the following restrictions exist depending on the unit
version of the CPU Unit.
The valid range is different for a CPU Unit with unit version 1.09 or later and a CPU Unit with unit
version 1.08 or earlier. Check the valid range if you upgrade to a CPU Unit with unit version 1.09
or later.
3
CPU Unit with Unit Version 1.09 or Later
The valid range is T#-1s to T#1s, but the following restrictions also apply to the setting.
Function
• Set the value within a range that does not exceed the time for half a rotation of the axis.
For example, for rotation at 500 rpm, the time for one rotation is 120 ms.
The time is for half a rotation, so set OnCompensation (ON Time Compensation) and Off-
Compensation (OFF Time Compensation) to between −60 and 60 ms.
• If a value is set that exceeds the time for half a rotation of the axis, InOperation will be
FALSE and EnableOut will be FALSE. Always check the status of InOperation during appli-
cation.
• If a value within the correct range is restored when InOperation is FALSE, InOperation will
change to TRUE.
CPU Unit with Unit Version 1.08 or Earlier
• The valid range is T#-1s to T#0s.
The following figure shows the operation when OnCompensation (ON Time Compensation) is set to
T#5ms and OffCompensation (OFF Time Compensation) is set to T#10ms for the setting example
given on page 3-400.
With compensation (solid line)
Switch 0
5 ms 10 ms
Position
Timing Charts
A timing chart for execution of the MC_DigitalCamSwitch (Enable Digital Cam Switch) instruction is
shown below.
Enable
InOperation
Busy
Error
ErrorID 16#0000
The following timing chart is for when an unused axis is specified or when an MC Test Run is in prog-
ress.
For a CPU Unit with unit version 1.09 or later, the timing chart will be the same if the Count Mode is
Rotary Mode and OnCompensation (ON Time Compensation) or OffCompensation (OFF Time Com-
pensation) is set to a time that exceeds half a rotation of the axis.
Enable
InOperation
Busy
Error
ErrorID 16#0000
Errors
If this instruction cannot be executed, an error occurs and Error of this instruction changes to TRUE.
You can find out the cause of the error by referring to the value output by ErrorID (Error Code).
MC_DigitalCamSwitch
Timing Chart When Error Occurs
Enable
InOperation
Busy
Error
3
ErrorID 16#0000 Error code
Function
Here, EnableOut in Outputs will be FALSE.
Error Codes
Refer to A-1 Error Codes for instruction errors.
Sample Programming
This section provides sample programming for the example that is given in Setting Example on page 3-
400.
Configuration Devices
The following devices are used in this sample programming.
Parameter Settings
The minimum settings required for this sample programming are given below.
Axis Parameters
Axis Types
Axis Axis type
Axis 1 Servo axis
Axis 2 Encoder axis
Count Modes
Axis Count Mode
Axis 1 Rotary Mode
Axis 2 Rotary Mode
Ring Counters
Axis Modulo maximum position Modulo minimum position
Axis 1 5000 0
Axis 2 5000 0
Unit of Display
Axis Unit of Display
Axis 1 pulse
Axis 2 pulse
Ladder Diagram
Main Variables
Name Data type Default Comment
MC_Axis000 _sAXIS_REF --- Axis Variable for axis 1.
MC_Axis001 _sAXIS_REF --- Axis Variable for axis 2.
MC_DigitalCamSwitch
E001_Time_Stamp_of_Synchronous_Output ULINT --- Device variable*1
N3_Output_Bit_00 BOOL --- Device variable
N3_Output_Bit_00_Time_Stamp ULINT --- Device variable
N3_Output_Bit_01 BOOL --- Device variable
N3_Output_Bit_01_Time_Stamp ULINT --- Device variable
Switches ARRAY[ 0..3] OF --- Input parameter for Switches in-out
_sCAMSWITCH_REF variable
The element numbers correspond to
the switch numbers. 3
Outputs ARRAY[ 0..1] OF --- Input parameter for Outputs in-out
_sOUTPUT_REF variable
Sample Programming
The element numbers correspond to
the track numbers.
TrackOptions ARRAY[ 0..1] OF --- Input parameter for TrackOptions in-
_sTRACK_REF out variable
The element numbers correspond to
the track numbers.
EnableMask WORD 16#0003 Input parameter for EnableMask input
variable
Tracks 0 and 1 are enabled.
*1 You must add 0x200A:02 (Time Stamp of Synchronous Output) to the I/O entries for the EtherCAT Coupler Unit.
Sample Programming
If StartPg is TRUE, check that the Servo Drive for axis 1 is ready.
StartPg MC_Axis000.DrvStatus.Ready Lock1
If the Servo Drive for axis 1 is ready, the Servo is turned ON.
PWR
MC_Power
Lock1 MC_Axis000 Axis Axis MC_Axis000 Pwr_Status
Enable Status
Busy Pwr_Bsy
Error Pwr_Err
ErrorID Pwr_ErrID
If a minor fault level error occurs for the axis composition, the error handler for the device (FaultHandler) is executed.
Program the FaultHandler according to the device.
MC_Axis000.MFaultLvl.Active FaultHandler
EN FaultHandler
If the Servo is ON for axis 1 and home is not defined, the Home instruction is executed to define home.
HM
MC_Home
Pwr_Status MC_Axis000 Axis Axis MC_Axis000 Hm_D
Execute Done
Busy Hm_Bsy
CommandAborted Hm_Ca
Error Hm_Err
ErrorID Hm_ErrID
The parameters are set for the MC_MoveVelocity (Velocity Control) instruction and for the Switches variables for the
MC_DigitalCamSwitch (Enable Digital Cam Switch) instruction.
InitFlag
The MC_MoveVelocity (Velocity Control) instruction is executed if home is defined for axis 1.
VEL
MC_MoveVelocity
MC_Axis000.Details.Homed Hm_D MC_Axis000 Axis Axis MC_Axis000 Vel_InVel
Execute InVelocity
Vel_Vel Velocity Busy Vel_Bsy
Vel_Acc Acceleration Active Vel_Act
Vel_Dec Deceleration CommandAborted Vel_Ca
Vel_Jrk Jerk Error Vel_Err
Direction ErrorID Vel_ErrID
Continuous
BufferMode
After the MC_MoveVelocity (Velocity Control) instruction is executed for axis 1, the MC_DigitalCamSwitch (Enable
Digital Cam Switch) instruction is executed for axis 2.
instMC_DigitalCamSwitch
MC_DigitalCamSwitch
MC_Axis001 Axis Axis MC_Axis001
Switches Switches Switches Switches
Outputs Outputs Outputs Outputs
Vel.Act TrackOptions TrackOptions TrackOptions TrackOptions InOperation
Enable InOperation
EnableMask EnableMask Busy DCS_Busy
ValueSource Error DCS_Error
ErrorID DCS_ErrID
After the MC_DigitalCamSwitch (Enable Digital Cam Switch) instruction for axis 2 starts operating, the
NX_AryDOutTimeStamp (Write Digital Output Array with Specified Time Stamps) instruction is executed.
inst_NX_AryDOutTimeStamp1
InOperation NX_AryDOutTimeStamp
Enable ENO
Outputs[0] SetDOut SetDOut Outputs[0]
E001_Time_Stamp_of_Synchronous_Output SyncOutTime
N3_Output_Bit_00 DOut DOut N3_Output_Bit_00
N3_Output_Bit_00_Time_Stamp TimeStamp TimeStamp N3_Output_Bit_00_Time_Stamp
inst_NX_AryDOutTimeStamp2
InOperation NX_AryDOutTimeStamp
Enable ENO
Outputs[1] SetDOut SetDOut Outputs[1]
E001_Time_Stamp_of_Synchronous_Output SyncOutTime
N3_Output_Bit_01 DOut DOut N3_Output_Bit_01
N3_Output_Bit_01_Time_Stamp TimeStamp TimeStamp N3_Output_Bit_01_Time_Stamp
MC_DigitalCamSwitch
Contents of Inline ST
// MC_MoveVelocity parameters
Vel_Vel := LREAL#1000.0;
Vel_Acc := LREAL#0.0;
Vel_Dec := LREAL#0.0;
Vel_Jrk := LREAL#1000.0;
InitFlag := BOOL#TRUE; 3
// MC_DigitalCamSwitch parameters
Switches[0].TrackNumber := UINT#0;
Sample Programming
Switches[0].FirstOnPosition := LREAL#2000.0;
Switches[0].LastOnPosition := LREAL#3000.0;
Switches[0].AxisDirection := _eMC_DIRECTION#_mcPositiveDirection;
Switches[0].CamSwitchMode := _eMC_SWITCH_MODE#_mcPositionBased;
Switches[1].TrackNumber := UINT#0;
Switches[1].FirstOnPosition := LREAL#2500.0;
Switches[1].LastOnPosition := LREAL#3000.0;
Switches[1].AxisDirection := _eMC_DIRECTION#_mcNegativeDirection;
Switches[1].CamSwitchMode := _eMC_SWITCH_MODE#_mcPositionBased;
Switches[2].TrackNumber := UINT#0;
Switches[2].FirstOnPosition := LREAL#4000.0;
Switches[2].LastOnPosition := LREAL#1000.0;
Switches[2].AxisDirection := _eMC_DIRECTION#_mcNoDirection;
Switches[2].CamSwitchMode := _eMC_SWITCH_MODE#_mcPositionBased;
Switches[3].TrackNumber := UINT#1;
Switches[3].FirstOnPosition := LREAL#3000.0;
Switches[3].Duration := T#1350ms;
Switches[3].AxisDirection := _eMC_DIRECTION#_mcNoDirection;
Switches[3].CamSwitchMode := _eMC_SWITCH_MODE#_mcTimeBased;
Sample Programming
// Processing when input parameters are not set
IF InitFlag=FALSE THEN
// MC_MoveVelocity parameters
Vel_Vel := LREAL#1000.0;
Vel_Acc := LREAL#0.0;
Vel_Dec := LREAL#0.0;
Vel_Jrk := LREAL#1000.0;
// MC_DigitalCamSwitch parameters
Switches[0].TrackNumber := UINT#0;
Switches[0].FirstOnPosition := LREAL#2000.0;
Switches[0].LastOnPosition := LREAL#3000.0;
Switches[0].AxisDirection := _eMC_DIRECTION#_mcPositiveDirection;
Switches[0].CamSwitchMode := _eMC_SWITCH_MODE#_mcPositionBased;
Switches[1].TrackNumber := UINT#0;
Switches[1].FirstOnPosition := LREAL#2500.0;
Switches[1].LastOnPosition := LREAL#3000.0;
Switches[1].AxisDirection := _eMC_DIRECTION#_mcNegativeDirection;
Switches[1].CamSwitchMode := _eMC_SWITCH_MODE#_mcPositionBased;
Switches[2].TrackNumber := UINT#0;
Switches[2].FirstOnPosition := LREAL#4000.0;
Switches[2].LastOnPosition := LREAL#1000.0;
Switches[2].AxisDirection := _eMC_DIRECTION#_mcNoDirection;
Switches[2].CamSwitchMode := _eMC_SWITCH_MODE#_mcPositionBased;
MC_DigitalCamSwitch
Switches[3].TrackNumber := UINT#1;
Switches[3].FirstOnPosition := LREAL#3000.0;
Switches[3].Duration := T#1350ms;
Switches[3].AxisDirection := _eMC_DIRECTION#_mcNoDirection;
Switches[3].CamSwitchMode := _eMC_SWITCH_MODE#_mcTimeBased;
Sample Programming
// If StartPg is TRUE and the Servo Drive is ready, the Servo for axis 1 is turned ON.
// If the Servo Drive is not ready, the Servo is turned OFF.
IF (StartPg=TRUE)
AND (MC_Axis000.DrvStatus.Ready=TRUE) THEN
Pwr_En:=TRUE;
ELSE
Pwr_En:=FALSE;
END_IF;
// If a minor fault level error occurs for axis 1, the error handler for the device (FaultHandler) is exe-
cuted.
// Program the FaultHandler according to the device.
IF MC_Axis000.MFaultLvl.Active=TRUE THEN
FaultHandler();
END_IF;
// If the Servo is ON and home is not defined, the Home instruction is executed.
IF (Pwr_Status=TRUE) THEN
Hm_Ex:=TRUE;
END_IF;
//MC_Power
PWR(
Axis := MC_Axis000,
Enable := Pwr_En,
Status => Pwr_Status,
Busy => Pwr_Bsy,
Error => Pwr_Err,
ErrorID => Pwr_ErrID
);
//MC_Home
HM(
Axis := MC_Axis000,
Execute := Hm_Ex,
Done => Hm_D,
Busy => Hm_Bsy,
CommandAborted => Hm_Ca,
Error => Hm_Err,
ErrorID => Hm_ErrID
);
//MC_MoveVelocity
VEL(
Axis := MC_Axis000,
Execute := Vel_Ex,
Velocity := Vel_Vel,
Acceleration := Vel_Acc,
Deceleration := Vel_Dec,
Jerk := Vel_Jrk,
InVelocity => Vel_InVel,
Busy => Vel_Bsy,
Active => Vel_Act,
CommandAborted => Vel_Ca,
Error => Vel_Err,
ErrorID => Vel_ErrID
);
//MC_DigitalCamSwitch
instMC_DigitalCamSwitch(
Axis := MC_Axis001,
Switches := Switches,
Outputs := Outputs,
TrackOptions := TrackOptions,
Enable := Vel_Act,
EnableMask := EnableMask,
InOperation => InOperation,
Busy => DCS_Busy,
Error => DCS_Error,
ErrorID => DCS_ErrorID );
inst_NX_AryDOutTimeStamp1(
Enable := Vel_Act,
SetDOut := Outputs[0],
SyncOutTime := E001_Time_Stamp_of_Synchronous_Output,
DOut := N3_Output_Bit_00,
TimeStamp := N3_Output_Bit_00_Time_Stamp);
inst_NX_AryDOutTimeStamp2(
Enable := Vel_Act,
SetDOut := Outputs[1],
SyncOutTime := E001_Time_Stamp_of_Synchronous_Output,
DOut := N3_Output_Bit_01,
TimeStamp := N3_Output_Bit_01_Time_Stamp);
MC_TimeStampToPos
The MC_TimeStampToPos instruction calculates the position of the axis for the specified time stamp.
MC_TimeStampToPos
FB/
Instruction Name Graphic expression ST expression
FUN
MC_TimeStamp- Time Stamp FB MC_TimestampToPos_instance MC_TimeStampToPos_instance (
ToPos to Axis Posi- Axis :=parameter,
tion Calcula- MC_TimestampToPos Enable :=parameter,
Axis Axis
tion TimeStamp :=parameter,
Enable Enabled
ValueSource :=parameter,
Timestamp Busy
Enabled =>parameter,
ValueSource CalcPosition Busy =>parameter,
Error
ErrorID
CalcPosition =>parameter, 3
Error =>parameter,
ErrorID =>parameter
);
Variables
Precautions for Correct Use
You can use this instruction for an axis that is assigned to an NX-series Position Interface Unit.
The applicable NX Units are as follows: NX-EC0 and NX-ECS.
Version Information
A CPU Unit with unit version 1.06 or later and Sysmac Studio version 1.07 or higher are required
to use this instruction.
Variables
Input Variables
Output Variables
Data
Name Meaning Valid range Description
type
Enabled Enable BOOL TRUE or FALSE TRUE when the axis is being controlled.
Busy Executing BOOL TRUE or FALSE TRUE when the instruction is acknowledged.
CalcPosition Calculated LREAL Negative number, Contains the position for the specified time stamp.
Position positive number, or
The unit is command units.*1
0
Error Error BOOL TRUE or FALSE TRUE while there is an error.
ErrorID Error Code WORD *2 Contains the error code when an error occurs. A
value of 16#0000 indicates normal execution.
*1 Refer to Unit Conversion Settings in the NJ/NX-series CPU Unit Motion Control User’s Manual (Cat. No. W507) or NY-
series Industrial Panel PC / Industrial Box PC Motion Control User’s Manual (Cat. No. W559) for information on command
units.
*2 Refer to A-1 Error Codes
In-Out Variables
Valid
Name Meaning Data type Description
range
Axis Axis _sAXIS_REF --- Specify the axis.*1*2
*1 Specify a user-defined Axis Variable that was created in the Axis Basic Settings of the Sysmac Studio (default:
MC_Axis***) or a system-defined axis variable name (_MC_AX[*], _MC1_AX[*], or _MC2_AX[*]).
*2 Specify the encoder axis that is assigned to the NX-series Encoder Input Unit.
Function
• The MC_TimestampToPos instruction calculates the actual current position at the time stamp that is
specified by the input variable based on the actual current position and time stamp of the axis.
• For the axis, specify an NX-series Encoder Input Unit.
• If the Count Mode is set to Linear Mode in the axis parameters and an overflow or underflow occurs
in the calculated position, the calculated value will be the underflow value or the overflow value. In
this case, no error will occur.
Position
Current position
Calculated position
MC_TimeStampToPos
PDO.
• The distributed clock in the EtherCAT Coupler Unit is disabled.
• An error does not occur for this instruction even if the time stamp is not updated. The position
will be calculated, but the result will not be the position for the specified time stamp.
Use this instruction only after you confirm in the MC Monitor Table or Watch Tab Page of the
Sysmac Studio that the TimeStamp member of the Axis Variable is being updated.
• This instruction calculates the position for the specified time stamp based on both the current
position and current velocity of the axis. If the axis accelerates or decelerates quickly, the cal-
culation error may increase. Use this instruction when the axis is at a constant velocity.
3
Verify operation sufficiently to confirm safety.
• If you specify an unused axis or if the MC Test Run is in progress, Busy will change to TRUE
Function
and Enabled and Error will change to FALSE when Enable changes to TRUE.
• Do not create two instances with the same instance name. If you do, unintentional outputs may
occur.
Timing Charts
A timing chart for execution of the MC_TimestampToPos (Convert Time Stamp to Axis Position) instruc-
tion is shown below.
Enable
Enabled
Busy
Error
ErrorID 16#0000
The following timing chart is for when an unused axis is specified or when an MC Test Run in progress.
Enable
Enabled
Busy
CalcPosition Undefined.
Error
ErrorID 16#0000
Errors
If this instruction cannot be executed, an error occurs and Error of this instruction changes to TRUE.
You can find out the cause of the error by referring to the value output by ErrorID (Error Code).
Enabled
Busy
CalcPosition Undefined.
Error
Error Codes
Refer to A-1 Error Codes for instruction errors.
Sample Programming
This section shows sample programming that measures the distances between workpieces that move
on a conveyor belt.
MC_TimeStampToPos
Configuration Devices
The following devices are used in this sample programming.
Sample Programming
*3 The NX Unit number is 2 and the device name is N2. It is assigned to axis 2.
*4 The NX Unit number is 3 and the device name is N3.
Parameter Settings
The minimum settings required for this sample programming are given below.
Axis Parameters
Axis Types
Axis Axis type
Axis 1 Servo axis
Axis 2 Encoder axis
Count Modes
Axis Count Mode
Axis 1 Rotary Mode
Axis 2 Rotary Mode
Ring Counters
Axis Modulo maximum position Modulo minimum position
Axis 1 360 0
Axis 2 360 0
Unit of Display
Axis Unit of Display
Axis 1 degree
Axis 2 degree
Operation Example
The sensor output turns ON when the sensor detects a workpiece. When the workpiece passes, the
sensor output turns OFF. When the sensor detects the next workpiece, the sensor output turns ON
again. The position of the encoder input is calculated based on the time stamp when the sensor output
turns ON. The difference between two positions is the distance between the workpieces.
Ladder Diagram
Main Variables
Name Data type Default Comment
MC_Axis000 _sAXIS_REF --- Axis Variable for axis 1.
MC_Axis001 _sAXIS_REF --- Axis Variable for axis 2.
N3_Input_Bit_00 BOOL --- Device variable
N3_Input_Bit_00_Time_Stamp ULINT --- Device variable
Position ARRAY[ 0..1] OF --- Stores the calculated positions.
LREAL
Count ARRAY[ 0..1] OF --- Stores the number of rotations.
ULINT
FirstPoint UINT --- A variable that is used for processing.
LastPoint UINT --- A variable that is used for processing.
Distance LREAL --- The distance between workpieces.
Sample Programming
If StartPg is TRUE, check that the Servo Drive for axis 1 is ready.
StartPg MC_Axis000.DrvStatus.Ready Lock1
MC_TimeStampToPos
If the Servo Drive for axis 1 is ready, the Servo is turned ON.
PWR
MC_Power
Lock1 MC_Axis000 Axis Axis MC_Axis000 Pwr_Status
Enable Status
Busy Pwr_Bsy
Error Pwr_Err
ErrorID Pwr_ErrID
If a minor fault level error occurs for the axis composition, the error handler for the device (FaultHandler) is executed.
3
Program the FaultHandler according to the device.
MC_Axis000.MFaultLvl.Active FaultHandler
Sample Programming
EN FaultHandler
If the Servo is ON for axis 1 and home is not defined, the Home instruction is executed to define home.
HM
MC_Home
Pwr_Status MC_Axis000 Axis Axis MC_Axis000 Hm_D
Execute Done
Busy Hm_Bsy
CommandAborted Hm_Ca
Error Hm_Err
ErrorID Hm_ErrID
The parameters are set for the MC_MoveVelocity (Velocity Control) instruction.
InitFlag
The MC_MoveVelocity (Velocity Control) instruction is executed if home is defined for axis 1.
VEL
MC_MoveVelocity
MC_Axis000.Details.Homed Hm_D MC_Axis000 Axis Axis MC_Axis000 Vel_InVel
Execute InVelocity
Vel_Vel Velocity Busy Vel_Bsy
Vel_Acc Acceleration Active Vel_Act
Vel_Dec Deceleration CommandAborted Vel_Ca
Vel_Jrk Jerk Error Vel_Err
Direction ErrorID Vel_ErrID
Continuous
BufferMode
After the MC_MoveVelocity (Velocity Control) instruction is executed for axis 1, the MC_TimeStampToPos (Time
Stamp to Axis Position Calculation) instruction is executed for axis 2.
instMC_TimeStampToPos
MC_TimeStampToPos
Vel.Act MC_Axis001 Axis Axis MC_Axis001 inst_Enabled
Enable Enabled
N3_Input_Bit_00_Time_Stamp TimeStamp Busy TTP_Busy
ValueSource CalcPosition CalcPosition
Error TTP_Err
ErrorID TTP_ErrID
The number of rotations of the encoder axis is counted. (If the current value is less than the previous value, it is
assumed that the modulo maximum position has been exceeded.)
CalcPosition (calculated position) is obtained when the sensor output turns ON. (The position is saved alternately in
Position[0] and Position[1].
inst_Enabled N3_Input_Bit_00
After two workpieces are detected, the distance between the workpieces is calculated.
Finish
Contents of Inline ST 1
// MC_MoveVelocity parameters
Vel_Vel := LREAL#1000.0;
Vel_Acc := LREAL#0.0;
Vel_Dec := LREAL#0.0;
Vel_Jrk := LREAL#1000.0;
InitFlag := BOOL#TRUE;
MC_TimeStampToPos
Contents of Inline ST 2
IF MC_Axis001.Act.Pos=LREAL#0.0 THEN
Inc(RotaryCount);
END_IF;
Contents of Inline ST 3
IF Index < USINT#2 THEN
Position[Index] := CalcPosition;
Count[Index] := RotaryCount;
3
Index := Index + UINT#1;
END_IF;
Sample Programming
IF Index >= USINT#2 THEN
Finish := BOOL#TRUE;
Index := UINT#0;
END_IF;
Contents of Inline ST 4
// First comparison: Workpiece 1= Position[0] and workpiece 2 = Position[1]
// Second comparison: Workpiece 2= Position[1] and workpiece 3 = Position[0]
// Third comparison: Workpiece 3 = Position[0] and workpiece 4 = Position[1]
//…
FirstPoint := (Index+UINT#1) MOD UINT#2;
LastPoint :=Index;
DiffCount := Count[1] - Count[0];
Distance := (ABS( DiffCount) -LINT#1)* 360.0 +
(360.0 + Position[FirstPoint] - Position[LastPoint]);
Sample Programming
// Processing when input parameters are not set
IF InitFlag=FALSE THEN
// MC_MoveVelocity parameters
Vel_Vel := LREAL#1000.0;
Vel_Acc := LREAL#0.0;
Vel_Dec := LREAL#0.0;
Vel_Jrk := LREAL#1000.0;
// InitFlag is changed to TRUE after input parameters are set.
InitFlag:=TRUE;
END_IF;
// If StartPg is TRUE and the Servo Drive is ready, the Servo for axis 1 is turned ON.
// If the Servo Drive is not ready, the Servo is turned OFF.
IF (StartPg=TRUE)
AND (MC_Axis000.DrvStatus.Ready=TRUE) THEN
Pwr_En:=TRUE;
ELSE
Pwr_En:=FALSE;
END_IF;
// If a minor fault level error occurs for axis 1, the error handler for the device (FaultHandler) is exe-
cuted.
// Program the FaultHandler according to the device.
IF MC_Axis000.MFaultLvl.Active=TRUE THEN
FaultHandler();
END_IF;
// If the Servo is ON and home is not defined, the Home instruction is executed.
IF (Pwr_Status=TRUE) THEN
Hm_Ex:=TRUE;
END_IF;
MC_TimeStampToPos
// The number of rotations of the encoder axis is counted.
// (If the current value is less than the previous value, it is assumed that the modulo maximum posi-
tion has been exceeded.)
IF MC_Axis001.Act.Pos<PreAxis001ActPos THEN
Inc(RotaryCount);
END_IF;
PreAxis001ActPos := MC_Axis001.Act.Pos;
3
//MC_TimeStampToPos
instMC_TimeStampToPos(
Sample Programming
Axis := MC_Axis001,
Enable := Vel_Ex,
TimeStamp := TimeStamp,
Enabled => inst_Enabled,
Busy => TSTP_Busy,
CalcPosition => CalcPosition,
Error => TSTP_Error,
ErrorID => TSTP_ErrorID );
// CalcPosition (calculated position) is obtained when the sensor output turns ON.
// (The position is saved alternately in Position[0] and Position[1].
IF inst_Enabled THEN
IF PreN3InputBit00=FALSE AND N3_Input_Bit_00=TRUE THEN
IF Index < UINT#2 THEN
Position[Index] := CalcPosition;
Count[Index] := RotaryCount;
Index := Index + UINT#1;
END_IF;
IF Index >= UINT#2 THEN
Finish := BOOL#TRUE;
Index := UINT#0;
END_IF;
END_IF;
END_IF;
PreN3InputBit00 := N3_Input_Bit_00;
// After two workpieces are detected, the distance between the workpieces is calculated.
// First comparison: Workpiece 1= Position[0] and workpiece 2 = Position[1]
// Second comparison: Workpiece 2= Position[1] and workpiece 3 = Position[0]
// Third comparison: Workpiece 3 = Position[0] and workpiece 4 = Position[1]
//…
IF Finish THEN
FirstPoint := (Index+UINT#1) MOD UINT#2;
LastPoint :=Index;
DiffCount := Count[1] - Count[0];
Distance := (ABS( DiffCount) -LINT#1)* 360.0 +
(360.0 + Position[FirstPoint] - Position[LastPoint]);
END_IF;
//MC_Power
PWR(
Axis := MC_Axis000,
Enable := Pwr_En,
Status => Pwr_Status,
Busy => Pwr_Bsy,
Error => Pwr_Err,
ErrorID => Pwr_ErrID
);
//MC_Home
HM(
Axis := MC_Axis000,
Execute := Hm_Ex,
Done => Hm_D,
Busy => Hm_Bsy,
CommandAborted => Hm_Ca,
Error => Hm_Err,
ErrorID => Hm_ErrID
);
//MC_MoveVelocity
VEL(
Axis := MC_Axis000,
Execute := Vel_Ex,
Velocity := Vel_Vel,
Acceleration := Vel_Acc,
Deceleration := Vel_Dec,
Jerk := Vel_Jrk,
InVelocity => Vel_InVel,
Busy => Vel_Bsy,
Active => Vel_Act,
CommandAborted => Vel_Ca,
Error => Vel_Err,
ErrorID => Vel_ErrID
);
MC_PeriodicSyncVariables
The MC_PeriodicSyncVariables instruction periodically synchronizes Axes Variables between tasks.
MC_PeriodicSyncVariables
Instruction Name FB/FUN Graphic expression ST expression
MC_Periodic Periodic Axis FB MC_PeriodicSyncVariables_instance
MC_PeriodicSyncVariables_instance (
SyncVariables Variable Syn- Axis :=parameter,
chronization MC_PeriodicSyncVariables Enable :=parameter,
between Tasks Axis Axis ExecID :=parameter,
Enable Enabled Enabled =>parameter,
ExecID Busy Busy =>parameter,
Error Error =>parameter,
ErrorID =>parameter
ErrorID
);
3
Precautions for Correct Use
Variables
You cannot use this instruction in an NX1P2 CPU Unit and an NJ-series CPU Unit.
Variables
Input Variables
Output Variables
In-Out Variables
Valid
Name Meaning Data type Description
range
Axis Axis _sAXIS_REF --- Specify the axis. *
* Specify a user-defined Axis Variable that was created in the Axis Basic Settings of the Sysmac Studio (default: MC_Axis***)
or a system-defined axis variable name (_MC_AX[*], _MC1_AX[*], or _MC2_AX[*]).
Function
• While Enable is TRUE, an Axis Variable is periodically synchronized between the primary periodic
task and a priority-5 periodic task.
• The synchronized Axis Variable is output to the Axis Variable system-defined variable in the specified
task.
Additional Information
If you declare an external variable in the user program for an Axis Variable of an axis that is con-
trolled in a different task, you cannot be sure of the update timing of the accessed Axis Variable,
which will depend on when execution of the user program started.
Always use the MC_PeriodicSyncVariables (Periodic Axis Variable Synchronization between
Tasks) instruction when controls are performed in different tasks for applications that have mas-
ter-slave relationships between the controlled axes, such as those for electronic cams.
Instruction Details
This section describes the instruction in detail.
Timing of Synchronization
MC_PeriodicSyncVariables
You can access values in the Axis Variable of an axis that is controlled in the user program for the pri-
mary periodic task from the user program for the priority-5 periodic task.
Values are never written to the Axis Variable of an axis in the primary periodic task while the program
for the priority-5 periodic task is being executed.
The user program for the priority-5 periodic task uses the execution results from the primary periodic
task from just prior to when the start of the primary periodic task and the start of the priority-5 periodic
task coincided.
The following figure shows the timing of applying the values in an Axis Variable in the primary periodic 3
task to the priority-5 periodic task.
Servo
Function
Primary period (t) Execution command
Primary
MC
MC
MC
MC
MC
IO UPG IO UPG IO UPG IO UPG IO UPG
periodic task
Abbreviation Description
(A) Axis Variable updated.
Regardless of where the user program execution for the priority-5 periodic task starts, the execu-
tion results from the primary periodic task from just prior to when the start of the task periods
coincided are used.
(B) The values in the Axis Variable will not be overwritten during the user program execution.
Servo
Primary period (t) Execution command
Primary
MC
MC
MC
MC
MC
Priority-5
MC
MC
MC
MC
MC
Additional Information
If a task period is exceeded, the execution results from just prior to when the start of the task
periods coincided are not used, rather, the execution results from the period before that period
are used.
Primary
MC
MC
IO UPG IO IO IO UPG
periodic task
MC
Task period (t×2)
Priority-5
IO UPG MC IO UPG MC
periodic task
(A)
(B)
Abbreviation Description
(A) Axis Variable updated.
If the task period is exceeded, the values from one more period before that period are
applied.
(B) The values in the Axis Variable will not be overwritten during the user program execution.
For example, if the motion control axis parameters are set as shown below, the Axis Variable system-
defined variables shown in the following figure are updated.
Note The parameters that are labeled Reserved will have the default settings except for the basic settings.
If you set Axis to axis 1 and ExecID (Execution ID) to 10#2 and execute the MC_PeriodicSyncVariables
(Periodic Axis Variable Synchronization between Tasks) instruction, the area for _MC2_Ax[1] is
updated.
MC_PeriodicSyncVariables
[3] Reserved
Function
Multi-execution of MC_PeriodicSyncVariables Instructions
If you execute a different instance of the MC_PeriodicSyncVariables (Periodic Axis Variable Synchroni-
zation between Tasks) instruction during execution of the MC_PeriodicSyncVariables (Periodic Axis
Variable Synchronization between Tasks) instruction, both instances are executed.
Errors
If an error occurs during instruction execution, Error will change to TRUE and the axis parameters are
not written. The value before the instruction was executed will be held.
You can find out the cause of the error by referring to the value output by ErrorID (Error Code).
Busy
Enabled
Error
Error Codes
Refer to A-1 Error Codes for instruction errors.
Sample Programming
In this sample, axis 1 is the master axis. Axis 2 is a slave axis that requires high-speed, high-precision
control. It is assigned to the primary periodic task. Axis 3 is a slave axis that does not require precision.
It is assigned to a priority-5 periodic task. The master axis (axis 1) is assigned to the primary periodic
task.
Axis 1
1:2 2:3
Axis 2 Axis 3
Axis 1:
Master axis
1:2
Axis 2:
Slave axis Primary periodic task
Target
Calculations position given Axis 4: 2:3
Master axis position to virtual axis. Virtual axis
Master axis velocity
Axis 3:
Slave axis
Programming is placed in both the primary periodic task and priority-5 periodic task to achieve the
operation for the above application.
MC_PeriodicSyncVariables
• By executing the MC_PeriodicSyncVariables (Periodic Axis Variable Synchronization between Tasks)
instruction, the Axis Variable in the master axis is periodically updated in the priority-5 periodic task.
• The main variable that is used in programming is given below.
3
Ladder Diagram
The ladder diagram programming in the primary periodic task is given below.
Sample Programming
The MC_PeriodicSyncVariables (Periodic Axis Variable Synchronization between Tasks) instruction is executed in
the primary periodic task.
PeriodicSyncVariablesInst
MC_PeriodicSyncVariables
P_On P_First_Run Primary_MasterAxis Axis Axis Primary_MasterAxis
Enable Enabled
ExecID Busy
Error
ErrorID
* In this sample, the Primary_MasterAxis internal variable is defined with the same name as the master axis in the
primary periodic task.
Ladder Diagram
The ladder diagram programming in the priority-5 periodic task is given below.
The current position and phase shift amount (PhaseShift) of Primary_MasterAxis are added to obtain the command
position (VirtualMasterAxisTargetPosition) for Secondary_VirtualMasterAxis.
The MC_SyncMoveAbsolute (Cyclic Synchronous Absolute Positioning) instruction is used so that
Secondary_VirtualMasterAxis always follows Primary_MasterAxis.
P_On P_First_RunMode ADD
EN ENO
Primary_MasterAxis.Act.Pos In1 VirtualMasterAxisTargetPosition
PhaseShift In2
SyncMoveAbs
MC_SyncMoveAbsolute
Secondary_VirtualMasterAxis Axis Axis Secondary_VirtualMasterAxis
Execute InPosition
VirtualMasterAxisTargetPosition Position Busy
Direction Active
BufferMode CommandAborted
Error
ErrorID
MC_SyncOffsetPosition
The MC_SyncOffsetPosition instruction compensates the position of a slave axis currently in synchronized con-
trol.
MC_SyncOffsetPosition
FB/
Instruction Name Graphic expression ST expression
FUN
MC_SyncOffsetPosi- Cyclic Synchro- FB MC_SyncOffsetPosition_instance MC_SyncOffsetPosition_instance (
tion nous Position Axis :=parameter,
Offset Compen- MC_SyncOffsetPosition Execute :=parameter,
sation Axis Axis OffsetPosition :=parameter,
Execute OutputtedOffsetPosition BufferMode :=parameter,
OffsetPosition Busy MoveMode :=parameter,
BufferMode Active OutputtedOffsetPosition =>parameter,
MoveMode CommandAborted Busy =>parameter, 3
Active =>parameter,
Error
CommandAborted =>parameter,
ErrorID Error =>parameter,
Variables
ErrorID =>parameter
);
Version Information
A CPU Unit with unit version 1.10 or later and Sysmac Studio version 1.12 or higher are required
to use this instruction.
Variables
Input Variables
Data
Name Meaning Valid range Default Description
type
Execute Execute BOOL TRUE or FALSE FALSE The instruction is executed when Exe-
cute changes to TRUE.
OffsetPosition Position Offset LREAL Negative number, 0 Specify the position offset to add to the
positive number, or 0 command current position.
The unit is command units.*1
BufferMode Buffer Mode _eM- 0: _mcAborting 0 *2 Specify the behavior when executing
Selection C_BUFF more than one motion instruction.
ER_- 0: Aborting
MODE
MoveMode Travel Mode _eM- 1: _mcRelative 0 *2 Select the travel method.
C_MOV 1: Relative positioning
E_MOD
E
*1 Refer to Unit Conversion Settings in the NJ/NX-series CPU Unit Motion Control User's Manual (Cat. No. W507) or NY-
series Industrial Panel PC / Industrial Box PC Motion Control User’s Manual (Cat. No. W559) for information on command
units.
*2 The default value for an enumeration variable is actually not the number, but the enumerator.
Output Variables
Data
Name Meaning Valid range Description
type
OutputtedOffset- Position Off- LREAL Negative number, Contains the position offset that was added to the
Position set Output positive number, or command current position.
Value 0 The value is updated when Active is TRUE.
Updating is stopped and the value is retained when
CommandAborted or Error is TRUE.
Busy Executing BOOL TRUE or FALSE TRUE when the instruction is acknowledged.
Active Controlling BOOL TRUE or FALSE TRUE while the axis is being controlled.
Command- Instruction BOOL TRUE or FALSE TRUE when the instruction is aborted.
Aborted Aborted
Error Error BOOL TRUE or FALSE TRUE while there is an error.
ErrorID Error Code WORD *1 Contains the error code when an error occurs.
A value of 16#0000 indicates normal execution.
*1 Refer to A-1 Error Codes.
In-Out Variables
Valid
Name Meaning Data type Description
range
Axis Axis _sAXIS_REF --- Specify the axis.*1, *2
*1 Specify a user-defined Axis Variable that was created in the Axis Basic Settings of the Sysmac Studio (default:
MC_Axis***) or a system-defined axis variable name (_MC_AX[*], _MC1_AX[*], or _MC2_AX[*]).
*2 Specify the encoder axis that is assigned to the NX-series Encoder Input Unit.
Function
• The MC_SyncOffsetPosition instruction adds an offset that is calculated based on the value of the
OffsetPosition (Position Offset) input variable to the command current position and outputs the result
to the Servo Drive.
• You can change the value of the OffsetPosition (Position Offset) input variable while the Active (Con-
MC_SyncOffsetPosition
trolling) output variable is TRUE.
• The starting point for this instruction is used as the starting point for OffsetPosition (Position Offset)
as long as Active (Controlling) of this instruction is TRUE. Refer to Repeatedly Starting and Stopping
this Instruction on page 3-437 for details.
First position
Command position
before addition of offset + Servo Drive
3
Target position Motion instruction
+ (CSP)
Function
MC_SyncOffsetPosition instruction
-
+
Position offset
0
Switch 2
• Switch 1 is turned ON only once when Execute of the motion instruction is changed to TRUE.
• Switch 2 is ON while Active (Controlling) of the MC_SyncOffsetPosition instruction is TRUE.
• When switch 2 is OFF, the offset that is added to the command position is 0.
• You can execute this instruction only for a slave axis that is currently in synchronized control.
• After execution of this instruction is started, CommandAborted (Instruction Aborted) changes to
TRUE after Done, CommandAborted (Instruction Aborted), or Error of the target synchronized control
instruction changes to TRUE.
• If CommandAborted (Instruction Aborted) or Error of this instruction changes to TRUE, the offset that
was previously added to the command position is retained.
• The following timing chart shows execution of this instruction while execution of the MC_GearIn (Start
Gear Operation) instruction is in progress in the primary periodic task and then CommandAborted
(Instruction Aborted) of the MC_GearIn (Start Gear Operation) instruction changes to TRUE.
MC_GearIn Instruction
Execute
Active
CommandAborted
MC_GearOut Instruction
Execute
Done
MC_SyncOffsetPosition Instruction
Execute
OffsetPosition 0 -10 0 10 20
Active
CommandAborted
OutputtedOffsetPosition 0 -10 0 10 20
Offset 0 -10 0 10 0 10 0
+10
+10
-10
-10
-10
Time
MC_SyncOffsetPosition
Execute
OffsetPosition 0 20 40 60 0
Active
CommandAborted
OutputtedOffsetPosition 0 20 40 60 0
Offset 0 20 0 20 0 20 0 3
Command position
Function
(increased or decreased by offset)
+60
+40
+20
Time
If you want to use the same starting point when you re-execute a previously aborted instruction, use
OutputtedOffsetPosition (Position Offset Output Value).
As shown in this programming sample, OutputtedOffsetPosition (Position Offset Output Value) is used
to access the position offset when execution was aborted and it is subtracted from the variable for the
input parameter specified for this instruction.
OffsetResetFlag MOVE
EN ENO
0 In Out PreviousOffsetPos
Execute SUB
EN ENO
InputOffsetPos In1 OffsetPosition
Busy PreviousOffsetPos In2
SyncOffsetPos
MC_SyncOffsetPosition
Execute MC_Axis000 Axis Axis MC_Axis000
Execute OutputtedOffsetPosition OutputtedOffsetPos Busy
OffsetPosition OffsetPosition Busy
BufferMode Active
MoveMode CommandAborted CA
Error Error
ErrorID
CA ADD
EN ENO
OutputtedOffsetPos In1 PreviousOffsetPos
Error PreviousOffsetPos In2
InputOffsetPosition 0 20 40 60
PreviousOffsetPos 0 60
MC_SyncOffsetPosition Instruction
Execute
OffsetPosition 0 20 40 60 0
Active
CommandAborted
OutputtedOffsetPosition 0 20 40 60 0
Offset 0 20 0 20 0 20 0
Command position
(increased or decreased by offset)
+60
+40
+20
Time
Timing Charts
The following timing charts show when the position offset is applied when this instruction is executed.
MC_SyncOffsetPosition
Periodic Task
The position offset that is specified for the input is output to the Servo Drive during the next task period.
The following timing chart shows an example of the operation for when this instruction is executed in the
primary periodic task. The same information applies when it is used in a priority-5 periodic task.
MC_SyncOffsetPosition Instruction
Execute
Active 3
OffsetPosition 10 20
Function
Command position Solid line: After position offset is added
Primary period +20
+20
+10
Time
Active
OffsetPosition 10 20
Time
MC_SyncOffsetPosition
Multi-execution of Instructions for the Target Synchronized Control Instructions
If you perform multi-execution of instructions for the synchronized control instruction for which this
instruction is being executed, CommandAborted (Instruction Aborted) of this instruction changes to
TRUE. If blending is used for multi-execution of two MC_CamIn (Start Cam Operation) instructions,
CommandAborted (Instruction Aborted) of this instruction remains FALSE and processing is continued.
In this case, the value of OffsetPosition (Position Offset) is added to the initial velocity.
The following timing chart shows the operation when this instruction is executed for an MC_GearIn
(Start Gear Operation) instruction and multi-execution of instructions is performed for another instance
of MC_GearIn (Start Gear Operation) before execution of the first instance is completed. 3
MC_GearIn Instruction 1
Function
Execute
Active
CommandAborted
MC_GearIn Instruction 2
Execute
Done
MC_SyncOffsetPosition Instruction
Execute
Active
CommandAborted
OffsetPosition 0 10
Time
MC_SyncOffsetPosition Instruction 1
Execute
OffsetPosition 0 10
Active
CommandAborted
MC_SyncOffsetPosition Instruction 2
Execute
OffsetPosition 0 20 30
Active
Errors
If an error occurs during instruction execution, Error will change to TRUE and the axes will stop.
You can find out the cause of the error by referring to the value output by ErrorID (Error Code).
Timing Chart When Error Occurs
Execute
Busy
Active
CommandAborted
Error
Error Codes
Refer to A-1 Error Codes for instruction errors.
MC_SyncOffsetPosition
3
Function
MC_GroupEnable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2
MC_GroupDisable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-6
MC_MoveLinear . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-10
MC_MoveLinearAbsolute . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-36
MC_MoveLinearRelative . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-39
MC_MoveCircular2D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-42
MC_GroupStop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-66
MC_GroupImmediateStop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-75
MC_GroupSetOverride . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-79
MC_GroupReadPosition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-83
MC_ChangeAxesInGroup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-87
MC_GroupSyncMoveAbsolute . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-91
MC_GroupReset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-97
MC_GroupEnable
The MC_GroupEnable instruction enables an axes group.
FB/
Instruction Name Graphic expression ST expression
FUN
MC_GroupEnable Enable Axes FB MC_GroupEnable_instance MC_GroupEnable_instance (
Group AxesGroup :=parameter,
MC_GroupEnable Execute :=parameter,
AxesGroup AxesGroup
Done =>parameter,
Execute Done
Busy =>parameter,
Busy
CommandAborted
CommandAborted
=>parameter,
Error
Error =>parameter,
ErrorID ErrorID =>parameter
);
Variables
Input Variables
Output Variables
Name Meaning Data type Valid range Description
Done Done BOOL TRUE or TRUE when the instruction is completed.
FALSE
Busy Executing BOOL TRUE or TRUE when the instruction is acknowledged.
FALSE
CommandAborted Command BOOL TRUE or TRUE when the instruction is aborted.
Aborted FALSE
Error Error BOOL TRUE or TRUE while there is an error.
FALSE
ErrorID Error Code WORD * Contains the error code when an error occurs. A value
of 16#0000 indicates normal execution.
MC_GroupEnable
tion.
In-Out Variables
Function
Function
Before describing the function of this instruction, the different states of axes groups are explained.
• Axes groups have two states, the GroupEnable and GroupDisable states.
State Description
GroupEnable Multi-axes coordinated control is enabled.
You can execute any multi-axes coordinated control instructions except for the
MC_ChangeAxesInGroup (Change Axes In Group) instruction.
GroupDisable Multi-axes coordinated control is disabled. You can execute only the following multi-axes
coordinated control instructions.
• MC_GroupEnable (Enable Axes Group) instruction
• MC_GroupDisable (Disable Axes Group) instruction
• MC_GroupReset (Reset Axes Group Errors) instruction
• MC_GroupSetOverride (Set Group Overrides) instruction
• MC_GroupReadPosition (Read Axes Group Position) instruction
• MC_ChangeAxesInGroup (Change Axes in Group) instruction
Note * in _MC_GRP*. is replaced by a number between 0 and 63 for NX701 CPU Units, a number between 0 and
7 for NX1P2 CPU Units, and a number between 0 and 31 for the NJ-series CPU Units and NY-series Control-
lers.
Basic Function
• The MC_GroupEnable (Enable Axes Group) instruction places the axes group specified by Axes-
Group into the GroupEnable state.
• When an axes group is in the GroupEnable state, you can execute any multi-axes coordinated control
instructions for the axes group.
• You can set only servo axes and virtual servo axes in an axes group. An error will occur if you include
other axis types.
• All axes that belong to an axes group must be in a stopped state to enable the group.
An axis is stopped if the Status.Disabled (Axis Disabled) or Status.Standstill (Standstill) in the Axis
Variable is TRUE.
• If there are axes that already belong to another axes group and the other axes group is enabled, the
MC_GroupEnable instruction is not executed and an error will occur if you attempt to execute it.
• When an axes group is enabled, the axes in the axes group change to Coordinated Motion status.
Status.Coordinated (Coordinated Motion) in the Axis Variable changes to TRUE.
• An axes group is disabled if the MC_GroupDisable (Disable Axes Group) instruction is executed, if
operation is stopped by changing to PROGRAM mode, or if a MC Test Run is started.
Timing Charts
Execute
Done
Busy
CommandAborted
Error
ErrorID 16#0000
Errors
If an error occurs during execution of the MC_GroupEnable instruction, Error will change to TRUE. You
can find out the cause of the error by referring to the value output by ErrorID (Error Code).
Execute
Busy
Done
CommandAborted
MC_GroupEnable
Error
Additional Information
Errors do not occur for individual axes in an axes group even if an error occurs for the axes
group. 4
Error Codes
Function
Refer to A-1 Error Codes for instruction errors.
MC_GroupDisable
The MC_GroupDisable instruction disables an axes group.
FB/
Instruction Name Graphic expression ST expression
FUN
MC_GroupDisable Disable Axes FB MC_GroupDisable_instance MC_GroupDisable_instance (
Group AxesGroup :=parameter,
MC_GroupDisable Execute :=parameter,
AxesGroup AxesGroup
Done =>parameter,
Execute Done
Busy =>parameter,
Busy
CommandAborted
CommandAborted
=>parameter,
Error
Error =>parameter,
ErrorID ErrorID =>parameter
);
Variables
Input Variables
Output Variables
Name Meaning Data type Valid range Description
Done Done BOOL TRUE or TRUE when the instruction is completed.
FALSE
Busy Executing BOOL TRUE or TRUE when the instruction is acknowledged.
FALSE
CommandAborted Command BOOL TRUE or TRUE when the instruction is aborted.
Aborted FALSE
Error Error BOOL TRUE or TRUE while there is an error.
FALSE
ErrorID Error Code WORD * Contains the error code when an error occurs. A value
of 16#0000 indicates normal execution.
MC_GroupDisable
instruction.
In-Out Variables
Function
Function
• The MC_GroupDisable instruction disables an axes group. For details on the axes group states, refer
to Function on page 4-3.
• The MC_GroupDisable (Disable Axes Group) instruction places the axes group specified by Axes-
Group into the GroupDisable state. When an axes group is in the GroupDisable state, the axes group
stops acknowledging multi-axes coordinated control instructions.
• Any buffered instruction of the specified AxesGroup is cleared when the axes group state changes to
GroupDisable.
• The axes group is disabled even while operation is stopped.
When an axes group is disabled, the status of the axes in the axes group changes from TRUE for
Status.Coordinated (Coordinated Motion) to the status of each axis.
Use Status (Axis Status) in the Axis Variable to determine the status of each axis.
Timing Charts
Execute
Done
Busy
CommandAborted
Error
ErrorID 16#0000
If you execute the MC_GroupDisable instruction for an AxisGroup that is under multi-axes coordinated
control, CommandAborted of multi-axes coordinated control instruction will change to TRUE. Com-
mandAborted of any buffered multi-axes coordinated control instruction will also change to TRUE. If the
axes are moving, they will decelerate to a stop at the maximum deceleration rate for each axis.
Multi-axes Coordinated Control 1 (Example: MC_MoveLinearAbsolute)
Execute
Done
Busy
Active
CommandAborted
Error
ErrorID 16#0000
Execute
Done
Busy
Active
CommandAborted
Error
ErrorID 16#0000
MC_GroupDisable
Execute
Done
Busy
CommandAborted
Error
ErrorID 16#0000
Errors
If an error occurs during execution of the MC_GroupDisable instruction, Error will change to TRUE. You
can find out the cause of the error by referring to the value output by ErrorID (Error Code).
Execute
Done
Busy
Error
MC_GroupDisable
ErrorID Error code
Error Codes
Refer to A-1 Error Codes for instruction errors.
Function
MC_MoveLinear
The MC_MoveLinear instruction performs linear interpolation.
FB/
Instruction Name Graphic expression ST expression
FUN
MC_MoveLinear Linear Interpolation FB MC_MoveLinear_instance MC_MoveLinear_instance (
AxesGroup :=parameter,
MC_MoveLinear
Execute :=parameter,
AxesGroup AxesGroup
Position :=parameter,
Execute Done
Velocity :=parameter,
Position Busy
Acceleration :=parameter,
Velocity Active
Deceleration :=parameter,
Acceleration CommandAborted
Jerk :=parameter,
Deceleration Error
CoordSystem :=parameter,
Jerk ErrorID
BufferMode :=parameter,
CoordSystem TransitionMode
BufferMode :=parameter,
TransitionMode MoveMode :=parameter,
MoveMode Done =>parameter,
Busy =>parameter,
Active =>parameter,
CommandAborted
=>parameter,
Error =>parameter,
ErrorID =>parameter
);
Variables
Input Variables
MC_MoveLinear
MODE
10: Superimpose corners
MoveMode Travel Mode _eMC_MOVE_ 0: _mcAbsolute 0*3 Select the travel method.
MODE 1: _mcRelative 0: Absolute positioning
1: Relative positioning
*1 Refer to Unit Conversion Settings in the NJ/NX-series CPU Unit Motion Control User's Manual (Cat. No. W507) or NY-
series Industrial Panel PC / Industrial Box PC Motion Control User’s Manual (Cat. No. W559) for information on command 4
units.
*2 Always set the target velocity. If the axes are moved without setting a target velocity, an error will occur.
Variables
*3 The default value for an enumeration variable is actually not the number, but the enumerator.
Output Variables
Name Meaning Data type Valid range Description
Done Done BOOL TRUE or FALSE TRUE when the instruction is completed.
Busy Executing BOOL TRUE or FALSE TRUE when the instruction is acknowledged.
Active Controlling BOOL TRUE or FALSE TRUE when the axes group is being controlled.
CommandAborted Command BOOL TRUE or FALSE TRUE when the instruction is aborted.
Aborted
Error Error BOOL TRUE or FALSE TRUE while there is an error.
ErrorID Error Code WORD * Contains the error code when an error occurs. A
value of 16#0000 indicates normal execution.
In-Out Variables
* Specify a user-defined Axes Group Variable that was created in the Axes Group Basic Settings of the Sysmac Studio
(default: MC_Group***) or a system-defined axes group variable name (_MC_GRP[*], _MC1_GRP[*], or _MC2_GRP[*]).
Function
• The MC_MoveLiner instruction performs linear interpolation for 2 to 4 axes.
Instruction Details
This section describes the instruction in detail.
MC_MoveLinear
Model or series Axis number
NX701 CPU Unit Axis 0 to Axis 255
NX1P2 CPU Unit Axis 0 to Axis 11
NJ-series CPU Unit Axis 0 to Axis 63
NY-series Controller Axis 0 to Axis 63
4
Additional Information
Function
For the details of the axis numbers, refer to the NJ/NX-series CPU Unit Motion Control User’s
Manual (Cat. No. W507) or NY-series Industrial Panel PC / Industrial Box PC Motion Control
User’s Manual (Cat. No. W559).
• In the Axes Group Basic Settings of the Sysmac Studio, select the axis composition to use
and assign an axis number to the logical axis. The following example shows a 3-axis axes
group that is called MC_Group000 with the following axes registered in it: MC_Axis000,
MC_Axis001, and MC_Axis002.
The following example shows assigning the target positions to Pos1 with inline ST.
In the figure, target positions (1000.0, 2000.0, 3000.0) are assigned to axes A0 to A2.
EnterVariable
1 Pos1[0] : =LREAL#1000.0; (* A0 *)
2 Pos1[1] : =LREAL#2000.0; (* A1 *)
3 Pos1[2] : =LREAL#3000.0; (* A2 *)
• If an axis with the Count Mode set to Rotary Mode is set as an interpolation axis and you specify
absolute position, the target value will be the same as if Direction was set to No direction specified.
For details, refer to Direction on page 3-50.
La1
MC_MoveLinear
Td
Fa1 F
4
Ta
Function
A
La0
X
Axis A0 motion
Ta Td
For linear interpolation of four axes, the interpolation velocity and travel distance of each axis determine
the target velocities as shown below.
F: Specified interpolation feeding velocity
Fa0: Interpolation feeding velocity based on expansion of F to axis A0
Fa1: Interpolation feeding velocity based on expansion of F to axis A1
Fa2: Interpolation feeding velocity based on expansion of F to axis A2
Fa3: Interpolation feeding velocity based on expansion of F to axis A3
Ta: Interpolation acceleration time
Td: Interpolation deceleration time
L: Travel distance on the specified path
La0, La1, La2, and La3: Travel distances of axis A0, axis A1, axis A2, and axis A3.
L, Fa0, Fa1, Fa2, and Fa3 can be expressed with the following formulas.
La0
Fa0 = F × L
La1
Fa1 = F × L
La2
Fa2 = F ×
L
La3
Fa3 = F ×
L
2 2 2 2
L= La0 + La1 + La2 + La3
Jerk
The relationships between Acceleration (Acceleration Rate), Deceleration (Deceleration Rate), and
Velocity (Target Velocity) when Jerk is set to 0 and when it is set to any other value are shown below.
• Jerk Set to 0
The command value for the velocity is created with acceleration rate At and deceleration rate Dt.
Interpolation velocity
Vt
Time
Acceleration rate At
Time
Deceleration rate -Dt
Vt: Specified interpolation velocity, At: Specified acceleration rate, Dt: Specified deceleration rate.
Interpolation velocity
Vt
Time
MC_MoveLinear
Acceleration rate At
Time
Deceleration rate -Dt
Vt: Specified interpolation velocity, At: Specified acceleration rate, Dt: Specified deceleration rate.
Function
Interpolation velocity
Vt
Time
Acceleration rate At
Time
Deceleration rate -Dt
Jt
Jerk
Time
-Jt
Vt: Specified interpolation velocity, At: Specified acceleration rate, Dt: Specified deceleration rate,
Jt: Specified jerk
Time
Acceleration rate At
Time
Deceleration rate -Dt
Jt
Jerk
Time
-Jt
Vt: Specified interpolation velocity, At: Specified acceleration rate, Dt: Specified deceleration rate,
Jt: Specified jerk
Additional Information
• If 0 is specified for Acceleration (Acceleration Rate), the specified Velocity (Target Velocity) is
used immediately.
• If 0 is specified for Deceleration (Deceleration Rate), the axis stops immediately. However, if
the Buffer Mode is set to a blending mode, axis operation will change to the target velocity
specified by the next operation without stopping. For details, refer to BufferMode (Buffer Mode
Selection) on page 4-19.
• When the Acceleration (Acceleration Rate) or Deceleration (Deceleration Rate) is 0, the jerk
setting is disabled.
MC_MoveLinear
rent instruction reaches the target position. The operation of the current
instruction is changed so that the axes reach the target position at the transit
velocity. There are four methods to specify the transit velocity. These are
described below. You can also specify a Transition Mode as an option to the
Blending Mode (see below).
Blending low The lower of the target velocities of the current instruction and the buffered
instruction is used as the transit velocity.
Blending previous The target velocity of the current instruction is used as the transit velocity.
4
Blending next The target velocity of the buffered instruction is used as the transit velocity.
Function
Blending high The higher of the target velocities of the current instruction and the buffered
instruction is used as the transit velocity.
For details on BufferMode (Buffer Mode Selection), refer to the NJ/NX-series CPU Unit Motion Con-
trol User's Manual (Cat. No. W507) or NY-series Industrial Panel PC / Industrial Box PC Motion Con-
trol User’s Manual (Cat. No. W559).
TransitionMode
• TransitionMode specifies how to combine the paths created by the previous interpolation opera-
tion and the next interpolation operation.
• Set the TransitionMode to either _mcTMNone (Transition Disabled) or _mcTMCornerSuperim-
posed (Superimpose Corners).
• TransitionMode is enabled when blending is specified for BufferMode.
• An error will occur if you do not set TransitionMode to _mcTMNone (Transition Disabled) when
blending is not used.
Transition Disabled
The path is given priority when creating the velocity command value, so velocity command values of
the axes may change rapidly when switching from one operation to the next.
Operation Example
The Velocity (Target Velocity), BufferMode, and TransitionMode when transitioning from P1 to P2,
and from P2 to P3 are shown below.
• Motion from P1 to P2: Velocity = F, BufferMode = Aborting, TransitionMode = _mcTMNone (Tran-
sition Disabled)
• Motion from P2 to P3: Velocity = F, BufferMode = Blend with next, TransitionMode = _mcTMNone
(Transition Disabled)
• The motion starts from position P1 and goes through position P2. Linear interpolation is per-
formed to position P3.
• The linear interpolation velocity F is maintained when passing position P2. Because of this, the
velocity is discontinuous at position P2 as shown in the following figure.
A1
P3
Interpolation
velocity F
The velocity is
discontinuous.
P1 P2 The velocity is
discontinuous.
A0
Velocity of axis A1
Velocity of axis A0
Superimpose Corners
Use the superimpose corners specification when you want make the axes command velocities con-
tinuous.
Operation Example
The Velocity (Target Velocity), BufferMode, and TransitionMode when transitioning from P1 to P2,
and from P2 to P3 are shown below.
• Motion from P1 to P2: Velocity = F, BufferMode = Aborting, TransitionMode = _mcTMNone (Tran-
sition Disabled)
• Motion from P2 to P3: Velocity = F, BufferMode = Blend with next, TransitionMode = _mcTM-
CornerSuperimposed (Superimpose Corners)
• The motion starts from position P1 and passes near position P2. Linear interpolation is performed
MC_MoveLinear
to position P3.
• To make the axes command velocities continuous, the deceleration range of the previous motion
and the acceleration range of the current motion are combined to create the command velocity.
For this reason, the acceleration time of the current motion is the same as the deceleration time of
the previous motion.
A1
P3
4
Function
The velocity is
continuous.
Velocity of axis A0
Additional Information
The Jerk settings are disabled in the region with superimposed corners.
Done
Busy
Active
CommandAborted
Error
Interpolation velocity
Time
Errors
If an error occurs during instruction execution, Error will change to TRUE and the axes will stop. You
can find out the cause of the error by referring to the value output by ErrorID (Error Code).
Execute
Done
Busy
Active
CommandAborted
Error
Error Codes
Refer to A-1 Error Codes for instruction errors.
Sample Programming
This section shows sample programming for linear interpolation with periodic multi-execution of instruc-
tions.
Parameter Settings
The minimum settings required for this sample programming are given below.
MC_MoveLinear
Axis Types
Axis Axis Type
Axis 1 Servo axis
Axis 2 Servo axis
Count Modes
4
Axis Count Mode
Axis 1 Linear Mode
Sample Programming
Axis 2 Linear Mode
Units of Display
Axis Unit of Display
Axis 1 mm
Axis 2 mm
Axis Composition
Two axes are set.
Axis Selection
Axis 1 and axis 2 are set.
Operation Example
The following is an example of operation that performs linear interpolation automatically and
then returns to home and stops. Linear interpolations (2) to (7) are executed with multi-exe-
cution of instructions while linear interpolation (1) is being executed. Set the Buffer Mode
Selection to Buffered. In this sample, multi-execution of instructions is performed for (2) to
(7) if the Active (Controlling) output variable from linear interpolation (1) is TRUE. For multi-
axes coordinated operation, multi-execution is possible for up to seven instructions.
Operation Pattern
Axis 2 (mm)
Positive direction
25.00
(5)
20.00
(4)
15.00
(3)
(6)
10.00
(2)
5.00
(1)
Positive direction
0.00 (7) 50.00 Axis 1 (mm)
Positioning is performed using linear interpolations in the order (Axis1, Axis2) = (50.00 mm, 5.00
mm) → (0.00 mm, 10.00 mm) → (50.00 mm, 15.00 mm) → (0.00 mm, 20.00 mm) → (50.00 mm,
25.00 mm) → (50.00 mm, 0.00 mm) → (0.00 mm, 0.00 mm), then stop.
Ladder Diagram
Main Variables
MC_MoveLinear
Sample Programming
If StartPg is TRUE, check that the Servo Drives for each axis are ready.
Lock2
4
MC_Axis001.DrvStatus.Ready
Sample Programming
If the Servo Drives are ready, the Servos are turned ON for each axis.
PWR1
MC_Power
Lock1 MC_Axis000 Axis Axis Pwr1_Status
Enable Status
Busy Pwr1_Bsy
Error Pwr1_Err
ErrorID Pwr1_ErrID
PWR2
MC_Power
Lock2 MC_Axis001 Axis Axis Pwr2_Status
Enable Status
Busy Pwr2_Bsy
Error Pwr2_Err
ErrorID Pwr2_ErrID
If a minor fault level error occurs for the axis composition, the error handler for the device (FaultHandler) is executed.
Program the FaultHandler according to the device.
MC_Axis000.MFaultLvl.Active FaultHandler
EN FaultHandler
MC_Axis001.MFaultLvl.Active
MC_Group000.MFaultLvl.Active
If the Servo is ON for axis 1 and home is not defined, the Home instruction is executed to define home.
HM1
MC_Home
Pwr1_Status MC_Axis000.Details.Homed MC_Axis000 Axis Axis Hm1_D
Execute Done
Busy Hm1_Bsy
CommandAborted Hm1_Ca
Error Hm1_Err
ErrorID Hm1_ErrID
If the Servo is ON for axis 2 and home is not defined, the Home instruction is executed to define home.
HM2
MC_Home
Pwr2_Status MC_Axis001.Details.Homed MC_Axis001 Axis Axis Hm2_D
Execute Done
Busy Hm2_Bsy
CommandAborted Hm2_Ca
Error Hm2_Err
ErrorID Hm2_ErrID
After home is defined for axis 1 and axis 2, the axes group is enabled.
GRP_EN
MC_GroupEnable
Hm1_D Hm2_D MC_Group000.Status.Disabled MC_Group000 AxesGroup AxesGroup Grp_En_D
Execute Done
Busy Grp_En_Bsy
CommandAborted Grp_En_Ca
Error Grp_En_Err
ErrorID Grp_En_ErrID
Linear interpolation (2) is executed with multi-execution of instructions after linear interpolation (1) is started.
MV_LIN2
MC_MoveLinear
Mv_Lin1_Act MC_Group000 AxesGroup AxesGroup Mv_Lin2_D
Execute Done
Mv_Lin2_Pos Position Busy Mv_Lin2_Bsy
Mv_Lin2_Vel Velocity Active Mv_Lin2_Act
Mv_Lin2_Acc Acceleration CommandAborted Mv_Lin2_Ca
Mv_Lin2_Dec Deceleration Error Mv_Lin2_Err
Jerk ErrorID Mv_Lin2_ErrID
CoordSystem
Mv_Lin2_Bm BufferMode
TransitionMode
Mv_Lin2_Mm MoveMode
MC_MoveLinear
Linear interpolation (3) is executed with multi-execution of instructions after linear interpolation (1) is started.
MV_LIN3
MC_MoveLinear
Mv_Lin1_Act MC_Group000 AxesGroup AxesGroup Mv_Lin3_D
Execute Done
Mv_Lin3_Pos Position Busy Mv_Lin3_Bsy 4
Mv_Lin3_Vel Velocity Active Mv_Lin3_Act
Mv_Lin3_Acc Acceleration CommandAborted Mv_Lin3_Ca
Sample Programming
Mv_Lin3_Dec Deceleration Error Mv_Lin3_Err
Jerk ErrorID Mv_Lin3_ErrID
CoordSystem
Mv_Lin3_Bm BufferMode
TransitionMode
Mv_Lin3_Mm MoveMode
Linear interpolation (4) is executed with multi-execution of instructions after linear interpolation (1) is started.
MV_LIN4
MC_MoveLinear
Mv_Lin1_Act MC_Group000 AxesGroup AxesGroup Mv_Lin4_D
Execute Done
Mv_Lin4_Pos Position Busy Mv_Lin4_Bsy
Mv_Lin4_Vel Velocity Active Mv_Lin4_Act
Mv_Lin4_Acc Acceleration CommandAborted Mv_Lin4_Ca
Mv_Lin4_Dec Deceleration Error Mv_Lin4_Err
Jerk ErrorID Mv_Lin4_ErrID
CoordSystem
Mv_Lin4_Bm BufferMode
TransitionMode
Mv_Lin4_Mm MoveMode
Linear interpolation (5) is executed with multi-execution of instructions after linear interpolation (1) is started.
MV_LIN5
MC_MoveLinear
Mv_Lin1_Act MC_Group000 AxesGroup AxesGroup Mv_Lin5_D
Execute Done
Mv_Lin5_Pos Position Busy Mv_Lin5_Bsy
Mv_Lin5_Vel Velocity Active Mv_Lin5_Act
Mv_Lin5_Acc Acceleration CommandAborted Mv_Lin5_Ca
Mv_Lin5_Dec Deceleration Error Mv_Lin5_Err
Jerk ErrorID Mv_Lin5_ErrID
CoordSystem
Mv_Lin5_Bm BufferMode
TransitionMode
Mv_Lin5_Mm MoveMode
Linear interpolation (6) is executed with multi-execution of instructions after linear interpolation (1) is started.
MV_LIN6
MC_MoveLinear
Mv_Lin1_Act MC_Group000 AxesGroup AxesGroup Mv_Lin6_D
Execute Done
Mv_Lin6_Pos Position Busy Mv_Lin6_Bsy
Mv_Lin6_Vel Velocity Active Mv_Lin6_Act
Mv_Lin6_Acc Acceleration CommandAborted Mv_Lin6_Ca
Mv_Lin6_Dec Deceleration Error Mv_Lin6_Err
Jerk ErrorID Mv_Lin6_ErrID
CoordSystem
Mv_Lin6_Bm BufferMode
TransitionMode
Mv_Lin6_Mm MoveMode
Linear interpolation (7) is executed with multi-execution of instructions after linear interpolation (1) is started.
MV_LIN7
MC_MoveLinear
Mv_Lin1_Act MC_Group000 AxesGroup AxesGroup Mv_Lin7_D
Execute Done
Mv_Lin7_Pos Position Busy Mv_Lin7_Bsy
Mv_Lin7_Vel Velocity Active Mv_Lin7_Act
Mv_Lin7_Acc Acceleration CommandAborted Mv_Lin7_Ca
Mv_Lin7_Dec Deceleration Error Mv_Lin7_Err
Jerk ErrorID Mv_Lin7_ErrID
CoordSystem
Mv_Lin7_Bm BufferMode
TransitionMode
Mv_Lin7_Mm MoveMode
Contents of Inline ST
// MV_LIN1 parameters
Mv_Lin1_Pos[0] := LREAL#50.0;
Mv_Lin1_Pos[1] := LREAL#5.0;
Mv_Lin1_Vel := LREAL#100.0;
Mv_Lin1_Acc := LREAL#100.0;
Mv_Lin1_Dec := LREAL#100.0;
Mv_Lin1_Mm := _eMC_MOVE_MODE#_mcAbsolute;
// MV_LIN2 parameters
Mv_Lin2_Pos[0] := LREAL#0.0;
Mv_Lin2_Pos[1] := LREAL#10.0;
Mv_Lin2_Vel := LREAL#100.0;
Mv_Lin2_Acc := LREAL#100.0;
Mv_Lin2_Dec := LREAL#100.0;
Mv_Lin2_Bm := _eMC_BUFFER_MODE#_mcBuffered;
Mv_Lin2_Mm := _eMC_MOVE_MODE#_mcAbsolute;
// MV_LIN3 parameters
Mv_Lin3_Pos[0] := LREAL#50.0;
Mv_Lin3_Pos[1] := LREAL#15.0;
Mv_Lin3_Vel := LREAL#100.0;
Mv_Lin3_Acc := LREAL#100.0;
Mv_Lin3_Dec := LREAL#100.0;
Mv_Lin3_Bm := _eMC_BUFFER_MODE#_mcBuffered;
Mv_Lin3_Mm := _eMC_MOVE_MODE#_mcAbsolute;
// MV_LIN4 parameters
Mv_Lin4_Pos[0] := LREAL#0.0;
MC_MoveLinear
Mv_Lin4_Pos[1] := LREAL#20.0;
Mv_Lin4_Vel := LREAL#100.0;
Mv_Lin4_Acc := LREAL#100.0;
Mv_Lin4_Dec := LREAL#100.0;
Mv_Lin4_Bm := _eMC_BUFFER_MODE#_mcBuffered;
Mv_Lin4_Mm := _eMC_MOVE_MODE#_mcAbsolute;
// MV_LIN5 parameters 4
Mv_Lin5_Pos[0] := LREAL#50.0;
Mv_Lin5_Pos[1] := LREAL#25.0;
Sample Programming
Mv_Lin5_Vel := LREAL#100.0;
Mv_Lin5_Acc := LREAL#100.0;
Mv_Lin5_Dec := LREAL#100.0;
Mv_Lin5_Bm := _eMC_BUFFER_MODE#_mcBuffered;
Mv_Lin5_Mm := _eMC_MOVE_MODE#_mcAbsolute;
// MV_LIN6 parameters
Mv_Lin6_Pos[0] := LREAL#50.0;
Mv_Lin6_Pos[1] := LREAL#0.0;
Mv_Lin6_Vel := LREAL#100.0;
Mv_Lin6_Acc := LREAL#100.0;
Mv_Lin6_Dec := LREAL#100.0;
Mv_Lin6_Bm := _eMC_BUFFER_MODE#_mcBuffered;
Mv_Lin6_Mm := _eMC_MOVE_MODE#_mcAbsolute;
// MV_LIN7 parameters
Mv_Lin7_Pos[0] := LREAL#0.0;
Mv_Lin7_Pos[1] := LREAL#0.0;
Mv_Lin7_Vel := LREAL#100.0;
Mv_Lin7_Acc := LREAL#100.0;
Mv_Lin7_Dec := LREAL#100.0;
Mv_Lin7_Bm := _eMC_BUFFER_MODE#_mcBuffered;
Mv_Lin7_Mm := _eMC_MOVE_MODE#_mcAbsolute;
Sample Programming
// Processing when input parameters are not set
IF InitFlag=FALSE THEN
// MV_LIN1 parameters
Mv_Lin1_Pos[0] := LREAL#50.0;
Mv_Lin1_Pos[1] := LREAL#5.0;
Mv_Lin1_Vel := LREAL#100.0;
Mv_Lin1_Acc := LREAL#100.0;
Mv_Lin1_Dec := LREAL#100.0;
Mv_Lin1_Mm := _eMC_MOVE_MODE#_mcAbsolute;
// MV_LIN2 parameters
Mv_Lin2_Pos[0] := LREAL#0.0;
Mv_Lin2_Pos[1] := LREAL#10.0;
Mv_Lin2_Vel := LREAL#100.0;
Mv_Lin2_Acc := LREAL#100.0;
Mv_Lin2_Dec := LREAL#100.0;
Mv_Lin2_Bm := _eMC_BUFFER_MODE#_mcBuffered;
Mv_Lin2_Mm := _eMC_MOVE_MODE#_mcAbsolute;
// MV_LIN3 parameters
Mv_Lin3_Pos[0] := LREAL#50.0;
Mv_Lin3_Pos[1] := LREAL#15.0;
Mv_Lin3_Vel := LREAL#100.0;
Mv_Lin3_Acc := LREAL#100.0;
Mv_Lin3_Dec := LREAL#100.0;
MC_MoveLinear
Mv_Lin3_Bm := _eMC_BUFFER_MODE#_mcBuffered;
Mv_Lin3_Mm := _eMC_MOVE_MODE#_mcAbsolute;
// MV_LIN4 parameters
Mv_Lin4_Pos[0] := LREAL#0.0;
Mv_Lin4_Pos[1] := LREAL#20.0;
Mv_Lin4_Vel := LREAL#100.0;
Mv_Lin4_Acc := LREAL#100.0; 4
Mv_Lin4_Dec := LREAL#100.0;
Mv_Lin4_Bm := _eMC_BUFFER_MODE#_mcBuffered;
Sample Programming
Mv_Lin4_Mm := _eMC_MOVE_MODE#_mcAbsolute;
// MV_LIN5 parameters
Mv_Lin5_Pos[0] := LREAL#50.0;
Mv_Lin5_Pos[1] := LREAL#25.0;
Mv_Lin5_Vel := LREAL#100.0;
Mv_Lin5_Acc := LREAL#100.0;
Mv_Lin5_Dec := LREAL#100.0;
Mv_Lin5_Bm := _eMC_BUFFER_MODE#_mcBuffered;
Mv_Lin5_Mm := _eMC_MOVE_MODE#_mcAbsolute;
// MV_LIN6 parameters
Mv_Lin6_Pos[0] := LREAL#50.0;
Mv_Lin6_Pos[1] := LREAL#0.0;
Mv_Lin6_Vel := LREAL#100.0;
Mv_Lin6_Acc := LREAL#100.0;
Mv_Lin6_Dec := LREAL#100.0;
Mv_Lin6_Bm := _eMC_BUFFER_MODE#_mcBuffered;
Mv_Lin6_Mm := _eMC_MOVE_MODE#_mcAbsolute;
// MV_LIN7 parameters
Mv_Lin7_Pos[0] := LREAL#0.0;
Mv_Lin7_Pos[1] := LREAL#0.0;
Mv_Lin7_Vel := LREAL#100.0;
Mv_Lin7_Acc := LREAL#100.0;
Mv_Lin7_Dec := LREAL#100.0;
Mv_Lin7_Bm := _eMC_BUFFER_MODE#_mcBuffered;
Mv_Lin7_Mm := _eMC_MOVE_MODE#_mcAbsolute;
END_IF;
// If StartPg is TRUE and the Servo Drive is ready, the Servo for axis 1 is turned ON.
// If the Servo Drive is not ready, the Servo is turned OFF.
IF (StartPg=TRUE)
AND (MC_Axis000.DrvStatus.Ready=TRUE) THEN
// If StartPg is TRUE and the Servo Drive is ready, the Servo for axis 2 is turned ON.
// If the Servo Drive is not ready, the Servo is turned OFF.
IF (StartPg=TRUE)
AND (MC_Axis001.DrvStatus.Ready=TRUE) THEN
Pwr2_En:=TRUE; // Turn ON the Servo for axis 2.
ELSE
Pwr2_En:=FALSE; // Turn OFF the Servo for axis 2.
END_IF;
// If the Servo is ON for axis 1 and home is not defined, the Home instruction is executed.
IF (Pwr1_Status=TRUE) AND (MC_Axis000.Details.Homed=FALSE) THEN
Hm1_Ex:=TRUE;
END_IF;
// If the Servo is ON for axis 2 and home is not defined, the Home instruction is executed.
IF (Pwr2_Status=TRUE) AND (MC_Axis001.Details.Homed=FALSE) THEN
Hm2_Ex:=TRUE;
END_IF;
// If axes group 0 is disabled while home is defined for axis 1 and axis 2, it is enabled.
IF (Hm1_D=TRUE) AND (Hm2_D=TRUE) AND (MC_Group000.Status.Disabled=TRUE) THEN
Grp_En_Ex:= TRUE;
END_IF;
// After the MC_GroupEnable (Enable Axes Group) instruction is completed, linear interpolation (1) is executed.
IF Grp_En_D=TRUE THEN
Mv_Lin1_Ex:=TRUE;
END_IF;
// Linear interpolations (2) to (7) are executed with multi-execution of instructions while the Active output
variable for linear interpolation (1) is TRUE.
IF Mv_Lin1_Act=TRUE THEN
Mv_Lin2_Ex:=TRUE;
Mv_Lin3_Ex:=TRUE;
Mv_Lin4_Ex:=TRUE;
Mv_Lin5_Ex:=TRUE;
Mv_Lin6_Ex:=TRUE;
Mv_Lin7_Ex:=TRUE;
END_IF;
Enable := Pwr2_En,
Status => Pwr2_Status,
Busy => Pwr2_Bsy,
Error => Pwr2_Err,
ErrorID => Pwr2_ErrID
);
MC_MoveLinear
ErrorID => Hm1_ErrID
);
Sample Programming
Error => Hm2_Err,
ErrorID => Hm2_ErrID
);
Deceleration := Mv_Lin2_Dec,
BufferMode := Mv_Lin2_Bm,
MoveMode := Mv_Lin2_Mm,
Done => Mv_Lin2_D,
Busy => Mv_Lin2_Bsy,
Active => Mv_Lin2_Act,
CommandAborted => Mv_Lin2_Ca,
Error => Mv_Lin2_Err,
ErrorID => Mv_Lin2_ErrID
);
MC_MoveLinear
ErrorID => Mv_Lin6_ErrID
);
// Linear interpolation (7)
MV_LIN7(
AxesGroup := MC_Group000,
Execute := Mv_Lin7_Ex,
Position := Mv_Lin7_Pos,
Velocity := Mv_Lin7_Vel, 4
Acceleration := Mv_Lin7_Acc,
Deceleration := Mv_Lin7_Dec,
Sample Programming
BufferMode := Mv_Lin7_Bm,
MoveMode := Mv_Lin7_Mm,
Done => Mv_Lin7_D,
Busy => Mv_Lin7_Bsy,
Active => Mv_Lin7_Act,
CommandAborted => Mv_Lin7_Ca,
Error => Mv_Lin7_Err,
ErrorID => Mv_Lin7_ErrID
);
MC_MoveLinearAbsolute
The MC_MoveLinearAbsolute instruction performs linear interpolation for a specified absolute position.
FB/
Instruction Name Graphic expression ST expression
FUN
MC_MoveLinearAbsolute Absolute FB MC_MoveLinearAbsolute_instance MC_MoveLinearAbsolute_
Linear instance (
Interpolation MC_MoveLinearAbsolute AxesGroup :=parameter,
AxesGroup AxesGroup
Execute :=parameter,
Execute Done
Position :=parameter,
Position Busy
Velocity :=parameter,
Velocity Active
Acceleration :=parameter,
Acceleration CommandAborted
Deceleration :=parameter,
Deceleration Error
Jerk :=parameter,
Jerk ErrorID CoordSystem :=parameter,
CoordSystem BufferMode :=parameter,
BufferMode TransitionMode :=parameter,
TransitionMode Done =>parameter,
Busy =>parameter,
Active =>parameter,
CommandAborted
=>parameter,
Error =>parameter,
ErrorID =>parameter
);
Variables
Input Variables
MC_MoveLinearAbsolute
4: _mcBlendingNext
1: Buffered
5: _mcBlendingHigh
2: Blending low
3: Blending previous
4: Blending next
5: Blending high
TransitionMode Transition _eMC_ 0: _mcTMNone 0*3 Specify the path of
Mode TRANSITION_ 10: _mcTMCornerSuperimposed motion.
MODE 0: Transition disabled
10: Superimpose corners 4
*1 Refer to Unit Conversion Settings in the NJ/NX-series CPU Unit Motion Control User's Manual (Cat. No. W507) or NY-
series Industrial Panel PC / Industrial Box PC Motion Control User’s Manual (Cat. No. W559) for information on command
Variables
units.
*2 Always set the target velocity. If the axes are moved without setting a target velocity, an error will occur.
*3 The default value for an enumeration variable is actually not the number, but the enumerator.
Output Variables
Name Meaning Data type Valid range Description
Done Done BOOL TRUE or TRUE when the instruction is completed.
FALSE
Busy Executing BOOL TRUE or TRUE when the instruction is acknowledged.
FALSE
Active Controlling BOOL TRUE or TRUE when the axes group is being controlled.
FALSE
CommandAborted Command BOOL TRUE or TRUE when the instruction is aborted.
Aborted FALSE
Error Error BOOL TRUE or TRUE while there is an error.
FALSE
ErrorID Error Code WORD * Contains the error code when an error occurs. A value
of 16#0000 indicates normal execution.
In-Out Variables
* Specify a user-defined Axes Group Variable that was created in the Axes Group Basic Settings of the Sysmac Studio
(default: MC_Group***) or a system-defined axes group variable name (_MC_GRP[*], _MC1_GRP[*], or _MC2_GRP[*]).
Function
• The MC_MoveLinearAbsolute instruction performs linear interpolation for 2 to 4 axes.
• The target position is specified as an absolute position.
Other specifications are the same as those for the MC_MoveLinear (Linear Interpolation) instruction.
For details, refer to Function on page 4-12.
MC_MoveLinearRelative
The MC_MoveLinearRelative instruction performs linear interpolation for a specified relative position.
FB/
Instruction Name Graphic expression ST expression
FUN
MC_MoveLinearRelative Relative FB MC_MoveLinearRelative_instance MC_MoveLinearRelative_
Linear instance (
MC_MoveLinearRelative
MC_MoveLinearRelative
Interpolation AxesGroup :=parameter,
AxesGroup AxesGroup
Execute :=parameter,
Execute Done
Distance :=parameter,
Distance Busy
Velocity :=parameter,
Velocity Active
Acceleration :=parameter,
Acceleration CommandAborted
Deceleration :=parameter,
Deceleration Error
Jerk :=parameter,
Jerk ErrorID CoordSystem :=parameter,
CoordSystem BufferMode :=parameter,
BufferMode TransitionMode
TransitionMode :=parameter,
Done =>parameter,
4
Busy =>parameter,
Active =>parameter,
Variables
CommandAborted
=>parameter,
Error =>parameter,
ErrorID =>parameter
);
Variables
Input Variables
*1 Refer to Unit Conversion Settings in the NJ/NX-series CPU Unit Motion Control User's Manual (Cat. No. W507) or NY-
series Industrial Panel PC / Industrial Box PC Motion Control User’s Manual (Cat. No. W559) for information on command
units.
*2 Always set the target velocity. If the axes are moved without setting a target velocity, an error will occur.
*3 The default value for an enumeration variable is actually not the number, but the enumerator.
Output Variables
Name Meaning Data type Valid range Description
Done Done BOOL TRUE or TRUE when the instruction is completed.
FALSE
Busy Executing BOOL TRUE or TRUE when the instruction is acknowledged.
FALSE
Active Controlling BOOL TRUE or TRUE when the axes group is being controlled.
FALSE
CommandAborted Command BOOL TRUE or TRUE when the instruction is aborted.
Aborted FALSE
Error Error BOOL TRUE or TRUE while there is an error.
FALSE
ErrorID Error Code WORD * Contains the error code when an error occurs. A value
of 16#0000 indicates normal execution.
MC_MoveLinearRelative
• When Error changes to TRUE.
• When CommandAborted changes to TRUE.
CommandAborted • When this instruction is aborted because • When Execute is TRUE and changes to
another motion control instruction was exe- FALSE.
cuted with the Buffer Mode set to Aborting. • After one period when Execute is FALSE.
• When this instruction is canceled due to an
error.
• When this instruction is executed while there
is an error.
• When you start this instruction during 4
MC_GroupStop instruction execution.
Error When there is an error in the execution condi- When the error is cleared.
Function
tions or input parameters for the instruction.
In-Out Variables
* Specify a user-defined Axes Group Variable that was created in the Axes Group Basic Settings of the Sysmac Studio
(default: MC_Group***) or a system-defined axes group variable name (_MC_GRP[*], _MC1_GRP[*], or _MC2_GRP[*]).
Function
• The MC_MoveLinearRelative instruction performs linear interpolation for 2 to 4 axes.
• The target position is specified as a relative position.
Other specifications are the same as those for the MC_MoveLinear (Linear Interpolation) instruction.
For details, refer to Function on page 4-12.
MC_MoveCircular2D
The MC_MoveCircular2D instruction performs circular interpolation for two axes.
FB/
Instruction Name Graphic expression ST expression
FUN
MC_MoveCircular2D Circular 2D FB MC_MoveCircular2D_instance MC_MoveCircular2D_instance (
Interpolation AxesGroup :=parameter,
MC_MoveCircular2D Execute :=parameter,
AxesGroup AxesGroup
CircAxes :=parameter,
Execute Done
CircMode :=parameter,
CircAxes Busy
AuxPoint :=parameter,
CircMode Active
EndPoint :=parameter,
AuxPoint CommandAborted
PathChoice :=parameter,
EndPoint Error Velocity :=parameter,
PathChoice ErrorID Acceleration :=parameter,
Velocity Deceleration :=parameter,
Acceleration Jerk :=parameter,
Deceleration CoordSystem :=parameter,
Jerk BufferMode :=parameter,
CoordSystem TransitionMode :=parameter,
BufferMode MoveMode :=parameter,
TransitionMode Done =>parameter,
MoveMode Busy =>parameter,
Active =>parameter,
CommandAborted
=>parameter,
Error =>parameter,
ErrorID =>parameter
);
Variables
Input Variables
MC_MoveCircular2D
1: CCW
Velocity*3 Target LREAL Positive number 0 Specify the target
Velocity velocity. The unit is
command units/s.*2
Acceleration Acceleration LREAL Non-negative number 0 Specify the accelera-
Rate tion rate. The unit is
command units/s2.*2
Deceleration Decelera- LREAL Non-negative number 0 Specify the decelera- 4
tion Rate tion rate. The unit is
command units/s2.*2
Variables
Jerk Jerk LREAL Non-negative number 0 Specify the jerk. The
unit is command
units/s3.*2
CoordSystem Coordinate _eMC_ 0: _mcACS 0*1 Specify the coordi-
System COORD_ nate system.
SYSTEM 0: Axis coordinate
system (ACS)
BufferMode Buffer Mode _eMC_ 0: _mcAborting 0*1 Specify the behavior
Selection BUFFER_ 1: _mcBuffered when executing more
MODE than one motion
2: _mcBlendingLow
instruction.
3: _mcBlendingPrevious
0: Aborting
4: _mcBlendingNext
1: Buffered
5: _mcBlendingHigh
2: Blending low
3: Blending previous
4: Blending next
5: Blending high
TransitionMode Transition _eMC_ 0: _mcTMNone 0*1 Specify the path of
Mode TRANSITION_- 10: _mcTMCornerSuperimposed motion.
MODE 0: Transition disabled
10: Superimpose cor-
ners
MoveMode Travel Mode _eMC_MOVE_- 0: _mcAbsolute 0*1 0: Absolute position-
MODE 1: _mcRelative ing
1: Relative positioning
*1 The default value for an enumeration variable is actually not the number, but the enumerator.
*2 Refer to Unit Conversion Settings in the NJ/NX-series CPU Unit Motion Control User's Manual (Cat. No. W507) or NY-
series Industrial Panel PC / Industrial Box PC Motion Control User’s Manual (Cat. No. W559) for information on command
units.
*3 Always set the target velocity. If the axes are moved without setting a target velocity, an error will occur.
Output Variables
Name Meaning Data type Valid range Description
Done Done BOOL TRUE or TRUE when the instruction is completed.
FALSE
Busy Executing BOOL TRUE or TRUE when the instruction is acknowledged.
FALSE
Active Controlling BOOL TRUE or TRUE when the axes group is being controlled.
FALSE
CommandAborted Command BOOL TRUE or TRUE when the instruction is aborted.
Aborted FALSE
Error Error BOOL TRUE or TRUE while there is an error.
FALSE
ErrorID Error Code WORD * Contains the error code when an error occurs. A value
of 16#0000 indicates normal execution.
In-Out Variables
* Specify a user-defined Axes Group Variable that was created in the Axes Group Basic Settings of the Sysmac Studio
(default: MC_Group***) or a system-defined axes group variable name (_MC_GRP[*], _MC1_GRP[*], or _MC2_GRP[*]).
Function
• The MC_MoveCircular2D instruction performs 2D circular interpolation for two axes.
MC_MoveCircular2D
Instruction Details
This section describes the instruction in detail.
Function
• Determine the axes group to perform interpolation.
An axes group is represented by _MC_GRP[*], _MC1_GRP[*], or _MC2_GRP[*].
• Specify the axis composition with the Composition of the Axes Group Variables.
• Specify the combination of axes to perform interpolation with the Axis Selection of the Axes
Group Variables.
• Use logical axes (axis A0 to A3) for the axes, and not axis numbers.
• Specify axis numbers for the logical axes A0 to A3 in order from the lowest number with Axis
Selection.
• The Axis number is specified as follows according to the model or series.
Example: The following specifications are used to specify axis numbers 0 and 1 for axes A0 and
A1 with a 2-axis composition.
Logical axis Axis number Description
Axis A0 Axis 0 Specify axis numbers to the logical axes from axis A0
Axis A1 Axis 1 in order from the lowest number.
Additional Information
For the details of the axis numbers, refer to the NJ/NX-series CPU Unit Motion Control User’s
Manual (Cat. No. W507) or NY-series Industrial Panel PC / Industrial Box PC Motion Control
User’s Manual (Cat. No. W559).
CCW
CW
CW: Clockwise rotation
CCW: Counterclockwise rotation
X
Specify the axes to use as the X axis and Y axis with CircAxes (Circular Axes). Use logical axes
(axis A0 to A3) for the axes, and not axis numbers.
MoveMode Description
Absolute positioning The border point for a border point specification or the center point and end point for a
center point specification are specified as absolute positions from home in the axis
coordinate system.
Relative positioning The border point for a border point specification or the center point and end point for a
center point specification are specified as relative positions from the start point.
The difference between absolute positioning and relative positioning using a border point is
described below as an example.
Circular Interpolation Method: Border Point Specification Circular Interpolation Method: Border Point Specification
with Absolute Positioning with Relative Positioning
Y Y
MC_MoveCircular2D
AuxPoint(X, Y) AuxPoint(X, Y)
EndPoint(X, Y) EndPoint(X, Y)
Function
The following sections describe the operation assuming that absolute positioning has been specified
as the MoveMode (Travel Mode).
Border point
The current position is the starting point. Circular Y
interpolation is performed through the border point AuxPoint(X, Y)
AuxPoint(X,Y) to the end point EndPoint(X,Y).
EndPoint(X, Y)
Start point
If the start point, border point, and end point are along Y
the same line, if the border point and the end point are
at the same point, or if the start point and the border
EndPoint(X, Y)
point are the same point, linear interpolation is per-
formed from the start point to the end point.
AuxPoint(X, Y)
Start point
If the start point and the end point are the same point, Y
a complete circle is drawn with the start point and the AuxPoint(X, Y)
border point as the diameter. PathChoice is specified
as the circular interpolation direction.
Center
The current position is the starting point. Circular Y
interpolation is performed for circle specified by the
center point AuxPoint(X,Y) to the end point End-
Point(X,Y). PathChoice is used to specify the circular
interpolation direction. A complete circle is drawn AuxPoint(X, Y)
when the start point and end point are at the same
EndPoint(X, Y)
point. If the radius from the specified center to the
start point is different to the radius to the end point,
the average of the two radiuses is used to perform
circular interpolation. In this case, the center is calcu- Start point
lated in the same way as specifying the radius, and
the calculated radius and center are used. X
Radius
The current position is the starting point. Circular Y
interpolation is performed for the circle specified by Negative radius
the radius AuxPoint(X,Y) to the end point End-
Point(X,Y). The radius is specified by the first element
in AuxPoint(X,Y). The second element is not used.
For example, for a radius of 100, set AuxPoint(X,Y) to
EndPoint(X, Y)
AuxPoint(100,0). If the sign of the radius is negative,
a circle with a long arc will be drawn. If the sign is
positive, a circle with a short arc will be drawn. Path- Positive radius
Start point
Choice is used to specify the circular interpolation
direction.
MC_MoveCircular2D
X
Function
Set Velocity, Acceleration, Deceleration, and Jerk to specify the interpolation velocity, acceleration
rate, deceleration rate, and jerk for circular interpolation. If you set the interpolation velocity for circu-
lar interpolation to 0, a velocity specification error will occur and operation will stop for all axes in the
group. If the specified interpolation velocity exceeds the maximum velocity of an axis, the following
operation is executed.
If only one axis exceeds the maximum velocity:
This axis moves at the maximum velocity and the interpolation velocity is adjusted accordingly.
If both axes exceed the maximum velocity:
The interpolation velocity is automatically adjusted so that the axes move at the maximum velocity of
the two axes that is slower.
Jerk
The relationships between Acceleration (Acceleration Rate), Deceleration (Deceleration Rate), and
Velocity (Target Velocity) when Jerk is set to 0 and when it is set to any other value are shown below.
• Jerk Set to 0
The command value for the velocity is created with acceleration rate At and deceleration rate Dt.
Interpolation velocity
Vt
Time
Acceleration rate At
Time
Deceleration rate -Dt
Vt: Specified interpolation velocity, At: Specified acceleration rate, Dt: Specified deceleration rate.
Interpolation velocity
Vt
Time
Acceleration rate At
Time
Deceleration rate -Dt
Vt: Specified interpolation velocity, At: Specified acceleration rate, Dt: Specified deceleration rate.
Interpolation velocity
Vt
MC_MoveCircular2D
Time
Acceleration rate At
Time
Deceleration rate -Dt
4
Jt
Jerk
Function
Time
-Jt
Vt: Specified interpolation velocity, At: Specified acceleration rate, Dt: Specified deceleration rate,
Jt: Specified jerk
Interpolation velocity
Vt
Time
Acceleration rate At
Time
Deceleration rate -Dt
Jt
Jerk
Time
-Jt
Vt: Specified interpolation velocity, At: Specified acceleration rate, Dt: Specified deceleration rate,
Jt: Specified jerk
For details on BufferMode (Buffer Mode Selection), refer to the NJ/NX-series CPU Unit Motion Con-
trol User's Manual (Cat. No. W507) or NY-series Industrial Panel PC / Industrial Box PC Motion Con-
trol User’s Manual (Cat. No. W559).
TransitionMode
• TransitionMode specifies how to join the motions for this interpolation instruction and the previous
interpolation instruction.
• If BufferMode (Buffer Mode Selection) is set to Blending, TransitionMode is enabled.
• An error will occur if you do not set TransitionMode to _mcTMNone (Transition Disabled) when
blending is not used.
For details, refer to TransitionMode on page 4-19.
Done
Busy
MC_MoveCircular2D
Active
CommandAborted
Error
Interpolation velocity 4
Function
Time
Errors
If an error occurs during instruction execution, Error will change to TRUE and the axes will stop. You
can find out the cause of the error by referring to the value output by ErrorID (Error Code).
Execute
Done
Busy
Active
CommandAborted
Error
Error Codes
Refer to A-1 Error Codes for instruction errors.
Sample Programming
This section shows sample programming for circular interpolation with multi-execution of instructions.
Parameter Settings
The minimum settings required for this sample programming are given below.
Axis Types
Axis Axis Type
Axis 1 Servo axis
Axis 2 Servo axis
Count Modes
Axis Count Mode
Axis 1 Linear Mode
Axis 2 Linear Mode
Units of Display
Axis Unit of Display
Axis 1 mm
Axis 2 mm
Axis Composition
Two axes are set.
Axis Selection
Axis 1 and axis 2 are set.
Operation Example
The following is an example of operation where the axes automatically perform positioning by using lin-
ear interpolation and circular interpolation. The axes move to the final target position (20.00 mm, 20.00
mm) using linear interpolation and circular interpolation. The Buffer Mode is set to Buffered and multi-
execution of instructions is used. In this sample, multi-execution of instructions is performed for (2) to
(4) if the Active output variable from linear interpolation (1) is TRUE. For multi-axes coordinated opera-
tion, multi-execution is possible for up to seven instructions.
Operation Pattern
Axis 2 (mm)
(4)
20.00
15.00
(3)
MC_MoveCircular2D
10.00
(2)
5.00
(1)
Axis 1 (mm)
0 10.00 15.00 20.00 4
1 Execution
Sample Programming
When you turn ON the operation start switch at home, the axes move to the point (10.00 mm,
5.00 mm) via linear interpolation.
2 Continuous Motion
The axes continue to move to the point (15.00 mm, 10.00 mm) via circular interpolation, to the
point (15.00 mm, 15.00 mm) via linear interpolation, and to the point (20.00 mm, 20.00 mm) via
circular interpolation. Here, the velocity is 10.00 mm/s.
Ladder Diagram
Main Variables
Sample Programming
If StartPg is TRUE, check that the Servo Drives for each axis are ready.
MC_Axis001.DrvStatus.Ready Lock2
MC_MoveCircular2D
MC_Power
Lock1 MC_Axis000 Axis Axis Pwr1_Status
Enable Status
Busy Pwr1_Bsy
Error Pwr1_Err
ErrorID Pwr1_ErrID
PWR2
MC_Axis001 Axis
MC_Power
Axis Pwr2_Status
4
Lock2
Enable Status
Busy Pwr2_Bsy
Sample Programming
Error Pwr2_Err
ErrorID Pwr2_ErrID
If a minor fault level error occurs for the axis composition, the error handler for the device (FaultHandler) is executed.
Program the FaultHandler according to the device.
MC_Axis000.MFaultLvl.Active FaultHandler
EN FaultHandler
MC_Axis001.MFaultLvl.Active
MC_Group000.MFaultLvl.Active
If the Servo is ON for axis 1 and home is not defined, the Home instruction is executed.
HM1
MC_Home
Pwr1_Status MC_Axis000.Details.Homed MC_Axis000 Axis Axis Hm1_D
Execute Done
Busy Hm1_Bsy
CommandAborted Hm1_Ca
Error Hm1_Err
ErrorID Hm1_ErrID
If the Servo is ON for axis 2 and home is not defined, the Home instruction is executed.
HM2
MC_Home
Pwr2_Status MC_Axis001.Details.Homed MC_Axis001 Axis Axis Hm2_D
Execute Done
Busy Hm2_Bsy
CommandAborted Hm2_Ca
Error Hm2_Err
ErrorID Hm2_ErrID
After home is defined for axis 1 and axis 2, the axes group is enabled.
GRP_EN
MC_GroupEnable
Hm1_D Hm2_D MC_Group000 AxesGroup AxesGroup Grp_En_D
Execute Done
MC_Group000.Status.Disabled Busy Grp_En_Bsy
CommandAborted Grp_En_Ca
Error Grp_En_Err
ErrorID Grp_En_ErrID
The parameters are set for linear interpolation and circular interpolation.
InitFlag
Circular interpolation (2) is executed with multi-execution of instructions after linear interpolation (1) is started.
MV_CIRC1
MC_MoveCircular2D
Mv_Lin1_Act MC_Group000 AxesGroup AxesGroup Mv_Circ1_D
Execute Done
Mv_Circ1_CircAxes CircAxes Busy Mv_Circ1_Bsy
Mv_Circ1_CircMode CircMode Active Mv_Circ1_Act
Mv_Circ1_AuxPoint AuxPoint CommandAborted Mv_Circ1_Ca
Mv_Circ1_EndPoint EndPoint Error Mv_Circ1_Err
Mv_Circ1_Pc PathChoice ErrorID Mv_Circ1_ErrID
Mv_Circ1_Vel Velocity
Mv_Circ1_Acc Acceleration
Mv_Circ1_Dec Deceleration
Jerk
CoordSystem
Mv_Circ1_Bm BufferMode
TransitionMode
Mv_Circ1_Mm MoveMode
Linear interpolation (3) is executed with multi-execution of instructions after linear interpolation (1) is started.
MV_LIN2
MC_MoveLinear
Mv_Lin1_Act MC_Group000 AxesGroup AxesGroup Mv_Lin2_D
Execute Done
Mv_Lin2_Pos Position Busy Mv_Lin2_Bsy
Mv_Lin2_Vel Velocity Active Mv_Lin2_Act
Mv_Lin2_Acc Acceleration CommandAborted Mv_Lin2_Ca
Mv_Lin2_Dec Deceleration Error Mv_Lin2_Err
Jerk ErrorID Mv_Lin2_ErrID
CoordSystem
Mv_Lin2_Bm BufferMode
MC_MoveCircular2D
TransitionMode
Mv_Lin2_Mm MoveMode
Circular interpolation (4) is executed with multi-execution of instructions after linear interpolation (1) is started.
MV_CIRC2
MC_MoveCircular2D
Mv_Lin1_Act MC_Group000 AxesGroup AxesGroup Mv_Circ2_D
Execute Done
Mv_Circ2_CircAxes CircAxes Busy Mv_Circ2_Bsy 4
Mv_Circ2_CircMode CircMode Active Mv_Circ2_Act
Mv_Circ2_AuxPoint AuxPoint CommandAborted Mv_Circ2_Ca
Sample Programming
Mv_Circ2_EndPoint EndPoint Error Mv_Circ2_Err
Mv_Circ2_Pc PathChoice ErrorID Mv_Circ2_ErrID
Mv_Circ2_Vel Velocity
Mv_Circ2_Acc Acceleration
Mv_Circ2_Dec Deceleration
Jerk
CoordSystem
Mv_Circ2_Bm BufferMode
TransitionMode
Mv_Circ2_Mm MoveMode
Contents of Inline ST
// MV_CIRC1 parameters
Mv_Circ1_CircAxes[0] := UINT#0;
Mv_Circ1_CircAxes[1] := UINT#1;
Mv_Circ1_CircMode := _eMC_CIRC_MODE#_mcRadius;
Mv_Circ1_AuxPoint[0] := LREAL#5.0;
Mv_Circ1_AuxPoint[1] := LREAL#0.0;
Mv_Circ1_EndPoint[0] := LREAL#15.0;
Mv_Circ1_EndPoint[1] := LREAL#10.0;
Mv_Circ1_Pc := _eMC_CIRC_PATHCHOICE#_mcCCW;
Mv_Circ1_Vel := LREAL#100.0;
Mv_Circ1_Acc := LREAL#20.0;
Mv_Circ1_Dec := LREAL#20.0;
Mv_Circ1_Bm := _eMC_BUFFER_MODE#_mcBuffered;
Mv_Circ1_Mm := _eMC_MOVE_MODE#_mcAbsolute;
// MV_CIRC2 parameters
Mv_Circ2_CircAxes[0] := UINT#0;
Mv_Circ2_CircAxes[1] := UINT#1;
Mv_Circ2_CircMode := _eMC_CIRC_MODE#_mcCenter;
Mv_Circ2_AuxPoint[0] := LREAL#15.0;
Mv_Circ2_AuxPoint[1] := LREAL#20.0;
Mv_Circ2_EndPoint[0] := LREAL#20.0;
Mv_Circ2_EndPoint[1] := LREAL#20.0;
Mv_Circ2_Pc := _eMC_CIRC_PATHCHOICE#_mcCW;
Mv_Circ2_Vel := LREAL#100.0;
Mv_Circ2_Acc := LREAL#20.0;
Mv_Circ2_Dec := LREAL#20.0;
Mv_Circ2_Bm := _eMC_BUFFER_MODE#_mcBuffered;
Mv_Circ2_Mm := _eMC_MOVE_MODE#_mcAbsolute;
// MV_LIN1 parameters
Mv_Lin1_Pos[0] := LREAL#10.0;
Mv_Lin1_Pos[1] := LREAL#5.0;
Mv_Lin1_Vel := LREAL#100.0;
Mv_Lin1_Acc := LREAL#20.0;
Mv_Lin1_Dec := LREAL#20.0;
Mv_Lin1_Mm := _eMC_MOVE_MODE#_mcAbsolute;
// MV_LIN2 parameters
Mv_Lin2_Pos[0] := LREAL#15.0;
Mv_Lin2_Pos[1] := LREAL#15.0;
Mv_Lin2_Vel := LREAL#100.0;
Mv_Lin2_Acc := LREAL#20.0;
Mv_Lin2_Dec := LREAL#20.0;
Mv_Lin2_Bm := _eMC_BUFFER_MODE#_mcBuffered;
Mv_Lin2_Mm := _eMC_MOVE_MODE#_mcAbsolute;
MC_MoveCircular2D
Mv_Lin1_Ex BOOL FALSE The MV_LIN1 instance of MC_MoveLinear is
executed when this variable changes to TRUE.
Mv_Lin2_Ex BOOL FALSE The MV_LIN2 instance of MC_MoveLinear is
executed when this variable changes to TRUE.
Mv_Circ1_Ex BOOL FALSE The MV_CIRC1 instance of MC_MoveCircular
is executed when this variable changes to
TRUE.
Mv_Circ2_Ex BOOL FALSE The MV_CIRC2 instance of MC_MoveCircular
is executed when this variable changes to 4
TRUE.
Sample Programming
Sample Programming
// Processing when input parameters are not set
IF InitFlag=FALSE THEN
// MV_CIRC1 parameters
Mv_Circ1_CircAxes[0] := UINT#0;
Mv_Circ1_CircAxes[1] := UINT#1;
Mv_Circ1_CircMode := _eMC_CIRC_MODE#_mcRadius;
Mv_Circ1_AuxPoint[0] := LREAL#5.0;
Mv_Circ1_AuxPoint[1] := LREAL#0.0;
Mv_Circ1_EndPoint[0] := LREAL#15.0;
Mv_Circ1_EndPoint[1] := LREAL#10.0;
Mv_Circ1_Pc := _eMC_CIRC_PATHCHOICE#_mcCCW;
Mv_Circ1_Vel := LREAL#100.0;
Mv_Circ1_Acc := LREAL#20.0;
Mv_Circ1_Dec := LREAL#20.0;
Mv_Circ1_Bm := _eMC_BUFFER_MODE#_mcBuffered;
Mv_Circ1_Mm := _eMC_MOVE_MODE#_mcAbsolute;
// MV_CIRC2 parameters
Mv_Circ2_CircAxes[0] := UINT#0;
Mv_Circ2_CircAxes[1] := UINT#1;
Mv_Circ2_CircMode := _eMC_CIRC_MODE#_mcCenter;
Mv_Circ2_AuxPoint[0] := LREAL#15.0;
Mv_Circ2_AuxPoint[1] := LREAL#20.0;
Mv_Circ2_EndPoint[0] := LREAL#20.0;
Mv_Circ2_EndPoint[1] := LREAL#20.0;
Mv_Circ2_Pc := _eMC_CIRC_PATHCHOICE#_mcCW;
Mv_Circ2_Vel := LREAL#100.0;
Mv_Circ2_Acc := LREAL#20.0;
Mv_Circ2_Dec := LREAL#20.0;
Mv_Circ2_Bm := _eMC_BUFFER_MODE#_mcBuffered;
Mv_Circ2_Mm := _eMC_MOVE_MODE#_mcAbsolute;
// MV_LIN1 parameters
Mv_Lin1_Pos[0] := LREAL#10.0;
Mv_Lin1_Pos[1] := LREAL#5.0;
Mv_Lin1_Vel := LREAL#100.0;
Mv_Lin1_Acc := LREAL#20.0;
Mv_Lin1_Dec := LREAL#20.0;
Mv_Lin1_Mm := _eMC_MOVE_MODE#_mcAbsolute;
// MV_LIN2 parameters
Mv_Lin2_Pos[0] := LREAL#15.0;
Mv_Lin2_Pos[1] := LREAL#15.0;
Mv_Lin2_Vel := LREAL#100.0;
Mv_Lin2_Acc := LREAL#20.0;
Mv_Lin2_Dec := LREAL#20.0;
Mv_Lin2_Bm := _eMC_BUFFER_MODE#_mcBuffered;
Mv_Lin2_Mm := _eMC_MOVE_MODE#_mcAbsolute;
END_IF;
// If StartPg is TRUE and the Servo Drive is ready, the Servo for axis 1 is turned ON.
// If the Servo Drive is not ready, the Servo is turned OFF.
IF (StartPg=TRUE)
AND (MC_Axis000.DrvStatus.Ready=TRUE) THEN
Pwr1_En:=TRUE; // Turn ON the Servo for axis 1.
ELSE
Pwr1_En:=FALSE; // Turn OFF the Servo for axis 1.
END_IF;
// If StartPg is TRUE and the Servo Drive is ready, the Servo for axis 2 is turned ON.
// If the Servo Drive is not ready, the Servo is turned OFF.
IF (StartPg=TRUE)
AND (MC_Axis001.DrvStatus.Ready=TRUE) THEN
Pwr2_En:=TRUE; // Turn ON the Servo for axis 2.
ELSE
Pwr2_En:=FALSE; // Turn OFF the Servo for axis 2.
END_IF;
// If the Servo is ON for axis 1 and home is not defined, the Home instruction is executed.
IF (Pwr1_Status=TRUE) AND (MC_Axis000.Details.Homed=FALSE) THEN
Hm1_Ex:=TRUE;
END_IF;
// If the Servo is ON for axis 2 and home is not defined, the Home instruction is executed.
IF (Pwr2_Status=TRUE) AND (MC_Axis001.Details.Homed=FALSE) THEN
Hm2_Ex:=TRUE;
END_IF;
// If axes group 0 is disabled after homing is completed for axis 1 and axis 2, it is enabled.
IF (Hm1_D=TRUE) AND (Hm2_D=TRUE) AND (MC_Group000.Status.Disabled=TRUE) THEN
Grp_En_Ex:= TRUE;
END_IF;
// The rest of the instructions are executed with multi-execution of instructions when the Active output variable
for linear interpolation (1) changes to TRUE.
IF Mv_Lin1_Act=TRUE THEN
Mv_Circ1_Ex:=TRUE;
Mv_Lin2_Ex:=TRUE;
Mv_Circ2_Ex:=TRUE;
END_IF;
MC_MoveCircular2D
Error => Pwr1_Err,
ErrorID => Pwr1_ErrID
);
Sample Programming
);
// Linear interpolation 1
MV_LIN1(
AxesGroup := MC_Group000,
Execute := Mv_Lin1_Ex,
Position := Mv_Lin1_Pos,
Velocity := Mv_Lin1_Vel,
Acceleration := Mv_Lin1_Acc,
Deceleration := Mv_Lin1_Dec,
MoveMode := Mv_Lin1_Mm,
Done => Mv_Lin1_D,
Busy => Mv_Lin1_Bsy,
Active => Mv_Lin1_Act,
CommandAborted => Mv_Lin1_Ca,
Error => Mv_Lin1_Err,
ErrorID => Mv_Lin1_ErrID
);
BufferMode := Mv_Circ2_Bm,
MoveMode := Mv_Circ2_Mm,
Done => Mv_Circ2_D,
Busy => Mv_Circ2_Bsy,
Active => Mv_Circ2_Act,
CommandAborted => Mv_Circ2_Ca,
Error => Mv_Circ2_Err,
ErrorID => Mv_Circ2_ErrID
);
MC_MoveCircular2D
4
Sample Programming
MC_GroupStop
The MC_GroupStop instruction decelerates all of the axes in an interpolated motion to a stop.
FB/
Instruction Name Graphic expression ST expression
FUN
MC_GroupStop Group Stop FB MC_GroupStop_instance MC_GroupStop_instance (
AxesGroup :=parameter,
MC_GroupStop Execute :=parameter,
AxesGroup AxesGroup
Deceleration :=parameter,
Execute Done
Jerk :=parameter,
Deceleration Busy
BufferMode :=parameter,
Jerk Active
Done =>parameter,
BufferMode CommandAborted
Busy =>parameter,
Error
Active =>parameter,
ErrorID CommandAborted =>parameter,
Error =>parameter,
ErrorID =>parameter
);
Variables
Input Variables
*1 Refer to Unit Conversion Settings in the NJ/NX-series CPU Unit Motion Control User's Manual (Cat. No. W507) or NY-
series Industrial Panel PC / Industrial Box PC Motion Control User’s Manual (Cat. No. W559) for information on command
units.
*2 The default value for an enumeration variable is actually not the number, but the enumerator.
Output Variables
Name Meaning Data type Valid range Description
Done Done BOOL TRUE or FALSE TRUE when the instruction is completed.
Busy Executing BOOL TRUE or FALSE TRUE when the instruction is acknowledged.
Active Controlling BOOL TRUE or FALSE TRUE when the axes group is being controlled.
CommandAborted Command BOOL TRUE or FALSE TRUE when the instruction is aborted.
Aborted
Error Error BOOL TRUE or FALSE TRUE while there is an error.
ErrorID Error Code WORD * Contains the error code when an error occurs. A value
of 16#0000 indicates normal execution.
MC_GroupStop
* Refer to A-1 Error Codes.
Variables
• When CommandAborted changes to TRUE.
Active When the instruction is started. • When Done changes to TRUE.
• When Error changes to TRUE.
• When CommandAborted changes to TRUE.
CommandAborted • When this instruction is aborted because • When Execute is TRUE and changes to FALSE.
another motion control instruction was • After one period when Execute is FALSE.
executed with the Buffer Mode set to
Aborting.
• When this instruction is canceled due to
an error.
• When this instruction is executed while
there is an error.
Error When there is an error in the execution When the error is cleared.
conditions or input parameters for the
instruction.
In-Out Variables
* Specify a user-defined Axes Group Variable that was created in the Axes Group Basic Settings of the Sysmac Studio
(default: MC_Group***) or a system-defined axes group variable name (_MC_GRP[*], _MC1_GRP[*], or _MC2_GRP[*]).
Function
• This instruction stops all of the axes that are in motion for an axes group instruction (i.e., all of the
axes in the axes group that is specified with AxesGroup), and then disables the axes group instruc-
tion. The following instructions use Deceleration (Deceleration Rate) to decelerate the axis to a stop:
MC_MoveLinear (Linear Interpolation), MC_MoveLinearAbsolute (Absolute Linear Interpolation),
MC_MoveLinearRelative (Relative Linear Interpolation), and MC_MoveCircular2D (Circular 2D Inter-
polation). The MC_GroupSyncMoveAbsolute (Axes Group Cyclic Synchronous Absolute Positioning)
instruction uses an immediate stop to stop the axis. It is not affected by Deceleration.
• CommandAborted for the interpolation instruction that is currently in operation will change to TRUE
when this instruction is executed.
• If you execute this instruction while an interpolation instruction is in execution, the axes will deceler-
ate to a stop along the linear interpolation or circular interpolation path.
• The deceleration stop operation starts when Execute changes to TRUE.
Instruction Details
This section describes the instruction in detail.
Jerk
The relationships between the deceleration rate and interpolation velocity when Jerk is set to 0 and
when it is set to any other value are shown below.
• Jerk Set to 0
The command value for the velocity is created with deceleration rate Dt.
Interpolation velocity
Vt
Time
Time
Deceleration rate -Dt
Vt
Time
MC_GroupStop
Time
Deceleration rate -Dt
Jt
Jerk Time
-Jt
Vt: Velocity when deceleration starts, Dt: Specified deceleration rate, Jt: Specified jerk 4
Function
Additional Information
• If 0 is specified for the deceleration rate, an immediate stop is performed and the axis stops
immediately.
• An immediate stop occurs regardless of the setting of the Acceleration/Deceleration Over Limit
Selection axis parameter only when the deceleration rate is set to 0.
For details on BufferMode (Buffer Mode Selection), refer to the NJ/NX-series CPU Unit Motion Con-
trol User's Manual (Cat. No. W507) or NY-series Industrial Panel PC / Industrial Box PC Motion Con-
trol User’s Manual (Cat. No. W559).
In-position Check
An in-position check is not performed when stopping for this instruction.
Timing Charts
• Busy (Executing) changes to TRUE at the same time as Execute changes to TRUE. Active (Con-
trolling) changes to TRUE in the next period.
• Done changes to TRUE when a velocity of 0 is reached.
• If another instruction aborts this instruction, CommandAborted changes to TRUE and Busy (Execut-
ing) and Active (Controlling) change to FALSE.
The following chart shows decelerating to a stop for linear interpolation. CommandAborted for the inter-
polation instruction that is currently in operation will change to TRUE when this instruction is executed.
Previous Instruction: MC_MoveLinear
Execute
Done
Busy
Active
CommandAborted
Current Instruction
Execute
Done
Busy
Active
CommandAborted
Interpolation velocity
Previous operation
Time
Interpolation velocity
Execute
Vt
MC_GroupStop
Re-execute
Time 4
Deceleration rate Time
-Dt2
Function
-Dt1
Jt
Jerk Time
-Jt
Vt: Velocity when deceleration starts, Dt: Specified deceleration rate, Jt: Specified jerk
Errors
If an error occurs during instruction execution, Error will change to TRUE and the axes will stop. You
can find out the cause of the error by referring to the value output by ErrorID (Error Code).
Previous Instruction: MC_MoveLinear
Execute
Done
Busy
Active
MC_GroupStop
CommandAborted
Current Instruction
Execute
Done 4
Busy
Function
Active
Error
Interpolation velocity
Previous operation
Time
Version Information
Operation when an error is reset depends on the unit version of the CPU Unit as follows:
Note that you must reset errors only after the axis has stopped. Do not reset errors during axis
motion.
• A CPU Unit with unit version 1.10 or later:
If you clear the error for this instruction, the instruction will not start until Execute changes to
TRUE again.
Ver. 1.10 or Later
Execute
Done
Busy
Active
CommandAborted
Error reset.
Error
Execute
Done
Busy
Active
CommandAborted
Error
Error reset.
Error Codes
Refer to A-1 Error Codes for instruction errors.
MC_GroupImmediateStop
The MC_GroupImmediateStop instruction stops all axes in an interpolated motion.
If the specified axes group is enabled, all of the composition axes are stopped according to the stop
mode that is specified in Immediate Stop Input Stop Method Selection regardless of the current status
of the axes.
FB/
MC_GroupImmediateStop
Instruction Name Graphic expression ST expression
FUN
MC_GroupImmediateStop Axes Group FB MC_GroupImmediateStop_instance MC_GroupImmediateStop_
Immediate instance (
Stop MC_GroupImmediateStop AxesGroup :=parameter,
AxesGroup AxesGroup
Execute :=parameter,
Execute Done
Done =>parameter,
Busy
Busy =>parameter,
CommandAborted
CommandAborted
Error
=>parameter,
ErrorID Error =>parameter,
ErrorID =>parameter 4
);
Variables
Variables
Input Variables
Output Variables
Name Meaning Data type Valid range Description
Done Done BOOL TRUE or FALSE TRUE when the instruction is completed.
Busy Executing BOOL TRUE or FALSE TRUE when the instruction is acknowledged.
CommandAborted Command BOOL TRUE or FALSE TRUE when the instruction is aborted.
Aborted
Error Error BOOL TRUE or FALSE TRUE while there is an error.
ErrorID Error Code WORD * Contains the error code when an error occurs.
A value of 16#0000 indicates normal execution.
In-Out Variables
* Specify a user-defined Axes Group Variable that was created in the Axes Group Basic Settings of the Sysmac Studio
(default: MC_Group***) or a system-defined axes group variable name (_MC_GRP[*], _MC1_GRP[*], or _MC2_GRP[*]).
Function
• You can execute the MC_GroupImmediateStop instruction for an entire axes group that is in motion
for an axes group instruction (i.e., the axes in the axes group that is specified with AxesGroup) or for
an axes group that is stopping for the MC_GroupStop instruction or error.
• When this instruction is executed, the axis stops immediately according to the setting of the Immedi-
ate Stop Input Stop Method axis parameter. CommandAborted changes to TRUE for the instruction
that is currently in operation.
• When the instruction is executed, Status.ErrorStop (Error Deceleration Stopping) in the axis status
changes to TRUE and an Axes Group Immediate Stop Instruction Executed error (error code: 5486
hex) occurs when the instruction is executed.
For details on the Axes Group Immediate Stop Instruction Executed error (error code: 5486 hex),
refer to the NJ/NX-series CPU Unit Motion Control User’s Manual (Cat. No. W507) or NY-series
Industrial Panel PC / Industrial Box PC Motion Control User’s Manual (Cat. No. W559).
Timing Charts
• Busy (Executing) changes to TRUE when Execute changes to TRUE.
• Done changes to TRUE when processing of this instruction is completed.
MC_MoveLiner Instruction
Execute
Done
MC_GroupImmediateStop
Busy
Active
CommandAborted
Error
ErrorID 16#0000
4
MC_GroupImmediateStop Instruction
Function
Execute
Done
Busy
CommandAborted
Error
ErrorID 16#0000
Interpolation velocity
Time
Errors
If an error occurs during instruction execution, Error will change to TRUE and the axis will stop.
You can find out the cause of the error by referring to the value output by ErrorID (Error Code).
Error Codes
Refer to A-1 Error Codes for instruction errors.
MC_GroupSetOverride
The MC_GroupSetOverride instruction changes the combined target velocity during an interpolated
motion.
FB/
Instruction Name Graphic expression ST expression
FUN
MC_GroupSetOverride Set Group FB MC_GroupSetOverride_instance MC_GroupSetOverride_
Overrides instance (
MC_GroupSetOverride
MC_GroupSetOverride
AxesGroup :=parameter,
AxesGroup AxesGroup
Enable :=parameter,
Enable Enabled
VelFactor :=parameter,
VelFactor Busy
AccFactor :=parameter,
AccFactor Error
JerkFactor :=parameter,
JerkFactor ErrorID
Enabled =>parameter,
Busy =>parameter,
Error =>parameter,
ErrorID =>parameter
);
4
Variables
Variables
Input Variables
Output Variables
Name Meaning Data type Valid range Description
Enabled Enabled BOOL TRUE or TRUE when the axes group is being controlled.
FALSE
Busy Executing BOOL TRUE or TRUE when the instruction is acknowledged.
FALSE
Error Error BOOL TRUE or TRUE while there is an error.
FALSE
ErrorID Error Code WORD * Contains the error code when an error occurs. A value
of 16#0000 indicates normal execution.
In-Out Variables
* Specify a user-defined Axes Group Variable that was created in the Axes Group Basic Settings of the Sysmac Studio
(default: MC_Group***) or a system-defined axes group variable name (_MC_GRP[*], _MC1_GRP[*], or _MC2_GRP[*]).
Function
• This instruction changes the override factors related to the interpolation target velocity for the group
controlled by the next instruction. Changes the target velocity of the axes in operation by changing
the override.
The override factors apply to the following instructions.
MC_MoveLinear (Linear Interpolation) instruc- MC_MoveLinearRelative (Relative Linear Interpolation)
tion instruction
MC_MoveLinearAbsolute (Absolute Linear MC_MoveCircular2D (Circular 2D Interpolation) instruction
Interpolation) instruction
• If an axes group error occurs during MC_GroupSetOverride execution, the value of Enabled for
MC_GroupSetOverride is maintained.
Additional Information
MC_GroupSetOverride
Influence on Other Instructions
Use this instruction to temporarily change the target velocities of other instructions. This instruc-
tion does nothing for instructions to which a target velocity is not input. However, Enabled
remains TRUE even if the MC_GroupSetOverride instruction is executed for an instruction to
which it does not apply.
Timing Charts 4
Function
Instruction
Previous Instruction: MC_MoveLinear
Execute
Done
Busy
Active
CommandAborted
Current Instruction
Enable
Enabled
Busy
Time
Errors
If an error occurs during instruction execution, Error will change to TRUE. If an axes group minor fault
occurs, the axes group will stop. You can find out the cause of the error by referring to the value output
by ErrorID (Error Code).
Enable
VelFactor 200
Enabled
Busy
Error
Time
Error Codes
Refer to A-1 Error Codes for instruction errors.
MC_GroupReadPosition
The MC_GroupReadPosition instruction gets the command current positions and the actual current
positions of an axes group.
Instruction Name FB/FUN Graphic expression ST expression
MC_GroupRead Read Axes FB MC_GroupReadPosition_instance MC_GroupReadPosition_instance (
Position Group AxesGroup :=parameter,
MC_GroupReadPosition
MC_GroupReadPosition
Position Enable :=parameter,
AxesGroup AxesGroup
CoordSystem :=parameter,
Enable Valid
Valid =>parameter,
CoordSystem Busy
Busy =>parameter,
Error
Error =>parameter,
ErrorID
ErrorID =>parameter,
CommandPosition
CommandPosition =>parameter,
ActualPosition ActualPosition =>parameter,
);
4
Version Information
A CPU Unit with unit version 1.01 or later and Sysmac Studio version 1.02 or higher are required
Variables
to use this instruction.
Variables
Input Variables
* The default value for an enumeration variable is actually not the number, but the enumerator.
Output Variables
Name Meaning Data type Valid range Description
Valid Enabled BOOL TRUE or TRUE when the axis group is being controlled.
FALSE
Busy Executing BOOL TRUE or TRUE when the instruction is acknowledged.
FALSE
Error Error BOOL TRUE or TRUE while there is an error.
FALSE
ErrorID Error Code WORD *1 Contains the error code when an error occurs. A value
of 16#0000 indicates normal execution.
CommandPosition Command ARRAY Negative Contains the current value of the command position.
Current Posi- [0..3]OF number,
The unit is command units.*2
tion LREAL positive
number, or 0
ActualPosition Actual Current ARRAY Negative Contains the actual current position.
Position [0..3]OF number,
The unit is command units.*1
LREAL positive
number, or 0
Note 1 When the axis composition of the axes group contains two or three axes, the values in CommandPosition (Command
Current Position) and ActualPosition (Actual Current Position) for the composition axes that are not used are not
defined.
2 When Enable changes to FALSE, the values in CommandPosition (Command Current Position) and ActualPosition
(Actual Current Position) are not defined.
In-Out Variables
* Specify a user-defined Axes Group Variable that was created in the Axes Group Basic Settings of the Sysmac Studio
(default: MC_Group***) or a system-defined axes group variable name (_MC_GRP[*], _MC1_GRP[*], or _MC2_GRP[*]).
Function
• While Valid (Enabled) is TRUE, the MC_GroupReadPosition instruction gets the command current
positions and the actual current positions of the composition axes in the axes group each control
period.
• The following table lists the position types that can be used for each axis type.
Types of positions
Axis type
Command current position Actual current position
Servo axis Applicable Applicable
MC_GroupReadPosition
Virtual servo axis Applicable Applicable*
Encoder axis Not applicable Applicable
Virtual encoder axis Not applicable Applicable
* For a virtual servo axis, the actual position is the same as the command position. However, there is sometimes
calculation error because processing is performed with long reals in the MC Function Module.
• You can execute this instruction even if home is not defined.
• You can execute this instruction regardless of whether the axes group is enabled or disabled.
4
Precautions for Correct Use
Function
Before you use this instruction in a task to which the axes group is not assigned, declare Axis
Variables as external variables for the configuration axes that are specified in Axes (Axes Group
Composition Axes) in the task.
Timing Charts
• When Enable changes to TRUE, Busy (Executing) and Valid (Enabled) change to TRUE.
When Enable changes to FALSE, Busy (Executing) and Valid (Enabled) change to FALSE.
MC_GroupReadPosition
Enable
Valid
Busy
Error
Error ID 16#0000
Errors
If an error occurs during instruction execution, Error will change to TRUE.
You can find out the cause of the error by referring to the value output by ErrorID (Error Code).
MC_GroupReadPosition
Enable
Valid
Busy
Error
Error Codes
Refer to A-1 Error Codes for instruction errors.
MC_ChangeAxesInGroup
The MC_ChangeAxesInGroup instruction temporarily changes the Composition Axes axes group
parameter.
Instruction Name FB/FUN Graphic expression ST expression
MC_Change Change FB MC_ChangeAxesInGroup_instance MC_ChangeAxesInGroup_instance (
AxesInGroup Axes in AxesGroup :=parameter,
MC_ChangeAxesInGroup
Group MC_ChangeAxesInGroup Axes :=parameter,
AxesGroup AxesGroup
Execute :=parameter,
Axes Axes
Done =>parameter,
Execute Done
Busy =>parameter,
Busy
CommandAborted =>parameter,
CommandAborted
Error =>parameter,
Error
ErrorID =>parameter,
ErrorID );
Variables
when settings are downloaded, or when the MC Function Module is restarted. They return to the
values that were set from the Sysmac Studio. Use the Sysmac Studio and transfer the parame-
ters to save them to non-volatile memory.
Additional Information
Use the Synchronize Menu of the Sysmac Studio to download the project.
Version Information
A CPU Unit with unit version 1.01 or later and Sysmac Studio version 1.02 or higher are required
to use this instruction.
Variables
Input Variables
Output Variables
Name Meaning Data type Valid range Description
Done Done BOOL TRUE or TRUE when instruction execution is completed.
FALSE
Busy Executing BOOL TRUE or TRUE when the instruction is acknowledged.
FALSE
CommandAborted Instruction BOOL TRUE or TRUE when the instruction is aborted.
Aborted FALSE
Error Error BOOL TRUE or TRUE while there is an error.
FALSE
ErrorID Error Code WORD * Contains the error code when an error occurs.
A value of 16#0000 indicates normal execution.
In-Out Variables
*1 Specify a user-defined Axes Group Variable that was created in the Axes Group Basic Settings of the Sysmac Studio
(default: MC_Group***) or a system-defined axes group variable name (_MC_GRP[*], _MC1_GRP[*], or _MC2_GRP[*]).
*2 Set only servo axes or virtual servo axes as the composition axes. Specify the same number of composition axes as the
number before the composition axes are changed.
Function
• When Execute changes to TRUE, the MC_ChangeAxesInGroup instruction writes the composition
axes that are specified in Axes (Axes Group Composition Axes) to the Axes Group parameter for the
axes group that is specified in AxesGroup (Axes Group).
• When execution of the instruction is completed, Axis[ ] in the Kinematics (Kinematics Transformation
Settings) axes group variable will indicate the specified composition axes.
• You cannot use this instruction to change the axis composition (i.e., the number of axes). For exam-
ple, if you execute this instruction for an axes group with an axis composition of three axes, the axis
MC_ChangeAxesInGroup
composition will still contain three axes.
• The operation for changing the axes numbers of the composition axes from 0, 1, 2, and 3 to 7, 6, 5,
and 4 is illustrated below.
Execute
Axes[0] UINT#7
Axes[1] UINT#6
Axes[2] UINT#5
Axes[3] UINT#4
4
Done
Function
Kinematics.Axes[0] UINT#0 UINT#7
Kinematics.Axes[1] UINT#1 UINT#6
Kinematics.Axes[2] UINT#2 UINT#5
Kinematics.Axes[3] UINT#3 UINT#4
• You can execute this instruction regardless of whether home is defined.
• You can execute this instruction only when the axes group is disabled.
Timing Charts
• When Execute changes to TRUE, Busy (Executing) changes to TRUE.
• Done changes to TRUE when changing the composition axes is completed.
MC_ChangeAxesInGroup Instruction
Execute
Done
Busy
CommandAborted
Error
ErrorID 16#0000
Errors
If an error occurs during instruction execution, Error will change to TRUE.
The parameter is not changed, i.e., the previous values are retained.
You can find out the cause of the error by referring to the value output by ErrorID (Error Code).
Done
Busy
CommandAborted
Error
Error Codes
Refer to A-1 Error Codes for instruction errors.
MC_GroupSyncMoveAbsolute
The MC_GroupSyncMoveAbsolute instruction cyclically outputs the specified target positions for the
axes.
Instruction Name FB/FUN Graphic expression ST expression
MC_GroupSyncMoveAbsolute
MC_GroupSyn- Axes Group FB MC_GroupSyncMoveAbsolute_instance MC_GroupSyncMoveAbsolute
cMoveAbsolute Cyclic Syn- _instance (
chronous MC_GroupSyncMoveAbsolute AxesGroup :=parameter,
AxesGroup AxesGroup
Absolute Execute :=parameter,
Execute InPosition
Positioning Position :=parameter,
Position Busy
CoordSystem :=parameter,
CoordSystem Active
BufferMode :=parameter,
BufferMode CommandAborted
InPosition =>parameter,
Error
Busy =>parameter,
ErrorID Active =>parameter,
CommandAborted
=>parameter,
Error =>parameter,
ErrorID =>parameter,
4
);
Variables
Version Information
A CPU Unit with unit version 1.01 or later and Sysmac Studio version 1.02 or higher are required
to use this instruction.
Variables
Input Variables
*1 Refer to Unit Conversion Settings in the NJ/NX-series CPU Unit Motion Control User’s Manual (Cat. No. W507) or NY-
series Industrial Panel PC / Industrial Box PC Motion Control User’s Manual (Cat. No. W559) for information on command
units.
*2 The default value for an enumeration variable is actually not the number, but the enumerator.
Output Variables
Name Meaning Data type Valid range Description
InPosition In Position BOOL TRUE or TRUE when the actual current positions for all composi-
FALSE tion axes are within the in-position range of their target
positions.
Busy Executing BOOL TRUE or TRUE when the instruction is acknowledged.
FALSE
Active Controlling BOOL TRUE or TRUE when the axis is being controlled.
FALSE
CommandAborted Instruction BOOL TRUE or TRUE when the instruction is aborted.
Aborted FALSE
Error Error BOOL TRUE or TRUE while there is an error.
FALSE
ErrorID Error Code WORD * Contains the error code when an error occurs.
A value of 16#0000 indicates normal execution.
In-Out Variables
* Specify a user-defined Axes Group Variable that was created in the Axes Group Basic Settings of the Sysmac Studio
(default: MC_Group***) or a system-defined axes group variable name (_MC_GRP[*], _MC1_GRP[*], or _MC2_GRP[*]).
Function
• The MC_GroupSyncMoveAbsolute instruction outputs the target position from the user program
every task period to the Servo Drive or other device in Cyclic Synchronous Position (CSP) Control
Mode. The target positions are given as absolute positions.
• The upper limit of the velocity is the value that is set in the Maximum Velocity axis parameter. The
maximum acceleration and deceleration rates are not used.
• If this instruction is executed in the primary periodic task or priority-5 periodic task, the target position
MC_GroupSyncMoveAbsolute
that is specified in the input parameters is output to the Servo Drive in the next task period.
The following timing charts show an example of the operation for when this instruction is executed in
the primary periodic task. The same information applies when it is used in a priority-5 periodic task.
MC_GroupSyncMoveAbsolute Executed
in Primary Periodic Task
Position Command position Command Servo Drive
Target positions (black positions
dots) specified with the M
input parameters
E
4
Time
Primary period
Function
• If this instruction is executed in the priority-16 periodic task, the target positions that are specified in
the input parameters are output to the Servo Drive in the next periodic task.
MC_GroupSyncMoveAbsolute Executed
in Priority-16 Periodic Task
Position Command position Command Servo Drive
positions
Target positions (black
dots) specified with the M
input parameters
Task period
Instruction Details
This section describes the instruction in detail.
In-position Check
If Position (Target Position) is not changed, InPosition changes to TRUE when the difference between
the target position and the actual position is within the range that is set for the In-position Range axis
parameter.
Even if the target position is changed while InPosition is TRUE, it will remain TRUE for the remainder of
the period and change to FALSE the next period.
The setting of the In-position Check Time axis parameter is disabled.
Stop Processing
This section describes the methods that are used to stop axes group operations.
Use the MC_GroupStop instruction or the MC_GroupImmediateStop instruction to stop axes group
operation. If one of these instructions is executed, CommandAborted for this instruction will change
to TRUE.
Applicable Axes
• You can use this instruction for a servo axis.
To use this instruction, change Enable for the MC_Power instruction to TRUE (Servo ON).
• A virtual servo axis will acknowledge this instruction at any time.
Start Condition
• Set the Count Mode axis parameters to Linear Mode.
• Define home for all of the composition axes.
• Execute the MC_GroupEnable instruction to enable the axes group.
Override Factors
Overrides are disabled for this instruction.
Timing Charts
• Busy (Executing) changes to TRUE at the same time as Execute changes to TRUE. Active (Con-
trolling) changes to TRUE in the next period.
• InPosition changes to TRUE when the actual current positions for all composition axes are within the
in-position range from Positions (Target Positions).
• If another instruction aborts this instruction, CommandAborted changes to TRUE and Busy (Execut-
ing), Active (Controlling), and InPosition change to FALSE.
MC_GroupSyncMoveAbsolute
• The MC_GroupStop instruction is used to stop this instruction.
The following timing charts show operation for when this instruction is executed in the primary periodic
task.
MC_GroupSyncMoveAbsolute Instruction
Execute
Position 20 30 40 50 60 40
InPosition
4
Busy
Active
Function
CommandAborted
Error
ErrorID 16#0000
MC_GroupStop Instruction
Execute
Done
Busy
Active
Command position
60
50
40
30
20
0
Time
Additional Information
The MC Function Module sends a command to the Servo Drive to change the Control Mode as
shown in the above timing chart. The timing of implementing the change in the Servo Drive
depends on Servo Drive specifications.
Errors
If an error occurs during instruction execution, Error will change to TRUE and the axes will stop.
You can find out the cause of the error by referring to the value output by ErrorID (Error Code).
InPosition
Busy
Active
CommandAborted
Error
Error Codes
Refer to A-1 Error Codes for instruction errors.
MC_GroupReset
The MC_GroupReset instruction clears axes group errors and axis errors.
Instruction Name FB/FUN Graphic expression ST expression
MC_GroupReset Group Reset FB MC_GroupReset_instance MC_GroupReset_instance (
AxesGroup :=parameter,
MC_GroupReset Execute :=parameter,
AxesGroup AxesGroup
Done =>parameter,
Execute Done
Busy =>parameter,
Busy
Failure =>parameter,
MC_GroupReset
Failure
Error =>parameter,
Error
ErrorID =>parameter
ErrorID );
Variables
4
Input Variables
Variables
Name Meaning Data type Valid range Default Description
Execute Execute BOOL TRUE or FALSE FALSE The instruction is executed when
Execute changes to TRUE.
Output Variables
Name Meaning Data type Valid range Description
Done Done BOOL TRUE or TRUE when the instruction is completed.
FALSE
Busy Executing BOOL TRUE or TRUE when the instruction is acknowledged.
FALSE
Failure Failure End BOOL TRUE or TRUE when the instruction was not executed correctly.
FALSE
Error Error BOOL TRUE or TRUE while there is an error.
FALSE
ErrorID Error Code WORD * Contains the error code when an error occurs. A value
of 16#0000 indicates normal execution.
In-Out Variables
* Specify a user-defined Axes Group Variable that was created in the Axes Group Basic Settings of the Sysmac Studio
(default: MC_Group***) or a system-defined axes group variable name (_MC_GRP[*], _MC1_GRP[*], or _MC2_GRP[*]).
Function
• When Execute changes to TRUE, the error of the axes group specified by AxesGroup in the
GroupEnable state and axis errors of axes belonging to the axes group are cleared.
The following are reset: minor faults or observations that occur for axes or axes groups and drive
errors.
• Error clear processing is performed regardless of whether the Servo is ON or OFF for the axes.
• If there is a drive error for an axis, the drive error is cleared first. Error clear processing is then per-
formed.
• Reset processing for the drive error is continued until the drive error is cleared or continues for the
Drive Error Reset Monitoring Time in the axis parameters. The drive error reset process is executed
for all axes belonging to the axes group at the same time.
• Only errors that existed when Execute changed to TRUE are reset. Errors that occur while clearing
errors are not cleared.
• If this instruction is executed while the axes group is decelerating to a stop for an axes group error
and the instruction is not executed, Failure will change to TRUE. This is so that the error cannot be
reset before the axis stops. Failure will also change to TRUE if an axis error that results from an axis
common error cannot be cleared by this instruction.
MC_GroupReset
connected to the Pulse Output Unit is not reset. Refer to the NX-series Position Interface Units
User’s Manual (Cat. No. W524) for details.
Additional Information
• You can clear axis errors only when the axes group is enabled.
4
• The following errors cannot be cleared with this instruction.
All axis common errors
To clear axis common errors, execute the ResetMcError (Reset All Errors) instruction sepa-
Function
rately.
• If you execute this instruction on an axes group for which there is no error, the instruction is
completed normally and the current status is continued.
Timing Charts
Execute
Done
Busy
Failure
Busy
Active
Error
Execute
Done
Busy
Failure
Done
Busy
Failure
Error Codes
Refer to A-1 Error Codes for instruction errors.
MC_GroupReset
4
Function
MC_SetCamTableProperty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-2
MC_SaveCamTable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-8 5
MC_Write . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-12
MC_GenerateCamTable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-18
MC_WriteAxisParameter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-47
MC_ReadAxisParameter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-62
MC_SetCamTableProperty
The MC_SetCamTableProperty instruction changes the end point index of the cam table that is speci-
fied in an in-out parameter.
FB/
Instruction Name Graphic expression ST expression
FUN
MC_SetCamTableProperty Set Cam FB MC_SetCamTableProperty_instance MC_SetCamTableProperty_
Table Prop- instance (
MC_SetCamTableProperty
erties CamTable :=parameter,
CamTable CamTable
Execute :=parameter,
Execute Done
Done =>parameter,
EndPointIndex
EndPointIndex =>parameter,
MaxDataNumber
MaxDataNumber =>parameter,
Busy
Busy =>parameter,
CommandAborted
CommandAborted =>parameter,
Error
Error =>parameter,
ErrorID ErrorID =>parameter
);
Variables
Input Variables
Output Variables
Name Meaning Data type Valid range Description
Done Done BOOL TRUE or FALSE TRUE when the instruction is completed.
EndPointIndex End Point UINT Non-negative Contains the cam table end point index.
Index number
MaxDataNumber Maximum UINT Positive number Contains the maximum number of cam data.
Number of
Cam Data
Busy Executing BOOL TRUE or FALSE TRUE when the instruction is acknowledged.
CommandAborted Command BOOL TRUE or FALSE TRUE when the instruction is aborted.
Aborted
Error Error BOOL TRUE or FALSE TRUE while there is an error.
ErrorID Error Code WORD * Contains the error code when an error occurs. A
value of 16#0000 indicates normal execution.
MC_SetCamTableProperty
In-Out Variables
Name Meaning Data type Valid range Description
CamTable Cam Table ARRAY[0..N] OF --- Specify the cam data structure _sMC_CAM_REF
_sMC_CAM_REF array variable as the cam table.*
* N in the array variable is set automatically by the Sysmac Studio. Specify a cam data variable that was created on Cam Edi-
tor of the Sysmac Studio.
5
Function
Function
• The MC_SetCamTableProperty instruction changes the end point index of the cam table that is spec-
ified in an in-out parameter.
• The end point is the data located one cam data before the first cam data with a phase of 0 after the
start point in the cam table.
• The array number of the end point is output to EndPointIndex.
• Any data that is detected after the 0 phase is detected is treated as invalid cam data, and the
phase/displacement values are ignored.
• The maximum number of cam data is the value that was specified when the structure array is
declared with the Sysmac Studio.
• When the user program changes the cam data end point index, the end point must be updated. Use
this instruction to update the number of valid cam data.
For details on cam tables, refer to the NJ/NX-series CPU Unit Motion Control User's Manual (Cat. No.
W507) or NY-series Industrial Panel PC / Industrial Box PC Motion Control User’s Manual (Cat. No.
W559).
Instruction Details
For example, refer to the following cam table. The EndPointIndex is 999 and the MaxDataNumber
(Maximum Number of Cam Data) is 5,000.
The following tables show the relationship between overwriting of the cam data and the EndPointIndex.
If this instruction is executed with a cam table in which the phases for MyCam1[1000] on are 0, End-
PointIndex will be 999.
If this instruction is executed for a cam table after the phase for MyCam1[997] is changed to 0, End-
PointIndex will be 996.
MC_SetCamTableProperty
MyCam1 [997] 359.8 2 0 0
MyCam1 [998] 359.9 1 359.9 1
MyCam1 [999] 360.0 0 End point 360.0 0
MyCam1 [1000] 0 0 0 0
Invalid data
. . . . .
. . . . .
. . . . .
MyCam1 [4999] 0 0 0 0
5
Function
If this instruction is executed for a cam table after the phases for MyCam1[1000] to MyCam1[4997] are
changed anything other than 0, EndPointIndex will be 4997.
Cam data structure array Phase Displacement Phase Displacement
MyCam1 [0] 0 0 0 0
. . . . .
. . . . .
. . . . .
MyCam1 [998] 359.9 1 100.3 20.3
MyCam1 [999] 360.0 0 End point 100.4 20.4
MyCam1 [1000] 0 0 100.5 20.5
. . . . .
. . . . .
. . . . .
Invalid
MyCam1 [4996] 0 0 359.99 0.01
data
MyCam1 [4997] 0 0 360.00 0.0 End point
MyCam1 [4998] 0 0 0 0
Invalid data
MyCam1 [4999] 0 0 0 0
If this instruction is not executed even though the phases for MyCam1[1000] to MyCam1[4997] were
overwritten to values other than 0, cam operation will be executed between MyCam1[0] to MyC-
am1[999]. The cam table is overwritten, but the EndPointIndex does not change.
For information on the cam table data structure, refer to MC_CamIn on page 3-165.
Timing Charts
The following chart shows two ways to execute the instruction. A normal end is indicated for either
method.
The first time, Execute is changed to TRUE and then it is changed to FALSE before execution of the
instruction is completed.
The second time, the value of Execute is held.
Execute
Done
Busy
CommandAborted
Error
ErrorID 16#0000
MC_SetCamTableProperty
Errors
If an error occurs during instruction execution, Error will change to TRUE. You can find out the cause of
the error by referring to the value output by ErrorID (Error Code).
Execute
Done
Busy 5
CommandAborted
Function
Error
Error Codes
Refer to A-1 Error Codes for instruction errors.
MC_SaveCamTable
The MC_SaveCamTable instruction saves the cam table specified with the input parameter to non-vola-
tile memory.
FB/
Instruction Name Graphic expression ST expression
FUN
MC_SaveCamTable Save Cam FB MC_SaveCamTable_instance MC_SaveCamTable_instance (
Table CamTable :=parameter,
MC_SaveCamTable
Execute :=parameter,
CamTable CamTable
Done =>parameter,
Execute Done
Busy =>parameter,
Busy
CommandAborted =>parameter,
CommandAborted
Error =>parameter,
Error
ErrorID =>parameter
ErrorID
);
Variables
Input Variables
Output Variables
Name Meaning Data type Valid range Description
Done Done BOOL TRUE or FALSE TRUE when the instruction is completed.
Busy Executing BOOL TRUE or FALSE TRUE when the instruction is acknowledged.
CommandAborted Command BOOL TRUE or FALSE TRUE when the instruction is aborted.
Aborted
Error Error BOOL TRUE or FALSE TRUE while there is an error.
ErrorID Error Code WORD * Contains the error code when an error occurs. A
value of 16#0000 indicates normal execution.
In-Out Variables
Name Meaning Data type Valid range Description
CamTable Cam Table ARRAY[0..N] OF --- Specify the start of a cam data structure _sMC_-
_sMC_CAM_REF CAM_REF array variable as the cam table.*
* N in the array variable is set automatically by the Sysmac Studio. Specify a cam data variable that was created on Cam Edi-
tor of the Sysmac Studio.
Function
• The MC_SaveCamTable instruction saves the cam table specified with the in-out variable to non-vol-
atile memory.
• _MC_COM.Status.CamTableBusy (Cam Table File Save Busy) in the system-defined variables for
MC_SaveCamTable
motion control is TRUE while the cam table is saved.
For information on the cam table data, refer to MC_CamIn on page 3-165.
Function
cessed when changing the cam table from the user program.
• This instruction has a considerably longer processing time compared with other instructions.
The processing time is greatly affected by the processing load on the CPU Unit. If the next
instruction is executed taking the completion of this instruction as a trigger, take care with the
timing of execution of the next instruction.
• Do not turn OFF the Controller while this instruction is being processed. The data is not saved
correctly if the Controller is turned OFF. The cam data in non-volatile memory may become
corrupted.
• You cannot upload cam data, download cam data, start online operation, perform online edit-
ing, or start data traces during execution of this instruction. If this instruction is executed during
a cam data upload, cam data download, or online editing, a Cannot Execute Save Cam Table
Instruction error (error code 743C hex) occurs. Perform retry processing until the cam data is
saved normally. Use the Synchronize Menu of the Sysmac Studio to upload and download the
data.
• There is a limit to the number of times that you can write non-volatile memory. The life of the
non-volatile memory will expire faster if this instruction is executed frequently. Do not execute
it any more than is necessary.
• Cam data variables are global variables. You can therefore access or change the values of
cam data variables from more than one task. If you change the values of cam data variables
from more than one task, program the changes so that there is no competition in writing the
value from more than one task.
• If you use exclusive control of global variables between tasks for a cam data variable, do not
use the cam data variable for motion control instructions while exclusive control is in effect for
the cam data variable. An Incorrect Cam Table Specification error (error code: 5439 hex) will
occur.
• Do not execute this instruction while online edits are being saved.* Otherwise the online edits
may not be saved correctly.
* Online edits are saved from when you click the Yes Button in the confirmation dialog box until the Online
Editing Pane closes (for a CPU Unit with unit version 1.04 or later and Sysmac Studio version 1.05 or
higher, saving continues until the dialog box that indicates saving data to built-in non-volatile memory
closes).
Timing Charts
The following chart shows two ways to execute the instruction. A normal end is indicated for either
method.
The first time, Execute is changed to TRUE and then it is changed to FALSE before execution of the
instruction is completed.
The second time, the value of Execute is held.
Execute
Done
Busy
CommandAborted
Error
ErrorID 16#0000
Errors
If an error occurs during instruction execution, Error will change to TRUE. You can find out the cause of
the error by referring to the value output by ErrorID (Error Code).
Execute
Done
Busy
MC_SaveCamTable
CommandAborted
Error
Error Codes
Refer to A-1 Error Codes for instruction errors. 5
Function
MC_Write
The MC_Write instruction writes parts of the motion control parameters in the MC Function Module.
Additional Information
Use the Synchronize Menu of the Sysmac Studio to download the project.
Variables
Input Variables
MC_Write
8: _mcPosiSwLmt 3: Positive Torque Warning Value
Variables
10: In-position Check Time
11: In-position Range
12: Start Velocity
Output Variables
Name Meaning Data type Valid range Description
Done Done BOOL TRUE or FALSE TRUE when the instruction is completed.
Busy Executing BOOL TRUE or FALSE TRUE when the instruction is acknowledged.
CommandAborted Command BOOL TRUE or FALSE TRUE when the instruction is aborted.
Aborted
Error Error BOOL TRUE or FALSE TRUE while there is an error.
ErrorID Error Code WORD * Contains the error code when an error occurs. A
value of 16#0000 indicates normal execution.
MC_Write
• After one period when Execute is FALSE.
Busy When Execute changes to TRUE. • When Done changes to TRUE.
• When Error changes to TRUE.
• When CommandAborted changes to TRUE.
CommandAborted When another instruction causes an error and • When Execute is TRUE and changes to
5
aborts this instruction. FALSE.
• After one period when Execute is FALSE.
Variables
Error When there is an error in the execution condi- When the error is cleared.
tions or input parameters for the instruction.
In-Out Variables
Name Meaning Data type Valid range Description
Target Write Target _sAXIS_ --- Specify the axis or axes group for which to write a
REF parameter.*1
or
_sGROUP_
REF
SettingValue Setting Value Depends on --- Specify the value to write.
the data type The valid range follows the motion control parameter
of the speci- that is specified by ParameterNumber.
fied vari- Default: 0
able.*2
*1 Specify a user-defined Axis Variable that was created in the Axis Basic Settings of the Sysmac Studio or a user-defined
Axes Group Variable that was created in the Axes Group Basic Settings of the Sysmac Studio. (The default axis variable
names are MC_Axis***. The default axes group variable names are MC_Group***.) You can also specify the system-
defined variables for any of these:_MC_AX[*], _MC1_AX[*], _MC2_AX[*], _MC_GRP[*], _MC1_GRP[*], or
_MC2_GRP[*].
*2 For details on the data types of variables, refer to Parameter Data Types and Valid Ranges on page 5-14.
Function
• The MC_Write instruction writes the SettingValue to the system-defined variable for motion control
specified by Target (Write Target) and ParameterNumber when Execute changes to TRUE.
• The parameters that are specified with the input variables are used if motion starts when Sta-
tus.Standby in the Axes Group Variable or Status.Standstill in the Axis Variable is TRUE, and for
multi-execution of instructions when the Buffer Mode is set to Aborting.
Therefore these parameters are not applied when operation is continued after restarting or for multi-
execution of instructions with Buffer Mode set to any value other than Aborting.
Timing Charts
The following timing chart shows the operation for when 20 is written to _mcChkDec (Deceleration
Warning Value) in the axis parameter settings.
Execute
Done
Busy
CommandAborted
Error
ErrorID 16#0000
Value of _mcChkDec 1 20
Errors
If an error occurs during instruction execution, Error will change to TRUE and parameters are not writ-
ten. The value before the instruction was executed will be held. You can find out the cause of the error
by referring to the value output by ErrorID (Error Code).
Done
Busy
CommandAborted
Error
MC_Write
Error Codes
Refer to A-1 Error Codes for instruction errors.
Function
MC_GenerateCamTable
The MC_GenerateCamTable instruction creates a cam table for the cam properties and cam nodes specified in
the I/O parameters.
FB/
Instruction Name Graphic expression ST expression
FUN
MC_GenerateCam- Generate FB MC_GenerateCamTable_instance
MC_GenerateCamTable_instance
Table Cam Table (CamTable :=parameter,
MC_GenerateCamTable CamProperty :=parameter,
CamTable CamTable CamNodes :=parameter,
CamProperty CamProperty Execute :=parameter,
CamNodes CamNodes Done =>parameter,
Execute Done EndPointIndex =>parameter,
Busy =>parameter,
EndPointIndex
CommandAborted =>parameter,
Busy
Error =>parameter,
CommandAborted ErrorID =>parameter,
Error ErrorParameterCode =>parameter,
ErrorID ErrorNodePointIndex =>parameter);
ErrorParameterCode
ErrorNodePointIndex
Version Information
A CPU Unit with unit version 1.08 or later and Sysmac Studio version 1.09 or higher are required
to use this instruction.
Variables
Input Variables
Data Valid
Name Meaning Default Description
type range
Execute Execute BOOL TRUE or FALSE The instruction is executed when Execute
FALSE changes to TRUE.
Output Variables
Data
Name Meaning Valid range Description
type
Done Done BOOL TRUE or TRUE when the instruction is completed.
FALSE
EndPointIndex End Point UINT Non-negative Contains the cam table end point index after the instruc-
Index number tion is executed.
Busy Executing BOOL TRUE or TRUE when the instruction is acknowledged.
FALSE
CommandAborted Command BOOL TRUE or TRUE when the instruction is aborted.
Aborted FALSE
Error Error BOOL TRUE or TRUE while there is an error.
MC_GenerateCamTable
FALSE
ErrorID Error Code WORD * Contains the error code when an error occurs.
A value of 16#0000 indicates normal execution.
ErrorParameter- Parameter WORD * Contains the attached information for some error codes.
Code Detail Code If the information is saved, the detail code of the parame-
ter for which the error occurred is output.
ErrorNodePointIn- Node Point UINT * Contains the attached information for some error codes.
dex Element If the information is saved, the element number of the
Number node point for which the error occurred is output. 5
* Refer to A-1 Error Codes.
Variables
Output Variable Update Timing
Name Timing for changing to TRUE Timing for changing to FALSE
Done When creating cam table data is completed. • When Execute is TRUE and changes to
FALSE.
• After one period when Execute is FALSE.
Busy When Execute changes to TRUE. • When Done changes to TRUE.
• When Error changes to TRUE.
• When CommandAborted changes to TRUE.
CommandAborted When there is a reason to abort this instruction. • When Execute is TRUE and changes to
FALSE.
• After one period when Execute is FALSE.
Error When there is an error in the execution conditions When the error is cleared.
or input parameters for the instruction.
In-Out Variables
Valid
Name Meaning Data type Description
range
CamTable Cam Table ARRAY[0..N] OF --- Specify an array variable of _sMC_CAM_REF cam
_sMC_CAM_REF data structure as the cam table. *1
Specify a cam data variable that was created on
the Cam Editor of the Sysmac Studio.
CamProperty Cam Properties _sMC_CAM_PROP- --- Specify a variable of _sMC_CAM_PROPERTY
ERTY cam property structures.
Specify a user-defined variable with a data type of
_sMC_CAM_PROPERTY or a cam property vari-
able created on the Sysmac Studio.
CamNodes Cam Nodes ARRAY[0..N] OF --- Specify an array variable of _sMC_CAM_NODE
_sMC_CAM_NODE cam node structures.
Specify a user-defined variable with a data type of
_sMC_CAM_NODE or a cam node variable cre-
ated on the Sysmac Studio.*2
*1 N in the array variable is set automatically by the Sysmac Studio.
*2 If you use a user-defined variable, create an array variable with a starting element number of 0 and a maximum of 358
array elements N.
Function
• The MC_GenerateCamTable instruction calculates cam data based on CamProperty (Cam Proper-
ties) and CamNodes (Cam Nodes) that are specified for the in-out variables when Execute changes
to TRUE.
• The calculated cam data values are written to CamTable specified for the in-out variable.
• The items in CamProperty (Cam Properties) and CamNodes correspond to the items that are set with
the Cam Editor of the Sysmac Studio.
• When writing the cam table is completed, the end point index of the cam table is updated and the
number of the last cam element is output to EndPointIndex.
It is not necessary to execute the MC_SetCamTableProperty (Set Cam Table Properties) instruction
after completion of the MC_GenerateCamTable instruction.
• While the cam table creation process is in progress, _MC_COM.Status.GenerateCamBusy (Cam
MC_GenerateCamTable
Table Creation Busy) in the MC Common variable of the motion control system variables will be
TRUE.
Cam table before instruction execution Cam table after instruction execution
Element No. Phase Displacement The cam data is Element No. Phase Displacement
0 0.0 0.0 calculated and written 0 0.0 0.0
to the table when the
1 0.0 0.0 instruction is executed. 1 1.0 1.0
... ... ... ... ... ... 5
179 0.0 0.0 179 179.0 199.0
180 0.0 0.0 Cam end point 180 180.0 200.0
Function
181 0.0 0.0 181 0.0 0.0
... ... ... ... ... ...
MC_GenerateCamTable_instance
MC_GenerateCamTable
CamTable CamTable
Cam table properties CamProperty CamProperty
Cam nodes (Curve definitions) CamNodes CamNodes
Execute Done
EndPointIndex “180” is output after instruction execution.
Busy
CommandAborted
Error
ErrorID
ErrorParameterCode
ErrorNodePointIndex
Additional Information
• You can check the maximum number of cam data in the cam table with the data type of the
global variable on the Sysmac Studio or by executing the SizeOfAry (Get Number of Array Ele-
ments) instruction in the user program.
• You can calculate the number of cam data in the cam table that is created by this instruction
with the following formula.
n–1M –M
k k–1
T
cd
=
k=0
------------------------------- + 1
Pk
MC_GenerateCamTable
Tcd: Number of cam data in cam table
k: Element number in cam node array variable
Mk: Phase (Master Axis Phase) of element number k in cam node array
variable (However, Phase (Master Axis Phase) of M-1 is taken as 0.)
Pk: PhasePitch (Phase Pitch) of element number k in cam node array
variable
n: Number of node points
Function
• Do not use this instruction to create a cam table with more than 65,535 cam data.
• You can check the number of cam data in the created cam table with EndPointIndex. You can
use an HMI to display the value of EndPointIndex to improve the resolution of the cam table,
add node points, or make other adjustments.
• Refer to information on the MC_CamIn (Start Cam Operation) instruction for details on the
cam data in cam tables.
• Refer to information on the MC_SetCamTableProperty (Set Cam Table Properties) instruction
for information on the end point index.
• Refer to the NJ-Series Sysmac Studio Version 1 Operation Manual (Cat. No. W504-E1-10 or
higher) for information on the setting items for CamProperty (Cam Properties) and CamNodes.
• Refer to the Sysmac Studio Version 1 Operation Manual (Cat. No. W504-E1-10 or higher) for
information on the relationship between curve shapes, connecting velocities, and connecting
accelerations.
Instruction Details
This section describes the instruction in detail.
*1 Specify a value that has an absolute value of 0.001 or greater. The value is rounded to the forth decimal place.
Start node
CamNodes[0] Cam nodes
CamNodes[1]
This cam node structure is used for the CamNodes in-out variable that is specified for this instruction.
An element in the cam node array variable is called a node point. The number of elements in the array
variable must be equal to or greater than the number of node points that is set.
The node point that is the start point of the cam profile curve (phase = 0, displacement = 0) is called the
start node. Except for the start node, the node points in the array variable are in the order of the ele-
ment numbers.
If you specify a positive number that is 0.001 or higher for Phase (Master Axis Phase), the node is valid.
If you specify 0, that node and all following nodes are invalid. However, if you set Phase (Master Axis
Phase) for element number 0 to 0, an error occurs.
The following example shows five valid nodes and 10 elements in an array variable.
MC_GenerateCamTable
Phase Master Axis REAL Non-negative number*1*2 Set the phase of the master axis at the
Phase node point.
The unit is command units.
Distance Slave Axis REAL Negative number,*1*2 posi- Set the displacement of the slave axis at
Displace- tive number,*1*2 or 0 the node point.
ment The unit is command units.
Curve Curve Shape _eMC_- 0: _mcConstantLine Specify the shape of the cam curve to the
CAM_CUR node point.
VE
1: _mcStraightLine 5
2: _mcParabolic 0: Constant*3
3: _mcModifiedConstantVel 1: Straight line
Function
4: _mcModifiedTrapezoid 2: Parabolic
5: _mcModifiedSine 3: Modified constant velocity
6: _mcCycloidal 4: Modified trapezoid
7: _mcTrapecloid 5: Modified sine
8: _mcReverseTrapecloid 6: Cycloidal
9: _mcSimpleHarmonic 7: Trapecloid
10: _mcDoubleHarmonic 8: Reverse trapecloid
11: _mcReverseDouble 9: Simple harmonic
Harmonic 10: Double harmonic
12: _mcNC2Curve 11: Reverse double harmonic
13: _mcPolynomic3 12: NC2 curve
14: _mcPolynomic5 13: Polynomic 3
14: Polynomic 5
ConnectingVe- Connecting BOOL TRUE or FALSE Set to TRUE to enable the specified con-
lEnable Velocity necting velocity when the specified curve
Enable shape is polynomic 3 or polynomic 5.
Set to FALSE to disable the connecting
velocity.
ConnectingVel Connecting REAL Negative number,*1 positive If the specified curve shape is polynomic 3
Velocity number,*1 or 0 or polynomic 5, you can specify the veloc-
ity of the connecting section to the next
curve.
Use this setting for smooth connections
between curves.
The unit is command units/s.
*1 Specify a value that has an absolute value of 0.001 or greater. The value is rounded to the forth decimal place.
*2 Phase (Master Axis Phase) and Distance (Slave Axis Displacement) are effective to seven digits. If you enter more than
seven digits, the digits that are not effective are truncated. If a truncated value is the same as the value of another value
in Phase, a Cam Node Master Axis Phase Not in Ascending Order error (error code: 5740 hex) occurs. Enter values in
ascending order for seven digits or less.
*3 If you specify a straight line with constant displacement, Distance (Slave Axis Displacement) is disabled and the value
that is specified for the previous node point is used for processing. If the array element number is 0 and you specify a
straight line with constant displacement, Distance (Slave Axis Displacement) is treated as 0.
*4 Make the settings so that the total of all cam data that is created for each node point is 65,535 or less.
Example of Creating a Cam Table
This section provides an example of creating a cam table with this instruction.
There are four elements in the array variable that is specified for CamNodes. _mcStraightLine (Straight
Line) is specified for Curve (Curve Shape). ConnectingVel (Connecting Velocity) and ConnectingAcc
(Connecting Acceleration) are disabled, as are InitVel (Initial Velocity) and InitAcc (Initial Acceleration)
in CamProperty (Cam Properties), so they are not given here. The values of Phase (Master Axis
Phase) and Distance (Slave Axis Displacement) are given in the following table.
Distance (Slave
Element number in Cam- Phase (Master
Axis Displace- Curve (Curve Shape) PhasePitch
Nodes array variable Axis Phase)
ment)
0 180.000 180.000 _mcStraightLine 0.100
1 360.000 0.000 _mcStraightLine 0.100
2 0.00 --- --- ---
3 --- --- --- ---
This example uses a cam data variable with 4,000 elements that was created in advance with the Cam
Editor of the Sysmac Studio. All phases and displacements are set to “undefined.”
The cam data variable for the cam table is as shown in the following table before the instruction is exe-
cuted.
Distance (Displace-
Element No. Phase (Phase)
ment)
0 (Undefined) (Undefined)
1 (Undefined) (Undefined)
...
1799 (Undefined) (Undefined)
1800 (Undefined) (Undefined)
Distance (Displace-
Element No. Phase (Phase)
ment)
1801 (Undefined) (Undefined)
...
3599 (Undefined) (Undefined)
3600 (Undefined) (Undefined)
3601 (Undefined) (Undefined)
...
3999 (Undefined) (Undefined)
Next, we describe the sequence of changes that occur in the cam data variable as the instruction is
executed. The locations that changed are showed by filled backgrounds.
MC_GenerateCamTable
When the MC_GenerateCamTable instruction is executed, 0 is written to the phase and displacement
of element 0 of the cam data variable.
Distance (Displace-
Element No. Phase (Phase)
ment)
0 0.0 0.0
1 (Undefined) (Undefined)
5
...
1799 (Undefined) (Undefined)
Function
1800 (Undefined) (Undefined)
1801 (Undefined) (Undefined)
...
3599 (Undefined) (Undefined)
3600 (Undefined) (Undefined)
3601 (Undefined) (Undefined)
...
3999 (Undefined) (Undefined)
Next, the number of cam data and the phase and displacement for each cam data are calculated from
the start node to the node point according to the specified values for element 0 in CamNodes. The
number of cam data calculates as 1,800, so the phases and displacements of element 1 to 1,800 are
written to the cam data variable.
Distance (Displace-
Element No. Phase (Phase)
ment)
0 0.0 0.0
1 0.1 0.1
...
1799 179.9 179.9
1800 180.0 180.0
1801 (Undefined) (Undefined)
...
3599 (Undefined) (Undefined)
3600 (Undefined) (Undefined)
Distance (Displace-
Element No. Phase (Phase)
ment)
3601 (Undefined) (Undefined)
...
3999 (Undefined) (Undefined)
In the same way, the number of cam data and the phase and displacement for each cam data are cal-
culated between node points according to the specified values for element 1 in CamNodes. The num-
ber of cam data calculates as 1,800, so the phases and displacements of element 1801 to 3600 are
written to the cam data variable.
Distance (Displace-
Element No. Phase (Phase)
ment)
0 0.0 0.0
1 0.1 0.1
...
1799 179.9 179.9
1800 180.0 180.0
1801 180.1 179.9
...
3599 359.9 0.1
3600 360.0 0.0
3601 (Undefined) (Undefined)
...
3999 (Undefined) (Undefined)
Next, calculations are ended because element 2 in CamNodes has an invalid node. The cam data in
elements 3601 and higher in the cam data variable are invalid, so 0 is written as the phases.
Distance (Displace-
Element No. Phase (Phase)
ment)
0 0.0 0.0
1 0.1 0.1
...
1799 179.9 179.9
1800 180.0 180.0
1801 180.1 179.9
...
3599 359.9 0.1
3600 360.0 0.0
3601 0.0 (Undefined)
...
3999 (Undefined) (Undefined)
However, if there were only 3601 elements in the cam data variable that was created with the Cam Edi-
tor of the Sysmac Studio, no invalid cam data would exist, so 0 would not be written as the value of the
phase of element 3601.
Distance (Displace-
Element No. Phase (Phase)
ment)
0 0.0 0.0
1 0.1 0.1
...
1799 179.9 179.9
1800 180.0 180.0
1801 180.1 179.9
...
3599 359.9 0.1
3600 360.0 0.0
MC_GenerateCamTable
The number of the last element in the cam data variable that was written is output to the EndPointIndex
output variable of the instruction as the end point index. In this example, 3600 would be output. This
completes execution of the instruction.
Function
nomic 3 or polynomic 5. If this error occurs, refer to the following calculation methods for displacements
for polynomic 3 or polynomic 5 and correct the values in the CamProperty (Cam Properties) and Cam-
Nodes in-out variables.
When 0 ≤ n < N,
3 i
pitch
d ( n ) = d init + ( d final – d init ) ⋅ a i ⋅ ---------------------------------------- ⋅ n
(P
i=1 final – P init )
When n = N,
d ( n ) = d final
P final – P phase
N = --------------------------------------------
pitch
P final – P phase
N = floor -------------------------------------------- + 1
pitch
V init ⋅ T
a = ---------------------------------------
1 ( d final – d init )
T
a = 3 – (2 ⋅ V +V ) ⋅ ---------------------------------------
2 init fin ( d final – d init )
T
a = (V +V ) ⋅ --------------------------------------- – 2
3 init fin ( d final – d init )
( P final – P init )
T = CycleTime ⋅ ----------------------------------------
P max
When m ≥ 1 and Curve (Curve Shape) of element m-1 in CamNodes is a straight line (_mcStraight-
Line),
( d final of element m-1 – d init of element m-1 ) P max
V init = ---------------------------------------------------------------------------------------------------------------------------- ⋅ -------------------------------
( P final of element m-1 – P init of element m-1 ) CycleTime
When m ≥ 1 and Curve (Curve Shape) of element m-1 in CamNodes is polynomic 3 or polynomic 5,
• ConnectingVelEnable (Connecting Velocity Enable) of element m-1 in CamNodes is TRUE
Vinit = ConnectingVel (Connecting Velocity) of element m-1 in CamNodes
• ConnectingVelEnable (Connecting Velocity Enable) of element m-1 in CamNodes is FALSE
Vinit = 0
• Curve (Curve Shape) of element m+1 in CamNodes is not a straight line (_mcStraightLine)
Vfin = 0
MC_GenerateCamTable
d(n) is calculated as shown below when d(n) is Distance (Displacement) of the nth cam data from dinit.
When 0 ≤ n < N,
5 i
a i ⋅ ---------------------------------------- ⋅ n
pitch
d ( n ) = d init + ( d final – d init ) ⋅ ( P final – P init )
i=1
5
When n = N,
d ( n ) = d final
Function
However, when (Pfinal − Pphase) / pitch is an integer,
P final – P phase
N = --------------------------------------------
pitch
When (Pfinal − Pphase) / pitch is not an integer,
P final – P phase
N = floor -------------------------------------------- + 1
pitch
V init ⋅ T
a 1 = ---------------------------------------
( d final – d init )
2
A init ⋅ T
a 2 = -----------------------------------------------
2 ⋅ ( d final – d init )
2
T T
– ( 3A init – A fin ) ⋅ --------------------------------------
- + ( 8V + 12V
fin init ) ⋅ --------------------------------------- – 20
( d final – d init ) ( d final – d init )
a 3 = ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
2
2
T T
a 4 = ( 1.5A init – A fin ) ⋅ --------------------------------------- + ( 7V fin + 8V init ) ⋅ --------------------------------------- – 15
( d final – d init ) ( d final – d init )
2
T T
– ( A init – A fin ) ⋅ --------------------------------------- + ( 6V fin + 6V init ) ⋅ --------------------------------------- – 12
( d final – d init ) ( d – d )
final init
a 5 = -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
2
(P –P )
final init
T = CycleTime ⋅ ----------------------------------------
P max
When m ≥ 1 and Curve (Curve Shape) of element m-1 in CamNodes is not polynomic 5,
Ainit = 0
Refer to Displacement Calculation Method for Polynomic 3 on page 5-29 for information on Vinit (initial
velocity of cam profile curve [command units/s]) and Vfin (final velocity of cam curve [command
units/s]).
Timing Charts
Busy (Executing) changes to TRUE at the same time as Execute changes to TRUE. _MC_COM.Sta-
tus.GenerateCamBusy (Cam Table Creation Busy) changes to TRUE in the next period.
Execute
Done
Busy
CommandAborted
Error
MC_GenerateCamTable
ErrorID 16#0000
_MC_COM.Status.GenerateCamBusy
Function
Multi-execution of Motion Control Instructions
Execution during Execution of Other Instructions
Multi-execution of instructions cannot be used for this instruction if the cam table specified by Cam-
Table is used by another instruction, such as MC_CamIn, MC_SaveCamTable, or MC_SetCam-
TableProperty.
Errors
If an error occurs during instruction execution, Error will change to TRUE.
You can find out the cause of the error by referring to the value output by ErrorID (Error Code).
Depending on ErrorID (Error Code), attached information is output to ErrorParameterCode (Parameter
Detail Code) and ErrorNodePointIndex (Node Point Element Number).
Execute
Done
Busy
CommandAborted
Error
Even if an error occurs during execution of the instruction, the cam data variable that is specified for
CamTable retains the values from before execution of the instruction.
However, the values in the cam data variable are not retained in the following cases.
• When the parameter specified for CamNodes is changed after Execute changes to TRUE.
• The value of a cam data Distance (Displacement) calculated by this instruction exceeds the valid
range of REAL data.
If the values in the cam data variable are not retained, the cam table will be in an illegal state. An error
will occur if you specify a cam table that is an illegal state for the MC_CamIn, MC_SaveCamTable, or
MC_SetCamTableProperty instruction.
To recover a cam table from an illegal state, reset the error that occurred for the instruction and then
perform one of the following actions.
• Execute this instruction for the cam table that is in an illegal state again and complete creation of
the cam table.
• Downloaded the cam table from the Sysmac Studio.
• Cycle the power supply to the Controller.
An error code is not output to ErrorID (Error Code) if an error occurs for this instruction in PROGRAM
mode or during an MC Test Run. If that occurs, check the cause of the error in the event log or in the
_MC_COM.MFaultLvl.Code (MC Common Minor Fault Code) system-defined variables for motion con-
trol.
Error Codes
Refer to A-1 Error Codes for instruction errors.
Sample Programming
This sample programming writes data to a cam data variable in the cam table that was created on Cam
Editor of the Sysmac Studio.
Parameter Settings
The minimum settings required for this sample programming are given below.
Axis Parameters
Axis Type
MC_GenerateCamTable
Axis 1 Servo axis
Axis 2 Servo axis
Count Modes
Sample Programming
Ring Counter
Unit of Display
Cam Properties
The initial values of the cam property variable are given in the following table.
Cam Nodes
The initial values of the cam node variable are given in the following table.
Connectin-
Distance ConnectingVe- Connect- gAccEn-
Phase
Ele- (Slave lEnable (Con- ingVel able ConnectingAcc
(Master Curve (Curve
ment Axis Dis- necting (Connect- (Connect- (Connecting PhasePitch
Axis Shape)
No. place- Velocity ing Veloc- ing Accel- Acceleration)
Phase)
ment) Enable) ity) eration
Enable)
0 180.000 -100.000 _mcModifiedSine FALSE 0.000 FALSE 0.000 0.010
1 360.000 0.000 _mcPolynomic5 FALSE 0.000 FALSE 0.000 0.010
2 0.0 0.0 _mcConstantLine FALSE 0.000 FALSE 0.0 0.0
3 0.0 0.0 _mcConstantLine FALSE 0.000 FALSE 0.0 0.0
The sample programming changes the curve shape for element 0 and adds a node point to element 1.
Connectin-
Distance ConnectingVe- Connect- gAccEn-
Phase
Ele- (Slave lEnable (Con- ingVel able ConnectingAcc
(Master Curve (Curve
ment Axis Dis- necting (Connect- (Connect- (Connecting PhasePitch
Axis Shape)
No. place- Velocity ing Veloc- ing Accel- Acceleration)
Phase)
ment) Enable) ity) eration
Enable)
0 180.000 -100.000 _mcPolynomic5 FALSE 0.000 FALSE 0.000 0.010
1 200.000 -102.000 _mcStraightLine FALSE 0.000 FALSE 0.000 0.010
2 360.000 0.000 _mcPolynomic5 FALSE 0.000 FALSE 0.000 0.010
3 0.0 0.0 _mcConstantLine FALSE 0.000 FALSE 0.0 0.0
Ladder Diagram
Main Variables
Name Data type Default Comment
MC_Axis000 _sAXIS_REF --- Axis Variable for the master axis, axis
1.
MC_Axis001 _sAXIS_REF --- Axis Variable for the slave axis, axis
2.
CamProfile0 ARRAY[0..36000] OF --- This is the cam data variable.
_sMC_CAM_REF The cam data variable is created in
advance on the Cam Editor of the
Sysmac Studio.
MC_GenerateCamTable
Pwr1_Status BOOL --- This variable is assigned to the Status
output variable from the PWR1
instance of the MC_Power instruction.
This variable changes to TRUE when
the Servo is turned ON.
Pwr2_Status BOOL --- This variable is assigned to the Status
output variable from the PWR2
instance of the MC_Power instruction.
This variable changes to TRUE when
the Servo is turned ON.
5
StartPg BOOL --- The Servo is turned ON if this variable
is TRUE and EtherCAT process data
communications are established.
Sample Programming
WriteCamDefinition BOOL --- The values in the cam property vari-
able and cam node variable are writ-
ten when this variable is TRUE.
CamProperty0 _sMC_CAM_PROPERTY --- This is the cam property variable.
CamNode0 ARRAY[0..3] OF _sMC_- --- This is the cam node variable.
CAM_NODE
_MC_COM.Status.GenerateCamBusy BOOL --- This is a system-defined variable for
motion control. It is TRUE while the
cam table creation is in progress.
Timing Charts
WriteCamDefinition
WriteCamDefinitionDone
_MC_COM.Status.GenerateCamBusy
Gene_D
Gene_EPI 0 36000
Gene_Bsy
Gene_Ca
Gene_Err
CamIn_InCam
CamIn_Bsy
CamIn_Act
CamIn_Ca
CamIn_Err
Sample Programming
If StartPg is TRUE, check that the Servo Drives for each axis are ready.
StartPg MC_Axis000.DrvStatus.Ready Lock1
MC_Axis001.DrvStatus.Ready Lock2
If the Servo Drives are ready, the Servos are turned ON for each axis.
PWR1
MC_Power
Lock1 MC_Axis000 Axis Axis Pwr1_Status
Enable Status
Busy Pwr1_Bsy
MC_GenerateCamTable
Error Pwr1_Err
ErrorID Pwr1_ErrID
PWR2
MC_Power
Lock2 MC_Axis001 Axis Axis Pwr2_Status
Enable Status
Busy Pwr2_Bsy
Error Pwr2_Err
ErrorID Pwr2_ErrID 5
If a minor fault level error occurs in the MC Common Error Status variable or for any of the axes, the error handler
Sample Programming
for the device (FaultHandler) is executed. The FaultHandler is programmed according to the device.
MC_Axis000.MFaultLvl.Active FaultHandler
EN FaultHandler
MC_Axis001.MFaultLvl.Active
_MC_COM.MFaultLvl.Active
If the Servo is ON for the master axis (axis 1) and home is not defined, the Home instruction is executed to define home.
HM1
MC_Home
Pwr1_Status MC_Axis000.Details.Homed MC_Axis000 Axis Axis Hm1_D
Execute Done
Busy Hm1_Bsy
CommandAborted Hm1_Ca
Error Hm1_Err
ErrorID Hm1_ErrID
If the Servo is ON for the slave axis (axis 2) and home is not defined, the Home instruction is executed to define home.
HM2
MC_Home
Pwr2_Status MC_Axis001.Details.Homed MC_Axis001 Axis Axis Hm2_D
Execute Done
Busy Hm2_Bsy
CommandAborted Hm2_Ca
Error Hm2_Err
ErrorID Hm2_ErrID
After homing is completed for the master axis (axis 1), the MC_MoveVelocity (Velocity Control) instruction is executed.
VEL
MC_MoveVelocity
Hm1_D MC_Axis000 Axis Axis Vel_InVel
Execute InVelocity
LREAL#90.0 Velocity Busy Vel_Bsy
LREAL#90.0 Acceleration Active Vel_Act
LREAL#90.0 Deceleration CommandAborted Vel_Ca
LREAL#0.0 Jerk Error Vel_Err
_eMC_DIRECTION#_mcPositiveDirection Direction ErrorID Vel_ErrID
Continuous
BufferMode
If WriteCamDefinition is TRUE and the MC_GenerateCamTable (Generate Cam Table) instruction is not yet executed,
the cam properties and cam nodes are written. After the data is written, WriteCamDefinitionDone is changed to TRUE.
WriteCamDefinition
If cam table creation processing is completed and the master axis (axis 1) has reached the target velocity,
the MC_CamIn (Start Cam Operation) instruction is executed.
CAM_IN
MC_CamIn
MC_Axis000 Master Master
_MC_COM.Status.GenerateCamBusy MC_Axis001 Slave Slave
Gene_D Vel_InVel CamProfile0 CamTable CamTable CamIn_InCam
Execute InCam
_MC_COM BOOL#TRUE Periodic InSync Camin_InSync
_eMC_START_MODE#_mcRelativePosition StartMode EndOfProfile Camin_Eop
LREAL#0.0 StartPosition Index Camin_Index
LREAL#0.0 MasterStartDistance Busy Camin_Bsy
LREAL#1.0 MasterScaling Active Camin_Act
LREAL#1.0 SlaveScaling CommandAborted Camin_Ca
LREAL#0.0 MasterOffset Error Camin_Err
LREAL#0.0 SlaveOffset ErrorID Camin_ErrID
_eMC_REFERENCE_TYPE#_mcCommand ReferenceType
_eMC_DIRECTION#_mcNoDirection Direction
CamTransition
BufferMode
Contents of Inline ST
CamProperty0.CycleTime := REAL#0.800;
CamNode0[0].Curve := _eMC_CAM_CURVE#_mcPolynomic5;
CamNode0[0].ConnectingVelEnable := FALSE;
CamNode0[0].ConnectingVel := REAL#0.000;
CamNode0[0].ConnectingAccEnable := FALSE;
CamNode0[0].ConnectingAcc := REAL#0.000;
CamNode0[1].Phase := REAL#200.000;
CamNode0[1].Distance := REAL#-102.000;
CamNode0[1].Curve := _eMC_CAM_CURVE#_mcStraightLine;
CamNode0[1].ConnectingVelEnable := FALSE;
CamNode0[1].ConnectingVel := REAL#0.000;
CamNode0[1].ConnectingAccEnable := FALSE;
CamNode0[1].ConnectingAcc := REAL#0.000;
CamNode0[2].Phase := REAL#360.000;
MC_GenerateCamTable
CamNode0[2].Distance := REAL#0.000;
CamNode0[2].Curve := _eMC_CAM_CURVE#_mcPolynomic5;
CamNode0[2].ConnectingVelEnable := FALSE;
CamNode0[2].ConnectingVel := REAL#0.000;
CamNode0[2].ConnectingAccEnable := FALSE;
CamNode0[2].ConnectingAcc := REAL#0.000;
CamNode0[2].PhasePitch := REAL#0.010;
CamNode0[3].Phase := REAL#0.000;
WriteCamDefinitionDone := TRUE;
5
Sample Programming
Timing Charts
WriteCamDefinition
WriteCamDefinitionDone
_MC_COM.Status.GenerateCamBusy
Gene_Exe
MC_GenerateCamTable
Gene_D
Gene_EPI 0 36000
Gene_Bsy
Gene_Ca
Gene_Err
5
CamIn_Exe
Sample Programming
CamIn_InCam
CamIn_Bsy
CamIn_Act
CamIn_Ca
CamIn_Err
Sample Programming
// If StartPg is TRUE and the Servo Drive is ready, the Servo for axis 1 is turned ON.
// If the Servo Drive is not ready, the Servo is turned OFF.
IF (StartPg=TRUE)
AND (MC_Axis000.DrvStatus.Ready=TRUE) THEN
Pwr1_En:=TRUE;
ELSE
Pwr1_En:=FALSE;
END_IF;
// If StartPg is TRUE and the Servo Drive is ready, the Servo for axis 2 is turned ON.
// If the Servo Drive is not ready, the Servo is turned OFF.
IF (StartPg=TRUE)
AND (MC_Axis001.DrvStatus.Ready=TRUE) THEN
Pwr2_En:=TRUE;
ELSE
Pwr2_En:=FALSE;
END_IF;
// If a minor fault level error occurs in the MC Common Error Status variable or for any of the axes,
// If the Servo is ON for axis 1 and home is not defined, the Home instruction is executed.
IF (Pwr1_Status=TRUE) AND (MC_Axis000.Details.Homed=FALSE) THEN
Hm1_Ex:=TRUE;
END_IF;
// If the Servo is ON for axis 2 and home is not defined, the Home instruction is executed.
IF (Pwr2_Status=TRUE) AND (MC_Axis001.Details.Homed=FALSE) THEN
Hm2_Ex:=TRUE;
END_IF;
// If cam table creation processing is completed and the master axis (axis 1) has reached the
// MC_GenerateCamTable
GENE_CAM(
CamTable := CamProfile0,
CamProperty := CamProperty0,
CamNodes := CamNode0,
execute := Gene_Exe,
Done => Gene_D,
EndPointIndex => Gene_EPI,
MC_GenerateCamTable
Busy => Gene_Bsy,
CommandAborted => Gene_CA,
Error => Gene_Err,
ErrorID => Gene_ErrID,
ErrorParameterCode => Gene_ErrPC,
ErrorNodePointIndex => Gene_ErrNPI
);
Sample Programming
Error => Pwr1_Err,
ErrorID => Pwr1_ErrID
);
//MC_MoveVelocity
VEL(
Axis := MC_Axis000,
Execute := Vel_Ex,
Velocity := Vel_Vel,
Acceleration := Vel_Acc,
Deceleration := Vel_Dec,
Direction := Vel_Dir,
InVelocity => Vel_InVel,
Busy => Vel_Bsy,
Active => Vel_Act,
CommandAborted => Vel_Ca,
Error => Vel_Err,
ErrorID => Vel_ErrID
);
//MC_CamIn
CAM_IN(
Master := MC_Axis000,
Slave := MC_Axis001,
CamTable := CamProfile0,
Execute := Camin_Ex,
Periodic := Camin_P,
StartMode := Camin_Sm,
StartPosition := Camin_Sp,
MasterStartDistance := Camin_Msd,
MasterScaling := Camin_Ms,
SlaveScaling := Camin_Ss,
MasterOffset := Camin_Mo,
SlaveOffset := Camin_So,
ReferenceType := Camin_Rt,
Direction := Camin_Dir,
InCam => Camin_InCam,
InSync => Camin_InSync,
EndOfProfile => Camin_Eop,
Index => Camin_Index,
Busy => Camin_Bsy,
Active => Camin_Act,
CommandAborted => Camin_Ca,
Error => Camin_Err,
ErrorID => Camin_ErrID
);
MC_WriteAxisParameter
The MC_WriteAxisParameter instruction writes axis parameters in the MC Function Module.
FB/
Instruction Name Graphic expression ST expression
FUN
MC_WriteAxis- Write Axis FB MC_WriteAxisParameter_instance MC_WriteAxisParameter_instance
Parameter Parameters (Axis :=parameter,
MC_WriteAxisParameter AxisParameter :=parameter,
Axis Axis
Execute :=parameter,
AxisParameter AxisParameter
Done =>parameter,
MC_WriteAxisParameter
Execute Done
Busy =>parameter,
Busy CommandAborted =>parameter,
CommandAborted Error =>parameter,
Error ErrorID =>parameter,
ErrorID ErrorParameterCode =>parameter);
ErrorParameterCode
Version Information
A CPU Unit with unit version 1.08 or later and Sysmac Studio version 1.09 or higher are required
5
to use this instruction.
Variables
Variables
Input Variables
Data Valid
Name Meaning Default Description
type range
Execute Execute BOOL TRUE or FALSE The instruction is executed when Execute
FALSE changes to TRUE.
Output Variables
Data
Name Meaning Valid range Description
type
Done Done BOOL TRUE or TRUE when the instruction is completed.
FALSE
Busy Executing BOOL TRUE or TRUE when the instruction is acknowledged.
FALSE
CommandAborted Command BOOL TRUE or TRUE when the instruction is aborted.
Aborted FALSE
Data
Name Meaning Valid range Description
type
Error Error BOOL TRUE or TRUE while there is an error.
FALSE
ErrorID Error Code WORD * Contains the error code when an error occurs.
A value of 16#0000 indicates normal execution.
ErrorParameterCode Parameter WORD * Contains the attached information for some error
Detail Code codes. If the information is saved, the detail code of the
parameter for which the error occurred is output.
In-Out Variables
Valid
Name Meaning Data type Description
range
Axis Axis _sAXIS_REF * Specify the axis for which to write the parameters.
*1
AxisParameter Axis Parame- _sAXIS_PARAM * Specify the values to write. *2
ters
*1 Specify a user-defined Axis Variable that was created in the Axis Basic Settings of the Sysmac Studio (default:
MC_Axis***) or a system-defined axis variable name (_MC_AX[*], _MC1_AX[*], or _MC2_AX[*]).
*2 Define a user-defined variable with a data type of _sAXIS_PARAM.
Function
• When Execute changes to TRUE, the MC_WriteAxisParameter instruction writes the values specified
in AxisParameter (Axis Parameters) to the axis parameters for the axis specified with Axis.
• You can write data only when the specified axis is an unused axis. If the instruction is executed for
any other condition, an execution error occurs and the axis parameters are not written. The values
before the instruction was executed will be held.
• If you execute this instruction after you change axis usage with the MC_ChangeAxisUse instruction,
make sure that the Done output variable from the MC_ChangeAxisUse instruction is TRUE before
you execute this instruction.
• If there is an illegal value in AxisParameter (Axis Parameters) or if there is an inconsistency within the
axis parameters, an execution error occurs and the axis parameters are not written. The values
before the instruction was executed will be held.
MC_WriteAxisParameter
For information on the setting ranges of the axis parameters or the consistency check within the axis
parameters, refer to the NJ/NX-series CPU Unit Motion Control User’s Manual (Cat. No. W507) or NY-
series Industrial Panel PC / Industrial Box PC Motion Control User’s Manual (Cat. No. W559).
Function
• You cannot upload the values that are written with this instruction to the Sysmac Studio.
• You must set all of the axis parameters for the axis that you are writing, not just the axis
parameters that you want to change with this instruction. Refer to Axis Parameters That Are
Written and Read on page 5-58 for the applicable parameters. For axis parameters that do not
need to be changed, set the same values as those that were set from the Sysmac Studio or
the values that are read by the MC_ReadAxisParameter (Read Axis Parameters) instruction.
• An illustration of combining this instruction with the MC_ReadAxisParameter (Read Axis
Parameters) instruction is provided below.
axisParam.xxx.yyy :=(Write_value_1);
MC_ReadAxisParameter axisParam.xxx.zzz :=(Write_value_2);
Overwrite the values of axis
Axis parameters that you need to
change in the axis parameters
AxisParamter
that were read.
Execute Done
MC_WriteAxisParameter
Axis
AxisParamter
Execute Done
Detect when Done from MC_ReadAxisParameter
changes to TRUE and then execute
MC_WriteAxisParameter.
• An example that uses this instruction with the MC_ChangeAxisUse (Change Axis Use)
instruction is given. Execute this instruction only after confirming that Done from the
MC_ChangeAxisUse (Change Axis Use) instruction changes to TRUE.
MC_WriteAxisParameter
MC_ChangeAxisUse
Axis
Axis AxisParameter
Execute Done Execute Done
• If you use this instruction to change the unit conversion settings or position count settings for
an axis whose encoder type is set to Absolute encoder (ABS), the relationship between the
physical position of the machine and the axis position in the MC Function Module will change.
In this case, use the MC_ChangeAxisUse (Change Axis Use) instruction to change the axis to
an used axis, and then execute the Home instruction to define the home again.
If an Absolute Encoder Current Position Calculation Failed (error code: 6458 hex) occurred
after the axis was changed to an used axis, clear the axis error and then execute the Home
instruction to define the home again.
• Do not set the reserved parameters in the axis parameters to any value other than 0.
Instruction Details
This section describes the instruction in detail.
_sAXIS_PARAM
The _sAXIS_PARAM data type is used to specify the values of axis parameter. The axis parameters
are configured in members with a structure data type for each type of axis parameters.
This data type is used for the variable that is specified for the AxisParameter (Axis Parameters) in-out
variable.
Each member is described in the following table.
Parameter
Member Data type Description
name
UnitConversion Unit Conver- _sAXIS_UNIT_CONVERSION_SETTINGS Specify the values to write for the
sion Settings member variables for the unit conver-
sion settings.
Operation Operation Set- _sAXIS_OPERATION_SETTINGS Specify the values to write for the
tings member variables for the operation
settings.
OtherOperation Other Opera- _sAXIS_OTHER_OPERATION_SETTINGS Specify the values to write for the
tion Settings member variables for the other opera-
tion settings.
Limit Limit Settings _sAXIS_LIMIT_SETTINGS Specify the values to write for the
member variables for the limit set-
tings.
Parameter
Member Data type Description
name
PosCount Position Count _sAXIS_POSITION_COUNT_SETTINGS Specify the values to write for the
Settings member variables for the position
count settings.
Homing Homing Set- _sAXIS_HOMING_SETTINGS Specify the values to write for the
tings member variables for the homing set-
tings.
Reserved (Reserved ARRAY[0..255] OF BYTE ---
area)
MC_WriteAxisParameter
Each member is described in the following table.
Parameter
Member Data type Valid range Description
name
UnitDisplay Unit of Display _eMC_ 0: _mcPls Set the unit for command positions.
UNITS 1: _mcMm 0: pulse
2: _mcUm 1: mm
3: _mcNm 2: μm
4: _mcDeg 3: nm 5
5: _mcInch 4: degree
5: inch
Function
CmdPlsCount Command UDINT 1 to 4,294,967,295 Set the number of pulses per motor
PerMotor Pulse Count Per rotation for command positions accord-
Rotation Motor Rotation ing to the encoder resolution.
The command value is converted to the
equivalent number of pulses based on
the electronic gear ratio.
WorkTravel Work Travel LREAL 0.000000001 to Set the workpiece travel distance per
DistancePer Distance Per 4,294,967,295 motor rotation for command positions.
MotorRotation Motor Rotation
ReducerUse*1 Reducer Use BOOL TRUE or FALSE Specify whether to use the reducer set-
ting or not.
TRUE: Used.
FALSE: Not used.
WorkTravel Work Travel LREAL Positive long reals Set the work travel distance per rotation.
DistancePer Distance Per
WorkSide Rotation
Rotation*1*2*3
WorkSideGear Work Gear UDINT 1 to 4,294,967,295 Set the gear ratio for the workpiece.
Ratio*1*2 Ratio
MotorSideGear- Motor Gear UDINT 1 to 4,294,967,295 Set the gear ratio of the motor.
Ratio*1*2 Ratio
Reserved (Reserved area) ARRAY --- ---
[0..7] OF
BYTE*4
*1 A CPU Unit with unit version 1.11 or later and Sysmac Studio version 1.15 or higher are required to use this parameter.
*2 This parameter is enabled when you set to use the reducer.
*3 The setting is possible only when the Count Mode is Linear Mode. When the Count Mode is Rotary Mode, the parameter
value is calculated from the modulo maximum position setting value and modulo minimum position setting value.
*4 For a CPU Unit with unit version 1.10 or earlier, the data type is ARRAY [0..31] OF BYTE.
Parameter
Member Data type Valid range Description
name
MaxVel Maximum LREAL Positive long reals Set the maximum velocity for each axis.
Velocity Do not set a value that exceeds the
maximum speed of the motor that you
are using.
StartVel Start Velocity LREAL 0.0 to Upper limit of positive Set the start velocity for the axis.
long reals Set a value that does not exceed the
maximum velocity.
MaxJogVel Maximum Jog LREAL Positive long reals Set the maximum jog velocity for the
Velocity axis.
Set a value that does not exceed the
maximum velocity.
MaxAcc Maximum LREAL Non-negative long reals Set the maximum acceleration rate for
Acceleration an axis operation command.
There will be no limit to the acceleration
rate if 0 is set.
MaxDec Maximum LREAL Non-negative long reals Set the maximum deceleration rate for
Deceleration an axis operation command.
There will be no limit to the deceleration
rate if 0 is set.
AccDecOver Accelera- _eMC_ 0: _mcAccDecOverBuffer Set the operation for when the maxi-
tion/Decelera- ACCDE- 1: _mcAccDecOverRapid mum acceleration/deceleration rate
tion Over COVER would be exceeded after excessive
2: _mcAccDecOverError
acceleration/deceleration during accel-
Stop
eration/deceleration control of the axis
because stopping at the target position
is given priority.
0: Use rapid acceleration/deceleration.
(Blending is changed to Buffered.)*1
1: Use rapid acceleration/deceleration.
2: Minor fault stop*2
ReverseMode Operation _eMC_ 0: _mcReverseMode Specify the operation for reversing rota-
Selection at REVERSE DecelerationStop tion for multi-execution of instructions,
Reversing _MODE 1: _mcReverseMode re-execution of instructions, and inter-
ImmediateStop rupt feeding.
0: Deceleration stop
1: Immediate stop
VelWarningVal Velocity Warn- UINT 0 or 1 to 100 Set the percentage of the maximum
ing Value velocity at which to output a velocity
warning for the axis.
No velocity warning is output if 0 is set.
AccWarningVal Acceleration UINT 0 or 1 to 100 Set the percentage of the maximum
Warning Value acceleration rate at which to output an
acceleration warning for the axis.
No acceleration warning is output if 0 is
set.
Parameter
Member Data type Valid range Description
name
DecWarningVal Deceleration UINT 0 or 1 to 100 Set the percentage of the maximum
Warning Value deceleration rate at which to output a
deceleration warning for the axis.
No deceleration warning is output if 0 is
set.
PosiTrq Positive Torque UINT 0 or 1 to 1,000 Set the torque command value at which
WarningVal*3 Warning Value to output a positive torque warning.
No positive torque warning is output if 0
is set.
NegaTrq Negative Torque UINT 0 or 1 to 1,000 Set the torque command value at which
WarningVal*3 Warning Value to output a negative torque warning.
No negative torque warning is output if 0
MC_WriteAxisParameter
is set.
InPosRange In-position LREAL Non-negative long reals Set the in-position width.
Range
InPosCheck In-position UINT 0 or 1 to 10,000 Set the in-position check time in milli-
Time Check Time seconds.
Set 0 to check for the end of positioning
only when you define the home position
during homing. No check is made for
the end of positioning at other times.
ActVelFilter Actual Velocity UINT 0 or 1 to 100 Set the time period to calculate the
5
TimeConstant Filter Time Con- average travel of the actual velocity in
stant milliseconds. The average travel is not
Function
calculated if 0 is set.
ZeroPosRange Zero Position LREAL Non-negative long reals Set the home position detection width.
Range
Reserved (Reserved area) ARRAY --- ---
[0..31] OF
BYTE
*1 For a CPU Unit with unit version 1.10 or later, blending is not changed to Buffered. For details, refer to the NJ/NX-series
CPU Unit Motion Control User's Manual (Cat. No. W507) or NY-series Industrial Panel PC / Industrial Box PC Motion
Control User’s Manual (Cat. No. W559).
*2 For a CPU Unit with unit version 1.10 or later, the axis does not stop with an error and operation continues if blending
operation is used. For details, refer to the NJ/NX-series CPU Unit Motion Control User's Manual (Cat. No. W507) or NY-
series Industrial Panel PC / Industrial Box PC Motion Control User’s Manual (Cat. No. W559).
*3 This parameter is enabled only for torque control.
Parameter
Member Data type Valid range Description
name
ImmediateStop Immediate Stop _eM- 1: _mcImmediateStop Set the stopping method in the MC
InputStopMode Input Stop C_STOP_- 2: _mcImmediateStopFE Function Module when the immediate
Method MODE Reset stop input is enabled.
3: _mcFreeRunStop 1: Immediate stop
2: Immediate stop and error reset
3: Immediate stop and Servo OFF
LimitInputStop- Limit Input Stop _eM- 0: _mcDeccelerationStop Set the stopping method in the MC
Mode Method C_STOP_- 1: _mcImmediateStop Function Module when the positive limit
MODE input or negative limit input is enabled.
2: _mcImmediateStopFE
Reset 0: Deceleration stop
3: _mcFreeRunStop 1: Immediate stop
2: Immediate stop and error reset
3: Immediate stop and Servo OFF
DriveErrorReset Drive Error UINT 1 to 1,000 Set the monitor time for a drive error
MonitoringTime Reset Monitor- reset. (Unit: ms)
ing Time After the monitor time has elapsed,
reset processing will end even if the
drive error is not yet reset.
MaxPosiTrq Maximum Posi- LREAL 0.0 to 1,000.0 Set the maximum value of the positive
Limit tive Torque Limit torque limit.
MaxNegaTrq Maximum Nega- LREAL 0.0 to 1,000.0 Set the maximum value of the negative
Limit tive Torque Limit torque limit.
ImmediateStop Immediate Stop BOOL TRUE or FALSE Set whether to reverse the logic of the
InputLogic Input Logic immediate stop input signal.
Inversion Inversion TRUE: Reverse turn.
FALSE: No reverse turn.
PosiLimitInput Positive Limit BOOL TRUE or FALSE Set whether to reverse the logic of the
LogicInversion Input Logic positive limit input signal.
Inversion TRUE: Reverse turn.
FALSE: No reverse turn.
NegaLimitInput- Negative Limit BOOL TRUE or FALSE Set whether to reverse the logic of the
LogicInversion Input Logic negative limit input signal.
Inversion TRUE: Reverse turn.
FALSE: No reverse turn.
HomeProximity Home Proximity BOOL TRUE or FALSE Set whether to reverse the logic of the
InputLogic Input Logic home proximity input signal.
Inversion Inversion TRUE: Reverse turn.
FALSE: No reverse turn.
Reserved (Reserved area) ARRAY --- ---
[0..31] OF
BYTE
Parameter
Member Data type Valid range Description
name
SwLimitMode Software Limits _eMC_ 0: _mcNonSwLmt Select the software limit function.
SWLMT_- 1: _mcCmdDeceleration 0: Disabled
MODE Stop 1: Deceleration stop for command posi-
2: _mcCmdImmediateStop tion
3: _mcActDecelerationStop 2: Immediate stop for command position
4: _mcActImmediateStop 3: Deceleration stop for actual position
MC_WriteAxisParameter
4: Immediate stop for actual position
PosiSwLimit Positive Soft- LREAL Long reals Set the software limit in the positive
ware Limit direction.
NegaSwLimit Negative Soft- LREAL Long reals Set the software limit in the negative
ware Limit direction.
FollowingError Following Error LREAL Non-negative long reals Set the excessive following error check
OverVal Over Value value.
Set 0 to disable the excessive following
error check.
5
FollowingError- Following Error LREAL Non-negative long reals Set the following error warning check
WarningVal Warning Value value.
Function
Set 0 to disable the following error warn-
ing check.
Reserved (Reserved area) ARRAY --- ---
[0..31] OF
BYTE
Parameter
Member Data type Valid range Description
name
CountMode Count Mode _eMC_ 0: _mcCountModeLinear Set the count mode for the position.
COUNT_- 1: _mcCountModeRotary 0: Linear Mode (finite length)
MODE
1: Rotary Mode (infinite length)
ModuloMax- Modulo Maxi- LREAL Long reals Set the modulo maximum position when
PosVal mum Position the Count Mode is set to Rotary Mode.
Setting Value
ModuloMin- Modulo Mini- LREAL Long reals Set the modulo minimum position when
PosVal mum Position the Count Mode is set to Rotary Mode.
Setting Value
Reserved (Reserved area) ARRAY --- ---
[0..31] OF
BYTE
Parameter
Member Data type Valid range Description
name
Mode Homing Method _eMC_ 0: _mcHomeSwTurnHome Set the homing operation.
HOMING_- SwOff 0: Proximity reverse turn/home proxim-
MODE 1: _mcHomeSwTurnHome ity input OFF
SwOn 1: Proximity reverse turn/home proxim-
4: _mcHomeSwOff ity input ON
5: _mcHomeSwOn 4: Home proximity input OFF
8: _mcLimitInputOff 5: Home proximity input ON
9: _mcHomeSwTurnHome 8: Limit input OFF
Mask 9: Proximity reverse turn/home input
11: _mcLimitInputOnly mask distance
12: _mcHomeSwTurn 11: Limit inputs only
HoldingTime 12: Proximity reverse turn/holding time
13: _mcNoHomeSw 13: No home proximity input/holding
HoldingHomeInput home input
14: _mcHomePreset 14: Zero position preset
HomeInput Home Input Sig- _eMC_ 0: _mcZPhase Select the input to use for the home
Signal nal HOME_ 1: _mcExternalSignal input signal.
INPUT 0: Use Z-phase input as home
1: Use external home input
StartDirection Homing Start _eMC_DI- 0: _mcPositiveDirection Set the start direction for when homing
Direction RECTION 2: _mcNegativeDirection is started.
0: Positive direction
2: Negative direction
HomeInput Home Input _eMC_DI- 0: _mcPositiveDirection Set the home input detection direction
Detection Detection Direc- RECTION 2: _mcNegativeDirection for homing.
Direction tion 0: Positive direction
2: Negative direction
PosiLimitInput Operation _eMC_ 0: _mcErrorStop Set the stopping method when the posi-
Mode Selection at LIMIT_ 1: _mcRevImmediateStop tive limit input turns ON during homing.
Positive Limit REVERSE 0: No reverse turn/minor fault stop (Stop
2: _mcRevDeceleration
Input _MODE according to Limit Input Stop Method
Stop
parameter.)
1: Reverse turn/immediate stop
2: Reverse turn/deceleration stop
NegaLimitInput- Operation _eMC_ 0: _mcErrorStop Set the stopping method when the neg-
Mode Selection at LIMIT_ 1: _mcRevImmediateStop ative limit input turns ON during homing.
Negative Limit REVERSE 0: No reverse turn/minor fault stop (Stop
2: _mcRevDeceleration
Input _MODE according to Limit Input Stop Method
Stop
parameter.)
1: Reverse turn/immediate stop
2: Reverse turn/deceleration stop
Vel Homing Velocity LREAL Positive long reals Set the homing velocity.
ApproachVel Homing LREAL Positive long reals Set the velocity to use after the home
Approach Veloc- proximity input turns ON.
ity
Parameter
Member Data type Valid range Description
name
Acc Homing Accel- LREAL Non-negative long reals Set the acceleration rate for homing.
eration If the homing acceleration is set to 0,
the homing velocity or other target
velocity is used without any accelera-
tion.
Dec Homing Decel- LREAL Non-negative long reals Set the deceleration rate for homing.
eration If the homing deceleration is set to 0,
the homing approach velocity or other
target velocity is used without any
deceleration.
Jerk Homing Jerk LREAL Non-negative long reals Set the jerk for homing.
Set 0 for no jerk.
MC_WriteAxisParameter
HomeInput Home Input LREAL Non-negative long reals Set the home input mask distance when
MaskDistance Mask Distance you set the Homing Operation Mode to
the proximity reverse turn/home input
mask distance.
HomeOffset Home Offset LREAL Long reals Preset the actual position for the value
that is set after homing.
HoldingTime Homing Hold- UINT 0 to 10,000 Set the holding time in milliseconds
ing Time when you set the Homing Operation
Mode to the proximity reverse turn/hold-
ing time. 5
Compensation Homing Com- LREAL Long reals Set the homing compensation value that
Val pensation Value is applied after the home is defined.
Function
Compensation Homing Com- LREAL Positive long reals Set the velocity to use for homing com-
Vel pensation pensation.
Velocity
Reserved (Reserved area) ARRAY --- ---
[0..31] OF
BYTE
MC_WriteAxisParameter
Home Proximity Input Logic Inversion OK*5
Limit Settings Software Limits OK*5
Positive Software Limit OK*5
Negative Software Limit OK*5
Following Error Over Value OK*5
Following Error Warning Value OK*5
Position Count Settings Count Mode OK 5
Modulo Maximum Position Setting Value OK
Modulo Minimum Position Setting Value OK
Function
Encoder Type ---
Servo Drive Settings Modulo Maximum Position Setting Value ---
Modulo Minimum Position Setting Value ---
PDS State Control Method*7 ---
Homing Settings Homing Method OK*5
Home Input Signal OK*5
Homing Start Direction OK*5
Home Input Detection Direction OK*5
Operation Selection at Positive Limit Input OK*5
Operation Selection at Negative Limit Input OK*5
Homing Velocity OK*5
Homing Approach Velocity OK*5
Homing Acceleration OK*5
Homing Deceleration OK*5
Homing Jerk OK*5
Home Input Mask Distance OK*5
Home Offset OK*5
Homing Holding Time OK*5
Homing Compensation Value OK*5
Homing Compensation Velocity OK*5
*1 You can use this parameter only with NX701 CPU Units.
*2 You can use this parameter only with NX1P2 CPU Units.
*3 A CPU Unit with unit version 1.11 or later and Sysmac Studio version 1.15 or higher are required to use this
parameter.
*4 If ReducerUse of an axis for which to write a parameter is set to Used and the Count Mode of the axis is Rotary
Mode, the value of Work Travel Distance Per Rotation is not written. The value of Work Travel Distance Per
Rotation is determined by subtracting the modulo minimum position from the modulo maximum position. If
ReducerUse of an axis for which to read a parameter is set to Used and the Count Mode of the axis is Rotary
Mode, the value obtained by subtracting the modulo minimum position from the modulo maximum position is
read as Work Travel Distance Per Rotation.
*5 If the axis specified for writing is an encoder axis or a virtual encoder axis, the axis parameters are not written.
Also, if the axis specified for reading is an encoder axis or a virtual encoder axis, the default values of the axis
parameters are read. For the default values of the axis parameters, refer to the NJ/NX-series CPU Unit Motion
Control User’s Manual (Cat. No. W507) or NY-series Industrial Panel PC / Industrial Box PC Motion Control
User’s Manual (Cat. No. W559).
*6 This parameter is enabled only for torque control.
*7 A CPU Unit with unit version 1.10 or later and Sysmac Studio version 1.12 or higher are required to use this
parameter.
Timing Charts
A timing chart for execution of the MC_WriteAxisParameter (Write Axis Parameters) instruction is
shown below.
Execute
Done
Busy
CommandAborted
Error
ErrorID 16#0000
Errors
If an error occurs during instruction execution, Error will change to TRUE and the axis parameters are
not written. The values before the instruction was executed will be held.
You can find out the cause of the error by referring to the value output by ErrorID (Error Code). Depend-
ing on ErrorID (Error Code), attached information is output to ErrorParameterCode (Parameter Detail
Code).
Execute
Done
Busy
MC_WriteAxisParameter
CommandAborted
Error
Error Codes
Refer to A-1 Error Codes for instruction errors. 5
Function
MC_ReadAxisParameter
The MC_ReadAxisParameter instruction reads axis parameters in the MC Function Module.
FB/
Instruction Name Graphic expression ST expression
FUN
MC_ReadAxisPa- Read Axis FB MC_ReadAxisParameter_instance MC_ReadAxisParameter (
rameter Parameters Axis :=parameter,
MC_ReadAxisParameter AxisParameter :=parameter,
Axis Axis
Execute :=parameter,
AxisParameter AxisParameter
Done =>parameter,
Execute Done
Busy =>parameter,
Busy CommandAborted =>parameter,
CommandAborted Error =>parameter,
Error ErrorID =>parameter);
ErrorID
Version Information
A CPU Unit with unit version 1.08 or later and Sysmac Studio version 1.09 or higher are required
to use this instruction.
Variables
Input Variables
Data Valid
Name Meaning Default Description
type range
Execute Execute BOOL TRUE or FALSE The instruction is executed when Execute
FALSE changes to TRUE.
Output Variables
Data
Name Meaning Valid range Description
type
Done Done BOOL TRUE or TRUE when the instruction is completed.
FALSE
Busy Executing BOOL TRUE or TRUE when the instruction is acknowledged.
FALSE
CommandAborted Command BOOL TRUE or TRUE when the instruction is aborted.
Aborted FALSE
Error Error BOOL TRUE or TRUE while there is an error.
FALSE
ErrorID Error Code WORD * Contains the error code when an error occurs.
A value of 16#0000 indicates normal execution.
MC_ReadAxisParameter
In-Out Variables
Valid
Name Meaning Data type Description
range
Axis Axis _sAXIS_REF --- Specify the axis for which to read the parame-
ters. *1
AxisParameter Axis Parame- _sAXIS_PARAM --- Stores the read values. *2 5
ters
Variables
*1 Specify a user-defined Axis Variable that was created in the Axis Basic Settings of the Sysmac Studio (default:
MC_Axis***) or a system-defined axis variable name (_MC_AX[*], _MC1_AX[*], or _MC2_AX[*]).
*2 Define a user-defined variable with a data type of _sAXIS_PARAM.
_sAXIS_PARAM
Parameter
Member
name
Data type *1 Function
UnitConversion Unit Conver- _sAXIS_UNIT_CONVERSION_SETTINGS The values that are read for the unit
sion Settings conversion settings are stored in the
member variables.
Operation Operation Set- _sAXIS_OPERATION_SETTINGS The values that are read for the opera-
tings tion settings are stored in the member
variables.
OtherOperation Other Opera- _sAXIS_OTHER_OPERATION_SETTINGS The values that are read for the other
tion Settings operation settings are stored in the
member variables.
Limit Limit Settings _sAXIS_LIMIT_SETTINGS The values that are read for the limit
settings are stored in the member vari-
ables.
PosCount Position Count _sAXIS_POSITION_COUNT_SETTINGS The values that are read for the posi-
Settings tion count settings are stored in the
member variables.
Homing Homing Set- _sAXIS_HOMING_SETTINGS The values that are read for the hom-
tings ing settings are stored in the member
variables.
Reserved (Reserved ARRAY[0..255] OF BYTE ---
area)
*1 Refer to Instruction Details on page 5-50 for details on the data types.
Function
• When Execute changes to TRUE, the MC_ReadAxisParameter instruction reads the axis parameters
of the axis specified with Axis and outputs them to AxisParameter (Axis Parameters).
• You can use this instruction to read the axis parameters regardless of the status of the Cfg.AxEnable
(Axis Use) axis variable.
Timing Charts
A timing chart for execution of the MC_ReadAxisParameter (Read Axis Parameters) instruction is
shown below.
Execute
Done
Busy
CommandAborted
Error
ErrorID 16#0000
Errors
If an error occurs during instruction execution, Error will change to TRUE and the axis parameters are
not read.
You can find out the cause of the error by referring to the value output by ErrorID (Error Code).
MC_ReadAxisParameter
Execute
Done
Busy
CommandAborted
Error
Error Codes
Function
Refer to A-1 Error Codes for instruction errors.
Level
Event code Event name Meaning Assumed cause Reference
Maj Prt Min Obs Info
34610000 hex Process Data The PDO mapping • The PDOs that are required for √ page A-26
Object Set- is not correct. the motion control instruction
ting Missing are not mapped.
• The relevant instruction was
executed for a device that does
not have an object that sup-
ports the instruction.
• A motion control instruction that
specifies phase Z (_mcEnco-
derMark) as the trigger condi-
tions was executed for an axis
that is mapped to an OMRON
GX-EC02 EtherCAT
Encoder slave.
54200000 hex Electronic The parameter • Instruction input parameter √ page A-27
Gear Ratio specified for the exceeded the valid range of the
Numerator RatioNumerator input variable.
Setting Out of input variable to a
Range motion control
instruction is out of
range.
54210000 hex Electronic The parameter • Instruction input parameter √ page A-27
Gear Ratio specified for the exceeded the valid range of the
Denominator RatioDenominator input variable.
Setting Out of input variable to a
Range motion control
instruction is out of
range.
54220000 hex Target Veloc- The parameter • Instruction input parameter √ page A-28
ity Setting specified for the exceeded the valid range of the
Out of Range Velocity input vari- input variable.
able to a motion
control instruction is
out of range.
Level
Event code Event name Meaning Assumed cause Reference
Maj Prt Min Obs Info
54230000 hex Acceleration The parameter • Instruction input parameter √ page A-28
Setting Out of specified for the exceeded the valid range of the
Range Acceleration input input variable.
variable to a motion
control instruction is
out of range.
54240000 hex Deceleration The parameter • Instruction input parameter √ page A-29
Setting Out of specified for the exceeded the valid range of the
Range Deceleration input input variable.
variable to a motion
control instruction is
out of range.
54250000 hex Jerk Setting The parameter • Instruction input parameter √ page A-29
Out of Range specified for the exceeded the valid range of the
Jerk input variable input variable.
to a motion control
instruction is out of
range.
54270000 hex Torque Ramp The parameter • Instruction input parameter √ page A-30
Setting Out of specified for the exceeded the valid range of the
Range TorqueRamp input input variable.
Level
Event code Event name Meaning Assumed cause Reference
Maj Prt Min Obs Info
542E0000 hex Direction The parameter • Instruction input parameter √ page A-32
Selection Out specified for the exceeded the valid range of the
of Range Direction input vari- input variable.
able to a motion
control instruction is
out of range.
542F 0000 hex Path Selec- The parameter • Instruction input parameter √ page A-33
tion Out of specified for the exceeded the valid range of the
Range PathChoice input input variable.
variable to a motion
control instruction is
out of range.
54300000 hex Position Type The parameter • Instruction input parameter √ page A-33
Selection Out specified for the exceeded the valid range of the
of Range ReferenceType input variable.
input variable to a
motion control
instruction is out of
range.
54310000 hex Travel Mode The parameter • Instruction input parameter √ page A-34
Selection Out specified for the exceeded the valid range of the
of Range MoveMode input input variable.
variable to a motion
control instruction is
out of range.
54320000 hex Transition The parameter • Instruction input parameter √ page A-34
Mode Selec- specified for the exceeded the valid range of the
tion Out of TransitionMode input variable.
Range input variable to a • _mcAborting or _mcBuffered
motion control was specified for BufferMode
instruction is out of and _mcTMCornerSuperim-
range. posed was specified for Transi-
tionMode.
54330000 hex Continue The value of the • The value of the reserved input √ page A-35
Method reserved input vari- variable Continuous changed.
Selection Out able Continuous to
of Range a motion control
instruction
changed.
54340000 hex Combine The parameter • Instruction input parameter √ page A-35
Mode Selec- specified for the exceeded the valid range of the
tion Out of CombineMode input variable.
Range input variable to a
motion control
instruction is out of
range.
54350000 hex Synchroniza- The parameter • Instruction input parameter √ page A-35
tion Start specified for the exceeded the valid range of the
Condition LinkOption input input variable.
Selection Out variable to a motion
of Range control instruction is
out of range.
54360000 hex Master and The same axis is • The parameter is the same for √ page A-36
Slave specified for the the Master and Slave input vari-
Defined as Master and Slave ables to the instruction.
Same Axis input variables to a
motion control
instruction.
54370000 hex Master and The same axis is • The parameter is the same for √ page A-36
Auxiliary specified for the the Master and Auxiliary input
Defined as Master and Auxil- variables to the instruction.
Same Axis iary input variables
to a motion control
instruction.
Level
Event code Event name Meaning Assumed cause Reference
Maj Prt Min Obs Info
54380000 hex Master/Slave The axis numbers • The parameters for the Master √ page A-37
Axis Num- specified for the and Slave input variables to the
bers Not in Master and Slave instruction were not in ascend-
Ascending input variables to a ing order when _mcLatestCom-
Order motion control mand was specified for the
instruction are not ReferenceType input variable to
in ascending order. the instruction.
54390000 hex Incorrect The parameter • Something other than a cam √ page A-37
Cam Table specified for the data variable was specified for
Specification CamTable input the CamTable input variable to
variable to a motion the instruction.
control instruction is
out of range.
543A0000 hex Synchroniza- A synchronized • The MC_CamOut (End Cam √ page A-38
tion Stopped control motion con- Operation) instruction was exe-
trol instruction was cuted even though the MC_-
executed, but con- CamIn (Start Cam Operation)
ditions required for instruction is not being exe-
execution were not cuted.
met. • The MC_GearOut (End Gear
Operation) instruction was exe-
Level
Event code Event name Meaning Assumed cause Reference
Maj Prt Min Obs Info
543E0000 hex Instruction • An operation • An operation instruction was √ page A-41
Cannot Be instruction was executed for an axis or an axes
Executed executed for an group that was in a coordinated
during Multi- axis or an axes multi-axes motion.
axes Coordi- group that was in • The MC_SetKinTransform
nated Control a coordinated instruction was executed for an
multi-axes axes group in a GroupEnable
motion. state.
• A robot instruc-
tion that you can-
not use for an
axes group in a
GroupEnable
state was exe-
cuted.
543F 0000 hex Multi-axes A multi-axes coordi- • A multi-axes coordinated con- √ page A-41
Coordinated nated control trol instruction was executed for
Control instruction was exe- an axes group that was in the
Instruction cuted for an axes Axes Group Disabled state.
Executed for group that was in • One of the following instructions
Disabled the Axes Group was executed for an axes group
Axes Group Disabled state. that was in a GroupDisable
state.
MC_MoveTimeAbsolute
MC_SyncLinearConveyor
MC_SyncOut
MC_RobotJog
54400000 hex Axes Group Execution of the • When the MC_GroupEnable √ page A-42
Cannot Be MC_GroupEnable (Enable Axes Group) instruc-
Enabled (Enable Axes tion was executed, there was a
Group) instruction composition axis that was not
failed. stopped.
• When the MC_GroupEnable
(Enable Axes Group) instruc-
tion was executed, there was a
composition axis for which the
MC_TouchProbe (Enable Exter-
nal Latch) instruction was being
executed.
54410000 hex Impossible An operation • An operation instruction was √ page A-43
Axis Opera- instruction was exe- executed for an axis for which
tion Speci- cuted for an axis for the Servo is OFF.
fied when the which the Servo is • Home was preset with the
Servo is OFF OFF. MC_Home or MC_HomeWith-
Parameter instruction for an
axis for which EtherCAT pro-
cess data communications are
not established.
54420000 hex Composition A motion instruction • A motion instruction was exe- √ page A-43
Axis Stopped was executed for an cuted for an axes group while
Error axes group while the MC_Stop instruction was
the MC_Stop being executed for a composi-
instruction was tion axis.
being executed for
a composition axis.
Level
Event code Event name Meaning Assumed cause Reference
Maj Prt Min Obs Info
54430000 hex Motion Con- The number of • An axis instruction was exe- √ page A-44
trol Instruc- motion control cuted when there was already a
tion Multi- instructions that is current instruction and a buff-
execution buffered for Buff- ered instruction for the same
Buffer Limit ered or Blending axis.
Exceeded Buffer Modes • An axes group instruction was
exceeded the buf- executed when there was
fer limit. already eight current instruc-
tions and buffered instructions
for the same axis.
54440000 hex Insufficient The specified • Stopping at the target position √ page A-45
Travel Dis- motion cannot be was not possible for the speci-
tance executed for the fied acceleration/deceleration
deceleration rate or rate for multi-execution or re-
acceleration rate execution of a positioning
that was specified instruction when the Accelera-
for multi-execution tion/Deceleration Over parame-
or re-execution of a ter was set to generate a minor
positioning instruc- fault and stop.
tion.
54450000 hex Insufficient There is not suffi- • There was not sufficient travel √ page A-45
Level
Event code Event name Meaning Assumed cause Reference
Maj Prt Min Obs Info
54490000 hex Circular Inter- The position speci- • The difference between the dis- √ page A-47
polation Cen- fied for the center tance from the start point to the
ter point exceeded the center point and the distance
Specification allowed range when between the end point to the
Position Out the center method center point exceeded the per-
of Range was specified for mitted value specified for the
the MC_MoveCircu- correction allowance ratio in the
lar2D (Circular 2D axes group settings when the
Interpolation) center designation method was
instruction. specified for the MC_MoveCir-
cular2D (Circular 2D Interpola-
tion) instruction.
544A0000 hex Instruction An instruction that • An instruction that cannot be √ page A-48
Execution cannot be used used when the Count Mode is
Error Caused when the Count set to Rotary Mode was exe-
by Count Mode is set to cuted for an axis that was set to
Mode Setting Rotary Mode was Rotary Mode.
executed for an axis
that was set to
Rotary Mode.
544C 0000 hex Parameter The parameter • Instruction input parameter √ page A-48
Selection Out specified for the exceeded the valid range of the
of Range ParameterNumber input variable.
input variable to a
motion control
instruction is out of
range.
544D 0000 hex Stop Method The parameter • Instruction input parameter √ page A-48
Selection Out specified for the exceeded the valid range of the
of Range StopMode input input variable.
variable to a motion
control instruction is
out of range.
544E0000 hex Latch ID The parameter • Instruction input parameter √ page A-49
Selection Out specified for the exceeded the valid range of the
of Range for TriggerIn- input variable.
Trigger Input put::LatchID input
Condition variable to a motion
control instruction is
out of range.
544F 0000 hex Setting Out of The parameter • Instruction input parameter √ page A-49
Range for specified for the exceeded the valid range of the
Writing MC SettingValue input input variable.
Setting variable to a motion • The parameter specification
control instruction is and the data type of the setting
out of range. value do not agree.
54500000 hex Trigger Input The parameter • Instruction input parameter √ page A-50
Condition specified for the exceeded the valid range of the
Mode Selec- TriggerInput:: Mode input variable.
tion Out of input variable to a
Range motion control
instruction is out of
range.
54510000 hex Drive Trigger The parameter • Instruction input parameter √ page A-50
Signal Selec- specified for the exceeded the valid range of the
tion Out of TriggerInput::Input- input variable.
Range for Drive input variable
Trigger Input to a motion control
Condition instruction is out of
range.
Level
Event code Event name Meaning Assumed cause Reference
Maj Prt Min Obs Info
54530000 hex Motion Con- An attempt was • A parameter for an input vari- √ page A-51
trol Instruc- made to change the able that cannot be changed for
tion Re- parameter for the re-execution was changed.
execution Axis input variable
Disabled when re-executing
(Axis Specifi- a motion control
cation) instruction. (This
input variable can-
not be changed
when re-executing
an instruction.)
54540000 hex Motion Con- An attempt was • A parameter for an input vari- √ page A-51
trol Instruc- made to change the able that cannot be changed for
tion Re- parameter for the re-execution was changed.
execution BufferMode input
Disabled variable when re-
(Buffer Mode executing a motion
Selection) control instruction.
(This input variable
cannot be changed
when re-executing
Level
Event code Event name Meaning Assumed cause Reference
Maj Prt Min Obs Info
54590000 hex Motion Con- An attempt was • A parameter for an input vari- √ page A-54
trol Instruc- made to change the able that cannot be changed for
tion Re- parameter for the re-execution was changed.
execution Master input vari-
Disabled able when re-exe-
(Master Axis) cuting a motion
control instruction.
(This input variable
cannot be changed
when re-executing
an instruction.)
545A0000 hex Motion Con- An attempt was • A parameter for an input vari- √ page A-54
trol Instruc- made to change the able that cannot be changed for
tion Re- parameter for the re-execution was changed.
execution MasterOffset input
Disabled variable when re-
(MasterOff- executing a motion
set) control instruction.
(This input variable
cannot be changed
when re-executing
an instruction.)
545B0000 hex Motion Con- An attempt was • A parameter for an input vari- √ page A-55
trol Instruc- made to change the able that cannot be changed for
tion Re- parameter for the re-execution was changed.
execution MasterScaling input
Disabled variable when re-
(MasterScal- executing a motion
ing) control instruction.
(This input variable
cannot be changed
when re-executing
an instruction.)
545C 0000 hex Motion Con- An attempt was • A parameter for an input vari- √ page A-55
trol Instruc- made to change the able that cannot be changed for
tion Re- parameter for the re-execution was changed.
execution MasterStartDis-
Disabled tance input variable
(MasterStart- when re-executing
Distance) a motion control
instruction. (This
input variable can-
not be changed
when re-executing
an instruction.)
545D 0000 hex Motion Con- An attempt was • A parameter for an input vari- √ page A-56
trol Instruc- made to change the able that cannot be changed for
tion Re- parameter for the re-execution was changed.
execution Continuous input
Disabled variable when re-
(Continuous) executing a motion
control instruction.
(This input variable
cannot be changed
when re-executing
an instruction.)
Level
Event code Event name Meaning Assumed cause Reference
Maj Prt Min Obs Info
545E0000 hex Motion Con- An attempt was • A parameter for an input vari- √ page A-56
trol Instruc- made to change the able that cannot be changed for
tion Re- parameter for the re-execution was changed.
execution MoveMode input
Disabled variable when re-
(MoveMode) executing a motion
control instruction.
(This input variable
cannot be changed
when re-executing
an instruction.)
545F 0000 hex Illegal Auxil- The axis specified • An axis does not exist for the √ page A-57
iary Axis for the Auxiliary variable specified for the Auxil-
Specification input variable to a iary input variable to the
motion control instruction.
instruction does not
exist.
54600000 hex Illegal Axis The axis specified • An axis does not exist for the √ page A-57
Specification for the Axis input variable specified for the Axis
variable to a motion input variable to the instruction.
control instruction
Level
Event code Event name Meaning Assumed cause Reference
Maj Prt Min Obs Info
54650000 hex Motion Con- An attempt was • A parameter for an input vari- √ page A-60
trol Instruc- made to change the able that cannot be changed for
tion Re- StartPosition input re-execution was changed.
execution variable when re-
Disabled executing a motion
(StartPosi- control instruction.
tion) (This input variable
cannot be changed
when re-executing
an instruction.)
54660000 hex Instruction High-speed hom- • High-speed homing was exe- √ page A-61
Execution ing or an interpola- cuted when home was unde-
Error with tion instruction was fined.
Undefined executed when • An interpolation instruction was
Home home was unde- executed for an axes group that
fined. includes an axis with no defined
home.
• One of the following robot
instructions was executed for
an axes group that includes a
logical axis with no defined
home.
MC_SetKinTransform
MC_MoveTimeAbsolute
MC_SyncLinearConveyor
MC_SyncOut
MC_GroupMon
MC_RobotJog
54670000 hex Motion Con- An attempt was • A parameter for an input vari- √ page A-62
trol Instruc- made to change the able that cannot be changed for
tion Re- ReferenceType re-execution was changed.
execution input variable when
Disabled re-executing a
(Position motion control
Type) instruction. (This
input variable can-
not be changed
when re-executing
an instruction.)
54680000 hex Unused Axis The master axis • The master axis specified for a √ page A-62
Specification specified for a motion control instruction is an
for Master motion control unused axis.
Axis instruction is an
unused axis.
54690000 hex First Position The parameter • Instruction input parameter √ page A-63
Setting Out of specified for the exceeded the valid range of the
Range FirstPosition input input variable.
variable to a motion
control instruction is
out of range.
546A0000 hex Last Position The parameter • Instruction input parameter √ page A-63
Setting Out of specified for the exceeded the valid range of the
Range LastPosition input input variable.
variable to a motion
control instruction is
out of range.
Level
Event code Event name Meaning Assumed cause Reference
Maj Prt Min Obs Info
546B0000 hex Illegal The parameter • The value of the LastPosition √ page A-64
First/Last specified for the input parameter is less than the
Position Size LastPosition input value of the FirstPosition input
Relationship variable to a motion variable for the instruction when
(Linear control instruction is the Count Mode is set to Linear
Mode) smaller than the Mode.
parameter speci-
fied for the FirstPo-
sition input variable.
546C0000 hex Master Sync The parameter • Instruction input parameter √ page A-64
Start Posi- specified for the exceeded the valid range of the
tion Setting MasterSyncPosi- input variable.
Out of Range tion input variable to
a motion control
instruction is out of
range.
546D0000 hex Slave Sync The parameter • Instruction input parameter √ page A-65
Start Posi- specified for the exceeded the valid range of the
tion Setting SlaveSyncPosition input variable.
Out of Range input variable to a
motion control
Level
Event code Event name Meaning Assumed cause Reference
Maj Prt Min Obs Info
54720000 hex Motion Con- An attempt was • A parameter for an input vari- √ page A-67
trol Instruc- made to change the able that cannot be changed for
tion Re- StartMode input re-execution was changed.
execution variable when re-
Disabled executing a motion
(First Position control instruction.
Method) (This input variable
cannot be changed
when re-executing
an instruction.)
54740000 hex Unused Axis The axis specified • The axis specified for the Auxil- √ page A-67
Specification for the Auxiliary iary input variable to the
for Auxiliary input variable to a instruction is an unused axis.
Axis motion control
instruction is an
unused axis.
54750000 hex Position Gear Synchronized • The specified synchronized √ page A-68
Value Error motion is not possi- motion cannot be performed at
ble for the velocity, the velocity, acceleration rate,
acceleration rate, or deceleration rate that is input
and deceleration to the instruction.
rate that were input
to a motion control
instruction.
54760000 hex Position Gear The velocity of the • The velocity of the master axis √ page A-68
Master Axis master axis was was 0 when the instruction was
Zero Velocity zero when a motion started.
control instruction
was started.
54780000 hex Target Posi- The parameter • Instruction input parameter √ page A-69
tion Setting specified for the exceeded the valid range of the
Out of Range Position input vari- input variable.
able to a motion • The target position of a Rotary
control instruction is Mode axis is not within the ring
out of range. setting range.
54790000 hex Travel Dis- The parameter that • The absolute value of the √ page A-69
tance Out of was specified for instruction input parameter
Range the Distance input exceeded the range of 40-bit
variable to a motion data when it is converted to
control instruction is pulses.
out of range or the • For a Linear Mode axis, the tar-
target position with get position with the travel dis-
the value of Dis- tance added exceeded signed
tance added is out 40-bit data when the absolute
of range. value is converted to pulses.
547A0000 hex Cam Table The parameter • Instruction input parameter √ page A-70
Start Point specified for the exceeded the valid range of the
Setting Out of StartPosition input input variable.
Range variable to a motion
control instruction is
out of range.
547B0000 hex Cam Master The parameter • Instruction input parameter √ page A-70
Axis Follow- specified for the exceeded the valid range of the
ing First Posi- MasterStartDis- input variable.
tion Setting tance input variable
Out of Range to a motion control
instruction is out of
range.
Level
Event code Event name Meaning Assumed cause Reference
Maj Prt Min Obs Info
547C0000 hex Circular Inter- It was not possible • For the MC_MoveCircular2D √ page A-71
polation to create a circular (Circular 2D Interpolation)
Radius Set- path for the speci- instruction, it was not possible
ting Error fied radius when to create a circular path for the
the radius method specified radius when the
was specified for radius method was specified for
the MC_MoveCircu- circular interpolation.
lar2D (Circular 2D
Interpolation)
instruction.
547D0000 hex Circular Inter- For the MC_Move- • For the MC_MoveCircular2D √ page A-71
polation Circular2D (Circu- (Circular 2D Interpolation)
Radius Over- lar 2D Interpolation) instruction, the radius of the cir-
flow instruction, the cle exceeded 40-bit data when
radius of the circle it is converted to pulses for the
exceeded the maxi- border point or center specifica-
mum value for the tion method.
border point or cen-
ter specification
method.
547E 0000 hex Circular Inter- The parameter • Instruction input parameter √ page A-72
Level
Event code Event name Meaning Assumed cause Reference
Maj Prt Min Obs Info
54840000 hex Master Dis- The parameter • Instruction input parameter √ page A-74
tance in specified for the exceeded the valid range of the
Deceleration MasterDistance- input variable.
Specification DEC input variable
Out of Range to a motion control
instruction is out of
range.
54870000 hex Execution The parameter • Instruction input parameter √ page A-74
Mode Selec- specified for the exceeded the valid range of the
tion Out of ExecutionMode input variable.
Range input variable to a
motion control
instruction is out of
range.
54880000 hex Permitted The parameter • Instruction input parameter √ page A-75
Following specified for the exceeded the valid range of the
Error Out of PermittedDeviation input variable.
Range input variable to a
motion control
instruction is out of
range.
54890000 hex Border The parameter • The value of AutPoint exceeded √ page A-75
Point/Center specified for the signed 40-bit data when it is
Posi- AuxPoint input vari- converted to pulses for the bor-
tion/Radius able to a motion der point or center specifica-
Specification control instruction is tion method.
Out of Range out of range. • For a radius specifications, the
absolute value of AuxPoint[0]
exceeded 40-bit data when it is
converted to pulses.
548A 0000 hex End Point The parameter • The instruction input parameter √ page A-76
Specification specified for the exceeded the range of signed
Out of Range EndPoint input vari- 40-bit data when it is converted
able to a motion to pulses.
control instruction is
out of range.
548B0000 hex Slave Travel The parameter • The instruction input parameter √ page A-76
Distance specified for the exceeded the range of 40-bit
Specification SlaveDistance input data when it is converted to
Out of Range variable to a motion pulses.
control instruction is
out of range.
548C 0000 hex Phase Shift The parameter • The absolute value of the √ page A-76
Amount Out specified for the instruction input parameter
of Range PhaseShift input exceeded the range of 40-bit
variable to a motion data when it is converted to
control instruction is pulses.
out of range.
548D 0000 hex Feeding Dis- The parameter • The absolute value of the √ page A-77
tance Out of specified for the instruction input parameter
Range FeedDistance input exceeded the range of 40-bit
variable to a motion data when it is converted to
control instruction is pulses.
out of range.
548E 0000 hex Auxiliary and The same axis was • The parameter is the same for √ page A-77
Slave specified for the the Auxiliary and Slave input
Defined as Auxiliary and Slave variables to the instruction.
Same Axis input variables to a
motion control
instruction.
Level
Event code Event name Meaning Assumed cause Reference
Maj Prt Min Obs Info
548F 0000 hex Relative The parameter • Instruction input parameter √ page A-77
Position specified for the exceeded the valid range of the
Selection Out Relative input vari- input variable.
of Range able to a motion
control instruction is
out of range.
54900000 hex Cam Transi- The parameter • Instruction input parameter √ page A-78
tion Specifi- specified for the exceeded the valid range of the
cation Out of CamTransition input input variable.
Range variable to a motion
control instruction is
out of range.
54910000 hex Synchro- The parameter • Instruction input parameter √ page A-78
nized Con- specified for the exceeded the valid range of the
trol End OutMode input vari- input variable.
Mode Selec- able to a motion
tion Out of control instruction is
Range out of range.
54920000 hex Enable Exter- _mcImmediateS- • _mcImmediateStop was speci- √ page A-79
nal Latch top was specified fied for the StopMode input
Instruction for the StopMode variable when the MC_Touch-
Level
Event code Event name Meaning Assumed cause Reference
Maj Prt Min Obs Info
54980000 hex Auxiliary Axis The parameter • Instruction input parameter √ page A-81
Gear Ratio specified for the exceeded the valid range of the
Numerator RatioNumera- input variable.
Out of Range torAuxiliary input
variable to a motion
control instruction is
out of range.
54990000 hex Auxiliary Axis The parameter • Instruction input parameter √ page A-81
Gear Ratio specified for the exceeded the valid range of the
Denominator RatioDenomina- input variable.
Out of Range torAuxiliary input
variable to a motion
control instruction is
out of range.
549A0000 hex Master Axis The parameter • Instruction input parameter √ page A-82
Position Type specified for the exceeded the valid range of the
Selection Out ReferenceType- input variable.
of Range Master input vari-
able to a motion
control instruction is
out of range.
549B 0000 hex Auxiliary Axis The parameter • Instruction input parameter √ page A-82
Position Type specified for the exceeded the valid range of the
Selection Out ReferenceTypeAux- input variable.
of Range iliary input variable
to a motion control
instruction is out of
range.
549C 0000 hex Target Posi- Operation is not • High-speed homing was exe- √ page A-83
tion Ring possible because cuted when 0 was not included
Counter Out the target position in the ring counter.
of Range is out of range for
the ring counter of
the executed
instruction.
549D 0000 hex Axes Group The parameter • Instruction input parameter √ page A-83
(Ver. 1.01 or Composition specified for the exceeded the valid range of the
later) Axis Setting Axes input variable input variable.
Out of Range to a motion control • The composition axes in the
instruction is out of axes group are not assigned to
range. the same task.
549E 0000 hex Axis Use Set- The parameter • Instruction input parameter √ page A-84
(Ver. 1.04 or ting Out of specified for the exceeded the valid range of the
later) Range AxisUse input vari- input variable.
able to a motion
control instruction is
out of range.
57000000 hex Homing The parameter • Instruction input parameter √ page A-84
(Ver. 1.03 or Parameter specified for the exceeded the valid range of the
later) Setting Out of HomingParameter input variable.
Range input variable to a
motion control
instruction is out of
range.
57020000 hex Axis Use The • The MC_ChangeAxisUse √ page A-85
(Ver. 1.04 or Change Error MC_ChangeAxis- (Change Axis Use) instruction
later) Use (Change Axis was executed when the axis
Use) instruction was not stopped or when the
was executed when command velocity of the axis
the axis was not was saturated.
stopped or when
the command
velocity of the axis
was saturated.
Level
Event code Event name Meaning Assumed cause Reference
Maj Prt Min Obs Info
57030000 hex Cannot The • The MC_ChangeAxisUse √ page A-85
(Ver. 1.06 or Change Axis MC_ChangeAxis- (Change Axis Use) instruction
later) Use Use (Change Axis was executed in a way that
Use) instruction would cause the maximum
was executed in a number of used real axes to be
way that would exceeded.
cause the maxi- • The MC_ChangeAxisUse
mum number of (Change Axis Use) instruction
used real axes or was executed in a way that
the maximum num- would cause the maximum
ber of used motion number of used motion control
control servo axes servo axes to be exceeded.
to be exceeded.
57200000 hex Motion Con- The motion control • The MC_ChangeAxisUse √ page A-86
(Ver. 1.04 or trol Parame- parameter settings (Change Axis Use) instruction
later) ter Setting for the axis that was was used to change an unused
Error When changed to a used axis to a used axis, but the
Changing axis are incorrect. motion control parameter set-
Axis Use tings of the axis are not correct.
• The power supply was inter-
rupted while a download of the
Level
Event code Event name Meaning Assumed cause Reference
Maj Prt Min Obs Info
573B 0000 hex Axis Parame- The parameter • The parameter specified for the √ page A-89
(Ver. 1.08 or ter Setting specified for the AxisParameter input variable to
later) Out of Range AxisParameter the instruction is out of range
input variable to a for the input variable.
motion control
instruction is out-
side of the valid
range.
573C 0000 hex Cam Prop- The parameter • The parameter specified for the √ page A-91
(Ver. 1.08 or erty Setting specified for the CamProperty input variable to
later) Out of Range CamProperty input the instruction is out of range
variable to a motion for the input variable.
control instruction is
outside of the valid
range.
573D 0000 hex Cam Node The parameter • The parameter specified for the √ page A-91
(Ver. 1.08 or Setting Out of specified for the CamNodes input variable to the
later) Range CamNodes input instruction is out of range for
variable to a motion the input variable.
control instruction is
outside of the valid
range.
573E 0000 hex Incorrect The parameter • The parameter specified for the √ page A-92
(Ver. 1.08 or Cam Node specified for the CamNodes input variable to the
later) Type Specifi- CamNodes input instruction is not an _sMC_-
cation variable to a motion CAM_NODE array variable.
control instruction is
not an _sMC_-
CAM_NODE array
variable.
573F 0000 hex Insufficient The array variable • The array variable of the √ page A-92
(Ver. 1.08 or Nodes in of the parameter parameter specified for the
later) Cam Table specified for the CamNodes input variable to the
CamNodes input instruction has a Phase (master
variable to a motion axis phase) value of 0 for ele-
control instruction ment number 0.
has a Phase value
of 0 for element
number 0.
57400000 hex Cam Node The values of • The values of Phase (master √ page A-93
(Ver. 1.08 or Master Axis Phase in the array axis phase) in the array variable
later) Phase Not in variable of the of the parameter specified for
Ascending parameter speci- the CamNodes input variable to
Order fied for the Cam- the instruction are not in
Nodes input ascending order according to
variable to a motion the element numbers. Or, trun-
control instruction cating the digits that are not
are not in ascend- effective more than seven digits
ing order according caused the phases to not be in
to the element num- ascending order.
bers.
57410000 hex Too Many The number of gen- • The number of cam data points √ page A-93
(Ver. 1.08 or Data Points erated cam data in the generated cam table
later) in Cam Table points exceeded exceeded the number of ele-
the number of ele- ments in the array in the cam
ments in the array data variable that is specified
in the cam data for the CamTable input variable
variable that is to the instruction.
specified for the
CamTable input
variable to a motion
control instruction.
Level
Event code Event name Meaning Assumed cause Reference
Maj Prt Min Obs Info
57420000 hex Cam Table Distance in the gen- • Distance in the generated cam √ page A-94
(Ver. 1.08 or Displace- erated cam table table exceeded the range of
later) ment Over- exceeded the range REAL data.
flow of REAL data.
57430000 hex Aborted Cam A cam data variable • A cam data variable that was √ page A-94
(Ver. 1.08 or Table Used that was aborted aborted during generation due
later) during generation to an error in the MC_Gener-
was specified for ateCamTable (Generate Cam
the CamTable input Table) instruction was specified
variable to an for the CamTable input variable
instruction. to the instruction.
57490000 hex Execution ID The parameter • The parameter specified for the √ page A-95
(Ver. 1.10 or Setting Out of specified for the ExecID input variable to the
later) Range ExecID input vari- instruction is out of range for
able to a motion the input variable.
control instruction is
out of range.
574A0000 hex Position Off- The parameter • The position offset exceeded √ page A-95
(Ver. 1.10 or set Out of specified for the the range of signed 40-bit data
later) Range OffsetPosition input when it is converted to pulses.
variable to a motion
Level
Event code Event name Meaning Assumed cause Reference
Maj Prt Min Obs Info
64410000 hex Target Posi- The specified posi- • The parameter specified for the √ page A-98
tion Negative tion exceeds the Position input variable to the
Software negative software instruction is beyond the nega-
Limit limit. tive software limit.
Exceeded • The first position is beyond the
negative software limit and an
instruction that specifies motion
in the opposite direction of the
software limit was executed.
• The parameter that was speci-
fied for the AuxPoint input vari-
able to a border point
MC_MoveCircular2D (Circular
2D Interpolation) instruction is
beyond the negative software
limit.
64420000 hex Command Positioning, an • One of the following was exe- √ page A-99
Position instruction in the cuted when there was a com-
Over- underflow/overflow mand position
flow/Under- direction, or an overflow/underflow.
flow instruction for which • A positioning instruction
the direction is not
• A continuous control instruc-
specified was exe- tion in the underflow/overflow
cuted when there
direction
was an under-
• An instruction for which the
flow/overflow in the
command position. direction is not specified
(syncing or torque control)
64430000 hex Positive Limit An instruction was • An instruction for a motion in √ page A-99
Input executed for a the positive direction was exe-
motion in the posi- cuted when the positive limit
tive direction when input was ON, or an instruction
the positive limit for a motion with no direction
input was ON. specification was executed
when the positive limit input
was ON. An axes group motion
control instruction was exe-
cuted when the positive limit
input was ON.
64440000 hex Negative An instruction for a • An instruction for a motion in √ page A-100
Limit Input motion in the nega- the negative direction was exe-
tive direction was cuted when the negative limit
executed when the input was ON, or an instruction
negative limit input for a motion with no direction
was ON. specification was executed
when the negative limit input
was ON. An axes group motion
control instruction was exe-
cuted when the negative limit
input was ON.
74220000 hex Servo Main An attempt was • An attempt was made to turn √ page A-100
Circuits OFF made to turn ON ON the Servo when the main
the Servo when the circuit power supply to the
main circuit power Servo Drive was OFF.
supply to the Servo
Drive was OFF.
57220000 hex Actual Posi- An instruction was • An instruction was executed √ page A-101
(Ver. 1.06 or tion Over- executed that is not that is not supported during an
later) flow/Underflo supported during actual position overflow or
w an actual position underflow.
overflow/underflow.
Level
Event code Event name Meaning Assumed cause Reference
Maj Prt Min Obs Info
57230000 hex Switch Struc- The value of Track- • The value of the member of the √ page A-101
(Ver. 1.06 or ture Track Number that is structure variable that was
later) Number Set- specified in the specified for the in-out variable
ting Out of Switches in-out of the instruction is out of
Range variable to a motion range.
control instruction is
out of range.
57240000 hex Switch Struc- The value of Fir- • The value of the member of the √ page A-102
(Ver. 1.06 or ture First ON stOnPosition that is structure variable that was
later) Position Set- specified in the specified for the in-out variable
ting Out of Switches in-out of the instruction is out of
Range variable to a motion range.
control instruction is
out of range.
57250000 hex Switch Struc- The value of • The value of the member of the √ page A-102
(Ver. 1.06 or ture Last ON LastOnPosition that structure variable that was
later) Position Set- is specified in the specified for the in-out variable
ting Out of Switches in-out of the instruction is out of
Range variable to a motion range.
control instruction is
out of range.
Level
Event code Event name Meaning Assumed cause Reference
Maj Prt Min Obs Info
572B 0000 hex Number of The number of ele- • The number of elements in an √ page A-105
(Ver. 1.06 or Array Ele- ments in an array in array of the structure variable
later) ments in the structure vari- that was specified for the in-out
Switch Struc- able that is speci- variable of the instruction is out
ture Variable fied in the Switches of range.
Out of Range in-out variable to a
motion control
instruction is out of
range.
572C 0000 hex Number of The number of ele- • The number of elements in an √ page A-106
(Ver. 1.06 or Array Ele- ments in an array in array of the structure variable
later) ments in Out- the structure vari- that was specified for the in-out
put Signal able that is speci- variable of the instruction is out
Structure fied in the Outputs of range.
Variable Out in-out variable to a
of Range motion control
instruction is out of
range.
572D 0000 hex Number of The number of ele- • The number of elements in an √ page A-106
(Ver. 1.06 or Array Ele- ments in an array in array of the structure variable
later) ments in the structure vari- that was specified for the in-out
Track Option able that is speci- variable of the instruction is out
Structure fied in the of range.
Variable Out TrackOptions in-out
of Range variable to a motion
control instruction is
out of range.
572E 0000 hex Numbers of The arrays in the • The arrays in the output signal √ page A-107
(Ver. 1.06 or Elements in structure variables structure variable and track
later) Output Sig- that are specified option structure variable that
nals and for the Outputs and are specified for the in-out vari-
Track Option TrackOptions in-out ables to the instruction do not
Arrays Not variables to a have the same number of ele-
Matched motion control ments.
instruction do not
have the same
number of ele-
ments.
57310000 hex Same Track The same track • The same track number was √ page A-107
(Ver. 1.06 or Number Set- number was speci- specified more than the allow-
later) ting in Switch fied more than the able number of times for the
Structure Out allowable number of TrackNumber in the Switches
of Range times for the Track- in-out variable to a motion con-
Number in the trol instruction.
Switches in-out
variable to a motion
control instruction.
Event name Gives the name of the error. Event code Gives the code of the error.
Meaning Gives a short description of the error.
Source Gives the source of the error. Source details Gives details on Detection Tells when the
the source of the timing error is detected.
error.
Error attributes Level Tells the level of Recovery Gives the recov- Log category Tells which log
influence on con- ery method.*2 the error is saved
trol.*1 in.*3
Indicators Gives the status of the built-in EtherNet/IP port and built-in EtherCAT port indicators. Indicator status is given only for
errors in the EtherCAT Master Function Module and the EtherNet/IP Function Module.
System-defined Variable Data type Name
variables Lists the variable names, data types, and meanings for system-defined variables that provide direct error notification,
that are directly affected by the error, or that contain settings that cause the error.
Cause and cor- Assumed cause Correction Prevention
rection
Lists the possible causes, corrections, and preventive measures for the error.
Attached
A
This is the attached information that is displayed by the Sysmac Studio or an HMI.*5
information
Precautions/ Provides precautions, restrictions, and supplemental information.
Remarks
Version Information
With CPU Unit with unit version 1.10 or later, a variable name that starts with _MC_AX[*] may
start with _MC1_AX[*] or _MC2_AX[*] instead. In the same way, a variable name that starts with
_MC_GRP[*] may start with _MC1_GRP[*] or _MC2_GRP[*] instead.
Error Descriptions
The following table describes the error codes that are output to ErrorID when errors occur in execution
of the instructions. The upper four digits of the event codes that are given in the following table are out-
put as the error code to ErrorID.
Event name Process Data Object Setting Missing Event code 34610000 hex
Meaning The PDO mapping is not correct.
Source Motion Control Function Module Source details Axis Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant axis.
System-defined Variable Data type Name
variables
_MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
The PDOs that are required for the Map the PDOs that are required for Map the PDOs that are required for
motion control instruction are not the instruction. Refer to the Function the instructions that are used. Refer
mapped. section of the relevant instruction for to the NJ/NX-series CPU Unit Motion
the required PDOs. Control User’s Manual (Cat. No.
W507) for the PDOs (Servo Drive set-
tings) that you must map for each
instruction.
The relevant instruction was executed Some devices do not support the rel- Refer to the manual for the target
for a device that does not have an evant instruction. device and write the program so that
object that supports the instruction. Refer to the manual for the target unsupported instructions are not exe-
device, check to see if the relevant cuted.
instruction is supported, and correct
the program so that unsupported
instructions are not executed.
A motion control instruction that spec- Use an external input (_mcEXT) as Use an external input (_mcEXT) as
ifies phase Z (_mcEncoderMark) as the trigger conditions for an axis that the trigger conditions for an axis that
the trigger conditions was executed is mapped to an OMRON GX- is mapped to an OMRON GX-
for an axis that is mapped to an EC02 EtherCAT Encoder slave. EC02 EtherCAT Encoder slave.
OMRON GX-EC02 EtherCAT
Encoder slave.
Attached None
information
Precautions/ None
Remarks
Event name Electronic Gear Ratio Numerator Setting Out of Range Event code 54200000 hex
Meaning The parameter specified for the RatioNumerator input variable to a motion control instruction is out of range.
Source Motion Control Function Module Source details Axis Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant slave axis. Relevant
slave axis decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables
_MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
Instruction input parameter exceeded Correct the parameter so that the Set the input parameter to the instruc-
the valid range of the input variable. valid range of the input variable is not tion so that the valid range of the input
exceeded for the relevant instruction. variable is not exceeded.
Attached None
information
Precautions/ None
Remarks
Event name Target Velocity Setting Out of Range Event code 54220000 hex
Meaning The parameter specified for the Velocity input variable to a motion control instruction is out of range.
Source Motion Control Function Module Source details Axis/axes group Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation If “axis” is given for the source details, operation is not
possible for relevant axis. Relevant axis decelerates to a
stop if it is in motion.
If “axes group” is given for the source details, operation is
not possible for relevant axes group. Relevant axes group
decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables
_MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
_MC_GRP[*].MFaultLvl.Active BOOL Axes Group Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
Instruction input parameter exceeded Correct the parameter so that the Set the input parameter to the instruc-
the valid range of the input variable. valid range of the input variable is not tion so that the valid range of the input
exceeded for the relevant instruction. variable is not exceeded.
Attached None
information
Precautions/ None
Remarks
Event name Acceleration Setting Out of Range Event code 54230000 hex
Meaning The parameter specified for the Acceleration input variable to a motion control instruction is out of range.
Source Motion Control Function Module Source details Axis/axes group Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation If “axis” is given for the source details, operation is not
possible for relevant axis. Relevant axis decelerates to a
stop if it is in motion.
If “axes group” is given for the source details, operation is
not possible for relevant axes group. Relevant axes group
decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables _MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
_MC_GRP[*].MFaultLvl.Active BOOL Axes Group Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction Instruction input parameter exceeded Correct the parameter so that the Set the input parameter to the instruc-
the valid range of the input variable. valid range of the input variable is not tion so that the valid range of the input
exceeded for the relevant instruction. variable is not exceeded.
Attached None
information
Precautions/ None
Remarks
Event name Deceleration Setting Out of Range Event code 54240000 hex
Meaning The parameter specified for the Deceleration input variable to a motion control instruction is out of range.
Source Motion Control Function Module Source details Axis/axes group Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation If “axis” is given for the source details, operation is not
possible for relevant axis. Relevant axis decelerates to a
stop if it is in motion.
If “axes group” is given for the source details, operation is
not possible for relevant axes group. Relevant axes group
decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables
_MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
_MC_GRP[*].MFaultLvl.Active BOOL Axes Group Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
Instruction input parameter exceeded Correct the parameter so that the Set the input parameter to the instruc-
the valid range of the input variable. valid range of the input variable is not tion so that the valid range of the input
exceeded for the relevant instruction. variable is not exceeded.
Event name Jerk Setting Out of Range Event code 54250000 hex
Meaning The parameter specified for the Jerk input variable to a motion control instruction is out of range.
Source Motion Control Function Module Source details Axis/axes group Detection At instruction
timing execution A
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation If “axis” is given for the source details, operation is not
possible for relevant axis. Relevant axis decelerates to a
stop if it is in motion.
If “axes group” is given for the source details, operation is
not possible for relevant axes group. Relevant axes group
decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables _MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
_MC_GRP[*].MFaultLvl.Active BOOL Axes Group Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction Instruction input parameter exceeded Correct the parameter so that the Set the input parameter to the instruc-
the valid range of the input variable. valid range of the input variable is not tion so that the valid range of the input
exceeded for the relevant instruction. variable is not exceeded.
Attached None
information
Precautions/ None
Remarks
Event name Torque Ramp Setting Out of Range Event code 54270000 hex
Meaning The parameter specified for the TorqueRamp input variable to a motion control instruction is out of range.
Source Motion Control Function Module Source details Axis Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant axis. Relevant axis
decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables
_MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
Instruction input parameter exceeded Correct the parameter so that the Set the input parameter to the instruc-
the valid range of the input variable. valid range of the input variable is not tion so that the valid range of the input
exceeded for the relevant instruction. variable is not exceeded.
Attached None
information
Precautions/ None
Remarks
Event name Master Coefficient Scaling Out of Range Event code 54280000 hex
Meaning The parameter specified for the MasterScaling input variable to a motion control instruction is out of range.
Source Motion Control Function Module Source details Axis Detection Controller
timing
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant slave axis. Relevant
slave axis decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables _MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
Instruction input parameter exceeded Correct the parameter so that the Set the input parameter to the instruc-
the valid range of the input variable. valid range of the input variable is not tion so that the valid range of the input
exceeded for the relevant instruction. variable is not exceeded.
Attached None
information
Precautions/ None
Remarks
Event name Slave Coefficient Scaling Out of Range Event code 54290000 hex
Meaning The parameter specified for the SlaveScaling input variable to a motion control instruction is out of range.
Source Motion Control Function Module Source details Axis Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant slave axis. Relevant
slave axis decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables
_MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
Instruction input parameter exceeded Correct the parameter so that the Set the input parameter to the instruc-
the valid range of the input variable. valid range of the input variable is not tion so that the valid range of the input
exceeded for the relevant instruction. variable is not exceeded.
Attached None
information
Precautions/ None
Remarks
Event name Feeding Velocity Setting Out of Range Event code 542A0000 hex
Meaning The parameter specified for the FeedVelocity input variable to a motion control instruction is out of range.
Source Motion Control Function Module Source details Axis Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant axis. Relevant axis
decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables
_MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
The Feed Velocity (input variable Specify a positive value for the Feed Set the input parameter to the instruc-
FeedVelocity) is still at the default (0). Velocity (input variable FeedVelocity). tion so that the valid range of the input
variable is not exceeded.
Attached None
information
Precautions/ None
Remarks
Event name Coordinate System Selection Out of Range Event code 542C0000 hex
Meaning The parameter specified for the CoordSystem input variable to a motion control instruction is out of range.
Source Motion Control Function Module Source details Axes group Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant axes group. Relevant
axes group decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables
_MC_GRP[*].MFaultLvl.Active BOOL Axes Group Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
Instruction input parameter exceeded Correct the parameter so that the Set the input parameter to the instruc-
the valid range of the input variable. valid range of the input variable is not tion so that the valid range of the input
exceeded for the relevant instruction. variable is not exceeded.
Attached None
information
Precautions/ None
Remarks
Event name Circular Interpolation Mode Selection Out of Range Event code 542D0000 hex
Meaning The parameter specified for the CircMode input variable to a motion control instruction is out of range.
Source Motion Control Function Module Source details Axes group Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant axes group. Relevant
axes group decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables _MC_GRP[*].MFaultLvl.Active BOOL Axes Group Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
Instruction input parameter exceeded Correct the parameter so that the Set the input parameter to the instruc-
the valid range of the input variable. valid range of the input variable is not tion so that the valid range of the input
exceeded for the relevant instruction. variable is not exceeded.
Attached None
information
Precautions/ None
Remarks
Event name Direction Selection Out of Range Event code 542E0000 hex
Meaning The parameter specified for the Direction input variable to a motion control instruction is out of range.
Source Motion Control Function Module Source details Axis Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant axis. Relevant axis
decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables
_MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
Instruction input parameter exceeded Correct the parameter so that the Set the input parameter to the instruc-
the valid range of the input variable. valid range of the input variable is not tion so that the valid range of the input
exceeded for the relevant instruction. variable is not exceeded.
Attached None
information
Precautions/ None
Remarks
Event name Path Selection Out of Range Event code 542F0000 hex
Meaning The parameter specified for the PathChoice input variable to a motion control instruction is out of range.
Source Motion Control Function Module Source details Axes group Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant axes group. Relevant
axes group decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables
_MC_GRP[*].MFaultLvl.Active BOOL Axes Group Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
Instruction input parameter exceeded Correct the parameter so that the Set the input parameter to the instruc-
the valid range of the input variable. valid range of the input variable is not tion so that the valid range of the input
exceeded for the relevant instruction. variable is not exceeded.
Attached None
information
Precautions/ None
Remarks
Event name Travel Mode Selection Out of Range Event code 54310000 hex
Meaning The parameter specified for the MoveMode input variable to a motion control instruction is out of range.
Source Motion Control Function Module Source details Axis/axes group Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation If “axis” is given for the source details, operation is not
possible for relevant axis. Relevant axis decelerates to a
stop if it is in motion.
If “axes group” is given for the source details, operation is
not possible for relevant axes group. Relevant axes group
decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables
_MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
_MC_GRP[*].MFaultLvl.Active BOOL Axes Group Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
Instruction input parameter exceeded Correct the parameter so that the Set the input parameter to the instruc-
the valid range of the input variable. valid range of the input variable is not tion so that the valid range of the input
exceeded for the relevant instruction. variable is not exceeded.
Attached None
information
Precautions/ None
Remarks
Event name Transition Mode Selection Out of Range Event code 54320000 hex
Meaning The parameter specified for the TransitionMode input variable to a motion control instruction is out of range.
Source Motion Control Function Module Source details Axes group Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant axes group. Relevant
axes group decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables
_MC_GRP[*].MFaultLvl.Active BOOL Axes Group Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction Instruction input parameter exceeded Correct the parameter so that the Set the input parameter to the instruc-
the valid range of the input variable. valid range of the input variable is not tion so that the valid range of the input
exceeded for the relevant instruction. variable is not exceeded.
_mcAborting or _mcBuffered was If you specify _mcAborting or _mc- If you specify _mcAborting or _mc-
specified for BufferMode and _mcTM- Buffered for BufferMode, specify Buffered for BufferMode, specify
CornerSuperimposed was specified _mcTMNone for TransitionMode. If _mcTMNone for TransitionMode. If
for TransitionMode. you specify _mcTMCornerSuperim- you specify _mcTMCornerSuperim-
posed for TransitionMode, specify posed for TransitionMode, specify
_mcBlendingLow, _mcBlendingPrevi- _mcBlendingLow, _mcBlendingPrevi-
ous, _mcBlendingNext, or _mcBlend- ous, _mcBlendingNext, or _mcBlend-
ingHigh for BufferMode. ingHigh for BufferMode.
Attached None
information
Precautions/ None
Remarks
Event name Continue Method Selection Out of Range Event code 54330000 hex
Meaning The value of the reserved input variable Continuous to a motion control instruction changed.
Source Motion Control Function Module Source details Axis Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant axis. Relevant axis
decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables
_MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
The value of the reserved input vari- Correct the program so that the value Write the user program so that the
able Continuous changed. of the reserved input variable Contin- value of the reserved input variable
uous does not change. Continuous does not change.
Attached None
information
Precautions/ None
Remarks
Event name Synchronization Start Condition Selection Out of Range Event code 54350000 hex
Meaning The parameter specified for the LinkOption input variable to a motion control instruction is out of range.
Source Motion Control Function Module Source details Axis Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant axis. Relevant axis
decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables
_MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
Instruction input parameter exceeded Correct the parameter so that the Set the input parameter to the instruc-
the valid range of the input variable. valid range of the input variable is not tion so that the valid range of the input
exceeded for the relevant instruction. variable is not exceeded.
Attached None
information
Precautions/ None
Remarks
Event name Master and Slave Defined as Same Axis Event code 54360000 hex
Meaning The same axis is specified for the Master and Slave input variables to a motion control instruction.
Source Motion Control Function Module Source details MC common or Detection At instruction
axis timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant slave axis. Relevant
slave axis decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables
_MC_COM.MFaultLvl.Active BOOL MC Common Minor Fault Occurrence
_MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
The parameter is the same for the Correct the parameters so that differ- Specify different axes for the Master
Master and Slave input variables to ent axes are specified for the Master and Slave input variables to the
the instruction. and Slave input variables to the instruction.
instruction.
Attached None
information
Precautions/ None
Remarks
Event name Master and Auxiliary Defined as Same Axis Event code 54370000 hex
Meaning The same axis is specified for the Master and Auxiliary input variables to a motion control instruction.
Source Motion Control Function Module Source details Axis Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant slave axis. Relevant
slave axis decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables _MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
The parameter is the same for the Correct the parameters so that differ- Specify different axes for the Master
Master and Auxiliary input variables ent axes are specified for the Master and Auxiliary input variables to the
to the instruction. and Auxiliary input variables to the instruction.
instruction.
Attached None
information
Precautions/ None
Remarks
Event name Master/Slave Axis Numbers Not in Ascending Order Event code 54380000 hex
Meaning The axis numbers specified for the Master and Slave input variables to a motion control instruction are not in ascending
order.
Source Motion Control Function Module Source details Axis Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant slave axis. Relevant
slave axis decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables
_MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction The parameters for the Master and When specifying _mcLatestCom- When specifying _mcLatestCom-
Slave input variables to the instruction mand for the ReferenceType input mand for the ReferenceType input
were not in ascending order when variable to the instruction, correct the variable, make sure to specify the
_mcLatestCommand was specified parameters so that the axis numbers master axis and slave axis input vari-
for the ReferenceType input variable specified for the Master and Slave ables so that they are in ascending
to the instruction. input variables to the instruction are in order.
ascending order. Or, specify _mc-
Event name Incorrect Cam Table Specification Event code 54390000 hex
Meaning The parameter specified for the CamTable input variable to a motion control instruction is out of range.
Source Motion Control Function Module Source details MC common or Detection At instruction
A
axis timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation If “MC Common” is given for the source details, operation
is not affected.
If “axis” is given for the source details, operation is not
possible for relevant slave axis.
System-defined Variable Data type Name
variables
_MC_COM.MFaultLvl.Active BOOL MC Common Minor Fault Occurrence
_MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
Something other than a cam data Correct the parameter specified for Specify a cam data variable for the
variable was specified for the Cam- the CamTable input variable to the CamTable input variable to the
Table input variable to the instruction. instruction so that it is a cam data instruction.
variable.
Attached None
information
Precautions/ None
Remarks
Event name Motion Control Instruction Re-execution Disabled Event code 543B0000 hex
Meaning An attempt was made to re-execute a motion control instruction that cannot be re-executed.
Source Motion Control Function Module Source details MC common, Detection At instruction
axis, or axes timing execution
group
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation If “MC Common” is given for the source details, operation
is not affected.
If “axis” is given for the source details, operation is not
possible for relevant axis. Relevant axis decelerates to a
stop if it is in motion.
If “axes group” is given for the source details, operation is
not possible for relevant axes group. Relevant axes group
decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables
_MC_COM.MFaultLvl.Active BOOL MC Common Minor Fault Occurrence
_MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
_MC_GRP[*].MFaultLvl.Active BOOL Axes Group Minor Fault Occurrence
Event name Motion Control Instruction Multi-execution Disabled Event code 543C0000 hex
Meaning Multiple functions that cannot be executed simultaneously were executed for the same target (MC common, axis, or
axes group).
Source Motion Control Function Module Source details MC common, Detection At multi-execution
axis, or axes timing of instructions
group
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation If “MC Common” is given for the source details, operation
is not affected.
If “axis” is given for the source details, operation is not
possible for relevant axis. Relevant axis decelerates to a
stop if it is in motion.
If “axes group” is given for the source details, operation is
not possible for relevant axes group. Relevant axes group
decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables _MC_COM.MFaultLvl.Active BOOL MC Common Minor Fault Occurrence
_MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
MC_GRP[*].MFaultLvl.Active BOOL Axes Group Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
Multiple functions that cannot be exe- Check the specifications of multi-exe- Check the specifications for multi-exe-
cuted simultaneously were executed cution of instructions for this instruc- cution of instructions for the instruc-
for the same target (MC common, tion and correct the program so that tion and do not execute instructions
axis, or axes group). instructions that cannot be executed that cannot be executed at the same
at the same time are not executed time.
simultaneously.
Attached None
information
Precautions/ None
Remarks
Event name Instruction Not Allowed for Encoder Axis Type Event code 543D0000 hex
Meaning An operation instruction was executed for an encoder axis.
Source Motion Control Function Module Source details Axis Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant axis.
System-defined Variable Data type Name
variables
_MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
An operation instruction was executed Specify either a Servo axis or virtual Only execute motion instructions for
for an encoder axis. Servo axis as the axis type for the Servo axes or virtual Servo axes.
instruction, or correct the program so
that the instruction is not executed for
an encoder axis.
Attached None
information
Precautions/ None
Remarks
Event name Instruction Cannot Be Executed during Multi-axes Coordi- Event code 543E0000 hex
nated Control
Meaning • An operation instruction was executed for an axis or an axes group that was in a coordinated multi-axes motion.
• A robot instruction that you cannot use for an axes group in a GroupEnable state was executed.
Source Motion Control Function Module Source details Axis or axis group Detection At multi-execution
timing of instructions
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation The axes group decelerates to a stop.
System-defined Variable Data type Name
variables
_MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
_MC_GRP[*].MFaultLvl.Active BOOL Axes Group Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
An operation instruction was executed Correct the program so that axis oper- Execute axis operation instructions
for an axis or an axes group that was ation instructions are executed only only for axes or axes groups that are
in a coordinated multi-axes motion. for axes or axes groups that are not in not in coordinated multi-axes motion.
coordinated multi-axes motion.
The MC_SetKinTransform (Set Kine- Correct the program so that the Execute the instruction only when the
Event name Multi-axes Coordinated Control Instruction Executed for Event code 543F0000 hex
Disabled Axes Group A
Meaning A multi-axes coordinated control instruction was executed for an axes group that was in the Axes Group Disabled state.
Source Motion Control Function Module Source details Axes group Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant axes group. Relevant
axes group decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables
_MC_GRP[*].MFaultLvl.Active BOOL Axes Group Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction A multi-axes coordinated control Correct the program so that the Execute multi-axes coordinated oper-
instruction was executed for an axes instruction is executed only after ation instructions only after enabling
group that was in the Axes Group Dis- changing the axes group to the Axes the axes group. Execute the
abled state. Group Enabled state. Execute the MC_GroupEnable (Enable Axes
MC_GroupEnable (Enable Axes Group) instruction to change an axes
One of the following instructions was
executed for an axes group that was Group) instruction to change an axes group to the Axes Group Enabled
group to the Axes Group Enabled state.
in a GroupDisable state.
state.
• MC_MoveTimeAbsolute (Time-
specified Absolute Positioning)
instruction
• MC_SyncLinearConveyor (Start
Conveyor Synchronization) instruc-
tion
• MC_SyncOut (End Synchroniza-
tion) instruction
• MC_RobotJog (Axes Group Jog)
instruction
Attached None
information
Precautions/ None
Remarks
Event name Axes Group Cannot Be Enabled Event code 54400000 hex
Meaning Execution of the MC_GroupEnable (Enable Axes Group) instruction failed.
Source Motion Control Function Module Source details Axes group Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant axes group. The
operation of the composition axes will continue.
System-defined Variable Data type Name
variables
_MC_GRP[*].MFaultLvl.Active BOOL Axes Group Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
When the MC_GroupEnable (Enable Correct the program so that the Write the programs so that the
Axes Group) instruction was exe- MC_GroupEnable (Enable Axes MC_GroupEnable (Enable Axes
cuted, there was a composition axis Group) instruction is executed only Group) instruction is executed only
that was not stopped. when all composition axes are when all composition axes are
stopped. An axis is stopped if Sta- stopped. An axis is stopped if Sta-
tus.Disabled or Status.Standstill is tus.Disabled or Status.Standstill is
TRUE in the Axis Variable. TRUE in the Axis Variable.
When the MC_GroupEnable (Enable Correct the program so that the Write the program so that the
Axes Group) instruction was exe- MC_GroupEnable (Enable Axes MC_GroupEnable (Enable Axes
cuted, there was a composition axis Group) instruction is executed only Group) instruction is executed only
for which the MC_TouchProbe when the MC_TouchProbe (Enable when the MC_TouchProbe (Enable
(Enable External Latch) instruction External Latch) instruction is not External Latch) instruction is not
was being executed. being executed for any of the compo- being executed for any of the compo-
sition axes. sition axes.
Attached None
information
Precautions/ None
Remarks
Event name Impossible Axis Operation Specified when the Servo is Event code 54410000 hex
OFF
Meaning An operation instruction was executed for an axis for which the Servo is OFF.
Source Motion Control Function Module Source details Axis/axes group Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation The motion instruction will not start.
System-defined Variable Data type Name
variables
_MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
_MC_GRP[*].MFaultLvl.Active BOOL Axes Group Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
An operation instruction was executed Correct the program so that the Make sure to execute the axis opera-
for an axis for which the Servo is OFF. instruction is executed after the Servo tion instruction after the Servo is
is turned ON. turned ON.
Home was preset with the MC_Home If the _EC_PDSlavTbl (Process Data If you execute the MC_Home or
or MC_HomeWithParameter instruc- Communicating Slave Table) system- MC_HomeWithParameter instruction
tion for an axis for which EtherCAT defined variable for the EtherCAT to preset home immediately after you
process data communications are not master of the master axis is FALSE, turn ON the power supply to the Con-
Event name Composition Axis Stopped Error Event code 54420000 hex
Meaning A motion instruction was executed for an axes group while the MC_Stop instruction was being executed for a composi-
tion axis.
Source Motion Control Function Module Source details Axes group Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant axes group.
System-defined Variable Data type Name
variables _MC_GRP[*].MFaultLvl.Active BOOL Axes Group Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
A motion instruction was executed for Change the Execute input variable to Change the Execute input variables to
an axes group while the MC_Stop the MC_Stop instruction for the com- the MC_Stop instructions for all of the
instruction was being executed for a position axis to FALSE, reset the composition axes to FALSE before
composition axis. error, and then execute the motion you execute motion control instruc-
control instruction. tion.
Attached Attached information 1: Number of the logical axis that was stopped.
information
Precautions/ None
Remarks
Event name Motion Control Instruction Multi-execution Buffer Limit Event code 54430000 hex
Exceeded
Meaning The number of motion control instructions that is buffered for Buffered or Blending Buffer Modes exceeded the buffer
limit.
Source Motion Control Function Module Source details Axis/axes group Detection Controller
timing
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation If “axis” is given for the source details, operation is not
possible for relevant axis. Relevant axis decelerates to a
stop if it is in motion.
If “axes group” is given for the source details, operation is
not possible for relevant axes group. Relevant axes group
decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables
_MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
_MC_GRP[*].MFaultLvl.Active BOOL Axes Group Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
An axis instruction was executed Correct the program so that the num- Do not execute an axis instruction
when there was already a current ber of executed instructions does not when there is already a current
instruction and a buffered instruction exceed the buffer limit. instruction and a buffered instruction
for the same axis. for the same axis.
An axes group instruction was exe- Do not execute an axes group instruc-
cuted when there was already eight tion when there are already eight cur-
current instructions and buffered rent and buffered instructions for the
instructions for the same axis. same axis.
Attached None
information
Precautions/ None
Remarks
Event name Insufficient Travel Distance to Achieve Blending Transit Event code 54450000 hex
Velocity
Meaning There is not sufficient travel distance to accelerate or decelerate to the transit velocity.
Source Motion Control Function Module Source details Axis/axes group Detection At multi-execution
timing of instructions
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation If “axis” is given for the source details, operation is not
possible for relevant axis. Relevant axis decelerates to a
stop if it is in motion.
If “axes group” is given for the source details, operation is
not possible for relevant axes group. Relevant axes group
decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables _MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
_MC_GRP[*].MFaultLvl.Active BOOL Axes Group Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction There was not sufficient travel dis- Correct the program to allow a suffi- Check the operating specifications for
tance to accelerate the current com- cient travel distance according to the the relevant instruction and write the
mand to the transit velocity when the operating specifications of the instruc- program so that this error does not
Acceleration/Deceleration Over tion. Or, change the Accelera- occur. Or, change the Accelera-
parameter was set to generate a tion/Deceleration Over parameter to a tion/Deceleration Over parameter to a
minor fault and stop. setting other than to generate a minor setting other than to generate a minor
fault and stop. fault and stop.
Attached None
information
Precautions/ None
Remarks
Event name Move Link Constant Velocity Insufficient Travel Distance Event code 54460000 hex
Meaning The constant-velocity travel distance of the master axis is less than zero.
Source Motion Control Function Module Source details Axis Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant axis. Relevant axis
decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables
_MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
The constant velocity travel distance Correct the program so that the mas- Check the operating specifications for
of the master axis is below 0 for the ter axis travel distance is greater than the relevant instruction and write the
MC_MoveLink (Synchronous Posi- or equal to the master distance in program so that this error does not
tioning) instruction. acceleration plus the master distance occur.
in deceleration.
Attached None
information
Precautions/ None
Remarks
Event name Positioning Gear Operation Insufficient Target Velocity Event code 54470000 hex
Meaning For the MC_GearInPos (Positioning Gear Operation) instruction, the target velocity of the slave axis is too small to
achieve the required velocity.
Source Motion Control Function Module Source details Axis Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant axis. Relevant axis
decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables _MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
For the MC_GearInPos (Positioning Set the value of the Velocity (Target Check the operating specifications for
Gear Operation) instruction, the value Velocity) input variable to a value that the relevant instruction and write the
of the Velocity (Target Velocity) input is greater than the master axis veloc- program so that this error does not
variable is smaller than the master ity multiplied by the gear ratio when occur.
axis velocity multiplied by the gear the instruction is executed based on
ratio when the instruction was exe- the operating specifications of the
cuted. instruction.
Attached None
information
Precautions/ None
Remarks
Event name Same Start Point and End Point for Circular Interpolation Event code 54480000 hex
Meaning The start point and end point were the same when the radius method was specified for the MC_MoveCircular2D (Circu-
lar 2D Interpolation) instruction. Or, the start point, end point, and border point were the same when the border point
method was specified.
Source Motion Control Function Module Source details Axes group Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant axes group. Relevant
axes group decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables _MC_GRP[*].MFaultLvl.Active BOOL Axes Group Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
The start point and end point were the Correct the program so that the radius Do not use the same start point and
same when the radius method was specification is not used when the end point when you execute circular
specified for the MC_MoveCircular2D start point and end point for the interpolation with a radius specifica-
(Circular 2D Interpolation) instruction. instruction are the same. tion.
The start point, end point, and border Correct the program so that border Do not use the same start point, end
point were the same when the border point specification is not used when point, and border point when you exe-
Event name Circular Interpolation Center Specification Position Out of Event code 54490000 hex
Range A
Meaning The position specified for the center point exceeded the allowed range when the center method was specified for the
MC_MoveCircular2D (Circular 2D Interpolation) instruction.
Source Motion Control Function Module Source details Axes group Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant axes group. Relevant
axes group decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables
_MC_GRP[*].MFaultLvl.Active BOOL Axes Group Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
The difference between the distance Correct the center point so that the Correct the difference between the
from the start point to the center point difference between the distance from distance from the start point to the
and the distance between the end the start point to the center point input center point and the distance
point to the center point exceeded the variables and the distance between between the end point to the center
permitted value specified for the cor- the end point to the center point input point so that it does not exceed the
rection allowance ratio in the axes variables is less than the permitted correction allowance ratio in the axes
group settings when the center desig- value specified for the correction group settings.
nation method was specified for the allowance ratio in the axes group set-
MC_MoveCircular2D (Circular 2D tings.
Interpolation) instruction.
Attached None
information
Precautions/ None
Remarks
Event name Instruction Execution Error Caused by Count Mode Set- Event code 544A0000 hex
ting
Meaning An instruction that cannot be used when the Count Mode is set to Rotary Mode was executed for an axis that was set
to Rotary Mode.
Source Motion Control Function Module Source details Axes group Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant axes group. Relevant
axes group decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables _MC_GRP[*].MFaultLvl.Active BOOL Axes Group Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
An instruction that cannot be used Change the Count Mode of the rele- Confirm the Count Mode in which you
when the Count Mode is set to Rotary vant axis to Linear Mode. can execute the instruction and set
Mode was executed for an axis that the correct Count Mode for the axis.
was set to Rotary Mode.
Attached None
information
Precautions/ None
Remarks
Event name Parameter Selection Out of Range Event code 544C0000 hex
Meaning The parameter specified for the ParameterNumber input variable to a motion control instruction is out of range.
Source Motion Control Function Module Source details MC Common Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation The instruction is not executed.
System-defined Variable Data type Name
variables
_MC_COM.MFaultLvl.Active BOOL MC Common Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction Instruction input parameter exceeded Correct the parameter so that the Set the input parameter to the instruc-
the valid range of the input variable. valid range of the input variable is not tion so that the valid range of the input
exceeded for the relevant instruction. variable is not exceeded.
Attached None
information
Precautions/ None
Remarks
Event name Stop Method Selection Out of Range Event code 544D0000 hex
Meaning The parameter specified for the StopMode input variable to a motion control instruction is out of range.
Source Motion Control Function Module Source details Axis Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant axis. Relevant axis
decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables _MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
Instruction input parameter exceeded Correct the parameter so that the Set the input parameter to the instruc-
the valid range of the input variable. valid range of the input variable is not tion so that the valid range of the input
exceeded for the relevant instruction. variable is not exceeded.
Attached None
information
Precautions/ None
Remarks
Event name Latch ID Selection Out of Range for Trigger Input Condi- Event code 544E0000 hex
tion
Meaning The parameter specified for the TriggerInput::LatchID input variable to a motion control instruction is out of range.
Source Motion Control Function Module Source details Axis Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant axis. Relevant axis
decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables
_MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction Instruction input parameter exceeded Correct the parameter so that the Set the input parameter to the instruc-
the valid range of the input variable. valid range of the input variable is not tion so that the valid range of the input
exceeded for the relevant instruction. variable is not exceeded.
Attached None
information
Precautions/ None
Remarks
Event name Trigger Input Condition Mode Selection Out of Range Event code 54500000 hex
Meaning The parameter specified for the TriggerInput:: Mode input variable to a motion control instruction is out of range.
Source Motion Control Function Module Source details Axis Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant axis. Relevant axis
decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables
_MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
Instruction input parameter exceeded Correct the parameter so that the Set the input parameter to the instruc-
the valid range of the input variable. valid range of the input variable is not tion so that the valid range of the input
exceeded for the relevant instruction. variable is not exceeded.
Attached None
information
Precautions/ None
Remarks
Event name Drive Trigger Signal Selection Out of Range for Trigger Event code 54510000 hex
Input Condition
Meaning The parameter specified for the TriggerInput::InputDrive input variable to a motion control instruction is out of range.
Source Motion Control Function Module Source details Axis Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant axis. Relevant axis
decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables
_MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
Instruction input parameter exceeded Correct the parameter so that the Set the input parameter to the instruc-
the valid range of the input variable. valid range of the input variable is not tion so that the valid range of the input
exceeded for the relevant instruction. variable is not exceeded.
Attached None
information
Precautions/ None
Remarks
Event name Motion Control Instruction Re-execution Disabled (Axis Event code 54530000 hex
Specification)
Meaning An attempt was made to change the parameter for the Axis input variable when re-executing a motion control instruc-
tion. (This input variable cannot be changed when re-executing an instruction.)
Source Motion Control Function Module Source details Axis Detection At instruction re-
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant axis. Relevant axis
decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables _MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
A parameter for an input variable that Correct the program so that the Check the manual to see if the input
cannot be changed for re-execution parameter for the relevant input vari- variables to the relevant motion con-
was changed. able does not change when the rele- trol instruction can be changed by re-
vant instruction is re-executed. execution. Write the program so that
the input parameters for any input
variable that cannot be changed do
Event name Motion Control Instruction Re-execution Disabled (Buffer Event code 54540000 hex
Mode Selection)
Meaning An attempt was made to change the parameter for the BufferMode input variable when re-executing a motion control
instruction. (This input variable cannot be changed when re-executing an instruction.) A
Source Motion Control Function Module Source details Axis/axes group Detection At instruction re-
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation If “axis” is given for the source details, operation is not
possible for relevant axis. Relevant axis decelerates to a
stop if it is in motion.
If “axes group” is given for the source details, operation is
not possible for relevant axes group. Relevant axes group
decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables
_MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
_MC_GRP[*].MFaultLvl.Active BOOL Axes Group Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
A parameter for an input variable that Correct the program so that the Check the manual to see if the input
cannot be changed for re-execution parameter for the relevant input vari- variables to the relevant motion con-
was changed. able does not change when the rele- trol instruction can be changed by re-
vant instruction is re-executed. execution. Write the program so that
the input parameters for any input
variable that cannot be changed do
not change upon re-execution.
Attached None
information
Precautions/ None
Remarks
Event name Motion Control Instruction Re-execution Disabled Event code 54550000 hex
(Direction Selection)
Meaning An attempt was made to change the parameter for the Direction input variable when re-executing a motion control
instruction. (This input variable cannot be changed when re-executing an instruction.)
Source Motion Control Function Module Source details Axis Detection At instruction re-
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant axis. Relevant axis
decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables _MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
An input variable that cannot be Correct the program so that the Check the manual to see if the input
changed for re-execution was parameter for the relevant input vari- variables to the relevant motion con-
changed. able does not change when the rele- trol instruction can be changed by re-
vant instruction is re-executed. execution. Write the program so that
the input parameters for any input
variable that cannot be changed do
not change upon re-execution.
Attached None
information
Precautions/ None
Remarks
Event name Motion Control Instruction Re-execution Disabled (Execu- Event code 54560000 hex
tion Mode)
Meaning An attempt was made to change the parameter for the Periodic input variable when re-executing a motion control
instruction. (This input variable cannot be changed when re-executing an instruction.)
Source Motion Control Function Module Source details Axis Detection At instruction re-
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant axis. Relevant axis
decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables
_MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
A parameter for an input variable that Correct the program so that the Check the manual to see if the input
cannot be changed for re-execution parameter for the relevant input vari- variables to the relevant motion con-
was changed. able does not change when the rele- trol instruction can be changed by re-
vant instruction is re-executed. execution. Write the program so that
the input parameters for any input
variable that cannot be changed do
not change upon re-execution.
Attached None
information
Precautions/ None
Remarks
Event name Motion Control Instruction Re-execution Disabled (Axes Event code 54570000 hex
Group Specification)
Meaning An attempt was made to change the parameter for the AxesGroup input variable when re-executing a motion control
instruction. (This input variable cannot be changed when re-executing an instruction.)
Source Motion Control Function Module Source details Axes group Detection At instruction re-
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant axes group. Relevant
axes group decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables _MC_GRP[*].MFaultLvl.Active BOOL Axes Group Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
A parameter for an input variable that Correct the program so that the Check the manual to see if the input
cannot be changed for re-execution parameter for the relevant input vari- variables to the relevant motion con-
was changed. able does not change when the rele- trol instruction can be changed by re-
vant instruction is re-executed. execution. Write the program so that
the input parameters for any input
variable that cannot be changed do
Event name Motion Control Instruction Re-execution Disabled (Jerk Event code 54580000 hex
Setting)
Meaning An attempt was made to change the parameter for the Jerk input variable when re-executing a motion control instruc-
tion. (This input variable cannot be changed when re-executing an instruction.) A
Source Motion Control Function Module Source details Axis/axes group Detection At instruction re-
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation If “axis” is given for the source details, operation is not
possible for relevant axis. Relevant axis decelerates to a
stop if it is in motion.
If “axes group” is given for the source details, operation is
not possible for relevant axes group. Relevant axes group
decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables
_MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
_MC_GRP[*].MFaultLvl.Active BOOL Axes Group Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
A parameter for an input variable that Correct the program so that the Check the manual to see if the input
cannot be changed for re-execution parameter for the relevant input vari- variables to the relevant motion con-
was changed. able does not change when the rele- trol instruction can be changed by re-
vant instruction is re-executed. execution. Write the program so that
the input parameters for any input
variable that cannot be changed do
not change upon re-execution.
Attached None
information
Precautions/ None
Remarks
Event name Motion Control Instruction Re-execution Disabled Event code 54590000 hex
(Master Axis)
Meaning An attempt was made to change the parameter for the Master input variable when re-executing a motion control
instruction. (This input variable cannot be changed when re-executing an instruction.)
Source Motion Control Function Module Source details Axis Detection At instruction re-
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant axis. Relevant axis
decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables _MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
A parameter for an input variable that Correct the program so that the Check the manual to see if the input
cannot be changed for re-execution parameter for the relevant input vari- variables to the relevant motion con-
was changed. able does not change when the rele- trol instruction can be changed by re-
vant instruction is re-executed. execution. Write the program so that
the input parameters for any input
variable that cannot be changed do
not change upon re-execution.
Attached None
information
Precautions/ None
Remarks
Event name Motion Control Instruction Re-execution Disabled Event code 545A0000 hex
(MasterOffset)
Meaning An attempt was made to change the parameter for the MasterOffset input variable when re-executing a motion control
instruction. (This input variable cannot be changed when re-executing an instruction.)
Source Motion Control Function Module Source details Axis Detection At instruction re-
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant axis. Relevant axis
decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables
_MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
A parameter for an input variable that Correct the program so that the Check the manual to see if the input
cannot be changed for re-execution parameter for the relevant input vari- variables to the relevant motion con-
was changed. able does not change when the rele- trol instruction can be changed by re-
vant instruction is re-executed. execution. Write the program so that
the input parameters for any input
variable that cannot be changed do
not change upon re-execution.
Attached None
information
Precautions/ None
Remarks
Event name Motion Control Instruction Re-execution Disabled Event code 545B0000 hex
(MasterScaling)
Meaning An attempt was made to change the parameter for the MasterScaling input variable when re-executing a motion control
instruction. (This input variable cannot be changed when re-executing an instruction.)
Source Motion Control Function Module Source details Axis Detection At instruction re-
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant axis. Relevant axis
decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables _MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
A parameter for an input variable that Correct the program so that the Check the manual to see if the input
cannot be changed for re-execution parameter for the relevant input vari- variables to the relevant motion con-
was changed. able does not change when the rele- trol instruction can be changed by re-
vant instruction is re-executed. execution. Write the program so that
the input parameters for any input
variable that cannot be changed do
Event name Motion Control Instruction Re-execution Disabled Event code 545C0000 hex
(MasterStartDistance)
Meaning An attempt was made to change the parameter for the MasterStartDistance input variable when re-executing a motion
control instruction. (This input variable cannot be changed when re-executing an instruction.) A
Source Motion Control Function Module Source details Axis Detection At instruction re-
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant axis. Relevant axis
decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables
_MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
A parameter for an input variable that Correct the program so that the Check the manual to see if the input
cannot be changed for re-execution parameter for the relevant input vari- variables to the relevant motion con-
was changed. able does not change when the rele- trol instruction can be changed by re-
vant instruction is re-executed. execution. Write the program so that
the input parameters for any input
variable that cannot be changed do
not change upon re-execution.
Attached None
information
Precautions/ None
Remarks
Event name Motion Control Instruction Re-execution Disabled Event code 545D0000 hex
(Continuous)
Meaning An attempt was made to change the parameter for the Continuous input variable when re-executing a motion control
instruction. (This input variable cannot be changed when re-executing an instruction.)
Source Motion Control Function Module Source details Axis Detection At instruction re-
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant axis. Relevant axis
decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables _MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
A parameter for an input variable that Correct the program so that the Check the manual to see if the input
cannot be changed for re-execution parameter for the relevant input vari- variables to the relevant motion con-
was changed. able does not change when the rele- trol instruction can be changed by re-
vant instruction is re-executed. execution. Write the program so that
the input parameters for any input
variable that cannot be changed do
not change upon re-execution.
Attached None
information
Precautions/ None
Remarks
Event name Motion Control Instruction Re-execution Disabled Event code 545E0000 hex
(MoveMode)
Meaning An attempt was made to change the parameter for the MoveMode input variable when re-executing a motion control
instruction. (This input variable cannot be changed when re-executing an instruction.)
Source Motion Control Function Module Source details Axis Detection At instruction re-
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant axis. Relevant axis
decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables
_MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
A parameter for an input variable that Correct the program so that the Check the manual to see if the input
cannot be changed for re-execution parameter for the relevant input vari- variables to the relevant motion con-
was changed. able does not change when the rele- trol instruction can be changed by re-
vant instruction is re-executed. execution. Write the program so that
the input parameters for any input
variable that cannot be changed do
not change upon re-execution.
Attached None
information
Precautions/ None
Remarks
Event name Illegal Auxiliary Axis Specification Event code 545F0000 hex
Meaning The axis specified for the Auxiliary input variable to a motion control instruction does not exist.
Source Motion Control Function Module Source details Axis Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant slave axis. The slave
axis decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables
_MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
An axis does not exist for the variable Correct the instruction so that the Make sure to specify variables that
specified for the Auxiliary input vari- variable exists for the axis that was exist when specifying variables for the
able to the instruction. specified for the instruction. input parameters to an instruction.
Attached None
information
Precautions/ None
Remarks
Event name Illegal Axes Group Specification Event code 54610000 hex
Meaning The axes group specified for the AxesGroup input variable to a motion control instruction does not exist or is not a used
group.
Source Motion Control Function Module Source details MC Common Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation The relevant instruction is not executed.
System-defined Variable Data type Name
variables
_MC_COM.MFaultLvl.Active BOOL MC Common Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
An axes group does not exist for the Correct the specification for the Specify a variable that exists when
variable specified for the AxesGroup instruction so that the specified axes specifying a variable for an input
input variable to the instruction. group exists. parameter to an instruction.
The axes group specified for the Correct the axes group specified by Set a used axes group for the Axes-
AxesGroup input variable to the the instruction to a used group. Group input variable to the instruc-
instruction is not specified as a used tion.
group.
Attached None
information
Precautions/ None
Remarks
Event name Illegal Master Axis Specification Event code 54620000 hex
Meaning The axis that is specified for the Master input variable to a motion control instruction is not correct.
Source Motion Control Function Module Source details MC common or Detection At instruction
axis timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant slave axis. The slave
axis decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables
_MC_COM.MFaultLvl.Active BOOL MC Common Minor Fault Occurrence
_MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
An axis does not exist for the variable Correct the instruction so that the Specify a variable that exists when
specified for the Master input variable variable exists for the axis that was specifying a variable for an input
to the instruction. specified for the instruction. parameter to an instruction.
The axis that was specified for the Correct the variable that is input to the Set the variable that is input to the
Master input variable to the Master input variable of the Master input variable of the
MC_Phasing (Shift Master Axis MC_Phasing (Shift Master Axis MC_Phasing (Shift Master Axis
Phase) instruction is not the master Phase) instruction to the axis variable Phase) instruction to the axis variable
axis for syncing. that is specified as the master axis of that is specified as the master axis of
the synchronized control instruction. the synchronized control instruction.
The master axis and a slave axis are Assign the axes that are input to the Specify axes that are assigned to the
not assigned to the same task. Master and Slave input variables to same tasks for the master and slave
the instruction to the same task. axes.
Attached None
information
Precautions/ None
Remarks
Event name Motion Control Instruction Re-execution Disabled (Slave- Event code 54630000 hex
Offset)
Meaning An attempt was made to change the SlaveOffset input variable when re-executing a motion control instruction. (This
input variable cannot be changed when re-executing an instruction.)
Source Motion Control Function Module Source details Axis Detection At instruction re-
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant axis. Relevant axis
decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables _MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
A parameter for an input variable that Correct the program so that the Check the manual to see if the input
cannot be changed for re-execution parameter for the relevant input vari- variables to the relevant motion con-
was changed. able does not change when the rele- trol instruction can be changed by re-
vant instruction is re-executed. execution. Write the program so that
the input parameters for any input
variable that cannot be changed do
Event name Motion Control Instruction Re-execution Disabled Event code 54640000 hex
(SlaveScaling)
Meaning An attempt was made to change the SlaveScaling input variable when re-executing a motion control instruction. (This
input variable cannot be changed when re-executing an instruction.) A
Source Motion Control Function Module Source details Axis Detection At instruction re-
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant axis. Relevant axis
decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables
_MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
A parameter for an input variable that Correct the program so that the Check the manual to see if the input
cannot be changed for re-execution parameter for the relevant input vari- variables to the relevant motion con-
was changed. able does not change when the rele- trol instruction can be changed by re-
vant instruction is re-executed. execution. Write the program so that
the input parameters for any input
variable that cannot be changed do
not change upon re-execution.
Attached None
information
Precautions/ None
Remarks
Event name Motion Control Instruction Re-execution Disabled (Start- Event code 54650000 hex
Position)
Meaning An attempt was made to change the StartPosition input variable when re-executing a motion control instruction. (This
input variable cannot be changed when re-executing an instruction.)
Source Motion Control Function Module Source details Axis Detection At instruction re-
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant axis. Relevant axis
decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables _MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
A parameter for an input variable that Correct the program so that the Check the manual to see if the input
cannot be changed for re-execution parameter for the relevant input vari- variables to the relevant motion con-
was changed. able does not change when the rele- trol instruction can be changed by re-
vant instruction is re-executed. execution. Write the program so that
the input parameters for any input
variable that cannot be changed do
not change upon re-execution.
Attached None
information
Precautions/ None
Remarks
Event name Instruction Execution Error with Undefined Home Event code 54660000 hex
Meaning High-speed homing or an interpolation instruction was executed when home was undefined.
Source Motion Control Function Module Source details Axis/axes group Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation If “axis” is given for the source details, operation is not
possible for relevant axis. Relevant axis decelerates to a
stop if it is in motion.
If “axes group” is given for the source details, operation is
not possible for relevant axes group. Relevant axes group
decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables
_MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
_MC_GRP[*].MFaultLvl.Active BOOL Axes Group Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
High-speed homing was executed Execute the high-speed homing oper- Execute the high-speed homing
when home was undefined. ation only after homing to define instruction only after home is defined
home. by homing.
Event name Motion Control Instruction Re-execution Disabled (Posi- Event code 54670000 hex
tion Type)
Meaning An attempt was made to change the ReferenceType input variable when re-executing a motion control instruction. (This
input variable cannot be changed when re-executing an instruction.)
Source Motion Control Function Module Source details Axis Detection At instruction re-
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant axis. Relevant axis
decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables _MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
A parameter for an input variable that Correct the program so that the Check the manual to see if the input
cannot be changed for re-execution parameter for the relevant input vari- variables to the relevant motion con-
was changed. able does not change when the rele- trol instruction can be changed by re-
vant instruction is re-executed. execution. Write the program so that
the input parameters for any input
variable that cannot be changed do
not change upon re-execution.
Attached None
information
Precautions/ None
Remarks
Event name Unused Axis Specification for Master Axis Event code 54680000 hex
Meaning The master axis specified for a motion control instruction is an unused axis.
Source Motion Control Function Module Source details Axis Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant slave axis. Relevant
slave axis decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables
_MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction The master axis specified for a motion Set a used axis for the master axis Make sure the master axis specified
control instruction is an unused axis. that is specified for the instruction. for the motion control instruction is a
used axis.
Attached None
information
Precautions/ None
Remarks
Event name First Position Setting Out of Range Event code 54690000 hex
Meaning The parameter specified for the FirstPosition input variable to a motion control instruction is out of range.
Source Motion Control Function Module Source details Axis Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant axis. Relevant axis
decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables
_MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
Instruction input parameter exceeded Correct the parameter so that the Set the input parameter to the instruc-
the valid range of the input variable. valid range of the input variable is not tion so that the valid range of the input
exceeded for the relevant instruction. variable is not exceeded.
Attached None
information
Precautions/ None
Remarks
Event name Illegal First/Last Position Size Relationship (Linear Mode) Event code 546B0000 hex
Meaning The parameter specified for the LastPosition input variable to a motion control instruction is smaller than the parameter
specified for the FirstPosition input variable.
Source Motion Control Function Module Source details Axis Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant axis. Relevant axis
decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables
_MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction The value of the LastPosition input Correct the program so that the value Write the program so that the value of
parameter is less than the value of the of the LastPosition specified for the the LastPosition specified for the
FirstPosition input variable for the instruction is larger than the value of instruction is larger than the value of
instruction when the Count Mode is the FirstPosition. Or, change the the FirstPosition. Or, check to make
set to Linear Mode. value of the Count Mode to Rotary sure that the Count Mode of the rele-
Mode. vant axis is set to Rotary Mode.
Attached None
information
Precautions/ None
Remarks
Event name Master Sync Start Position Setting Out of Range Event code 546C0000 hex
Meaning The parameter specified for the MasterSyncPosition input variable to a motion control instruction is out of range.
Source Motion Control Function Module Source details Axis Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant slave axis. Relevant
slave axis decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables
_MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
Instruction input parameter exceeded Correct the parameter so that the Set the input parameter to the instruc-
the valid range of the input variable. valid range of the input variable is not tion so that the valid range of the input
exceeded for the relevant instruction. variable is not exceeded.
Attached None
information
Precautions/ None
Remarks
Event name Slave Sync Start Position Setting Out of Range Event code 546D0000 hex
Meaning The parameter specified for the SlaveSyncPosition input variable to a motion control instruction is out of range.
Source Motion Control Function Module Source details Axis Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant axis. Relevant axis
decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables
_MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
Instruction input parameter exceeded Correct the parameter so that the Set the input parameter to the instruc-
the valid range of the input variable. valid range of the input variable is not tion so that the valid range of the input
exceeded for the relevant instruction. variable is not exceeded.
Attached None
information
Precautions/ None
Remarks
Event name Jerk Override Factor Out of Range Event code 546F 0000 hex
Meaning The parameter specified for the JerkFactor input variable to a motion control instruction is out of range.
Source Motion Control Function Module Source details Axis/axes group Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant axis. Relevant axis
decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables
_MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
Instruction input parameter exceeded Correct the parameter so that the Set the input parameter to the instruc-
the valid range of the input variable. valid range of the input variable is not tion so that the valid range of the input
exceeded for the relevant instruction. variable is not exceeded.
Attached None
information
Precautions/ None
Remarks
Event name Acceleration/Deceleration Override Factor Out of Range Event code 54700000 hex
Meaning The parameter specified for the AccFactor input variable to a motion control instruction is out of range.
Source Motion Control Function Module Source details Axis/axes group Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant axis. Relevant axis
decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables _MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
Instruction input parameter exceeded Correct the parameter so that the Set the input parameter to the instruc-
the valid range of the input variable. valid range of the input variable is not tion so that the valid range of the input
exceeded for the relevant instruction. variable is not exceeded.
Attached None
information
Precautions/ None
Remarks
Event name First Position Method Specification Out of Range Event code 54710000 hex
Meaning The parameter specified for the StartMode input variable to a motion control instruction is out of range.
Source Motion Control Function Module Source details Axis Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant axis. Relevant axis
decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables
_MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
Instruction input parameter exceeded Correct the parameter so that the Set the input parameter to the instruc-
the valid range of the input variable. valid range of the input variable is not tion so that the valid range of the input
exceeded for the relevant instruction. variable is not exceeded.
Attached None
information
Precautions/ None
Remarks
Event name Motion Control Instruction Re-execution Disabled (First Event code 54720000 hex
Position Method)
Meaning An attempt was made to change the StartMode input variable when re-executing a motion control instruction. (This
input variable cannot be changed when re-executing an instruction.)
Source Motion Control Function Module Source details Axis Detection At instruction re-
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant axis. Relevant axis
decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables _MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
A parameter for an input variable that Correct the program so that the Check the manual to see if the input
cannot be changed for re-execution parameter for the relevant input vari- variables to the relevant motion con-
was changed. able does not change when the rele- trol instruction can be changed by re-
vant instruction is re-executed. execution. Write the program so that
the input parameters for any input
variable that cannot be changed do
Event name Unused Axis Specification for Auxiliary Axis Event code 54740000 hex
Meaning The axis specified for the Auxiliary input variable to a motion control instruction is an unused axis.
Source Motion Control Function Module Source details Axis Detection At instruction
timing execution
A
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant slave axis. Relevant
slave axis decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables
_MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction The axis specified for the Auxiliary Set a used axis for the axis that is Make sure that the axis specified for
input variable to the instruction is an specified for the instruction. Or, cor- the instruction is a used axis.
unused axis. rect the parameter so that it specifies
a used axis.
Attached None
information
Precautions/ None
Remarks
Event name Position Gear Value Error Event code 54750000 hex
Meaning Synchronized motion is not possible for the velocity, acceleration rate, and deceleration rate that were input to a motion
control instruction.
Source Motion Control Function Module Source details Axis Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant slave axis. Relevant
slave axis decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables
_MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction The specified synchronized motion Correct the program to enable syn- Check the processing of the relevant
cannot be performed at the velocity, chronized motion according to the instruction and set a value that allows
acceleration rate, or deceleration rate operating specifications of the for synchronized motion.
that is input to the instruction. MC_GearInPos (Positioning Gear
Operation) instruction.
Attached None
information
Precautions/ None
Remarks
Event name Position Gear Master Axis Zero Velocity Event code 54760000 hex
Meaning The velocity of the master axis was zero when a motion control instruction was started.
Source Motion Control Function Module Source details Axis Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant slave axis. Relevant
slave axis decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables _MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
The velocity of the master axis was 0 Correct the program so that the veloc- Write the program so that the velocity
when the instruction was started. ity of the master axis is not 0 when of the master axis is not 0 when the
the instruction is started. instruction is started.
Attached None
information
Precautions/ None
Remarks
Event name Target Position Setting Out of Range Event code 54780000 hex
Meaning The parameter specified for the Position input variable to a motion control instruction is out of range.
Source Motion Control Function Module Source details Axis/axes group Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation If “axis” is given for the source details, operation is not
possible for relevant axis. Relevant axis decelerates to a
stop if it is in motion.
If “axes group” is given for the source details, operation is
not possible for relevant axes group. Relevant axes group
decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables
_MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
_MC_GRP[*].MFaultLvl.Active BOOL Axes Group Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
Instruction input parameter exceeded Correct the parameter so that the Set the input parameter to the instruc-
the valid range of the input variable. valid range of the input variable is not tion so that the valid range of the input
exceeded for the relevant instruction. variable is not exceeded.
A
Event name Travel Distance Out of Range Event code 54790000 hex
Meaning The parameter that was specified for the Distance input variable to a motion control instruction is out of range or the
target position with the value of Distance added is out of range.
Source Motion Control Function Module Source details Axis/axes group Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation If “axis” is given for the source details, operation is not
possible for relevant axis. Relevant axis decelerates to a
stop if it is in motion.
If “axes group” is given for the source details, operation is
not possible for relevant axes group. Relevant axes group
decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables _MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
_MC_GRP[*].MFaultLvl.Active BOOL Axes Group Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction The absolute value of the instruction Correct the input parameter specified Write the program so that the travel
input parameter exceeded the range for the Distance input variable of the distance and the target position for
of 40-bit data when it is converted to instruction so that the travel distance the instruction are not out of range.
pulses. and the target position are not out of
range.
For a Linear Mode axis, the target
position with the travel distance
added exceeded signed 40-bit data
when the absolute value is converted
to pulses.
Attached None
information
Precautions/ None
Remarks
Event name Cam Table Start Point Setting Out of Range Event code 547A0000 hex
Meaning The parameter specified for the StartPosition input variable to a motion control instruction is out of range.
Source Motion Control Function Module Source details Axis Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant axis. Relevant axis
decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables
_MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
Instruction input parameter exceeded Correct the parameter so that the Set the input parameter to the instruc-
the valid range of the input variable. valid range of the input variable is not tion so that the valid range of the input
exceeded for the relevant instruction. variable is not exceeded.
Attached None
information
Precautions/ None
Remarks
Event name Cam Master Axis Following First Position Setting Out of Event code 547B0000 hex
Range
Meaning The parameter specified for the MasterStartDistance input variable to a motion control instruction is out of range.
Source Motion Control Function Module Source details Axis Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant axis. Relevant axis
decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables
_MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
Instruction input parameter exceeded Correct the parameter so that the Set the input parameter to the instruc-
the valid range of the input variable. valid range of the input variable is not tion so that the valid range of the input
exceeded for the relevant instruction. variable is not exceeded.
Attached None
information
Precautions/ None
Remarks
Event name Circular Interpolation Radius Setting Error Event code 547C0000 hex
Meaning It was not possible to create a circular path for the specified radius when the radius method was specified for the
MC_MoveCircular2D (Circular 2D Interpolation) instruction.
Source Motion Control Function Module Source details Axes group Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant axes group. Relevant
axes group decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables
_MC_GRP[*].MFaultLvl.Active BOOL Axes Group Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction For the MC_MoveCircular2D (Circular Correct the radius so that the circular Check the processing of the relevant
2D Interpolation) instruction, it was path can be created. instruction and set a radius that
not possible to create a circular path allows the creation of a circular path.
for the specified radius when the
radius method was specified for circu-
lar interpolation.
Attached None
Event name Circular Interpolation Radius Overflow Event code 547D0000 hex
Meaning For the MC_MoveCircular2D (Circular 2D Interpolation) instruction, the radius of the circle exceeded the maximum
value for the border point or center specification method.
Source Motion Control Function Module Source details Axes group Detection At instruction
timing execution
A
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant axes group. Relevant
axes group decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables
_MC_GRP[*].MFaultLvl.Active BOOL Axes Group Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
For the MC_MoveCircular2D (Circular Correct the input parameter so that Check the processing of the instruc-
2D Interpolation) instruction, the the circle radius does not exceed 40- tion and correct the input parameters
radius of the circle exceeded 40-bit bit data when it is converted to pulses so that the circle radius does not
data when it is converted to pulses for based on the operating specifications exceed 40-bit data when it is con-
the border point or center specifica- of the instruction. verted to pulses.
tion method. Border point specification: Start point,
border point, and end point
Center point specification: Start point,
end point, and center point
Attached None
information
Precautions/ If the maximum radius is exceeded when the radius specification method is used, a Border Point/Center Posi-
Remarks tion/Radius Specification Out of Range error occurs.
Event name Circular Interpolation Setting Out of Range Event code 547E0000 hex
Meaning The parameter specified for the CircAxes input variable to a motion control instruction is out of range.
Source Motion Control Function Module Source details Axes group Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant axes group. Relevant
axes group decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables
_MC_GRP[*].MFaultLvl.Active BOOL Axes Group Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
Instruction input parameter exceeded Correct the parameter so that the Set the input parameters to the
the valid range of the input variable. valid range of the input variable is not instruction so that the valid range of
exceeded for the relevant instruction. the input variables is not exceeded.
The axes that were specified in Cir- Set the axes that are specified for Cir- Make sure that the axes that are
cAxes are not included in the compo- cAxes so that they are in an axes specified for CircAxes are in an axes
sition axes in the Axes Group group configuration. group configuration.
Settings.
The same axis was specified for both Correct the settings so that the two Write the program so that the two
axes of CircAxes. axes specified for CircAxes are differ- axes specified for CircAxes are differ-
ent axes. ent axes.
Attached None
information
Precautions/ None
Remarks
Event name Auxiliary/Slave Axis Numbers Not in Ascending Order Event code 547F 0000 hex
Meaning The values of the parameters for the Auxiliary and Slave input variables to a motion control instruction are not in
ascending order.
Source Motion Control Function Module Source details Axis Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant axis. Relevant axis
decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables _MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
The parameters for the Auxiliary and Correct the axis numbers specified for Write the program so that the axis
Slave input variables to the instruction the Auxiliary and Slave input parame- numbers specified for Auxiliary and
are not in ascending order. ters to the instruction so that they are Slave are in ascending order.
in ascending order.
Attached None
information
Precautions/ None
Remarks
Event name Cam Table Property Ascending Data Error at Update Event code 54800000 hex
Meaning A phase that was not in ascending order was found during calculating the number of valid data. Or, after calculations,
the number of valid data is 0.
Source Motion Control Function Module Source details MC common Detection During instruc-
timing tion execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Not affected.
System-defined Variable Data type Name
variables
_MC_COM.MFaultLvl.Active BOOL MC Common Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
A phase that was not in ascending Place the phase data into ascending Place the phase data into ascending
order was found when calculating the order in the cam table data. order in the cam table data.
number of valid data.
After calculations, the number of valid Correct the cam table data so that it Create the cam table data so that it
data is 0. includes phases that are not 0. includes phases that are not 0.
Attached None
information
Event name MC_Write Target Out of Range Event code 54810000 hex
Meaning The parameter specified for the Target input variable to a motion control instruction is out of range.
Source Motion Control Function Module Source details MC common Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Not affected. A
System-defined Variable Data type Name
variables
_MC_COM.MFaultLvl.Active BOOL MC Common Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction Instruction input parameter exceeded Correct the parameter so that the Set the input parameter to the instruc-
the valid range of the input variable. valid range of the input variable is not tion so that the valid range of the input
exceeded for the relevant instruction. variable is not exceeded.
Attached None
information
Precautions/ None
Remarks
Event name Master Travel Distance Specification Out of Range Event code 54820000 hex
Meaning The parameter specified for the MasterDistance input variable to a motion control instruction is out of range.
Source Motion Control Function Module Source details Axis Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant slave axis. Relevant
slave axis decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables _MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
Instruction input parameter exceeded Correct the parameter so that the Set the input parameter to the instruc-
the valid range of the input variable. valid range of the input variable is not tion so that the valid range of the input
exceeded for the relevant instruction. variable is not exceeded.
Attached None
information
Precautions/ None
Remarks
Event name Master Distance in Acceleration Specification Out of Event code 54830000 hex
Range
Meaning The parameter specified for the MasterDistanceACC input variable to a motion control instruction is out of range.
Source Motion Control Function Module Source details Axis Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant slave axis. Relevant
slave axis decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables
_MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction Instruction input parameter exceeded Correct the parameter so that the Set the input parameter to the instruc-
the valid range of the input variable. valid range of the input variable is not tion so that the valid range of the input
exceeded for the relevant instruction. variable is not exceeded.
Attached None
information
Precautions/ None
Remarks
Event name Master Distance in Deceleration Specification Out of Event code 54840000 hex
Range
Meaning The parameter specified for the MasterDistanceDEC input variable to a motion control instruction is out of range.
Source Motion Control Function Module Source details Axis Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant slave axis. Relevant
slave axis decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables
_MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction Instruction input parameter exceeded Correct the parameter so that the Set the input parameter to the instruc-
the valid range of the input variable. valid range of the input variable is not tion so that the valid range of the input
exceeded for the relevant instruction. variable is not exceeded.
Attached None
information
Precautions/ None
Remarks
Event name Execution Mode Selection Out of Range Event code 54870000 hex
Meaning The parameter specified for the ExecutionMode input variable to a motion control instruction is out of range.
Source Motion Control Function Module Source details Axis Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant axis. Relevant axis
decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables _MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
Instruction input parameter exceeded Correct the parameter so that the Set the input parameter to the instruc-
the valid range of the input variable. valid range of the input variable is not tion so that the valid range of the input
exceeded for the relevant instruction. variable is not exceeded.
Attached None
information
Precautions/ None
Remarks
Event name Permitted Following Error Out of Range Event code 54880000 hex
Meaning The parameter specified for the PermittedDeviation input variable to a motion control instruction is out of range.
Source Motion Control Function Module Source details MC Common Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation The instruction is not executed.
System-defined Variable Data type Name
variables _MC_COM.MFaultLvl.Active BOOL MC Common Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
Instruction input parameter exceeded Correct the parameter so that the Set the input parameter to the instruc-
the valid range of the input variable. valid range of the input variable is not tion so that the valid range of the input
exceeded for the relevant instruction. variable is not exceeded.
Attached None
information
Precautions/ None
Remarks
Event name End Point Specification Out of Range Event code 548A0000 hex
Meaning The parameter specified for the EndPoint input variable to a motion control instruction is out of range.
Source Motion Control Function Module Source details Axes group Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant axes group. Relevant
axes group decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables
_MC_GRP[*].MFaultLvl.Active BOOL Axes Group Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
The instruction input parameter Correct the parameter so that the Set the input parameter to the instruc-
exceeded the range of signed 40-bit valid range of the input variable is not tion so that the valid range of the input
data when it is converted to pulses. exceeded for the relevant instruction. variable is not exceeded.
Attached None
information
Precautions/ None
Remarks
Event name Slave Travel Distance Specification Out of Range Event code 548B0000 hex
Meaning The parameter specified for the SlaveDistance input variable to a motion control instruction is out of range.
Source Motion Control Function Module Source details Axis Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant slave axis. Relevant
slave axis decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables _MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
The instruction input parameter Correct the parameter so that the Set the input parameter to the instruc-
exceeded the range of 40-bit data valid range of the input variable is not tion so that the valid range of the input
when it is converted to pulses. exceeded for the relevant instruction. variable is not exceeded.
Attached None
information
Precautions/ None
Remarks
Event name Phase Shift Amount Out of Range Event code 548C0000 hex
Meaning The parameter specified for the PhaseShift input variable to a motion control instruction is out of range.
Source Motion Control Function Module Source details Axis Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant slave axis. Relevant
slave axis decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables
_MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
The absolute value of the instruction Correct the parameter so that the Set the input parameter to the instruc-
input parameter exceeded the range valid range of the input variable is not tion so that the valid range of the input
of 40-bit data when it is converted to exceeded for the relevant instruction. variable is not exceeded.
pulses.
Attached None
information
Precautions/ None
Remarks
Event name Feeding Distance Out of Range Event code 548D0000 hex
Meaning The parameter specified for the FeedDistance input variable to a motion control instruction is out of range.
Source Motion Control Function Module Source details Axis Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant axes. Relevant axis
decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables
_MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
The absolute value of the instruction Correct the parameter so that the Set the input parameter to the instruc-
input parameter exceeded the range valid range of the input variable is not tion so that the valid range of the input
of 40-bit data when it is converted to exceeded for the relevant instruction. variable is not exceeded.
pulses.
Attached None
information
Precautions/ None
Remarks
Event name Relative Position Selection Out of Range Event code 548F0000 hex
Meaning The parameter specified for the Relative input variable to a motion control instruction is out of range.
Source Motion Control Function Module Source details Axis Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant slave axis. Relevant
slave axis decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables _MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
Instruction input parameter exceeded Correct the parameter so that the Set the input parameter to the instruc-
the valid range of the input variable. valid range of the input variable is not tion so that the valid range of the input
exceeded for the relevant instruction. variable is not exceeded.
Attached None
information
Precautions/ None
Remarks
Event name Cam Transition Specification Out of Range Event code 54900000 hex
Meaning The parameter specified for the CamTransition input variable to a motion control instruction is out of range.
Source Motion Control Function Module Source details Axis Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant slave axis. Relevant
slave axis decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables
_MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
Instruction input parameter exceeded Correct the parameter so that the Set the input parameter to the instruc-
the valid range of the input variable. valid range of the input variable is not tion so that the valid range of the input
exceeded for the relevant instruction. variable is not exceeded.
Attached None
information
Precautions/ None
Remarks
Event name Synchronized Control End Mode Selection Out of Range Event code 54910000 hex
Meaning The parameter specified for the OutMode input variable to a motion control instruction is out of range.
Source Motion Control Function Module Source details Axis Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant slave axis. Relevant
slave axis decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables
_MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction Instruction input parameter exceeded Correct the parameter so that the Set the input parameter to the instruc-
the valid range of the input variable. valid range of the input variable is not tion so that the valid range of the input
exceeded for the relevant instruction. variable is not exceeded.
Attached None
information
Precautions/ None
Remarks
Event name Enable External Latch Instruction Execution Disabled Event code 54920000 hex
Meaning _mcImmediateStop was specified for the StopMode input variable when the MC_TouchProbe (Enable External Latch)
instruction was executed in Drive Mode for an encoder axis.
Source Motion Control Function Module Source details Axis Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant axis.
System-defined Variable Data type Name
variables
_MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
_mcImmediateStop was specified for Correct the program so that If you specify _mcImmediateStop and
the StopMode input variable when the _mcImmediateStop is not specified use Drive Mode, execute the
MC_TouchProbe (Enable External for StopMode for the encoder axis. MC_TouchProbe (Enable External
Latch) instruction was executed in Latch) instruction only for a servo
Drive Mode for an encoder axis. axis.
Attached None
information
Precautions/ None
Event name Master Axis Offset Out of Range Event code 54930000 hex
Meaning The parameter specified for the MasterOffset input variable to a motion control instruction is out of range.
Source Motion Control Function Module Source details Axis Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for the slave axis. Relevant slave
axis decelerates to a stop if it is in motion. A
System-defined Variable Data type Name
variables
_MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction The instruction input parameter Correct the parameter so that the Set the input parameter to the instruc-
exceeded the range of signed 40-bit valid range of the input variable is not tion so that the valid range of the input
data when it is converted to pulses. exceeded for the relevant instruction. variable is not exceeded.
Attached None
information
Precautions/ None
Remarks
Event name Slave Axis Offset Out of Range Event code 54940000 hex
Meaning The parameter specified for the SlaveOffset input variable to a motion control instruction is out of range.
Source Motion Control Function Module Source details Axis Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant slave axis. Relevant
slave axis decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables
_MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
The instruction input parameter Correct the parameter so that the Set the input parameter to the instruc-
exceeded the range of signed 40-bit valid range of the input variable is not tion so that the valid range of the input
data when it is converted to pulses. exceeded for the relevant instruction. variable is not exceeded.
Attached None
information
Precautions/ None
Remarks
Event name Command Current Position Count Selection Out of Range Event code 54950000 hex
Meaning The parameter specified for the CmdPosMode input variable to a motion control instruction is out of range.
Source Motion Control Function Module Source details Axis Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant axis. Relevant axis
decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables _MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
Instruction input parameter exceeded Correct the parameter so that the Set the input parameter to the instruc-
the valid range of the input variable. valid range of the input variable is not tion so that the valid range of the input
exceeded for the relevant instruction. variable is not exceeded.
Attached None
information
Precautions/ None
Remarks
Event name Master Axis Gear Ratio Numerator Out of Range Event code 54960000 hex
Meaning The parameter specified for the RatioNumeratorMaster input variable to a motion control instruction is out of range.
Source Motion Control Function Module Source details Axis Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant slave axis. Relevant
slave axis decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables
_MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
Instruction input parameter exceeded Correct the parameter so that the Set the input parameter to the instruc-
the valid range of the input variable. valid range of the input variable is not tion so that the valid range of the input
exceeded for the relevant instruction. variable is not exceeded.
Attached None
information
Precautions/ None
Remarks
Event name Master Axis Gear Ratio Denominator Out of Range Event code 54970000 hex
Meaning The parameter specified for the RatioDenominatorMaster input variable to a motion control instruction is out of range.
Source Motion Control Function Module Source details Axis Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant slave axis. Relevant
slave axis decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables
_MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
Instruction input parameter exceeded Correct the parameter so that the Set the input parameter to the instruc-
the valid range of the input variable. valid range of the input variable is not tion so that the valid range of the input
exceeded for the relevant instruction. variable is not exceeded.
Attached None
information
Precautions/ None
Remarks
Event name Auxiliary Axis Gear Ratio Denominator Out of Range Event code 54990000 hex
Meaning The parameter specified for the RatioDenominatorAuxiliary input variable to a motion control instruction is out of range.
Source Motion Control Function Module Source details Axis Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant slave axis. Relevant
slave axis decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables
_MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
Instruction input parameter exceeded Correct the parameter so that the Set the input parameter to the instruc-
the valid range of the input variable. valid range of the input variable is not tion so that the valid range of the input
exceeded for the relevant instruction. variable is not exceeded.
Attached None
information
Precautions/ None
Remarks
Event name Master Axis Position Type Selection Out of Range Event code 549A0000 hex
Meaning The parameter specified for the ReferenceTypeMaster input variable to a motion control instruction is out of range.
Source Motion Control Function Module Source details Axis Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant slave axis. Relevant
slave axis decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables
_MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
Instruction input parameter exceeded Correct the parameter so that the Set the input parameter to the instruc-
the valid range of the input variable. valid range of the input variable is not tion so that the valid range of the input
exceeded for the relevant instruction. variable is not exceeded.
Attached None
information
Precautions/ None
Remarks
Event name Auxiliary Axis Position Type Selection Out of Range Event code 549B0000 hex
Meaning The parameter specified for the ReferenceTypeAuxiliary input variable to a motion control instruction is out of range.
Source Motion Control Function Module Source details Axis Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant slave axis. Relevant
slave axis decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables _MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
Instruction input parameter exceeded Correct the parameter so that the Set the input parameter to the instruc-
the valid range of the input variable. valid range of the input variable is not tion so that the valid range of the input
exceeded for the relevant instruction. variable is not exceeded.
Attached None
information
Precautions/ None
Remarks
Event name Target Position Ring Counter Out of Range Event code 549C0000 hex
Meaning Operation is not possible because the target position is out of range for the ring counter of the executed instruction.
Source Motion Control Function Module Source details Axis Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant axis. Relevant axis
decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables
_MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
High-speed homing was executed High-speed homing cannot be exe- High-speed homing cannot be exe-
when 0 was not included in the ring cuted when the ring counter range cuted when the ring counter range
counter. does not include 0. Correct the pro- does not include 0. Write the program
gram so that high-speed homing is so that high-speed homing is not per-
not performed. Or change the settings formed. Or make the settings so that
so that the ring counter range the ring counter range includes 0.
includes 0.
Attached None
Event name Axes Group Composition Axis Setting Out of Range Event code 549D0000 hex*
Meaning The parameter specified for the Axes input variable to a motion control instruction is out of range.
Source Motion Control Function Module Source details Axes group Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System A
Effects User program Continues. Operation Operation is not possible for the relevant axes group. Rel-
evant axes group decelerates to a stop if the axes are in
motion.
System-defined Variable Data type Name
variables
_MC_GRP[*].MFaultLvl.Active BOOL Axes Group Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
Instruction input parameter exceeded Correct the parameter so that the Set the input parameter to the instruc-
the valid range of the input variable. valid range of the input variable is not tion so that the valid range of the input
exceeded for the relevant instruction variable is not exceeded.
The composition axes in the axes Assign all of the axes that are speci- Specify axes that are assigned to the
group are not assigned to the same fied for the Axes input variable to the same task for all of the composition
task. instruction to the same task. axes in an axes group.
Attached Attached Information 1: Error Details
information 01 hex: There is a type specification error.
02 hex: The number of elements in the array is lower than the number of composition axes.
03 hex: The same axis number is specified twice, the axis type of the specified axis number is not supported, or the
specified axis number is out of range.
04 hex: The axis with the specified axis number cannot be set as the composition axis because it is a single-axis posi-
tion control axis.
Precautions/ None
Remarks
* This event code occurs for a CPU Unit with unit version 1.01 or later.
Event name Axis Use Setting Out of Range Event code 549E 0000 hex*
Meaning The parameter specified for the AxisUse input variable to a motion control instruction is out of range.
Source Motion Control Function Module Source details MC common or Detection At instruction
axis timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Not affected.
System-defined Variable Data type Name
variables _MC_COM.MFaultLvl.Active BOOL MC Common Minor Fault Occurrence
_MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction Instruction input parameter exceeded Correct the parameter so that the Set the input parameter to the instruc-
the valid range of the input variable. valid range of the input variable is not tion so that the valid range of the input
exceeded for the relevant instruction. variable is not exceeded.
Attached None
information
Precautions/ If an error occurs in executing an instruction for a used axis, an axis error will occur. If an error occurs in executing an
Remarks instruction for an unused axis, an MC common error will occur.
* This event code occurs for a CPU Unit with unit version 1.04 or later.
Event name Homing Parameter Setting Out of Range Event code 57000000 hex*
Meaning The parameter specified for the HomingParameter input variable to a motion control instruction is out of range.
Source Motion Control Function Module Source details Axis Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Not affected.
System-defined Variable Data type Name
variables
_MC_COM.MFaultLvl.Active BOOL MC Common Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction Instruction input parameter exceeded Correct the parameter so that the Set the input parameter to the instruc-
the valid range of the input variable. valid range of the input variable is not tion so that the valid range of the input
exceeded for the relevant instruction. variable is not exceeded.
Attached Attached Information 1: Error Details
information 1: Homing Method out of range, 2: Home Input Signal out of range, 3: Homing Start Direction out of range, 4: Home
Input Detection Direction out of range, 5: Operation Selection at Positive Limit Input out of range, 6: Operation Selec-
tion at Negative Limit Input out of range, 7: Homing Velocity out of range, 8: Homing Approach Velocity out of range, 9:
Homing Acceleration out of range, 10: Homing Deceleration out of range, 11: Homing Jerk out of range, 12: Home
Input Mask Distance out of range, 13: Absolute Encoder Home Offset out of range, 14: Homing Holding Time out of
range, 15: Homing Compensation Value out of range, 16: Homing Compensation Velocity out of range, 100: Home
Input Mask Distance exceeded 40-bit range when converted to pulses, 101: Home Input Mask Distance exceeded
modulo length, 102: Homing Compensation Value exceeded 40-bit range when converted to pulses, 103: Homing
Compensation Value exceeded modulo length, 104: Home Offset exceeded 40-bit range when converted to pulses,
105: Home Offset exceeded modulo range, 106: Homing Velocity exceeded maximum velocity, 107: Homing Approach
Velocity exceeded maximum velocity, 108: Homing Approach Velocity was not less than or equal to Homing Velocity,
109: Homing Compensation Velocity is not less than or equal to Maximum Velocity, 110: Homing Acceleration
exceeded maximum acceleration rate, 111: Homing Deceleration exceeded maximum deceleration rate
Precautions/ None
Remarks
* This event code occurs for a CPU Unit with unit version 1.03 or later.
Event name Axis Use Change Error Event code 57020000 hex*
Meaning The MC_ChangeAxisUse (Change Axis Use) instruction was executed when the axis was not stopped or when the
command velocity of the axis was saturated.
Source Motion Control Function Module Source details Axis Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Not affected.
System-defined Variable Data type Name
variables
_MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
The MC_ChangeAxisUse (Change Reset the error and execute the Execute the MC_ChangeAxisUse
Axis Use) instruction was executed MC_ChangeAxisUse (Change Axis (Change Axis Use) instruction when
when the axis was not stopped or Use) instruction when the axis is the axis is stopped and the command
when the command velocity of the stopped or when the command veloc- velocity is not saturated.
axis was saturated. ity of the axis is not saturated.
An axis is stopped if Status.Disabled
or Status.Standstill is TRUE in the
Axis Variable. The command velocity
* This event code occurs for a CPU Unit with unit version 1.04 or later.
Event name Cannot Change Axis Use Event code 57030000 hex* A
Meaning The MC_ChangeAxisUse (Change Axis Use) instruction was executed in a way that would cause the maximum num-
ber of used real axes or the maximum number of used motion control servo axes to be exceeded.
Source Motion Control Function Module Source details MC common Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Not affected.
System-defined Variable Data type Name
variables
_MC_COM.MFaultLvl.Active BOOL MC Common Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction The MC_ChangeAxisUse (Change Correct the program so that the maxi- Write the program so that the maxi-
Axis Use) instruction was executed in mum number of real axes used by the mum number of real axes used by the
a way that would cause the maximum CPU Unit is not exceeded. CPU Unit is not exceeded.
number of used real axes to be
exceeded.
The MC_ChangeAxisUse (Change Correct the program so that the maxi- Write the program so that the maxi-
Axis Use) instruction was executed in mum number of used motion control mum number of used motion control
a way that would cause the maximum servo axes that can be used by the servo axes that can be used by the
number of used motion control servo CPU Unit is not exceeded. CPU Unit is not exceeded.
axes to be exceeded.
Attached Attached Information 1: Cause of the Error
information
1: Maximum number of used real axes exceeded
2: Maximum number of used motion control servo axes exceeded
Precautions/ None
Remarks
* This event code occurs for a CPU Unit with unit version 1.06 or later.
Event name Motion Control Parameter Setting Error When Changing Event code 57200000 hex*
Axis Use
Meaning The motion control parameter settings for the axis that was changed to a used axis are incorrect.
Source Motion Control Function Module Source details MC common Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Not affected.
System-defined Variable Data type Name
variables
_MC_COM.MFaultLvl.Active BOOL MC Common Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
The MC_ChangeAxisUse (Change Use the Sysmac Studio to change the Make sure that operation is correct
Axis Use) instruction was used to Axis Use of the axis where the error when the axis is set to a Used Axis
change an unused axis to a used occurred to a Used Axis, and then and then download the settings with it
axis, but the motion control parameter check and correct the error location. If set to an Unused Axis.
settings of the axis are not correct. an error does not occur, change the
setting to an Unused Axis and then
download the settings again.
The power supply was interrupted Download the MC parameters from Do not interrupt the power supply
while a download of the motion con- the Sysmac Studio. while saving the parameter settings.
trol parameter settings was in prog-
ress.
The non-volatile memory is faulty or If this error remains even after making None
the life of the non-volatile memory has the above corrections, replace the
been exceeded. CPU Unit.
Attached None
information
Precautions/ None
Remarks
* This event code occurs for a CPU Unit with unit version 1.04 or later.
Event name Required Process Data Object Not Set When Changing Event code 57210000 hex*
Axis Use
Meaning The objects that are required for the axis type of the axis that was changed to a used axis are not set.
Source Motion Control Function Module Source details MC common Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Not affected.
System-defined Variable Data type Name
variables
_MC_COM.MFaultLvl.Active BOOL MC Common Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
The objects that are required for the Edit the PDO map settings on the Make sure that operation is correct
axis type of the axis that was changed Sysmac Studio and set the objects when the axis is set to a Used Axis
to a used axis are not set in the PDO that are required for the axis where and then download the settings with it
map settings. the error occurred. Refer to PDO set to an Unused Axis.
Mapping on page 2-35 for the
required objects.
The power supply was interrupted Download the MC parameters from Do not interrupt the power supply
while a download of the motion con- the Sysmac Studio. while saving the parameter settings.
* This event code occurs for a CPU Unit with unit version 1.04 or later.
Event name Motion Control Instruction Multi-execution Disabled (Mas- Event code 572F 0000 hex*
ter Axis)
Meaning A Master in-out variable that cannot be changed during multi-execution of instructions was changed
Source Motion Control Function Module Source details Axis Detection At multi-execution
timing of instructions
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Not affected.
System-defined Variable Data type Name
variables
_MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
A Master in-out variable that cannot Correct the program so that the value Write the program so that the value of
be changed during multi-execution of of the Master in-out variable is not the Master in-out variable is not
instructions was changed. changed during multi-execution of the changed during multi-execution of the
relevant instructions. relevant instructions.
Attached None
information
Precautions/ None
Remarks
* This event code occurs for a CPU Unit with unit version 1.06 or later.
Event name Motion Control Instruction Multi-execution Disabled (Posi- Event code 57300000 hex*
tion Type Selection)
Meaning A ReferenceType in-out variable that cannot be changed during multi-execution of instructions was changed
Source Motion Control Function Module Source details Axis Detection At multi-execution
timing of instructions
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Not affected.
System-defined Variable Data type Name
variables _MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction A ReferenceType in-out variable that Correct the program so that the value Write the program so that the value of
cannot be changed during multi-exe- of the ReferenceType in-out variable the ReferenceType in-out variable is
cution of instructions was changed. is not changed during multi-execution not changed during multi-execution of
of the relevant instructions. the relevant instructions.
Attached None
information
Precautions/ None
Remarks
* This event code occurs for a CPU Unit with unit version 1.06 or later.
Event name Cannot Write Axis Parameters Event code 573A 0000 hex*
Meaning The instruction was executed for an axis that is not an unused axis.
Source Motion Control Function Module Source details MC common Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Not affected.
System-defined Variable Data type Name
variables _MC_COM.MFaultLvl.Active BOOL MC Common Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
The instruction was executed for a Correct the program so that the Write the program so that the speci-
used axis or an undefined axis. MC_ChangeAxisUse (Change Axis fied axis is an unused axis when the
Use) instruction is executed after the instruction is executed.
specified axis is changed to an
unused axis.
Attached None
information
Precautions/ None
Remarks
Event name Axis Parameter Setting Out of Range Event code 573B0000 hex*1
Meaning The parameter specified for the AxisParameter input variable to a motion control instruction is outside of the valid
range.
Source Motion Control Function Module Source details MC common Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System A
Effects User program Continues. Operation Not affected.
System-defined Variable Data type Name
variables
_MC_COM.MFaultLvl.Active BOOL MC Common Minor Fault Occurrence
*1 This event code occurs for a CPU Unit with unit version 1.08 or later.
*2 The upper limit of the Maximum Velocity is 500 MHz for unit version 1.10 or earlier and 2,147,483,647 Hz for unit version
1.11 or later.
Event name Cam Property Setting Out of Range Event code 573C0000 hex*
Meaning The parameter specified for the CamProperty input variable to a motion control instruction is outside of the valid range.
Source Motion Control Function Module Source details MC common Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Not affected.
System-defined Variable Data type Name
variables _MC_COM.MFaultLvl.Active BOOL MC Common Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
The parameter specified for the Cam- Correct the parameter so that the Set the input parameter to the instruc-
Property input variable to the instruc- valid range of the input variable is not tion so that the valid range of the input
tion is out of range for the input exceeded for the instruction. variable is not exceeded.
variable. Confirm which parameter exceeded
the range in the attached information.
Attached Attached Information 1: Error Details
information 0000 hex: Initial Velocity out of range
0001 hex: Initial Acceleration out of range
* This event code occurs for a CPU Unit with unit version 1.08 or later.
Event name Cam Node Setting Out of Range Event code 573D0000 hex*
Meaning The parameter specified for the CamNodes input variable to a motion control instruction is outside of the valid range.
Source Motion Control Function Module Source details MC common Detection At instruction A
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Not affected.
System-defined Variable Data type Name
variables
_MC_COM.MFaultLvl.Active BOOL MC Common Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
The parameter specified for the Cam- Correct the parameter so that the Set the input parameter to the instruc-
Nodes input variable to the instruction valid range of the input variable is not tion so that the valid range of the input
is out of range for the input variable. exceeded for the instruction. variable is not exceeded.
Confirm which parameter exceeded
the range in the attached information.
Attached Attached Information 1: Error Details
information 0000 hex: Master Axis Phase out of range
0001 hex: Slave Axis Displacement out of range
0002 hex: Curve Shape out of range
0003 hex: Connecting Velocity out of range
0004 hex: Connecting Acceleration out of range
0005 hex: Phase Pitch out of range
Attached Information 2: Element Number of Error Node Point
Precautions/ None
Remarks
* This event code occurs for a CPU Unit with unit version 1.08 or later.
Event name Incorrect Cam Node Type Specification Event code 573E 0000 hex*
Meaning The parameter specified for the CamNodes input variable to a motion control instruction is not an _sMC_CAM_NODE
array variable.
Source Motion Control Function Module Source details MC common Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Not affected.
System-defined Variable Data type Name
variables
_MC_COM.MFaultLvl.Active BOOL MC Common Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
The parameter specified for the Cam- Correct the program to specify an Write the program to specify an
Nodes input variable to the instruction sMC_CAM_NODE array variable for sMC_CAM_NODE array variable for
is not an _sMC_CAM_NODE array the input variable to the instruction. the input variable to the instruction.
variable.
Attached None
information
Precautions/ None
Remarks
* This event code occurs for a CPU Unit with unit version 1.08 or later.
Event name Insufficient Nodes in Cam Table Event code 573F 0000 hex*
Meaning The array variable of the parameter specified for the CamNodes input variable to a motion control instruction has a
Phase value of 0 for element number 0.
Source Motion Control Function Module Source details MC common Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Not affected.
System-defined Variable Data type Name
variables _MC_COM.MFaultLvl.Active BOOL MC Common Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction The array variable of the parameter Correct the program so that the value Write the program so that the value of
specified for the CamNodes input of Phase (master axis phase) for ele- Phase (master axis phase) for ele-
variable to the instruction has a ment number 0 in the array variable ment number 0 in the array variable
Phase (master axis phase) value of 0 for the parameter specified for the for the parameter specified for the
for element number 0. CamNodes input variable is not 0. CamNodes input variable is not 0.
Attached None
information
Precautions/ None
Remarks
* This event code occurs for a CPU Unit with unit version 1.08 or later.
Event name Cam Node Master Axis Phase Not in Ascending Order Event code 57400000 hex*
Meaning The values of Phase in the array variable of the parameter specified for the CamNodes input variable to a motion con-
trol instruction are not in ascending order according to the element numbers.
Source Motion Control Function Module Source details MC common Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Not affected.
System-defined Variable Data type Name
variables
_MC_COM.MFaultLvl.Active BOOL MC Common Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
The values of Phase (master axis Correct the program so that the val- Write the program so that the values
phase) in the array variable of the ues of Phase (master axis phase) in of Phase (master axis phase) in the
parameter specified for the Cam- the array variable for the parameter array variable for the parameter spec-
Nodes input variable to the instruction specified for the CamNodes input ified for the CamNodes input variable
are not in ascending order according variable are in ascending order are in ascending order according to
to the element numbers. Or, truncat- according to the element numbers. the element numbers.
ing the digits that are not effective
more than seven digits caused the
* This event code occurs for a CPU Unit with unit version 1.08 or later.
Event name Too Many Data Points in Cam Table Event code 57410000 hex*
Meaning The number of generated cam data points exceeded the number of elements in the array in the cam data variable that A
is specified for the CamTable input variable to a motion control instruction.
Source Motion Control Function Module Source details MC common Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Not affected.
System-defined Variable Data type Name
variables
_MC_COM.MFaultLvl.Active BOOL MC Common Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
The number of cam data points in the Correct the program so that the num- Write the program so that the number
generated cam table exceeded the ber of cam data points in the gener- of cam data points in the generated
number of elements in the array in the ated cam table does not exceed the cam table does not exceed the num-
cam data variable that is specified for number of elements in the array in the ber of elements in the array in the
the CamTable input variable to the cam data variable that is specified for cam data variable that is specified for
instruction. the CamTable input variable to the the CamTable input variable to the
instruction. instruction.
Refer to information on the MC_Gen- Refer to information on the MC_Gen-
erateCamTable (Generate Cam erateCamTable (Generate Cam
Table) instruction for the number of Table) instruction for the number of
cam data points in generated cam cam data points in generated cam
tables. tables.
Attached Attached Information 1: Element Number of Error Node Point
information
Precautions/ None
Remarks
* This event code occurs for a CPU Unit with unit version 1.08 or later.
Event name Cam Table Displacement Overflow Event code 57420000 hex*
Meaning Distance in the generated cam table exceeded the range of REAL data.
Source Motion Control Function Module Source details MC common Detection At or during
timing instruction execu-
tion
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Not affected.
System-defined Variable Data type Name
variables
_MC_COM.MFaultLvl.Active BOOL MC Common Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
Distance in the generated cam table Correct the values of InitVel (initial Specify the values of InitVel (initial
exceeded the range of REAL data. velocity), ConnectingVel (connecting velocity), ConnectingVel (connecting
velocity), and ConnectingAcc (con- velocity), and ConnectingAcc (con-
necting acceleration) so that Distance necting acceleration) so that Distance
does not overflow when a polynomic does not overflow when a polynomic
3 curve or polynomic 5 curve is speci- 3 curve or polynomic 5 curve is speci-
fied for Curve (curve shape) in the fied for Curve (curve shape) in the
CamNodes input variable. CamNodes input variable.
Refer to information on the MC_Gen- Refer to information on the MC_Gen-
erateCamTable (Generate Cam erateCamTable (Generate Cam
Table) instruction for the method to Table) instruction for the method to
calculate Distance. calculate Distance.
Attached Attached Information 1: Element Number of Error Node Point
information
Precautions/ None
Remarks
* This event code occurs for a CPU Unit with unit version 1.08 or later.
Event name Aborted Cam Table Used Event code 57430000 hex*
Meaning A cam data variable that was aborted during generation was specified for the CamTable input variable to an instruction.
Source Motion Control Function Module Source details MC common or Detection At instruction
axis timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Not affected.
System-defined Variable Data type Name
variables _MC_COM.MFaultLvl.Active BOOL MC Common Minor Fault Occurrence
_MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Active
Cause and Assumed cause Correction Prevention
correction A cam data variable that was aborted Check the ErrorID (error code), Error- Write the program so that the MC_-
during generation due to an error in ParameterCode (parameter detail GenerateCamTable (Generate Cam
the MC_GenerateCamTable (Gener- code), and ErrorNodePointIndex Table) instruction creates correct cam
ate Cam Table) instruction was speci- (node point element number) output data variables. Or, write the program
fied for the CamTable input variable to variables from the MC_Generate- so that the relevant instruction is exe-
the instruction. CamTable (Generate Cam Table) cuted only when the MC_Generate-
instruction and correct the program so CamTable (Generate Cam Table)
that correct cam data variables are instruction ends normally.
created.
Attached None
information
Precautions/ None
Remarks
* This event code occurs for a CPU Unit with unit version 1.08 or later.
Event name Execution ID Setting Out of Range Event code 57490000 hex*
Meaning The parameter specified for the ExecID input variable to a motion control instruction is out of range.
Source Motion Control Function Module Source details Axis Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Relevant slave axis decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables _MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
The parameter specified for the Exe- Correct the program so that the input Create the program so that the input
cID input variable to the instruction is parameter specified for the ExecID parameter specified for the ExecID
out of range for the input variable. input variable to the instruction is input variable to the instruction is
within the setting range. within the setting range.
Attached None
information
Precautions/ None
Remarks
Event name Position Offset Out of Range Event code 574A 0000 hex*
Meaning The parameter specified for the OffsetPosition input variable to a motion control instruction is out of range.
Source Motion Control Function Module Source details Axis Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant axis. Relevant axis
decelerates to a stop if it is in motion. A
System-defined Variable Data type Name
variables
_MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction The instruction input parameter Correct the parameter so that the Set the input parameter to the instruc-
exceeded the range of signed 40-bit valid range of the input variable is not tion so that the valid range of the input
data when it was converted to pulses. exceeded for the relevant instruction. variable is not exceeded.
Attached None
information
Precautions/ None
Remarks
* This event code occurs for a CPU Unit with unit version 1.10 or later.
Event name PDS State Transition Command Selection Out of Range Event code 574B 0000 hex*
Meaning The parameter specified for the TransitionCmd input variable to a motion control instruction is out of range.
Source Motion Control Function Module Source details Axis Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant axis. Relevant axis
decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables
_MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
Instruction input parameter exceeded Correct the parameter so that the Set the input parameter to the instruc-
the valid range of the input variable. valid range of the input variable is not tion so that the valid range of the input
exceeded for the relevant instruction. variable is not exceeded.
Attached None
information
Precautions/ None
Remarks
* This event code occurs for a CPU Unit with unit version 1.10 or later.
Event name Single-axis Position Control Axis Motion Control Instruc- Event code 574C0000 hex *1
tion Execution Disabled
Meaning An operation instruction was executed for a single-axis position control axis.
Source Motion Control Function Module Source details Axis Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation Operation is not possible for relevant axis. Relevant axis
decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables _MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction An operation instruction was executed In the Axis Basic Settings for the axis Same as at the left.
for a single-axis position control axis. specified in the instruction, set the
Control Function parameter to 0: All.
Or specify the axis for which the Con-
trol Function paramter is set to 0: All
in the Axis Basic Settings.
Attached informa- None
tion
Precautions/ None
Remarks
*1 This event code occurs for a CPU Unit with unit version 1.13 or later.
Event name Target Position Positive Software Limit Exceeded Event code 64400000 hex
Meaning The specified position exceeds the positive software limit.
Source Motion Control Function Module Source details Axis/axes group Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation If “axis” is given for the source details, operation is not
possible for relevant axis. Relevant axis decelerates to a
stop if it is in motion.
If “axes group” is given for the source details, operation is
not possible for relevant axes group. Relevant axes group
decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables
_MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
_MC_GRP[*].MFaultLvl.Active BOOL Axes Group Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
The parameter specified for the Posi- Correct the parameter specified for Set the parameter specified for the
tion input variable to the instruction is the Position input variable to the Position input variable to the instruc-
beyond the positive software limit. instruction so that it is within the posi- tion so that it is within the positive
Event name Target Position Negative Software Limit Exceeded Event code 64410000 hex
Meaning The specified position exceeds the negative software limit.
Source Motion Control Function Module Source details Axis/axes group Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation If “axis” is given for the source details, operation is not
possible for relevant axis. Relevant axis decelerates to a
stop if it is in motion.
If “axes group” is given for the source details, operation is
not possible for relevant axes group. Relevant axes group
decelerates to a stop if it is in motion.
System-defined Variable Data type Name
variables
_MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
_MC_GRP[*].MFaultLvl.Active BOOL Axes Group Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction
The parameter specified for the Posi- Correct the parameter specified for Correct the input parameter specified
tion input variable to the instruction is the Position input variable to the for the Position input variable to the
beyond the negative software limit. instruction so that it is within the neg- instruction so that it is within the neg-
ative software limit. ative software limit.
The starting position is beyond the Correct the program so that the travel If the starting position is beyond the
negative software limit and an instruc- direction for the instruction is towards negative software limit, write the pro-
tion that specifies motion in the oppo- the negative software limit. gram so that the travel direction is in
site direction of the software limit was the direction of the negative software
executed. limit.
The parameter that was specified for Correct the parameter specified for Set the parameter specified for the
the AuxPoint input variable to a bor- the AuxPoint input variable to the AuxPoint input variable to the border
der point MC_MoveCircular2D (Circu- instruction so that it is within the neg- point MC_MoveCircular2D (Circular
lar 2D Interpolation) instruction is ative software limit. 2D Interpolation) instruction so that it
beyond the negative software limit. is within the negative software limit.
Attached Depends on the source details.
information Axis: 0
Axes group: Logical axis number
Precautions/ None
Remarks
Event name Servo Main Circuits OFF Event code 74220000 hex
Meaning An attempt was made to turn ON the Servo when the main circuit power supply to the Servo Drive was OFF.
Source Motion Control Function Module Source details Axis Detection At instruction
timing execution
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation The Servo for the axis turns OFF.
System-defined Variable Data type Name
variables
_MC_AX[*].MFaultLvl.Active BOOL Axis Minor Fault Occurrence
Cause and Assumed cause Correction Prevention
correction An attempt was made to turn ON the Turn ON the Servo after turning ON Turn ON the Servo after turning ON
Servo when the main circuit power the main circuit power of the Servo the main circuit power supply to the
supply to the Servo Drive was OFF. Drive for the axis where the error Servo Drive.
occurred.
Attached None
information
Precautions/ None
Remarks
Event name Switch Structure Track Number Setting Out of Range Event code 57230000 hex*
Meaning The value of TrackNumber that is specified in the Switches in-out variable to a motion control instruction is out of range.
Source Motion Control Function Module Source details Axis Detection At instruction
timing execution
Error attributes Level Observation Recovery --- Log category System
Effects User program Continues. Operation Not affected.
A
System-defined Variable Data type Name
variables
_MC_AX[*].Obsr.Active BOOL Axis Observation Occurrence
Cause and Assumed cause Correction Prevention
correction
The value of the member of the struc- Correct the value of the member of Make sure that the value of the mem-
ture variable that was specified for the the structure variable that is specified ber of the structure variable that is
in-out variable of the instruction is out for the in-out variable of the relevant specified for the in-out variable of the
of range. instruction so that it is in the valid relevant instruction is in the valid
range. range.
Attached None
information
Precautions/ None
Remarks
* This event code occurs for a CPU Unit with unit version 1.06 or later.
Event name Switch Structure First ON Position Setting Out of Range Event code 57240000 hex*
Meaning The value of FirstOnPosition that is specified in the Switches in-out variable to a motion control instruction is out of
range.
Source Motion Control Function Module Source details Axis Detection At instruction
timing execution
Error attributes Level Observation Recovery --- Log category System
Effects User program Continues. Operation Not affected.
System-defined Variable Data type Name
variables
_MC_AX[*].Obsr.Active BOOL Axis Observation Occurrence
Cause and Assumed cause Correction Prevention
correction
The value of the member of the struc- Correct the value of the member of Make sure that the value of the mem-
ture variable that was specified for the the structure variable that is specified ber of the structure variable that is
in-out variable of the instruction is out for the in-out variable of the relevant specified for the in-out variable of the
of range. instruction so that it is in the valid relevant instruction is in the valid
range. range.
Attached None
information
Precautions/ None
Remarks
* This event code occurs for a CPU Unit with unit version 1.06 or later.
Event name Switch Structure Last ON Position Setting Out of Range Event code 57250000 hex*
Meaning The value of LastOnPosition that is specified in the Switches in-out variable to a motion control instruction is out of
range.
Source Motion Control Function Module Source details Axis Detection At instruction
timing execution
Error attributes Level Observation Recovery --- Log category System
Effects User program Continues. Operation Not affected.
System-defined Variable Data type Name
variables
_MC_AX[*].Obsr.Active BOOL Axis Observation Occurrence
Cause and Assumed cause Correction Prevention
correction
The value of the member of the struc- Correct the value of the member of Make sure that the value of the mem-
ture variable that was specified for the the structure variable that is specified ber of the structure variable that is
in-out variable of the instruction is out for the in-out variable of the relevant specified for the in-out variable of the
of range. instruction so that it is in the valid relevant instruction is in the valid
range. range.
Attached None
information
Precautions/ None
Remarks
* This event code occurs for a CPU Unit with unit version 1.06 or later.
Event name Switch Structure Axis Direction Out of Range Event code 57260000 hex*
Meaning The value of AxisDirection that is specified in the Switches in-out variable to a motion control instruction is out of range.
Source Motion Control Function Module Source details Axis Detection At instruction
timing execution
Error attributes Level Observation Recovery --- Log category System
Effects User program Continues. Operation Not affected.
System-defined Variable Data type Name
variables _MC_AX[*].Obsr.Active BOOL Axis Observation Occurrence
Cause and Assumed cause Correction Prevention
correction
The value of the member of the struc- Correct the value of the member of Make sure that the value of the mem-
ture variable that was specified for the the structure variable that is specified ber of the structure variable that is
in-out variable of the instruction is out for the in-out variable of the relevant specified for the in-out variable of the
of range. instruction so that it is in the valid relevant instruction is in the valid
range. range.
Attached None
information
Precautions/ None
Remarks
Event name Switch Structure Cam Switch Mode Out of Range Event code 57270000 hex*
Meaning The value of CamSwitchMode that is specified in the Switches in-out variable to a motion control instruction is out of
range.
Source Motion Control Function Module Source details Axis Detection At instruction
timing execution
Error attributes Level Observation Recovery --- Log category System A
Effects User program Continues. Operation Not affected.
System-defined Variable Data type Name
variables _MC_AX[*].Obsr.Active BOOL Axis Observation Occurrence
Cause and Assumed cause Correction Prevention
correction The value of the member of the struc- Correct the value of the member of Make sure that the value of the mem-
ture variable that was specified for the the structure variable that is specified ber of the structure variable that is
in-out variable of the instruction is out for the in-out variable of the relevant specified for the in-out variable of the
of range. instruction so that it is in the valid relevant instruction is in the valid
range. range.
Attached None
information
Precautions/ None
Remarks
* This event code occurs for a CPU Unit with unit version 1.06 or later.
Event name Switch Structure Duration Setting Out of Range Event code 57280000 hex*
Meaning The value of Duration that is specified in the Switches in-out variable to a motion control instruction is out of range.
Source Motion Control Function Module Source details Axis Detection At instruction
timing execution
Error attributes Level Observation Recovery --- Log category System
Effects User program Continues. Operation Not affected.
System-defined Variable Data type Name
variables _MC_AX[*].Obsr.Active BOOL Axis Observation Occurrence
Cause and Assumed cause Correction Prevention
correction
The value of the member of the struc- Correct the value of the member of Make sure that the value of the mem-
ture variable that was specified for the the structure variable that is specified ber of the structure variable that is
in-out variable of the instruction is out for the in-out variable of the relevant specified for the in-out variable of the
of range. instruction so that it is in the valid relevant instruction is in the valid
range. range.
Attached None
information
Precautions/ None
Remarks
* This event code occurs for a CPU Unit with unit version 1.06 or later.
Event name Track Option Structure ON Compensation Setting Out of Event code 57290000 hex*
Range
Meaning The value of OnCompensation that is specified in the TrackOptions in-out variable to a motion control instruction is out
of range.
Source Motion Control Function Module Source details Axis Detection At instruction
timing execution
Error attributes Level Observation Recovery --- Log category System
Effects User program Continues. Operation Not affected.
System-defined Variable Data type Name
variables
_MC_AX[*].Obsr.Active BOOL Axis Observation Occurrence
Cause and Assumed cause Correction Prevention
correction
The value of the member of the struc- Correct the value of the member of Make sure that the value of the mem-
ture variable that was specified for the the structure variable that is specified ber of the structure variable that is
in-out variable of the instruction is out for the in-out variable of the relevant specified for the in-out variable of the
of range. instruction so that it is in the valid relevant instruction is in the valid
range. range.
Attached None
information
Precautions/ None
Remarks
* This event code occurs for a CPU Unit with unit version 1.06 or later.
Event name Track Option Structure OFF Compensation Setting Out of Event code 572A 0000 hex*
Range
Meaning The value of OffCompensation that is specified in the TrackOptions in-out variable to a motion control instruction is out
of range.
Source Motion Control Function Module Source details Axis Detection At instruction
timing execution
Error attributes Level Observation Recovery --- Log category System
Effects User program Continues. Operation Not affected.
System-defined Variable Data type Name
variables
_MC_AX[*].Obsr.Active BOOL Axis Observation Occurrence
Cause and Assumed cause Correction Prevention
correction The value of the member of the struc- Correct the value of the member of Make sure that the value of the mem-
ture variable that was specified for the the structure variable that is specified ber of the structure variable that is
in-out variable of the instruction is out for the in-out variable of the relevant specified for the in-out variable of the
of range. instruction so that it is in the valid relevant instruction is in the valid
range. range.
Attached None
information
* This event code occurs for a CPU Unit with unit version 1.06 or later.
Event name Number of Array Elements in Switch Structure Variable Event code 572B 0000 hex*
Out of Range
Meaning The number of elements in an array in the structure variable that is specified in the Switches in-out variable to a motion
control instruction is out of range.
Source Motion Control Function Module Source details Axis Detection At instruction
A
timing execution
Error attributes Level Observation Recovery Error reset Log category System
Effects User program Continues. Operation Not affected.
System-defined Variable Data type Name
variables
_MC_AX[*].Obsr.Active BOOL Axis Observation Occurrence
Cause and Assumed cause Correction Prevention
correction The number of elements in an array of Correct the number of elements in the Make sure that the number of ele-
the structure variable that was speci- array in the structure variable that is ments in the array in the structure
fied for the in-out variable of the specified for the in-out variable of the variable that is specified for the in-out
instruction is out of range. relevant instruction so that it is in the variable of the relevant instruction is
valid range. in the valid range.
Attached None
information
Precautions/ None
Remarks
* This event code occurs for a CPU Unit with unit version 1.06 or later.
Event name Number of Array Elements in Output Signal Structure Event code 572C0000 hex*
Variable Out of Range
Meaning The number of elements in an array in the structure variable that is specified in the Outputs in-out variable to a motion
control instruction is out of range.
Source Motion Control Function Module Source details Axis Detection At instruction
timing execution
Error attributes Level Observation Recovery --- Log category System
Effects User program Continues. Operation Not affected.
System-defined Variable Data type Name
variables
_MC_AX[*].Obsr.Active BOOL Axis Observation Occurrence
Cause and Assumed cause Correction Prevention
correction The number of elements in an array of Correct the number of elements in the Make sure that the number of ele-
the structure variable that was speci- array in the structure variable that is ments in the array in the structure
fied for the in-out variable of the specified for the in-out variable of the variable that is specified for the in-out
instruction is out of range. relevant instruction so that it is in the variable of the relevant instruction is
valid range. in the valid range.
Attached None
information
Precautions/ None
Remarks
* This event code occurs for a CPU Unit with unit version 1.06 or later.
Event name Number of Array Elements in Track Option Structure Vari- Event code 572D0000 hex*
able Out of Range
Meaning The number of elements in an array in the structure variable that is specified in the TrackOptions in-out variable to a
motion control instruction is out of range.
Source Motion Control Function Module Source details Axis Detection At instruction
timing execution
Error attributes Level Observation Recovery --- Log category System
Effects User program Continues. Operation Not affected.
System-defined Variable Data type Name
variables
_MC_AX[*].Obsr.Active BOOL Axis Observation Occurrence
Cause and Assumed cause Correction Prevention
correction The number of elements in an array of Correct the number of elements in the Make sure that the number of ele-
the structure variable that was speci- array in the structure variable that is ments in the array in the structure
fied for the in-out variable of the specified for the in-out variable of the variable that is specified for the in-out
instruction is out of range. relevant instruction so that it is in the variable of the relevant instruction is
valid range. in the valid range.
Attached None
information
Precautions/ None
Remarks
* This event code occurs for a CPU Unit with unit version 1.06 or later.
Event name Numbers of Elements in Output Signals and Track Option Event code 572E 0000 hex*
Arrays Not Matched
Meaning The arrays in the structure variables that are specified for the Outputs and TrackOptions in-out variables to a motion
control instruction do not have the same number of elements.
Source Motion Control Function Module Source details Axis Detection At instruction
timing execution
Error attributes Level Observation Recovery --- Log category System
Effects User program Continues. Operation Not affected.
System-defined Variable Data type Name
variables
_MC_AX[*].Obsr.Active BOOL Axis Observation Occurrence
Cause and Assumed cause Correction Prevention
correction The arrays in the output signal struc- Correct the output signal structure Make sure that the arrays in the out-
ture variable and track option struc- variable and track option structure put signal structure variable and track
ture variable that are specified for the variable that are specified for the in- option structure variable that are
in-out variables to the instruction do out variables to the relevant instruc- specified for the in-out variables to the
not have the same number of ele- tion so that the arrays in them have relevant instruction have the same
ments. the same number of elements. number of elements.
Attached None
* This event code occurs for a CPU Unit with unit version 1.06 or later.
Event name Same Track Number Setting in Switch Structure Out of Event code 57310000 hex*
Range
Meaning The same track number was specified more than the allowable number of times for the TrackNumber in the Switches
in-out variable to a motion control instruction. A
Source Motion Control Function Module Source details Axis Detection At instruction
timing execution
Error attributes Level Observation Recovery --- Log category System
Effects User program Continues. Operation Not affected.
System-defined Variable Data type Name
variables _MC_AX[*].Obsr.Active BOOL Axis Observation Occurrence
Cause and Assumed cause Correction Prevention
correction
The same track number was specified Correct the values in the TrackNum- Set the values in the TrackNumber so
more than the allowable number of ber so that the same track number is that the same track number is not
times for the TrackNumber in the not specified more than the maximum specified more than the maximum
Switches in-out variable to a motion number of times. number of times.
control instruction.
Attached None
information
Precautions/ None
Remarks
* This event code occurs for a CPU Unit with unit version 1.06 or later.
The letters in the table give the state that is changed to.
Axis Status
A: Disabled
A
B: Standstill
C: Discrete
Axis Disabled
Standstill
Discrete Motion
Continuous Motion
Synchronized Motion
Homing
Deceleration Stopping
Coordinated Motion
Standstill
Moving
Deceleration Stopping
MC_SetOverride A B C D E F G H I a b c d e
MC_ResetFollowingError H B G G G H G H I a e e e e
MC_CamIn H E E E E H G H I a e e e e
MC_CamOut H H H H C*7 H G H I a e e e e
MC_GearIn H E E E E H G H I a e e e e
MC_GearInPos H E H H H H G H I a e e e e
MC_GearOut H H H H C*8 H G H I a e e e e
MC_MoveLink H E E E E H G H I a e e e e
MC_CombineAxes H E E E E H G H I a e e e e
MC_Phasing H H H H E*9 H G H I a e e e e
MC_TorqueControl H D D D D H G H I a e e e e
MC_SetTorqueLimit A B C D E F G H I a b c d e
MC_ZoneSwitch A B C D E F G H I a b c d e
MC_TouchProbe A B C D E H G H I a e e e e
MC_AbortTrigger A B C*10 D*5 E H G H I a e e e e
MC_AxesObserve A B C D E F G H I a b c d e
Axis Disabled
Standstill
Discrete Motion
Continuous Motion
Synchronized Motion
Homing
Deceleration Stopping
Coordinated Motion
Standstill
Moving
Deceleration Stopping
MC_SyncMoveAbsolute H C C C C H G H I a e e e e
MC_Reset A B C D E F G *11 I a b c d e
MC_ChangeAxisUse to change A --- --- --- --- --- --- --- --- --- --- --- --- ---
unused axis to used axis
MC_ChangeAxisUse to change --- *12 H H H H H H H a b c d e
used axis to unused axis
MC_DigitalCamSwitch A B C D E F G H I a b c d e
MC_TimeStampToPos A B C D E F G H I a b c d e
MC_PeriodicSyncVariables A B C D E F G H I a b c d e
MC_SyncOffsetPosition H H H H E H G H I a e e e e
*1 If Execute for MC_Stop is FALSE, the status will change to Standstill (B). If Execute is TRUE, the status will
change to Deceleration Stopping (G). A
*2 The status will change to Standstill (b) or Deceleration Stopping (d) depending on the maximum deceleration
rate.
Axis Disabled
Standstill
Discrete Motion
Continuous Motion
Synchronized Motion
Homing
Deceleration Stopping
Coordinated Motion
Standstill
Moving
Deceleration Stopping
MC_GroupEnable I I C D E F G H I b b c d e *1
MC_GroupDisable A B C D E F G H *2 a a a a e
MC_MoveLinear A B C D E F G H I e c c d e
MC_MoveLinearAblolute A B C D E F G H I e c c d e
MC_MoveLinearRelative A B C D E F G H I e c c d e
MC_MoveCircular2D A B C D E F G H I e c c d e
MC_GroupStop A B C D E F G H I e d d d e
MC_GroupImmediateStop A B C D E F G H I e e e e e
MC_GroupSetOverride A B C D E F G H I a b c d e
MC_GroupReadPosition A B C D E F G H I a b c d e
MC_ChangeAxesInGroup A B C D E F G H I a*3 e e e e*4
MC_GroupSyncMoveAbsolute A B C D E F G H I e c c d e
MC_GroupReset A B C D E F G H I a b c d *5
The color of the cell in the table tells you if multi-execution of the instruction is supported.
White: Multi-execution of the instruction is supported.
Gray: Multi-execution of the instruction is not supported. An error will occur.
Yellow: Multi-execution of the instruction is supported. CommandAborted changes to TRUE and
execution of the instruction is disabled.
The letters in the table give the state that is changed to.
Axis Status
A: Disabled
H: ErrorStop
Version
Type Instruction Name Page
CPU Unit Sysmac Studio
Instructions for MC_Power Power Servo Changed Changed 3-3
axis commands MC_SetPosition Set Position Ver. 1.10 Ver. 1.12 3-147
MC_ResetFollowing Reset Following Error 3-158
Error Counter
MC_CamIn Start Cam Operation 3-165
MC_CombineAxes Combine Axes 3-292
MC_GearIn Start Gear Operation Changed Changed 3-224
Ver. 1.02 Ver. 1.03
Changed Changed
Ver. 1.10 Ver. 1.12
MC_GearInPos Positioning Gear Oper- Changed Changed 3-243
ation Ver. 1.02 Ver. 1.03
Changed Changed
Ver. 1.10 Ver. 1.12
MC_MoveLink Synchronous Position- Changed Changed 3-269
ing Ver. 1.10 Ver. 1.12
MC_TouchProbe Enable External Latch Changed Changed 3-336
Ver. 1.10 Ver. 1.12
MC_HomeWith Home with Parameters New New 3-38
Parameter Ver.1.03 Ver.1.04
MC_SyncMove Cyclic Synchronous 3-379
Absolute Absolute Positioning
MC_ChangeAxisUse Change Axis Use New New 3-390
Ver. 1.04 Ver. 1.05
MC_DigitalCamSwitch Enable Digital Cam New New 3-394
Switch Ver.1.06 Ver.1.07
Changed Changed
Ver. 1.09 Ver. 1.10
MC_TimeStampToPos Time Stamp to Axis New New 3-413
Position Calculation Ver.1.06 Ver.1.07
MC_PeriodicSyncVari- Periodic Axis Variable New New 3-425
ables Synchronization Ver.1.10 Ver.1.13
between Tasks
MC_SyncOffsetPosition Cyclic Synchronous New 3-433
Position Offset Com- Ver.1.12
pensation
Index
A 5438 hex ........................................................ A-5, A-37
5439 hex ........................................................ A-5, A-37
Absolute Linear Interpolation ....................................... 4-36 543A hex ........................................................ A-5, A-38
Absolute Positioning .................................................... 3-49 543B hex ........................................................ A-5, A-39
Axes Group Cyclic Synchronous Absolute Positioning 4-91 543C hex ....................................................... A-5, A-40
Axes Group Immediate Stop ....................................... 4-75 543D hex ....................................................... A-5, A-40
543E hex ........................................................ A-6, A-41
C 543F hex ........................................................ A-6, A-41
5440 hex ........................................................ A-6, A-42
Change Axes in Group ................................................ 4-87 5441 hex ........................................................ A-6, A-43
Change Axis Use ....................................................... 3-390 5442 hex ........................................................ A-6, A-43
Circular 2D Interpolation .............................................. 4-42 5443 hex ........................................................ A-7, A-44
circular interpolation .................................................... 4-42 5444 hex ........................................................ A-7, A-45
Combine Axes ........................................................... 3-292 5445 hex ........................................................ A-7, A-45
Cyclic Synchronous Absolute Positioning ................. 3-379 5446 hex ........................................................ A-7, A-46
Cyclic Synchronous Position Offset Compensation .. 3-433
5447 hex ........................................................ A-7, A-46
Cyclic Synchronous Velocity Control ......................... 3-369
5448 hex ........................................................ A-7, A-47
5449 hex ........................................................ A-8, A-47
D
544A hex ........................................................ A-8, A-48
544C hex ....................................................... A-8, A-48
Disable Axes Group ...................................................... 4-6
544D hex ....................................................... A-8, A-48
Disable External Latch .............................................. 3-358
544E hex ........................................................ A-8, A-49
544F hex ........................................................ A-8, A-49
E
5450 hex ........................................................ A-8, A-50
5451 hex ........................................................ A-8, A-50
electronic gear ........................................................... 3-243
5453 hex ........................................................ A-9, A-51
Enable Axes Group ....................................................... 4-2
Enable Digital Cam Switch ........................................ 3-394 5454 hex ........................................................ A-9, A-51
Enable External Latch ............................................... 3-336 5455 hex ........................................................ A-9, A-52
End Cam Operation ................................................... 3-219 5456 hex ........................................................ A-9, A-52
End Gear Operation .................................................. 3-264 5457 hex ........................................................ A-9, A-53
error code 5458 hex ........................................................ A-9, A-53
3461 hex ........................................................ A-2, A-26 5459 hex ...................................................... A-10, A-54
5420 hex ........................................................ A-2, A-27 545A hex ...................................................... A-10, A-54
5421 hex ........................................................ A-2, A-27 545B hex ...................................................... A-10, A-55
5422 hex ........................................................ A-2, A-28 545C hex ..................................................... A-10, A-55
5423 hex ........................................................ A-3, A-28 545D hex ..................................................... A-10, A-56
5424 hex ........................................................ A-3, A-29 545E hex ...................................................... A-11, A-56
5425 hex ........................................................ A-3, A-29 545F hex ...................................................... A-11, A-57
5427 hex ........................................................ A-3, A-30 5460 hex ...................................................... A-11, A-57
5428 hex ........................................................ A-3, A-30 5461 hex ...................................................... A-11, A-58
5429 hex ........................................................ A-3, A-30 5462 hex ...................................................... A-11, A-58
542A hex ........................................................ A-3, A-31 5463 hex ...................................................... A-11, A-59
542B hex ........................................................ A-3, A-31 5464 hex ...................................................... A-11, A-59
542C hex ....................................................... A-3, A-32 5465 hex ...................................................... A-12, A-60
542D hex ....................................................... A-3, A-32 5466 hex ...................................................... A-12, A-61
542E hex ........................................................ A-4, A-32 5467 hex ...................................................... A-12, A-62
542F hex ........................................................ A-4, A-33 5468 hex ...................................................... A-12, A-62
5430 hex ........................................................ A-4, A-33 5469 hex ...................................................... A-12, A-63
5431 hex ........................................................ A-4, A-34 546A hex ...................................................... A-12, A-63
5432 hex ........................................................ A-4, A-34 546B hex ...................................................... A-13, A-64
5433 hex ........................................................ A-4, A-35 546C hex ..................................................... A-13, A-64
5434 hex ........................................................ A-4, A-35 546D hex ..................................................... A-13, A-65
5435 hex ........................................................ A-4, A-35 546E hex ...................................................... A-13, A-65
5436 hex ........................................................ A-4, A-36 546F hex ...................................................... A-13, A-66
5437 hex ........................................................ A-4, A-36 5470 hex ...................................................... A-13, A-66
5471 hex ...................................................... A-13, A-66 572E hex ................................................... A-24, A-107
5472 hex ...................................................... A-14, A-67 572F hex ..................................................... A-19, A-88
5474 hex ...................................................... A-14, A-67 5730 hex .............................................A-19, A-88, A-94
5475 hex ...................................................... A-14, A-68 5731 hex .................................................... A-24, A-107
5476 hex ...................................................... A-14, A-68 574B hex ............................................................... A-96
5478 hex ...................................................... A-14, A-69 6440 hex ...................................................... A-21, A-97
5479 hex ...................................................... A-14, A-69 6441 hex ...................................................... A-22, A-98
547A hex ..................................................... A-14, A-70 6442 hex ...................................................... A-22, A-99
547B hex ..................................................... A-14, A-70 6443 hex ...................................................... A-22, A-99
547C hex ..................................................... A-15, A-71 6444 hex .................................................... A-22, A-100
547D hex ..................................................... A-15, A-71 7422 hex .................................................... A-22, A-100
547E hex ..................................................... A-15, A-72
547F hex ..................................................... A-15, A-72 G
5480 hex ...................................................... A-15, A-73
5481 hex ...................................................... A-15, A-73 gear operation ........................................................... 3-243
5482 hex ...................................................... A-15, A-73 Generate Cam Table .................................................. 5-18
5483 hex ...................................................... A-15, A-74 Group Reset ................................................................ 4-97
5484 hex ...................................................... A-16, A-74 Group Stop .................................................................. 4-66
5487 hex ...................................................... A-16, A-74
5488 hex ...................................................... A-16, A-75 H
5489 hex ...................................................... A-16, A-75
548A hex ..................................................... A-16, A-76 High-speed Home ....................................................... 3-98
548B hex ..................................................... A-16, A-76 Home .......................................................................... 3-16
548C hex ..................................................... A-16, A-76 Home with Parameters ............................................... 3-38
548D hex ..................................................... A-16, A-77
548E hex ..................................................... A-16, A-77 I
548F hex ..................................................... A-17, A-77
5490 hex ...................................................... A-17, A-78 Immediate Stop ......................................................... 3-142
5491 hex ...................................................... A-17, A-78 Interrupt Feeding ....................................................... 3-105
5492 hex ...................................................... A-17, A-79
5493 hex ...................................................... A-17, A-79 J
5494 hex ...................................................... A-17, A-80
5495 hex ...................................................... A-17, A-80 Jog ................................................................................ 3-8 I
5496 hex ...................................................... A-17, A-80
5497 hex ...................................................... A-17, A-81 L
5498 hex ...................................................... A-18, A-81
5499 hex ...................................................... A-18, A-81 Linear Interpolation ..................................................... 4-10
549A hex ..................................................... A-18, A-82 linear interpolation .............................................. 4-36, 4-39
549B hex ..................................................... A-18, A-82
549C hex ..................................................... A-18, A-83 M
549D hex ..................................................... A-18, A-83
549E hex ..................................................... A-18, A-84 MC_AbortTrigger (Disable External Latch) ............... 3-358
5700 hex ...................................................... A-18, A-84 MC_AxesObserve (Monitor Axis Following Error) .... 3-363
MC_CamIn (Start Cam Operation) ........................... 3-165
5702 hex ...................................................... A-18, A-85
MC_CamOut (End Cam Operation) .......................... 3-219
5703 hex ...................................................... A-19, A-85
MC_ChangeAxesInGroup (Change Axes in Group) ... 4-87
5720 hex ...................................................... A-19, A-86 MC_ChangeAxisUse (Change Axis Use) ................. 3-390
5721 hex ...................................................... A-19, A-87 MC_CombineAxes (Combine Axes) ......................... 3-292
5722 hex .................................................... A-22, A-101 MC_DigitalCamSwitch (Enable Digital Cam Switch) 3-394
5723 hex .................................................... A-23, A-101 MC_GearIn (Start Gear Operation) ........................... 3-224
5724 hex .................................................... A-23, A-102 MC_GearInPOS (Positioning Gear Operation) ......... 3-243
5725 hex .................................................... A-23, A-102 MC_GearOut (End Gear Operation) ......................... 3-264
5726 hex .................................................... A-23, A-103 MC_GenerateCamTable (Generate Cam Table) ........ 5-18
5727 hex .................................................... A-23, A-103 MC_GroupDisable (Disable Axes Group) ..................... 4-6
5728 hex .................................................... A-23, A-104 MC_GroupEnable (Enable Axes Group) ....................... 4-2
MC_GroupImmediateStop
5729 hex .................................................... A-23, A-104
(Axes Group Immediate Stop) .................................. 4-75
572A hex ................................................... A-23, A-105
MC_GroupReadPosition (Read Axes Group Position) 4-83
572B hex ................................................... A-24, A-105 MC_GroupReset (Group Reset) ................................. 4-97
572C hex ................................................... A-24, A-106 MC_GroupSetOverride (Set Group Overrides) ........... 4-79
572D hex ................................................... A-24, A-106 MC_GroupStop (Group Stop) ..................................... 4-66
OMRON ASIA PACIFIC PTE. LTD. OMRON (CHINA) CO., LTD. © OMRON Corporation 2011-2017 All Rights Reserved.
No. 438A Alexandra Road # 05-05/08 (Lobby 2), Room 2211, Bank of China Tower, In the interest of product improvement,
Alexandra Technopark, 200 Yin Cheng Zhong Road, specifications are subject to change without notice.
Singapore 119967 PuDong New Area, Shanghai, 200120, China
Tel: (65) 6835-3011/Fax: (65) 6835-2711 Tel: (86) 21-5037-2222/Fax: (86) 21-5037-2200 Cat. No. W508-E1-15 0417