0% found this document useful (0 votes)
77 views128 pages

XS Motion Control Manual

Xinje motion module
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
77 views128 pages

XS Motion Control Manual

Xinje motion module
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 128

XS series PLC

User manual【Motion control】

Wuxi Xinje Electric Co., Ltd


Data No. PS03 20211125EN 1.0
Basic description
◆ Thank you for purchasing Xinje XS series programmable controller.
◆ This manual mainly introduces the application of Codesys programming.
◆ Before using the product, please read this manual carefully and operate on the premise of fully understanding
the contents of the manual.
◆ Please refer to the relevant manuals for the programming mode and hardware specifications of XS products.
◆ Please deliver this manual to the end user.

User instructions
◆ Only operators with certain electrical knowledge can carry out wiring and other operations on the product. If
there is any unknown place, please consult the technical support personnel of the company.
◆ The examples listed in the manual and other technical materials are only for users' understanding and
reference, and do not guarantee certain actions.
◆ When using this product in combination with other products, please confirm whether it complies with
relevant specifications and principles.
◆ When using this product, please confirm whether it meets the requirements and safety by yourself. The
failure of this product may lead to the machine failure
◆ In case of failure or loss, please set up backup and safety functions by yourself.

Statement of responsibility
◆ Although the contents of the manual have been carefully checked, errors are inevitable, and we can't
guarantee complete consistency.
◆ We will often check the contents of the manual and correct them in subsequent versions. We welcome your
valuable comments.
◆ Please understand that the contents described in the manual are subject to change without notice.

For the hardware related and software application of XS series PLC, please refer to the following manual.
◆ XS series programmable controller user manual [hardware]
◆ XS series programmable controller user manual [software]

WUXI XINJE ELECTRIC CO., LTD. All rights reserved

This material and its contents shall not be copied, transmitted or used without explicit written

permission. Violators shall be liable for the losses caused. All rights provided in the patent license and

registration including utility modules or designs are reserved.

November 2021
Catalog

1. ETHERCAT OVERVIEW ........................................................................................................................................... 1


1-1. ETHERCAT OVERVIEW ............................................................................................................................................. 1
1-2. SYSTEM COMPOSITION ............................................................................................................................................. 1
1-3. COMMUNICATION SPECIFICATION ............................................................................................................................. 1
1-4. ETHERCAT COMMUNICATION CONNECTION ............................................................................................................. 2
2. ETHERCAT SPECIFICATION .................................................................................................................................. 3
2-1. ETHERCAT FRAME STRUCTURE................................................................................................................................ 3
2-2. ESM......................................................................................................................................................................... 4
2-3. ESC.......................................................................................................................................................................... 5
2-3-1. Principle overview ........................................................................................................................................... 5
2-3-2. Address space................................................................................................................................................... 5
2-4. SII AREA................................................................................................................................................................... 7
2-5. SDO ......................................................................................................................................................................... 7
2-5-1. Mailbox frame structure .................................................................................................................................. 7
2-5-2. Mailbox timeout ............................................................................................................................................... 8
2-5-3. Alarm information............................................................................................................................................ 9
2-6. PDO ....................................................................................................................................................................... 10
2-6-1. PDO mapping object ..................................................................................................................................... 10
2-6-2. PDO Allocation object ................................................................................................................................... 10
2-7. COMMUNICATION SYNCHRONIZATION MODE .......................................................................................................... 12
2-7-1. DC (SYNC0 event synchronization) ............................................................................................................... 12
2-7-2. SM2 (SM2 event synchronization) ................................................................................................................. 13
2-8. LED LIGHT ............................................................................................................................................................. 13
2-8-1. RUN Indicator ............................................................................................................................................... 13
2-8-2. L/A IN/OUT ................................................................................................................................................... 14
3. ETHERCAT PARAMETER CONFIGURATION................................................................................................... 15
3-1. MASTER STATION CONFIGURATION ......................................................................................................................... 15
3-1-1. Add master station ......................................................................................................................................... 15
3-1-2. General .......................................................................................................................................................... 15
3-1-3. EtherCAT I/O mapping .................................................................................................................................. 16
3-2. SLAVE STATION CONFIGURATION ............................................................................................................................ 17
3-2-1. Add slave station ............................................................................................................................................ 17
3-2-2. General .......................................................................................................................................................... 20
3-2-3. Expert process data........................................................................................................................................ 21
3-2-4. Process data ................................................................................................................................................... 22
3-2-5. Startup parameters ........................................................................................................................................ 23
3-2-6. EtherCAT I/O mapping .................................................................................................................................. 24
3-3. AXIS CONFIGURATION ............................................................................................................................................ 25
3-3-1. Add axis ......................................................................................................................................................... 25
3-3-2. SoftMotion drive: general .............................................................................................................................. 26
3-3-3. SoftMotion drive: scaling/mapping................................................................................................................ 26
3-3-4. SM_Drive_ETC_GenericDSP402: I/O mapping ........................................................................................... 27
4. ETHERCAT CONTROL PROJECT ........................................................................................................................ 28

i
4-1. MOTION PROJECT CONTROL ................................................................................................................................... 28
4-2. MULTIPLE POU USAGE........................................................................................................................................... 28
4-3. CALL MODE OF MOTION FUNCTION ......................................................................................................................... 28
5. MOTION INSTRUCTIONS ...................................................................................................................................... 29
5-1. SINGLE AXIS FUNCTION .......................................................................................................................................... 29
5-1-1. Single axis instruction list .............................................................................................................................. 29
5-1-2. Single axis instructions .................................................................................................................................. 30
5-1-3. Single axis function application ..................................................................................................................... 57
5-2. AXIS GROUP FUNCTION ........................................................................................................................................... 58
5-2-1. Axis group instruction list .............................................................................................................................. 58
5-2-2. Axis group instruction introduction ............................................................................................................... 59
5-2-3. Axis group function application ..................................................................................................................... 99
5-3. CAM FUNCTION ................................................................................................................................................... 101
5-3-1. CAM instruction list ..................................................................................................................................... 101
5-3-2. CAM instructions ......................................................................................................................................... 102
5-3-3. CAM function application ............................................................................................................................ 120
6. Q&A ........................................................................................................................................................................... 123

ii
1. EtherCAT overview
1-1. EtherCAT overview
EtherCAT is the abbreviation of Ethernet for control automation technology. It is the open network
communication between master station and slave station for real-time Ethernet developed by Beckhoff automation
GmbH, which is managed by ETG (EtherCAT Technology Group).

1-2. System composition


The connection form of EtherCAT is a network system connecting master station (FA controller) and multiple
slave stations.
The number of nodes that the slave station can connect depends on the processing or communication cycle of the
master station, the number of transmitted bytes, etc.

1-3. Communication specification


Item Specification
Physical layer 100BASE-TX (IEEE802.3)
Baud rate 100[Mbps] (full duplex)
Topology Line
Cable JC-CA twisted pair (shielded twisted pair)
Cable length The maximum length between nodes is 50m
Port 2 Port (RJ45)
EtherCAT Indicators (LED) [Run] RUN Indicator
[L/A IN] Port0 Link/Activity Indicator (Green)
[L/A OUT] Port1 Link/Activity Indicator (Green)
Station Alias (ID) Range: 0~65535. Address: 2700h
Explicit Device ID Not support
Mailbox protocol COE (CANopen Over EtherCAT)
SyncManager 4
FMMU 3

Modes of operation
csp Cyclic synchronous position mode
position PP Profile position mode
Modes of operation hm Homing mode
csv Cyclic synchronous velocity mode
speed
pv Profile velocity mode
cst Cyclic synchronous torque mode
torque
tq Torque profile mode

Touch Probe 2 channels


DC (SYNCO Event synchronization)
Synchronization mode
SM (SM Event synchronization)
Cyclic time (DC Communication cycle) 500, 1000, 2000, 4000[μs]

1
Item Specification
Communication object SDO[service data object], PDO[process data object]
Single station PDO maximum allocation TxPDO: 4 [pcs] RxPDO: 4 [pcs]
Single station PDO max bytes TxPDO: 24[byte] RxPDO: 24[byte]
Mailbox communication space in PreOP 1ms
mode
Email SDO request and SDO information

1-4. EtherCAT communication connection


The wiring of EtherCAT motion control system is very simple. Thanks to EtherCAT, the star topology of Ethernet
can be replaced by a simple linear structure. Taking Xinje DS5C series servo as an example, because EtherCAT
does not need hub and switch, DS5C series servo is equipped with EtherCAT communication network port, the
consumption of cables and bridges is greatly reduced, and the workload of connection design and joint calibration
is greatly reduced, which is convenient to save installation costs.
It is recommended to use linear connection method for EtherCAT bus wiring. XS series wiring mode is shown in
the figure below:

Expansion IO

EtherCAT

The whole bus network is linear structure, in which XS3 series controller is the master station and Xinje DS5C1
series servo station is the slave station. XS3 series PLC has upper and lower network ports. The upper network
port is Ethernet/IP, which is used to connect Codesys upper computer. The lower network port is EtherCAT
connection port, which is used to connect Xinje DS5C1 series servo to realize EtherCAT communication. The two
communication network ports of Xinje DS5C1 series servo driver shall follow the principle of "bottom in and top
out".

2
2. EtherCAT specification
2-1. EtherCAT frame structure
EtherCAT is an industrial communication protocol that can be controlled in real time based on Ethernet. It only
expands the IEEE 802.3 Ethernet specification without any change to the basic structure, so it can transfer the data
in the standard Ethernet frame.

EtherNet/EtherCAT frame structure


14byte 46-1500byte 4byte
Ethernet Header Ethernet Data FCS

Ethernet Header EtherCAT Header Datagrams

6byte 6byte 2byte 11bit 1bit 4bit 44(*1)-1498byte


Datagrams Source EtherType Length Res. Type Datagrams
88A4h 1

1st Ethernet Header 2nd Nth EtherCAT Datagram

10byte Max:1486byte 2byte


Datagram Header Data WKC

1byte 1byte 4byte 11bit 3bit 1bit 1bit 2byte


Working Counter
command index Address area Len R C M IRQ

2byte 2byte More EtherCAT Datagrams


AP** Position Offset Position Addressing

FP** Address Offset Node Addressing

L** Logical Address Logical Addressing

Note: when Ethernet frame is shorter than 64 bytes, add 1~32 bytes.
(Ethernet Header + Ethernet Data + FCS)
Because the EtherType of the Ethernet Header is [88A4h], the subsequent Ethernet data is processed as an
EtherCAT frame. "EtherCAT frame" is defined and analyzed by a certain protocol. As long as the master station
and slave station abide by this protocol, data communication can be realized. Commonly used protocols include
CANopen Over EtherCAT (CoE), Sercos Over EtherCAT (SoE), etc.

3
2-2. ESM
EtherCAT State machine (ESM) is responsible for coordinating the state relationship between master and slave
applications during initialization and operation.
The state change request is executed by the master station. The master station puts forward a control request to the
application layer service, which generates an application layer control event in the slave station. After the state
change request succeeds or fails, the slave station responds to the application layer control service through the
local application layer state write service. If the state change fails, the slave station maintains the state and sets an
error flag.

The following figure shows the state transition diagram of ESM:


Init
(IP) (PI)
Pre-Operational
(OI)
(PS) (SP) (SI)

(OP) Safe-Operational (IP) is state conversion abbreviation


(IP): Init Pre-Operational
(SO) (OS)
(PS): Pre-Operational Safe-Operational
Operational

Init: Initialization status


Pre-Operational: pre-operation status
Safe-Operational: safe operation status
Operational: operation status

Communication action
SDO
Slave station status Actions in each state (mailbox) PDO PDO
send & Send Receive
receive
Communication is initialized, SDO and PDO
Init - - -
cannot receive and send messages
Pre-Operational (PreOP) Only SDO can send and receive Yes - -
Safe-Operational (SafeOP) Only SDO can send and receive, PDO can send Yes Yes -
Operational (OP) SDO and PDO both can send and receive Yes Yes Yes

Note: the access from the master station to the ESC register is independent of the above table and can be used at
any time.
PDO (process data object) is used to transmit periodic communication data.
SDO (service data object) is used to transmit aperiodic communication data.
Instruction or interface operation during ESM state switching may cause abnormal communication and error
reporting.

4
2-3. ESC

2-3-1. Principle overview


ESC refers to the EtherCAT slave controller. The communication process is completely handled by ESC, which
has four data transceiver ports, and each port has a Tx and Rx. Each port can send and receive Ethernet data
frames, and the data flow direction in ESC is fixed: port 0 - > port 3 - > port 1 - > port 2 - > port 0. If ESC detects
that a port has no external PHY, it will automatically close the port and automatically forward to the next port
through internal loopback.
Ports(MII/EBUS) SPI/uC parallel/
0 1 2 3 Ditigal I/O On-chip bus

AutoForwarder+
PDI
Loopback
ECAT Interface PDI Interface

PHY
Management
FMMU

ECAT
Processing SyncManager
Unit

ESC address space

Reset Reset Registers User RAM Process RAM

Distributed
Monitoring EEPROM Status
Clocks

SYNC LATCH I2C EEPROM LEDs

2-3-2. Address space


DS5C1 series holds 8kbyte physical address space.
The initial 4kbyte (0000H ~ 0FFFH) is used as register space, and the other 4kbyte (1000H ~ 1FFFH) is process
data PDO used as RAM field. Please refer to the data table of IP (ET1810/ET1811/ET1812) for details of
registers.
Length Initial
ESC register byte address Explanation
(Byte) value*1
ESC Information (slave station controller information)
0000h 1 type 04h
0001h 1 Revision 02h
0002h~0003h 2 Build 0040h
0004h 1 FMMUs supported 03h
0005h 1 SyncManagers supported 04h
0006h 1 RAM Size 08h
0007h 1 Port Descriptor 0Fh

5
Length Initial
ESC register byte address Explanation
(Byte) value*1
0008h~0009h 2 ESC Features supported 0184h
Station Address
0010h~0011h 2 Configured Station Address -
0012h~0013h 2 Configured Station Alias -

Data Link Layer

0100h~0103h 4 ESC DL Control -

0110h~0111h 2 ESC DL Status -
Application Layer
0120h~0121h 2 AL Control -
0130h~0131h 2 AL Status -
0134h~0135h 2 AL Status Code -

PDI
0140h 1 PDI Control 08h
0141h 1 ESC Configuration 0Ch
0150h 1 PDI Configuration -
0151h 1 SYNC/LATCH PDI Configuration 66h
0152h~153h 2 Extend PDI Configuration -

Watchdogs
0400h~0401h 2 Watchdog Divider -
0410h~0411h 2 Watchdog Time PDI -
0420h~0421h 2 Watchdog Time Process Data -
0440h~0441h 2 Watchdog Status Process Data -
0442h 1 Watchdog Counter Process Data -
0443h 1 Watchdog Counter PDI -

FMMU
0600h~062Fh 3x16 FMMUs [2:0] -
+0h~3h 4 Logical Start Address -
+4h~5h 2 Length -
+6h 1 Logical Start bit -
+7h 1 Logical Stop bit -
+8h~9h 2 Physical Start Address -
+Ah 1 Physical Start bit -
+Bh 1 Type -

6
Length Initial
ESC register byte address Explanation
(Byte) value*1
+Ch 1 Activate -
+Dh~Fh 3 Reserved -

Distributed Clocks(DC)-SYNC Out Unit
0981h 1 Activation -

0984h 1 Activation Status -
098Eh 1 SYNCO Status -

0990h~0993h 4 Start Time Cyclic Operation/Next SYNC0 Pulse -

09A0h~09A3h 4 SYNC0 Cycle Time -

2-4. SII area


After the driver power is on, Configured Station Alias auto-read as the ESC and write in ESC register in the ESC
configuration area (EEPROM word address 0000h~0007h). When the changed value of SII EEPROM is reflected
in the ESC register, the power supply needs to be started again. In addition, the initial value of the IP core
(ET1810/ET1811/ET1812) is set. Please refer to IP core (ET1810/ET1811/ET1812) data list for details.

2-5. SDO
DS5C1 series supports SDO (service data object). The data exchange of SDO uses mailbox communication, so the
data refresh time of SDO becomes unstable.
The master station side reads and writes data in the records in the object dictionary, and can set the object and
monitor various states of the slave station. The response to the read-write action to the SDO takes time. For
objects refreshed with PDO, do not refresh with SDO, but overwrite with the value of PDO.

2-5-1. Mailbox frame structure


The frame structure of mailbox/SDO is as follows. Please refer to ETG specification (ETG1000-5 and ETG1000-6)
for details.
Ethernet Header EthernCAT Header 1st EtherCAT Datagram 2nd… … Nth… FCS

10byte Max:1486byte 2byte


Datagram Header Mailbox Protocol WKC

6byte 2byte Max:1478byte


Mailbox Header CoE Header Cmd Specific

16bit 16bit 6bit 2bit 4bit 4bit 9bit 3bit 4bit Max:1478byte
Length Address Channel Prio Type Cnt Number Res Serv Cmd Specific

7
Frame Data area Data type Function
MailBox Header Length WORD Mailbox data length
Address WORD Address of source station
Channel Unsigned6 (Reserved)
Prority Unsigned2 Priority
Type Unsigned4 Mailbox type
00h: error
01h: (reserved)
02h: EoE (not corresponding)
03h: CoE
04h: FoE (not corresponding)
05h: SoE (not corresponding)
06h-0Eh: (reserved)
0Fh: VoE (not corresponding)
Cnt Unsigned3 Mailbox counter
Reserved Unsigned1 (Reserved)
CoE Header Number Unsigned9 Reserved
Reserved Unsigned3 Reserved
Service Unsigned4 Information type
Cmd specific Size Indicator Unsigned1 Data Set Size use license
Transfer Type Unsigned1 Normal transfer/Expedited transfer
Data Set Size Unsigned2 Specified data size
Complete Access Unsigned1 Selection of object access method (not
corresponding)
Command Specfier Unsigned3 Upload/download
Selection of requirements / responses, etc
Index WORD Object Index
Subindex BYTE Object Subindex
Object data or Abort message

2-5-2. Mailbox timeout


The servo driver performs the following timeout settings in mailbox communication.
Timeout of mailbox request: 100ms
The master station sends a request to the slave station (driver). If the WKC of the transmission data of the request
frame is updated, the slave station is considered to receive the request normally. Retry repeatedly until the WKC
is updated. However, if the WKC is not updated until this set time, the master station side times out.

Mailbox response timeout: 10s


The master station receives the response from the request of the slave station (driver). If this WKC is updated, it is
considered to be a normal response. Until this set time, if the response that WKC is updated cannot be received,
the master station side times out.
The maximum time required for the response of the slave station (driver) to complete.

8
2-5-3. Alarm information

(1) Error code


Error code returns the same value as 603Fh (Error code).
0000h~FEFFh are defined according to IEC61800-7-201.
FF00h~FFFFh are defined by the manufacturer, as shown below.

Index Subindex Name Range Data type Accessibility PDO Op-mode


603Fh 00h Error code 0-65535 U16 ro TxPDO All
The alarm of servo driver now (only the main number).
When the alarm does not occur, 0000H is displayed.
When the alarm occurs, the alarm is displayed.
FF**h
Alarm main number (00h~FFh)
For example: FF03h … 03h=3d E-030 (overvoltage protection) occurs
FF55h …55h=85d E-850 (TxPDO configuration error protection), E-851(RxPDO
configuration error protection). Any one of them occurs as an exception, E-817
(SyncManager2/3 setting error), it will display A000h.

(2) Error register


Error register returns same value as 1001h (Error register).
Index Subindex Name Range Data type Accessibility PDO Op-mode
1001h 00h Error register 0-65535 U16 ro TxPDO All
Displays the type (status) of the alarm that is happening to the servo driver.
When the alarm does not occur, 0000H is displayed.
Do not display warnings.
Bit Content
0
1
Not support
2
3
4 The alarm defined by AL status code occurs *1
5 Not support
6 Reserved
7 The alarm undefined by AL status code occurs
*2
*1: The alarm defined by AL status code refers to EtherCAT communication related error
E-800~7, E-810~7, E-850~7.
*2: The alarm undefined by AL status code refers to EtherCAT communication related
error E-880~7 and error other than EtherCAT communication association.

9
2-6. PDO
DS5C1 series supports PDO (process data object).
EtherCAT based real-time data transfer is performed through data exchange of PDO (process data object).
PDO includes RxPDO transferred from master station to slave station and TxPDO transferred from slave station
to master station.
Send side Receive side
RxPDO Master station Slave station
TxPDO Slave station Master station

2-6-1. PDO mapping object


PDO mapping refers to the mapping from the object dictionary to the application object of PDO.
DS5C series PDO mapping tables can use mapping objects of 1600h ~ 1603h for RxPDO and 1A00h ~ 1A03h for
TxPDO.
The maximum number of application objects that a mapping object can map is as follows:
RxPDO: 24 [byte], TxPDO: 24 [byte]
The following shows the setting example of PDO mapping.
< Setting example >
Assign the application object 6040h, 6060h, 607Ah, 60B8h to the mapping object 1600h (Receive PDO mapping
1: RxPDO_1).
Index Subindex Object contents
1600h 00h 04h
01h 6040 00 10 h
02h 6060 00 08 h
03h 607A 00 20 h
04h 60B8 00 10 h
05h 0000 00 00 h

18h 0000 00 00 h
6040h 00h Controlword U16
6060h 00h Mode of operation I8
607Ah 00h Target Position I32
60B8h 00h Touch probe function U16

2-6-2. PDO Allocation object


For PDO data exchange, tables for PDO mapping must be assigned to syncmanager. The relationship between the
table used for PDO mapping and syncmanager is described to the PDO allocation object. DS5C series, as PDO
allocation objects, can use 1C12h for RxPDO (syncmanager2) and 1C13h for TxPDO (syncmanager3).

The maximum number of application objects that a mapping object can map is as follows:
RxPDO: 4 [Table] (1600h~1603h).
RxPDO: 4 [Table] (1A00h~1A03h).
Usually, one mapping object is enough, so the default one does not need to be changed.

10
Example of setting PDO allocation object:
Allocation of mapping object 1600h to allocation object 1C12h (sync Manager Channel 2).
Index Subindex Object contents
00h 01h
01h 1600h
1C12h 02h 0000h
03h 0000h
04h 0000h

Allocation of mapping object 1600h to allocation object 1C13h (sync Manager Channel 3).
Index Subindex Object contents
00h 01h
01h 1A00h
1C13h 02h 0000h
03h 0000h
04h 0000h

11
2-7. Communication synchronization mode
The DS5C series can select the following synchronization modes.
synchronization content Synchronization method Feature
modes
Synchronize the time
High-precision
SYNC0 event information of other slave
DC Compensation processing is required
synchronization stations based on the time of
at the master station side
axis 1
No transmission delay compensation,
poor accuracy
SM2 event Synchronize according to
SM2 It is necessary to maintain the transfer
synchronization RxPDO receiving time
time on the controller side (special
hardware, etc.)

2-7-1. DC (SYNC0 event synchronization)


DS5C series have 64 bits DC (Distributed Clock).
The synchronization of EtherCAT communication is based on this DC. According to the DC slave station, the
synchronization is realized by sharing the same reference clock (system time). The local cycle of the slave station
starts with the SYNC0 event. Since the slave processing (servo processing) starts from the sync0 event cycle, it is
always synchronized with the SYNC0 event.
The master station needs transmission delay compensation (offset compensation) and regular deviation
compensation during communication initialization. The following figure shows the synchronization completion
process from the control power input to the sync0 event and slave station processing (servo processing).
2~3s

General
CPU action restart initialization
Time change as the ESM status action
EtherCAT migration instruction
communication *1
state Pre Safe
Init Operational
(ESM state) Operational Operational

Servo driver SDO (Mailbox) can send and receive


communication
action
PDO can send

PDO can receive

SYNC0 signal
from ESC

SYNC0 signal Synchronization Communication


and servo completed time cycle
control cycle Synchronization Max.1s Synchronization
synchronization not completed
completed
status
After S Y N C 0 signal and
servo control cycle same
time completed, PDO send
in the status of same time as
servo control cycle

12
2-7-2. SM2 (SM2 event synchronization)
The local cycle of the slave station starts with the SM2 event.
Since the processing of the slave station starts from the SM2 event cycle, it is always synchronized with the SM2
event.
Since the SM2 event occurs when the receiving of PDO is completed, it must be ensured that the upper (Master)
side sends messages regularly. If the fluctuation (deviation) of the sending time is too large, the synchronization
cannot be completed, or an alarm occurs.
If the above problem occurs, please use DC (sync0 event synchronization).

2-8. LED light


DS5C has three EtherCAT Indicators (LED).
As the LED display status, on and off have the following four modes.

Approx. 50ms

ON
Flickering
OFF

Approx. 50ms

Approx. 200ms
ON

Blinking
OFF
Approx. 200ms

ON Approx. 1000ms
Single flash
OFF
Approx. 200ms

Approx. 200ms
ON Approx. 1000ms
Double flash
OFF
Approx. 200ms Approx. 200ms

2-8-1. RUN Indicator


RUN Indicator represents ESM (EtherCAT State Machine) status.
The light on status is green.
LED status Content
OFF ESM: INIT status
Blinking ESM: Pre-Operational status
Single flash ESM: Safe-Operational status
ON ESM: Operational status

Note: this light is on the PCB inside the servo and cannot be observed outside the servo.

13
2-8-2. L/A IN/OUT
The L/A IN/OUT Indicator indicates the link status and action status of the physical layer of each port.
The light on status is green.
LED status Content
OFF LINK not established
Flickering LINK established, with send and receive
ON LINK established, without send and receive

14
3. EtherCAT parameter configuration
3-1. Master station configuration

3-1-1. Add master station


Right click [Device], click [Add Device], select [Ethercat Master SoftMotion], then click [Add Device].

3-1-2. General

(1) EtherCAT NIC Settings


Destination address (MAC):
to receive the target address of EtherCAT message, if the [broadcast] option is activated, the target address does
not need to be entered, and the system will automatically search the target address through broadcast.
Redundancy:
when this option is enabled, the EtherCAT redundancy mode is officially enabled, which supports the ring
topology.
Source address (MAC):
MAC address of PLC network interface. You can select [select network by Mac] or [select network by name]. The
user can select the [Browse] to select the source address to be set.

15
(2) Distributed Clock
Cycle time:
If the distributed clock function is activated, the master station will send corresponding data messages to the slave
station according to the cycle time. Therefore, data exchange can achieve accurate synchronization. This function
is particularly important when synchronous action is required in the distributed process (for example, several
servo axes perform simultaneous linkage tasks). The master clock with signal jitter less than 1 microsecond can be
provided within the network.
Sync offset:
Generally, when the PLC task starts 20%, the synchronization message starts to affect the slave station, which
means that the PLC task cycle can have 80% delay, and no data will be lost within this delay.
Sync window monitoring:
If this option is on, you can monitor the synchronization status of the slave station.
Sync window:
Time used to monitor the synchronization window. If all slaves are within the synchronization window time, the
variable xSyncInWindow (IoDrvEtherCAT) will be set to TRUE, otherwise it will be FALSE.

3-1-3. EtherCAT I/O mapping


When the EtherCAT master station is established, EtherCAT_Task will be established automatically, set the bus
cycle task in the EtherCAT I/O mapping. The default is EtherCAT_ Task.

16
3-2. Slave station configuration

3-2-1. Add slave station

(1) Add xml file


Click Tools--Device Repository, then click Install, select the XML file, click open.

17
(2) Scan th slave station
In the project bar [Device], right click [EtherCAT_Master_SoftMotion], click [Scan For Devices] to scan the
EtherCAT slave station.
Or right click [EtherCAT_Master_SoftMotion], click [Insert Devices], to add the device by manual.

18
In this example, one DS5C1 series servo is connected, the scanning result is shown as below. Click [Copy All to
Project], add all scanned slave stations to the project.

Note: Before using the [scan devices] function, it must be ensured that the EtherCAT device description file of the
slave station has been installed in the Codesys of the commissioning PC, otherwise this function cannot be used.

19
3-2-2. General

(1) Address
AutoInc address:
Determined by the location of the slave station in the network. This address is only used during startup. The
master station needs to assign an EtherCAT address to the slave station. When the first message for this purpose
passes through the slave station, each passing slave station adds its own automatic increment address by 1.
EtherCAT address:
The final address of the slave station, which is allocated by the master station during startup.

(2) Distributed Clock


Select DC:
The drop-down menu provides all settings about the distributed clock provided by the device description file. You
can select DC SYNC0 (synchronous mode) or Freerun (asynchronous mode).

(3) Sync 0/1


Enable Sync 0/1:
If this option is selected, use [sync0/1] synchronous unit. A synchronization unit describes a set of synchronously
exchanged process data.
Sync unit cycle:
The time of the master station cycle multiplied by the selected coefficient will be used as the synchronization
cycle time of the slave station. The cycle time (us) column displays the currently set cycle time.

20
3-2-3. Expert process data
Select [expert settings] in the general interface, it will show [expert process data] configuration interface.

(1) Sync manager


Used for mailbox data (SDO) interaction. SM2 and SM3 are used for the interaction of PDO data (their type input
and output are relative to the master station).
Note:
① PDO (Process Data Object): used to transmit periodic communication data.
② SDO (Service Data Object): used to transmit aperiodic communication data.

21
(2) PDO assignment
The larger the PDO data, the longer the transmission time, and it may not be completed within the synchronization
unit cycle. Therefore, the stability of data transmission cannot be guaranteed when there are many slave stations
and each slave station has a large PDO data.

(3) PDO list


Some predefined PDO mappings in the servo XML. RxPDO represents the PDO transmitted from the master
station to the slave station, which can use 1600h~1603h. TxPDO represents the PDO transmitted from the slave
station to the master station, which can use 1A00h~1A03h.

(4) PDO content


Specify the PDO object to be mapped from the object dictionary, and the object performs periodic data exchange
through PDO.

3-2-4. Process data


Displays the slave input and output process data described in the device description file.

22
3-2-5. Startup parameters

There are three default configurations in the startup parameters, of which 6060h is the slave operation mode, and
the default value is 8 (CSP mode). 60C2-1 and 60C2-2 are synchronization unit cycles, 60C2-1 is the value of
synchronization unit cycles, and 60C2-2 is the unit of synchronization unit cycles.
Start parameters and their execution sequence can be configured through add, edit, delete, move up and move
down.
Note:
The execution sequence is from top to bottom. Different values can be written for the same parameter, indicating
that the parameters are assigned values from top to bottom.

[Error - > Exit]: indicates that if an error occurs when configuring this parameter, all the following configurations
will be skipped.
[Error - > Jump] and [Next line] to specify that when an error occurs, jump to the specified line to continue
configuration.

23
3-2-6. EtherCAT I/O mapping

You can view EtherCAT I/O mapping relationships, function descriptions, actual addresses, and types of mapping
variables.

24
3-3. Axis configuration

3-3-1. Add axis


After adding the slave station device, right click the slave station device [XINJE_DS5C1_CoE_Drive_Rev4_0],
click [Add SoftMotion CiA 402 Axis].

Note: If there are multiple slaves, you need to manually add axes for each slave station.

25
3-3-2. SoftMotion drive: general

Axis type:
In order to accurately control the motion position, the controller must accurately calculate the position of the servo
motor. According to the operating characteristics and stroke characteristics of the application system, select [axis
type and limit] so that the controller can calculate the feedback information of the encoder of the reading motor to
obtain the accurate position and avoid the error caused by the accumulated overflow of the encoder pulse number.

If the actual servo motor is not connected, select [virtual mode]. For the reciprocating mechanism of screw type,
its stroke is limited. We often need to know its absolute position within the range of screw stroke. At this time, it is
better to choose [linear mode]. For the rotating shaft of one-way operation type, if the linear mode is adopted, the
position count overflow is likely to occur, resulting in position calculation errors. It is better to select [periodic
mode].

3-3-3. SoftMotion drive: scaling/mapping


The encoder parameters (such as resolution) of the motor and the mechanical reduction ratio of the application
system may be different, and they also need to be set according to the actual situation during programming.

26
3-3-4. SM_Drive_ETC_GenericDSP402: I/O mapping

27
4. EtherCAT control project
4-1. Motion project control
In a project, the instructions used in the program need the support from the file library. Each POU, if not called in
a task, will not be executed. The user can choose to directly configure a task for execution, or select another POU
that is already in the task to call the POU that is the configured task. If the program executed in the POU needs to
interact with external IO or bus, the corresponding high-speed IO module or EtherCAT bus and slave station
equipment shall be configured in the program.

4-2. Multiple POU usage


When writing application programs, program functions with different execution cycles should be written in
different POU and configured to tasks with different priorities and cycle times, so as to facilitate the viewing and
optimization of subsequent programs.
◆ Allocate CPU resources reasonably and allocate cycles according to the cycle time required by each
function
◆ The program structure is clear, and each function is clearly distinguished. Compared with stacking all
programs together, multiple POU usages can distinguish functions through different names, which are
reflected in the project bar, and the logical structure of the program is clear at a glance
◆ It is convenient for debugging. During debugging, it is very convenient to shield some functions that
need to be shielded
◆ It can directly quote POU between different projects, and directly copy POU from project 1 to project 2
◆ After the program is clearly planned, it can be sent to several people for programming to improve the
efficiency of programming
◆ Different programming languages can be used in different POU. As long as the interface is clear, there is
no unified requirement for programming languages in POU.

4-3. Call mode of motion function


In a project, in order to allocate CPU resources more reasonably, programs with different cycles will be placed in
different POU and tasks during programming.

The motion function requires the task with the highest priority, while the logic function generally does not require
the task configuration with that high priority. Therefore, in practical projects, these two blocks are usually placed
in two different POU and tasks. So, how can we control the execution of a motion function in the logic function
even if the motion function is separated from the logic function? Generally, some input variables and output
variables are defined in the motion function for callingby other functions. For example, in the logic POU, if the
motion function needs to be called, the control data is written to the input variables of the motion POU. The
motion POU puts the motion state into the output variable and gives it to the logic POU to judge the motion state
and the execution of program logic.

28
5. Motion instructions
5-1. Single axis function

5-1-1. Single axis instruction list


Instruction Function
MC_Power Enable the axis
MC_Reset Reset the axis faults
MC_Stop Stop the controller motion
MC_Halt Pause the execution of function blocks in progress
MC_Home Homing
MC_Jog Jog operation
MC_MoveAbsolute Single axis absolute position control
MC_MoveAdditive Acceleration moves an additional distance at a given speed
MC_MoveRelative Moves the axis one relative position from the position of the current axis
On the basis of the previous motion, superimpose the speed and acceleration
MC_MoveSuperImposed
to run an additional distance
MC_MoveVelocity The axis runs continuously at a specified speed
MC_PositionProfile Plan and execute the motion as the time-position
MC_VeloctyProfile Plan and execute the motion as the time-speed
MC_AccelerationProfile Plan and execute the motion as the time-acceleration
MC_ReadActualPosition Read the current position of the current relevant axis
MC_ReadActualTorque Read the current torque of the current relevant axis
MC_ReadActualVlocity Read the current speed of the current relevant axis
MC_ReadAxisError Obtain the error code
MC_ReadBoolParameter Get the parameter value according to the parameter serial number
MC_ReadParameter Get the parameter value according to the parameter ID
SMC_ReadSetPosition Read the setting position of the current axis
SMC_ReadFBError Read historical error information of function block
Modify the parameter value of a specific boolean variable specified by the
MC_WriteBoolParameter
user
MC_WriteParameter Modify user specified special parameters
SMC_ClearFBError Clear historical error messages for function blocks
SMC_ErrorString Read the error description information corresponding to the error code

29
5-1-2. Single axis instructions

5-1-2-1. Axis enable [MC_Power]

(1) Instruction overview


It is used to enable the specified axis to enter or exit the runnable state. It is also called axis enable.
Instruction Name Graphic representation ST representation

MC_Power Axis enable

(2) Related variables


Effective range Initial Description
VAR_IN_OUT Name Data type
value
Axis Axis AXIS_REF_SM3 - - Specified axis
Effective range Initial Description
VAR_INPUT Name Data type
value
Must be set to TRUE to enable
Enable Valid BOOL TRUE/FALSE FALSE
processing of function blocks
Must be set to TRUE to activate the
bRegulatorOn Enable BOOL TRUE/FALSE FALSE
enable status of the function block
Must be set to TRUE to turn off the
Drive
bDriveStart BOOL TRUE/FALSE FALSE emergency stop processing of the
startup
function block
Effective range Initial Description
VAR_OUTPUT Name Data type
value
Status Operable BOOL TRUE/FALSE FALSE Axis ready is TRUE
Enable
bRegulatorRealState BOOL TRUE/FALSE FALSE Active state of axis enable
effective
Drive Drive not interrupted by quick stop
bDriveStartRealState BOOL TRUE/FALSE FALSE
available mechanism is TRUE
In Processing of function block did not
Busy BOOL TRUE/FALSE FALSE
execution complete is TRUE
Error Error BOOL TRUE/FALSE FALSE Error occurs is TRUE
The value is 0 under normal
ErrorID Error code SMC_ERROR - 0 conditions, and the error code is
output under abnormal conditions

30
5-1-2-2. Axis reset [MC_Reset]

(1) Instruction overview


Used to reset (clear) axis errors.
Instruction Name Graphic representation ST representation

MC_Reset Axis reset

(2) Related variables


VAR_IN_OUT Name Data type Efficient range Initial Description
value
Axis Axis AXIS_REF_SM3 - - Specified axis
Efficient range Initial Description
VAR_INPUT Name Data type
value
The rising edge of the input value will
Execute Valid BOOL TRUE/FALSE FALSE
start the execution of the function block
Efficient range Initial Description
VAR_OUTPUT Name Data type
value
Done Completed BOOL TRUE/FALSE FALSE Reset executed is TRUE
The function block execution has not
Busy In execution BOOL TRUE/FALSE FALSE
ended is TRUE
Error Error BOOL TRUE/FALSE FALSE Function block execution error
ErrorID Error code SMC_ERROR - 0 Error identification

31
5-1-2-3. Stop motion [MC_Stop]

(1) Instruction overview


Make the axis deceleration stop
Instruction Name Graphic representation ST representation

Forced
MC_Stop
stop

(2) Related variables


Efficient Initial
VAR_IN_OUT Name Data type Description
range value
Axis Axis AXIS_REF_SM3 - - Specified axis
Efficient Initial Description
VAR_INPUT Name Data type
range value
Rising edge triggers command
Execute Valid BOOL TRUE/FALSE FALSE
movement
Deceleration Positive Specified deceleration speed, the unit
Deceleration LREAL 0
speed number is [command unit/s2 ]
Positive Specified jerk, the unit is [command
Jerk Jerk LREAL 0
number unit/s3]
Efficient Initial Description
VAR_OUTPUT Name Data type
range value
Done Completed BOOL TRUE/FALSE FALSE Execution completed is TRUE
Busy In execution BOOL TRUE/FALSE FALSE After receiving the command is TRUE
Error Error BOOL TRUE/FALSE FALSE Function block execution error
ErrorID Error code SMC_ERROR - 0 Error identification

32
5-1-2-4. Pause the motion [MC_Halt]

(1) Instruction overview


Decelerates to stop the motion being performed by the axis, and the stop motion can resume the uncompleted part
of the execution.
Instruction Name Graphic representation ST representation

Pause the
MC_Halt
motion

(2) Related variables


VAR_IN_OUT Name Data type Efficient Initial Description
range value
Axis Axis AXIS_REF_SM3 - - Specified axis
Efficient Initial Description
VAR_INPUT Name Data type
range value
Execute Valid BOOL TRUE/FALSE FALSE Execute at the rising edge
Deceleration Specified deceleration speed. The unit
Deceleration LREAL Positive value 0
speed is [command unit/s2]
Specified jerk. The unit is [command
Jerk Jerk LREAL Positive value 0
unit/s3]
Efficient Initial Description
VAR_OUTPUT Name Data type
range value
Becomes TRUE when execution is
Done Completed BOOL TRUE/FALSE FALSE
complete
TRUE when the function block
Busy In execution BOOL TRUE/FALSE FALSE
execution has not ended
Instruction TRUE if the command has been
CommandAborted BOOL TRUE/FALSE FALSE
interrupted terminated by another command
Error Error BOOL TRUE/FALSE FALSE Function block execution error
ErrorID Error code SMC_ERROR - 0 Error identification

33
5-1-2-5. Axis homing [MC_Home]

(1) Instruction overview


This command executes the homing action of the motor. The specific homing process is determined by the
homing mode designed by the bus driver.
Instruction Name Graphic representation ST representation

Axis
MC_Home
homing

(2) Related variables


VAR_IN_OUT Name Data type Efficient range Initial Description
value
Axis Axis AXIS_REF_SM3 - - Specified axis
Efficient range Initial Description
VAR_INPUT Name Data type
value
Execute Valid BOOL TRUE/FALSE FALSE Execute at the rising edge
Axis reached
Position LREAL Data range 0 Axis homing position
position
Efficient range Initial Description
VAR_OUTPUT Name Data type
value
Becomes TRUE when execution is
Done Completed BOOL TRUE/FALSE FALSE
complete
TRUE when the function block
Busy In execution BOOL TRUE/FALSE FALSE
execution has not ended
Instruction TRUE if the command has been
CommandAborted BOOL TRUE/FALSE FALSE
interrupted terminated by another command
Error Error BOOL TRUE/FALSE FALSE Function block execution error
ErrorID Error code SMC_ERROR - 0 Error identification

(3) Function description


This function block is homing operation, Position is the homing position of the axis.
This function block operation status is Standstill, instruction running status is homing, other status cannot run.
The instruction starts at the rising edge of Execute.
Before homing operation, it is necessary to configure bus homing parameters, such as homing mode, speed,
acceleration, etc. Please refer to the manual of the driver used for which parameters need to be configured for bus
drive homing. For example, DS5C1 series servo driver user manual – chapter 6.5 HM mode.

For general bus drive homing, the data of index and subindex shall be set as shown in the following table.

34
Index Subindex Explanation
0x6098 00h Homing mode
0x6099 01h The speed from homing start to find the home point, the value is high
to decrease the homing time
0x6099 02h The speed from finding the zero point to homing completed, the value
is low to improve the precision
0x609A 00h Homing acceleration speed

5-1-2-6. Jog operation [MC_Jog]

(1) Instruction overview


This command is used to manually control the movement of the axis in the specified direction.
Instruction Name Graphic representation ST representation

Jog
MC_Jog
operation

(2) Related variables


Initial
VAR_IN_OUT Name Data type Efficient range Description
value
Axis Axis AXIS_REF_SM3 - - Specified axis
Efficient range Initial Description
VAR_INPUT Name Data type
value
If JogForward is TRUE, the axis
moves forward as the given parameters
JogForward Jog forward BOOL TRUE/FALSE FALSE (Velocity, Acceleration, Deceleration,
Jerk). If JogBackward is TRUE, axis
does not move
If JogBackward is TRUE,the axis
moves reverse as the given parameters
JogBackward Jog reverse BOOL TRUE/FALSE FALSE (Velocity, Acceleration, Deceleration,
Jerk). If JogForward is TRUE, axis
does not move
0, positive
Velocity Target speed LREAL 0 max speed [u/s]
value
Target positive value
Acceleration LREAL 0 Acceleration speed [u/s2]
acceleration
Deceleration Target LREAL positive value 0 Deceleration speed [u/s2]

35
Initial
VAR_IN_OUT Name Data type Efficient range Description
value
deceleration
Target jerk positive value
Jerk LREAL 0 Jerk speed [u/s3]
speed
Efficient range Initial Description
VAR_OUTPUT Name Data type
value
TRUE when the function block
Busy In execution BOOL TRUE/FALSE FALSE
execution has not ended
Instruction TRUE if the command has been
CommandAborted BOOL TRUE/FALSE FALSE
interrupted terminated by another command
Error Error BOOL TRUE/FALSE FALSE Function block execution error
ErrorID Error code SMC_ERROR - 0 Error identification

5-1-2-7. Absolute position [MC_MoveAbsolute]

(1) Instruction overview


This command is used to move the control axis to the specified absolute position according to the set parameters.
Instruction Name Graphic representation ST representation

Absolute
MC_MoveAbsolute
position

(2) Related variables


VAR_IN_OUT Name Initial
Data type Efficient range Description
value
Axis Axis AXIS_REF_SM3 - - Specified axis
Initial
VAR_INPUT Name Data type Efficient range Description
value
Execute Valid BOOL TRUE/FALSE FALSE Start at rising edge
Position Position LREAL Data range 0 Target position of motion
0, positive
Velocity Target speed LREAL 0 Max speed [u/s]
value
Acceleration Target LREAL positive value 0 Acceleration speed [u/s2]

36
VAR_IN_OUT Name Initial
Data type Efficient range Description
value
acceleration
Target positive value
Deceleration LREAL 0 Deceleration speed [u/s2]
deceleration
Target jerk positive value
Jerk LREAL 0 Jerk speed [u/s3]
speed
Fastest: automatically select the
3:fastest fastest direction to move
2:current Current: move in current direction
Direction Direction MC_DIRECTION 1:Positive 0 Positive: move forward
0:shortest Shortest: select the direction
-1:Negative according to the shortest path
Negative: move reverse
MC_BUFFER_ if function block is Busy, then only
BufferMode Buffer mode - 0
MODE allow BufferMode=Aborting
Initial
VAR_OUTPUT Name Data type Efficient range Description
value
Done Completed BOOL TRUE/FALSE FALSE TRUE after execution
TRUE when the function block
Busy In execution BOOL TRUE/FALSE FALSE
execution has not ended
Active In control BOOL TRUE/FALSE FALSE Change to TRUE in control
Instruction TRUE if the command has been
CommandAborted BOOL TRUE/FALSE FALSE
interrupted terminated by another command
Error Error BOOL TRUE/FALSE FALSE Function block execution error
ErrorID Error code SMC_ERROR - 0 Error identification

5-1-2-8. Position superposition [MC_MoveAdditive]

(1) Instruction overview


The axis superimposes the data specified by Distance on the original command position, which is used for the
online superposition position of the motion axis control process.
Instruction Name Graphic representation ST representation

Position
MC_MoveAdditive
superposition

37
(2) Related variables
VAR_IN_OUT Initial
Name Data type Efficient range Description
value
Axis Axis AXIS_REF_SM3 - - Specified axis
Initial
VAR_INPUT Name Data type Efficient range Description
value
Execute Valid BOOL TRUE/FALSE FALSE Start at rising edge
Distance Position LREAL Data range 0 This data is superposition position data
0, positive
Velocity Target speed LREAL 0 Max speed [u/s]
value
Target positive value
Acceleration LREAL 0 Acceleration speed [u/s2]
acceleration
Target positive value
Deceleration LREAL 0 Deceleration speed [u/s2]
deceleration
Target jerk positive value
Jerk LREAL 0 Jerk speed [u/s3]
speed
Initial
VAR_OUTPUT Name Data type Efficient range Description
value
Done Completed BOOL TRUE/FALSE FALSE TRUE after execution
TRUE when the function block
Busy In execution BOOL TRUE/FALSE FALSE
execution has not ended
Instruction TRUE if the command has been
CommandAborted BOOL TRUE/FALSE FALSE
interrupted terminated by another command
Error Error BOOL TRUE/FALSE FALSE Function block execution error
ErrorID Error code SMC_ERROR - 0 Error identification

5-1-2-9. Relative position [MC_MoveRelative]

(1) Instruction overview


The axis operates in a relative position specified by Distance.
Instruction Name Graphic representation ST representation

Relative
MC_MoveRelative
position

38
(2) Related variables
VAR_IN_OUT Initial
Name Data type Efficient range Description
value
Axis Axis AXIS_REF_SM3 - - Specified axis
Initial
VAR_INPUT Name Data type Efficient range Description
value
Execute Valid BOOL TRUE/FALSE FALSE Start at the rising edge
Relative distance from the target
Distance Position LREAL Data range 0
to the current position
0, positive
Velocity Target speed LREAL 0 Max speed [u/s]
value
Target positive value
Acceleration LREAL 0 Acceleration speed [u/s2]
acceleration
Target positive value
Deceleration LREAL 0 Deceleration speed [u/s2]
deceleration
Target jerk positive value
Jerk LREAL 0 Jerk speed [u/s3]
speed
if function block is Busy, then
BufferMode Buffer mode MC_BUFFER_MODE - 0
only allow BufferMode=Aborting
Initial
VAR_OUTPUT Name Data type Efficient range Description
value
Done Completed BOOL TRUE/FALSE FALSE TRUE after execution
TRUE when the function block
Busy In execution BOOL TRUE/FALSE FALSE
execution has not ended

Active In control BOOL TRUE/FALSE FALSE Becomes TRUE in control

Instruction TRUE if the command has been


CommandAborted BOOL TRUE/FALSE FALSE
interrupted terminated by another command
Error Error BOOL TRUE/FALSE FALSE Function block execution error
ErrorID Error code SMC_ERROR - 0 Error identification

39
5-1-2-10. Superimpose relative motion command [MC_MoveSuperImposed]

(1) Instruction overview


Based on the original command speed and position, the axis superimposes the data of speed and position on the
running command.
Instruction Name Graphic representation ST representation

Superimpose
relative
MC_MoveSuperImposed
motion
command

(2) Related variables


VAR_IN_OUT Initial
Name Data type Efficient range Description
value
Axis Axis AXIS_REF_SM3 - - Specified axis
Initial
VAR_INPUT Name Data type Efficient range Description
value
Execute Valid BOOL TRUE/FALSE FALSE Start at the rising edge
Aborts the motion in progress and
Abort Abort BOOL TRUE/FALSE FALSE
resets all outputs
Distance Position LREAL Data range 0 This is superimposition data
Stacking 0, positive Maximum speed of superimposed
VelocityDiff LREAL 0
velocity value motion [u/s]
Target positive value
Acceleration LREAL 0 Acceleration speed [u/s2]
acceleration
Target positive value
Deceleration LREAL 0 Deceleration speed [u/s2]
deceleration
Target jerk positive value
Jerk LREAL 0 Jerk speed [u/s3]
speed
Initial
VAR_OUTPUT Name Data type Efficient range Description
value
Done Completed BOOL TRUE/FALSE FALSE TRUE after execution
TRUE when the function block
Busy In execution BOOL TRUE/FALSE FALSE
execution has not ended
Instruction TRUE if the command has been
CommandAborted BOOL TRUE/FALSE FALSE
interrupted terminated by another command
Error Error BOOL TRUE/FALSE FALSE Function block execution error

40
VAR_IN_OUT Initial
Name Data type Efficient range Description
value
ErrorID Error code SMC_ERROR - 0 Error identification

5-1-2-11. Speed control [MC_MoveVelocity]

(1) Instruction overview


The function block moves infinitely at a specified speed.
Instruction Name Graphic representation ST representation

MC_MoveVelocity Speed control

(2) Related variables


VAR_IN_OUT Initial
Name Data type Efficient range Description
value
Axis Axis AXIS_REF_SM3 - - Specified axis
Initial
VAR_INPUT Name Data type Efficient range Description
value
Execute Valid BOOL TRUE/FALSE FALSE Start running at the rising edge
0, positive
Velocity Speed LREAL 0 Speed [u/s]
value
Target 0, positive
Acceleration LREAL 0 Acceleration speed [u/s2]
acceleration value
Target 0, positive
Deceleration LREAL 0 Deceleration speed [u/s2]
deceleration value
Target jerk 0, positive
Jerk LREAL 0 Jerk speed [u/s3]
speed value
Fastest: automatically select the
3:fastest
fastest direction to move
2:current
Current: move in current direction
Direction Direction MC_DIRECTION 1:Positive 0
Positive: move forward
0:shortest
Shortest: select the direction
-1:Negative
according to the shortest path

41
VAR_IN_OUT Initial
Name Data type Efficient range Description
value
Negative: move reverse
If the function block is Busy, then
BufferMode Buffer mode MC_BUFFER_MODE - 0
only allow BufferMode=Aborting
Initial
VAR_OUTPUT Name Data type Efficient range Description
value
Reach setting The setting speed reached is
InVelocity BOOL TRUE/FALSE FALSE
speed flag TRUE
TRUE when the function block
Busy In execution BOOL TRUE/FALSE FALSE
execution has not ended
Active In control BOOL TRUE/FALSE FALSE Becomes TRUE in control
Command Instruction TRUE if the command has been
BOOL TRUE/FALSE FALSE
Aborted interrupted terminated by another command
Error Error BOOL TRUE/FALSE FALSE Function block execution error
ErrorID Error code SMC_ERROR - 0 Error identification

5-1-2-12. Position profile [MC_PositionProfile]

(1) Instruction overview


The user can plan the "time-position" data table by himself, and the controller will complete the movement
according to the planned data.
Instruction Name Graphic representation ST representation

Position
MC_PositionProfile
profile

(2) Related variables


Initial
VAR_IN_OUT Name Data type Efficient range Description
value
Axis Axis AXIS_REF_SM3 - - Specified axis
Time-position data table planned by
TimePosition Data table MC_TP_REF - -
the user
Initial
VAR_INPUT Name Data type Efficient range Description
value
Execute Valid BOOL TRUE/FALSE FALSE Start at the rising edge
ArraySize Dynamic INT Positive value 0 Number of arrays used in the running

42
Initial
VAR_IN_OUT Name Data type Efficient range Description
value
array profile
General
PositionScale LREAL Data range 1 Overall position scale factor
factor
Offset Offset LREAL Data range 0 Position offset
Initial
VAR_OUTPUT Name Data type Efficient range Description
value
Done Completed BOOL TRUE/FALSE FALSE TRUE after execution completed
TRUE when the function block
Busy In execution BOOL TRUE/FALSE FALSE
execution has not ended
Instruction TRUE if the command has been
CommandAborted BOOL TRUE/FALSE FALSE
interrupted terminated by another command
Error Error BOOL TRUE/FALSE FALSE Function block execution error
ErrorID Error code SMC_ERROR - 0 Error identification

43
5-1-2-13. Speed profile [MC_VelocityProfile]

(1) Instruction overview


Like MC_PositionProfile, MC_VelocityProfile plans the motion through defining the “time-speed” data.
Instruction Name Graphic representation ST representation

MC_VelocityProfile Speed profile

(2) Related variables


Initial
VAR_IN_OUT Name Data type Efficient range Description
value
Axis Axis AXIS_REF_SM3 - - Specified axis
Time-speed data table planned by the
TimePosition Data table MC_TP_REF - -
user
Initial
VAR_INPUT Name Data type Efficient range Description
value
Execute Valid BOOL TRUE/FALSE FALSE Start at the rising edge
Dynamic Number of arrays used in the running
ArraySize INT Positive value 0
array profile
General
VelocityScale LREAL Data range 1 Overall speed scale factor
factor
Offset Offset LREAL Data range 0 Speed offset
Initial
VAR_OUTPUT Name Data type Efficient range Description
value
Done Completed BOOL TRUE/FALSE FALSE TRUE after execution completed
TRUE when the function block
Busy In execution BOOL TRUE/FALSE FALSE
execution has not ended
Instruction TRUE if the command has been
CommandAborted BOOL TRUE/FALSE FALSE
interrupted terminated by another command
Error Error BOOL TRUE/FALSE FALSE Function block execution error
ErrorID Error code SMC_ERROR - 0 Error identification

44
5-1-2-14. Acceleration speed profile [MC_AccelerationProfile]

(1) Instruction overview


Like MC_PositionProfile, MC_AccelerationProfile plans the motion through defining “time-acceleration” data.
Instruction Name Graphic representation ST representation

Acceleration
MC_AccelerationProfile
profile

(2) Related variables


Initial
VAR_IN_OUT Name Data type Efficient range Description
value
Axis Axis AXIS_REF_SM3 - - Specified axis
Time-acceleration data table planned by
TimePosition Data table MC_TP_REF - -
the user
Initial
VAR_INPUT Name Data type Efficient range Description
value
Execute Valid BOOL TRUE/FALSE FALSE Start at the rising edge
Dynamic Number of arrays used in the running
ArraySize INT Positive value 0
array profile
General
AccelerationScale LREAL Data range 1 Acceleration or deceleration scale factor
factor
Offset Offset LREAL Data range 0 Acceleration offset
Initial
VAR_OUTPUT Name Data type Efficient range Description
value
Done Completed BOOL TRUE/FALSE FALSE TRUE after execution completed
TRUE when the function block
Busy In execution BOOL TRUE/FALSE FALSE
execution has not ended
Instruction TRUE if the command has been
CommandAborted BOOL TRUE/FALSE FALSE
interrupted terminated by another command
Error Error BOOL TRUE/FALSE FALSE Function block execution error
ErrorID Error code SMC_ERROR - 0 Error identification

45
5-1-2-15. Actual position read [MC_ReadActualPosition]

(1) Instruction overview


Read the axis current actual position.
Instruction Name Graphic representation ST representation

Read
MC_ReadActualPosition actual
position

(2) Related variables


VAR_IN_OUT Initial
Name Data type Efficient range Description
value
Axis Axis AXIS_REF_SM3 - - Specified axis
Initial
VAR_INPUT Name Data type Efficient range Description
value
When TRUE, read the servo current
Enable Valid BOOL TRUE/FALSE FALSE
position
Initial
VAR_OUTPUT Name Data type Efficient range Description
value
Valid Obtain the flag BOOL TRUE/FALSE FALSE If the output is valid, then is TRUE
TRUE when the function block
Busy In execution BOOL TRUE/FALSE FALSE
execution has not ended
Error Error BOOL TRUE/FALSE FALSE Function block execution error
ErrorID Error code SMC_ERROR - 0 Error identification
Obtained axis
Position LREAL Data range 0 Axis position data read by command
position

46
5-1-2-16. Read the current torque [MC_ReadActualTorque]

(1) Instruction overview


Read the axis actual torque.
Instruction Name Graphic representation ST representation

Read the
current
MC_ReadActualTorque
actual
torque

(2) Related variables


VAR_IN_OUT Initial
Name Data type Efficient range Description
value
Axis Axis AXIS_REF_SM3 - - Specified axis
Initial
VAR_INPUT Name Data type Efficient range Description
value
Must set to TRUE to activate the processing
Enable Valid BOOL TRUE/FALSE FALSE
of the function block
Initial
VAR_OUTPUT Name Data type Efficient range Description
value
Obtain the
Valid BOOL TRUE/FALSE FALSE If the output is valid, then is TRUE
flag
TRUE when the function block execution
Busy In execution BOOL TRUE/FALSE FALSE
has not ended
Error Error BOOL TRUE/FALSE FALSE Function block execution error
ErrorID Error code SMC_ERROR - 0 Error identification
Obtained
Torque current LREAL Data range 0 Current torque data read by command
torque

47
5-1-2-17. Read the current speed [MC_ReadActualVelocity]

(1) Instruction overview


Read the axis actual speed.
Instruction Name Graphic representation ST representation

Read the
MC_ReadActualVelocity current
speed

(2) Related variables


Initial
VAR_IN_OUT Name Data type Efficient range Description
value
Axis Axis AXIS_REF_SM3 - - Specified axis
Initial
VAR_INPUT Name Data type Efficient range Description
value
Must set to TRUE to activate the
Enable Valid BOOL TRUE/FALSE FALSE
processing of the function block
VAR_OUTPU Initial
Name Data type Efficient range Description
T value
Valid Obtain the flag BOOL TRUE/FALSE FALSE If the output is valid, then is TRUE
TRUE when the function block
Busy In execution BOOL TRUE/FALSE FALSE
execution has not ended
Error Error BOOL TRUE/FALSE FALSE Function block execution error
ErrorID Error code SMC_ERROR - 0 Error identification
Obtained current Current speed data read by the
Velocity LREAL Data range 0
speed command

48
5-1-2-18. Read axis error status [MC_ReadAxisError]

(1) Instruction overview


Read the axis error.
Instruction Name Graphic representation ST representation

Read the axis


MC_ReadActualVelocity
error status

(2) Related variables


Initial
VAR_IN_OUT Name Data type Efficient range Description
value
Axis Axis AXIS_REF_SM3 - - Specified axis
Initial
VAR_INPUT Name Data type Efficient range Description
value
Must set to TRUE to activate the
Enable Valid BOOL TRUE /FALSE FALSE
processing of the function block
Initial
VAR_OUTPUT Name Data type Efficient range Description
value
Obtain the If the output is valid, then is
Valid BOOL TRUE/FALSE FALSE
flag TRUE
TRUE when the function block
Busy In execution BOOL TRUE/FALSE FALSE
execution has not ended
Error Error BOOL TRUE/FALSE FALSE Function block execution error
ErrorID Error code SMC_ERROR - 0 Error identification
Axis error
AxisError BOOL TRUE/FALSE FALSE Axis error flag
flag
Axis error Positive value,
AxisErrorID DWORD 0 Read axis error code
code 0
TRUE if the soft limit is
SWEndSwitchActive Soft limit BOOL TRUE/FALSE FALSE
exceeded

49
5-1-2-19. Read axis bit parameter [MC_ReadBoolParameter]

(1) Instruction overview


Read the value of the specified BOOL variable.
Instruction Name Graphic representation ST representation

Read axis bit


MC_ReadBoolParameter
parameter

(2) Related variables


Initial
VAR_IN_OUT Name Data type Efficient range Description
value
Axis Axis AXIS_REF_SM3 - - Specified axis
Initial
VAR_INPUT Name Data type Efficient range Description
value
Must set to TRUE to activate the
Enable Valid BOOL TRUE/FALSE FALSE
processing of the function block
Axis
Positive value,
ParameterNumber parameter DINT 0 Parameter number
0
number
Initial
VAR_OUTPUT Name Data type Efficient range Description
value
Obtain the
Valid BOOL TRUE/FALSE FALSE If the output is valid, then is TRUE
flag
In TRUE when the function block execution
Busy BOOL TRUE/FALSE FALSE
execution has not ended
Error Error BOOL TRUE/FALSE FALSE Function block execution error
ErrorID Error code SMC_ERROR - 0 Error identification
Parameter
Value BOOL TRUE/FALSE FALSE Read the parameter value
value

50
5-1-2-20. Read the axis parameter [MC_ReadParameter]

(1) Instruction overview


Read the specified parameter.
Instruction Name Graphic representation ST representation

Read the axis


MC_ReadParameter
parameter

(2) Related variables


Initial
VAR_IN_OUT Name Data type Efficient range Description
value
Axis Axis AXIS_REF_SM3 - - Specified axis
Initial
VAR_INPUT Name Data type Efficient range Description
value
Must set to TRUE to activate the
Enable Valid BOOL TRUE/FALSE FALSE
processing of the function block
Axis
Positive value,
ParameterNumber parameter DINT 0 Parameter number
0
number
Initial
VAR_OUTPUT Name Data type Efficient range Description
value
Obtain the
Valid BOOL TRUE/FALSE FALSE If the output is valid, then is TRUE
flag
In TRUE when the function block execution
Busy BOOL TRUE/FALSE FALSE
execution has not ended
Error Error BOOL TRUE/FALSE FALSE Function block execution error
ErrorID Error code SMC_ERROR - 0 Error identification
Parameter
Value LREAL Data range 0 Read the parameter value
value

51
5-1-2-21. Read axis command position [SMC_ReadSetPosition]

(1) Instruction overview


Read the driver current setting position.
Instruction Name Graphic representation ST representation

Read axis
SMC_ReadSetPosition command
position

(2) Related variables


Initial
VAR_IN_OUT Name Data type Efficient range Description
value
Axis Axis AXIS_REF_SM3 - - Specified axis
Initial
VAR_INPUT Name Data type Efficient range Description
value
Must set to TRUE to activate the processing
Enable Valid BOOL TRUE/FALSE FALSE
of the function block
VAR_OUTPU Initial
Name Data type Efficient range Description
T value
Obtain the
Valid BOOL TRUE/FALSE FALSE If the output is valid, then is TRUE
flag
In TRUE when the function block execution
Busy BOOL TRUE/FALSE FALSE
execution has not ended
Error Error BOOL TRUE/FALSE FALSE Function block execution error
ErrorID Error code SMC_ERROR - 0 Error identification
Position Position LREAL Data range 0 Setting position

52
5-1-2-22. Read function block error [SMC_ReadFBError]

(1) Instruction overview


Read the axis function block error information.
Instruction Name Graphic representation ST representation

Read function
SMC_ReadFBError
block error

(2) Related variables


VAR_IN_OUT Initial
Name Data type Efficient range Description
value
Axis Axis AXIS_REF_SM3 - - Specified axis
Initial
VAR_INPUT Name Data type Efficient range Description
value
Must set to TRUE to activate the
bEnable Valid BOOL TRUE/FALSE FALSE
processing of the function block
Initial
VAR_OUTPUT Name Data type Efficient range Description
value
Obtain
bValid BOOL TRUE/FALSE FALSE If the output is valid, then is TRUE
the flag
In TRUE when the function block
bBusy BOOL TRUE/FALSE FALSE
execution execution has not ended
bFBError Error BOOL TRUE/FALSE FALSE Function block execution error
Error
nFBErrorID SMC_ERROR - 0 Error identification
code
Error
pbyErrorInstance POINTER TO BYTE - - Pointer to the function block with error
pointer
Error
strErrorInstance STRING - - -
pointer
Time
tTimeStamp TIME - 0 Time stamp when the error occurred
stamp

53
5-1-2-23. Set the axis bit parameter [MC_WriteBoolParameter]

(1) Instruction overview


Write in BOOL parameter value.
Instruction Name Graphic representation ST representation

Set the axis bit


MC_WriteBoolParameter
parameter

(2) Related variables


VAR_IN_OUT Initial
Name Data type Efficient range Description
value
Axis Axis AXIS_REF_SM3 - - Specified axis
Initial
VAR_INPUT Name Data type Efficient range Description
value
The rising edge of the input value will start
Execute Valid BOOL TRUE/FALSE FALSE
the execution of the function block
Parameter Positive value,
ParameterNumber DINT 0 Parameter ID
number 0
Parameter
Value BOOL TRUE/FALSE FALSE -
value
Initial
VAR_OUTPUT Name Data type Efficient range Description
value
TRUE if the parameter value has been
Done Completed BOOL TRUE/FALSE FALSE
successfully written
In TRUE when the function block execution
Busy BOOL TRUE/FALSE FALSE
execution has not ended
Error Error BOOL TRUE/FALSE FALSE Function block execution error
ErrorID Error code SMC_ERROR - 0 Error identification

54
5-1-2-24. Set axis parameter [MC_WriteParameter]

(1) Instruction overview


Write in specified parameter value.
Instruction Name Graphic representation ST representation

Set the axis


MC_WriteParameter
parameter

(2) Related variables


VAR_IN_OUT Initial
Name Data type Efficient range Description
value
Axis Axis AXIS_REF_SM3 - - Specified axis
Initial
VAR_INPUT Name Data type Efficient range Description
value
The rising edge of the input value will
Execute Valid BOOL TRUE/FALSE FALSE
start the execution of the function block
Parameter Positive value,
ParameterNumber DINT 0 Parameter ID
number 0
Parameter
Value LREAL Data range - Write the value to be set
value
Initial
VAR_OUTPUT Name Data type Efficient range Description
value
TRUE if the parameter value has been
Done Completed BOOL TRUE/FALSE FALSE
successfully written
In TRUE when the function block execution
Busy BOOL TRUE/FALSE FALSE
execution has not ended
Error Error BOOL TRUE/FALSE FALSE Function block execution error
ErrorID Error code SMC_ERROR - 0 Error identification

55
5-1-2-25. Clear the error [SMC_ClearFBError]

(1) Instruction overview


Clear the historical error message of the function block.
Instruction Name Graphic representation ST representation

Clear the
SMC_ClearFBError
error

(2) Related variables


VAR_INPUT Initial
Name Data type Efficient range Description
value
Axis POINTR TO
pDrive - - Map to axis
pointer AXIS_REF_SM3
Initial
VAR_OUTPUT Name Data type Efficient range Description
value
TRUE if the error is
SMC_ClearFBError Valid BOOL TRUE/FALSE FALSE
cleared

5-1-2-26. Read error information [SMC_ErrorString]


(1) Instruction overview
Read the error description information corresponding to the error code.
Instruction Name Graphic representation ST representation

Read the
SM3_Error.SMC_ErrorString error
information

(2) Related variables


VAR_INPUT Efficient
Name Data type Initial value Description
range
ErrorID Error code SMC_ERROR - - Error identification
Language Language - - - Required language
Efficient
VAR_OUTPUT Name Data type Initial value Description
range
SMC_ErrorString Error STRING (100) - - Error description information

56
5-1-3. Single axis function application
Example 1: realize that axis 0 moves in two sections to reach the designated position 0 Pluse, the first section runs
at a speed of 10 pluse/s and an acceleration of 100 pluse/s2 for relative motion, and then runs 100 pluse relative to
the starting position. After reaching the relative position of the target, it runs absolute motion at a speed of 15
pluse/s and an acceleration of 100 pluse/s2 for absolute motion, and moves to the target position as 0 pluse. During
the movement, the real-time position can be read, and the movement can be stopped. If an error is reported, the
axis can also be reset.

57
5-2. Axis group function

5-2-1. Axis group instruction list


Instruction Function
MC_AddAxisToGroup Add the axis to the axis group
MC_RemoveAxisFromGroup Remove one axis in the axis group
MC_UngroupAllAxes Delete all the axes in the axis group
MC_GroupEnable Enable the axis group
MC_GroupDisable Disable the axis group
MC_GroupReset Reset the axis group
MC_GroupSetPosition Set the axis group position
MC_SetCoordinateTransform Transform the coordinate
MC_SetDynCoordTransform Connect two axis groups
MC_GroupContinue Axis group continue
MC_GroupHalt Axis group stop
MC_GroupInterrupt Axis group interrupt
MC_GroupStop Axis group stop
MC_GroupSetOverride Change speed, acceleration, or active and controlled actions
MC_SetKinTransform Motion coordinate system conversion
MC_MoveCircularAbsolute Circular move to absolute position
MC_MoveCircularRelative Circular move to relative position
MC_MoveDirectAbsolute Move to absolute position
MC_MoveDirectRelative Move to relative position
MC_MoveLinearAbsolute Linear move to absolute position
MC_MoveLinearRelative Linear move to relative position
MC_GroupReadActualPosition Read actual position
MC_GroupReadActualVelocity Read actual speed
MC_GroupReadConfiguration Read parameter
MC_GroupReadError Read error
MC_GroupReadStatus Read status
SMC_StartupAxisGroup Startup the axis group
SMC_GroupPower Power the axis group
SMC_GroupInterruptAt Break assignment
SMC_GroupEnableResumeAfterError Restore movement after axis error
SMC_GroupJog Axis group jog operation
SMC_GroupWait Axis group wait

58
5-2-2. Axis group instruction introduction

5-2-2-1. Add axis to axis group [MC_AddAxisToGroup]

(1) Instruction overview


Add the axis to the axis group in command mode.
Instruction Name Graphic representation ST representation

Add axis to axis


MC_AddAxisToGroup
group

(2) Related variables


Initial
VAR_IN_OUT Name Data type Efficient range Description
value
AxisGroup Axis group AXIS_GROUP_REF_SM3 - - Specified axis group
Axis Axis AXIS_REF_SM3 - - Specified axis
Initial
VAR_INPUT Name Data type Efficient range Description
value
The rising edge of the input value will
Execute Valid BOOL TRUE/FALSE FALSE start the execution of the function
block
Initial
VAR_OUTPUT Name Data type Efficient range Description
value
TRUE when instruction execution is
Done Completed BOOL TRUE/FALSE FALSE
complete
In TRUE when the function block
Busy BOOL TRUE/FALSE FALSE
execution execution has not ended
Error Error BOOL TRUE/FALSE FALSE Function block execution error
ErrorID Error code SMC_ERROR - 0 Error identification

59
5-2-2-2. Remove axis from the axis group [MC_RemoveAxisFromGroup]

(1) Instruction overview


Remove axis from the axis group.
Instruction Name Graphic representation ST representation

Remove axis
MC_RemoveAxisFromGroup from the axis
group

(2) Related variables


VAR_IN_OUT Initial
Name Data type Efficient range Description
value
AXIS_GROUP_REF_
AxisGroup Axis group - - Specified axis group
SM3
Axis Axis AXIS_REF_SM3 - - Specified axis
Initial
VAR_INPUT Name Data type Efficient range Description
value
The rising edge of the input value will
Execute Valid BOOL TRUE/FALSE FALSE start the execution of the function
block
Initial
VAR_OUTPUT Name Data type Efficient range Description
value
TRUE when instruction execution is
Done Completed BOOL TRUE/FALSE FALSE
complete
TRUE when the function block
Busy In execution BOOL TRUE/FALSE FALSE
execution has not ended
Error Error BOOL TRUE/FALSE FALSE Function block execution error
ErrorID Error code SMC_ERROR - 0 Error identification

60
5-2-2-3. Release axis group [MC_UngroupAllAxes]

(1) Instruction overview


Remove all the axes contained in an axis group and release the axis group.
Instruction Name Graphic representation ST representation

Release
MC_UngroupAllAxes the axis
group

(2) Related variables


VAR_IN_OUT Initial
Name Data type Efficient range Description
value
AxisGroup Axis group AXIS_GROUP_REF_SM3 - - Specified axis group
Initial
VAR_INPUT Name Data type Efficient range Description
value
The rising edge of the input value
Execute Valid BOOL TRUE/FALSE FALSE will start the execution of the
function block
Initial
VAR_OUTPUT Name Data type Efficient range Description
value
TRUE when instruction execution
Done Completed BOOL TRUE/FALSE FALSE
is complete
TRUE when the function block
Busy In execution BOOL TRUE/FALSE FALSE
execution has not ended
Error Error BOOL TRUE/FALSE FALSE Function block execution error
ErrorID Error code SMC_ERROR - 0 Error identification

61
5-2-2-4. Enable the axis group [MC_GroupEnable]

(1) Instruction overview


Enable the axis group.
Instruction Name Graphic representation ST representation

Enable the
MC_GroupEnable
axis group

(2) Related variables


VAR_IN_OUT Initial
Name Data type Efficient range Description
value
AxisGroup Aix group AXIS_GROUP_REF_SM3 - - Specified axis group
Initial
VAR_INPUT Name Data type Efficient range Description
value
The rising edge of the input
Execute Valid BOOL TRUE/FALSE FALSE value will start the execution
of the function block
Parameters that exist for
Compatibility SMC_AXIS_GROUP_CO
CompatibilityOptions - - compatibility with previous
options MPATIBILITY_OPTIONS
versions
Initial
VAR_OUTPUT Name Data type Efficient range Description
value
TRUE when instruction
Done Completed BOOL TRUE/FALSE FALSE
execution is complete
TRUE when the function
Busy In execution BOOL TRUE/FALSE FALSE block execution has not
ended
Function block execution
Error Error BOOL TRUE/FALSE FALSE
error
ErrorID Error code SMC_ERROR - 0 Error identification

62
5-2-2-5. Disable the axis group [MC_GroupDisable]

(1) Instruction overview


The axis group is switched to the disable state, and the motion control of the axis group is not allowed in this state.
Instruction Name Graphic representation ST representation

Disable the
MC_GroupEnable
axis group

(2) Related variables


Initial
VAR_IN_OUT Name Data type Efficient range Description
value
AXIS_GROUP_RE
AxisGroup Axis group - - Specified axis group
F_SM3
Initial
VAR_INPUT Name Data type Efficient range Description
value
The rising edge of the input value
Execute Valid BOOL TRUE/FALSE FALSE will start the execution of the
function block
Initial
VAR_OUTPUT Name Data type Efficient range Description
value
TRUE when instruction execution
Done Completed BOOL TRUE/FALSE FALSE
is complete
TRUE when the function block
Busy In execution BOOL TRUE/FALSE FALSE
execution has not ended
Error Error BOOL TRUE/FALSE FALSE Function block execution error
ErrorID Error code SMC_ERROR - 0 Error identification

63
5-2-2-6. Reset the axis group [MC_GroupReset]

(1) Instruction overview


Remove the abnormal state of the axis group and the axis.
Instruction Name Graphic representation ST representation

Reset the
MC_GroupReset
axis group

(2) Related variables


Initial
VAR_IN_OUT Name Data type Efficient range Description
value
AxisGroup Axis group AXIS_GROUP_REF_SM3 - - Specified axis group
Initial
VAR_INPUT Name Data type Efficient range Description
value
The rising edge of the input
Execute Valid BOOL TRUE/FALSE FALSE value will start the execution of
the function block
Initial
VAR_OUTPUT Name Data type Efficient range Description
value
TRUE when instruction
Done Completed BOOL TRUE/FALSE FALSE
execution is complete
In TRUE when the function block
Busy BOOL TRUE/FALSE FALSE
execution execution has not ended
Error Error BOOL TRUE/FALSE FALSE Function block execution error
ErrorID Error code SMC_ERROR - 0 Error identification

64
5-2-2-7. Set axis group instruction position [MC_GroupSetPosition]

(1) Instruction overview


Set the command position of each axis in the axis group.
Instruction Name Graphic representation ST representation

Set axis group


MC_GroupSetPosition
instruction position

(2) Related variables


VAR_IN_OUT Efficient Initial
Name Data type Description
range value
AxisGroup Axis group AXIS_GROUP_REF_SM3 - - Specified axis group
Efficient Initial
VAR_INPUT Name Data type Description
range value
The rising edge of the input value will
Execute Valid BOOL TRUE/FALSE FALSE start the execution of the function
block
Position Position SMC_POS_REF Data range 0 Axis target position
Relative position mode =True,
Position
Relative BOOL TRUE/FALSE FALSE absolute position mode
mode
=False(default)
Apply
CoordSystem coordinate SMC_COORD_SYSTEM - - Apply coordinate system
system
Efficient Initial
VAR_OUTPUT Name Data type Description
range value
TRUE when instruction execution is
Done Completed BOOL TRUE/FALSE FALSE
complete
TRUE when the function block
Busy In execution BOOL TRUE/FALSE FALSE
execution has not ended
Error Error BOOL TRUE/FALSE FALSE Function block execution error
ErrorID Error code SMC_ERROR - 0 Error identification

65
5-2-2-8. Coordinate system conversion [MC_SetCoordinateTransform]

(1) Instruction overview


It is used to convert the command coordinates of different reference coordinate systems.
Instruction Name Graphic representation ST representation

Coordinate
MC_SetCoordinateTransform system
conversion

(2) Related variables


VAR_IN_OUT Initial
Name Data type Efficient range Description
value
AxisGroup Axis group AXIS_GROUP_REF_SM3 - - Specified axis group
Initial
VAR_INPUT Name Data type Efficient range Description
value
The rising edge of the input
Execute Valid BOOL TRUE/FALSE FALSE value will start the execution of
the function block
Coordinate transformation, i.e.
product coordinate system
Transform
(PCS_1 or PCS_2) or machine
CoordTransform coordinate MC_COORD_REF - -
coordinate system (MCS)
system
expressed in world coordinate
system (WCS)
Apply Target coordinate system,
CoordSystem coordinate SMC_COORD_SYSTEM - - allowing conversion of PCS_ 1,
system PCS_ 2, and MCS
Initial
VAR_OUTPUT Name Data type Efficient range Description
value
TRUE when instruction
Done Completed BOOL TRUE/FALSE FALSE
execution is complete
TRUE when the function block
Busy In execution BOOL TRUE/FALSE FALSE
execution has not ended
Error Error BOOL TRUE/FALSE FALSE Function block execution error
ErrorID Error code SMC_ERROR - 0 Error identification

66
5-2-2-9. Dynamic coordinate system conversion [MC_SetDynCoordTransform]

(1) Instruction overview


When the specified coordinate system moves relative to WCS, call this instruction to realize coordinate system
conversion.
Instruction Name Graphic representation ST representation

Dynamic
MC_SetDynCoordTransform coordinate system
conversion

(2) Related variables


VAR_IN_OUT Initial
Name Data type Efficient range Description
value
AxisGroup Axis group AXIS_GROUP_REF_SM3 - - Specified axis group
Master
MasterAxisGroup AXIS_GROUP_REF_SM3 - - Specified master axis group
axis group
Initial
VAR_INPUT Name Data type Efficient range Description
value
The rising edge of the input value
Execute Valid BOOL TRUE/FALSE FALSE will start the execution of the
function block
Coordinate
Tool coordinate system of master
system to
CoordTransform MC_COORD_REF - - axis group relative to the PCS
be
coordinate and direction
converted
Coordinate PCS coordinate system to be
CoordSystem SMC_COORD_SYSTEM - -
system converted (PCS_1 or PCS_2)
Initial
VAR_OUTPUT Name Data type Efficient range Description
value
TRUE when instruction execution
Done Completed BOOL TRUE/FALSE FALSE
is complete
In TRUE when the function block
Busy BOOL TRUE/FALSE FALSE
execution execution has not ended
Indicates the dynamic coordinate
Reference
InUse BOOL - - system that the axis group still
system
needs to reference
Error Error BOOL TRUE/FALSE FALSE Function block execution error
ErrorID Error code SMC_ERROR - 0 Error identification

67
5-2-2-10. Axis group continue to run [MC_GroupContinue]

(1) Instruction overview


Release the interrupt status of the axis group and continue to execute the uncompleted command.
Instruction Name Graphic representation ST representation

Axis group
MC_GroupContinue
continue to run

(2) Related variables


Initial
VAR_IN_OUT Name Data type Efficient range Description
value
AxisGroup Axis group AXIS_GROUP_REF_SM3 - - Specified axis group
Continue SMC_AXIS_GROUP_ Axis group position when
continueData - -
motion data CONTINUE_DATA motion is interrupted
Initial
VAR_INPUT Name Data type Efficient range Description
value
Execute the current
Execute Valid BOOL TRUE/FALSE FALSE
command
Initial
VAR_OUTPUT Name Data type Efficient range Description
value
TRUE when instruction
Done Completed BOOL TRUE/FALSE FALSE
execution is complete
Instruction Module execution
CommandAborted BOOL TRUE/FALSE FALSE
interrupted interrupted is TRUE
TRUE when the function
Busy In execution BOOL TRUE/FALSE FALSE block execution has not
ended
Function block execution
Error Error BOOL TRUE/FALSE FALSE
error
ErrorID Error code SMC_ERROR - 0 Error identification

68
5-2-2-11. Axis group pause [MC_GroupHalt]

(1) Instruction overview


Pause the current axis group motion.
Instruction Name Graphic representation ST representation

Axis group
MC_GroupHalt
pause

(2) Related variables


VAR_IN_OUT Initial
Name Data type Efficient range Description
value
AXIS_GROUP_REF_
AxisGroup Axis group - - Specified axis group
SM3
Initial
VAR_INPUT Name Data type Efficient range Description
value
Execute Valid BOOL TRUE/FALSE FALSE Execute current instruction
Deceleration Maximum combined deceleration
Deceleration LREAL Positive value 0
speed speed [command unit/s2]
Max combined jerk speed
Jerk Jerk speed LREAL Positive value 0
[command unit/s3]
Acceleration factor, the maximum
Acceleration speed of each axis multiplied by
AccFactor LREAL 0-1 1
factor this acceleration factor, and the
value is between [0, 1]
Jerk factor: the maximum speed
of each axis is multiplied by this
JerkFactor Jerk factor LREAL 0-1 1
jerk factor, and the value is
between [0, 1]
Initial
VAR_OUTPUT Name Data type Efficient range Description
value
TRUE when instruction execution
Done Completed BOOL TRUE/FALSE FALSE
is complete
TRUE when the function block
Busy In execution BOOL TRUE/FALSE FALSE
execution has not ended
Active In control BOOL TRUE/FALSE FALSE Becomes TRUE in control
CommandAborted Instruction BOOL TRUE/FALSE FALSE Module execution interrupted is

69
interrupted TRUE
Motion TRUE when the module
CommandAccepted BOOL TRUE/FALSE FALSE
accepted successfully calls the axis group
Error Error BOOL TRUE/FALSE FALSE Function block execution error
ErrorID Error code SMC_ERROR - 0 Error identification
TRUE when the motion is
MovementId Motion flag SMC_Movement_Id TRUE/FALSE FALSE
executing or completed

5-2-2-12. Axis group interrupt [MC_GroupInterrupt]

(1) Instruction overview


Interrupt the current moving axis group, continue to run the unexecuted command through MC_GroupContinue.
Instruction Name Graphic representation ST representation

Axis group
MC_GroupInterrupt
interrupt

(2) Related variables


VAR_IN_OUT Initial
Name Data type Efficient range Description
value
AXIS_GROUP_REF_
AxisGroup Axis group - - Specified axis group
SM3
Continue moving SMC_AXIS_GROUP_ Motion information when axis
continueData - -
data CONTINUE_DATA group motion is interrupted
Initial
VAR_INPUT Name Data type Efficient range Description
value
Execute Valid BOOL TRUE/FALSE FALSE Execute current instruction
Initial
VAR_OUTPUT Name Data type Efficient range Description
value
TRUE when instruction
Done Completed BOOL TRUE/FALSE FALSE
execution is completed
Instruction Module execution interrupted
CommandAborted BOOL TRUE/FALSE FALSE
interrupted is TRUE
TRUE when the function
Busy In execution BOOL TRUE/FALSE FALSE
block execution has not ended
Error Error BOOL TRUE/FALSE FALSE Function block execution error
ErrorID Error code SMC_ERROR - 0 Error identification
mvtIdInterruptPosi Interrupt position Movement ID corresponding
SMC_Movement_Id - -
tion ID to the interrupt location

70
5-2-2-13. Axis group stop [MC_GroupStop]

(1) Instruction overview


Stop the axis group motion.
Instruction Name Graphic representation ST representation

Axis group
MC_GroupStop
stop

(2) Related variables


Initial
VAR_IN_OUT Name Data type Efficient range Description
value
AXIS_GROUP_REF_
AxisGroup Axis group - - Specified axis group
SM3
Initial
VAR_INPUT Name Data type Efficient range Description
value
Execute Valid BOOL TRUE/FALSE FALSE Execute current instruction
Deceleration Maximum combined deceleration
Deceleration LREAL Positive value 0
speed [command unit/s2]
Max combined jerk speed
Jerk Jerk speed LREAL Positive value 0
[command unit/s3]
Acceleration factor, the maximum
Acceleration speed of each axis is multiplied
AccFactor LREAL 0-1 1
factor by this acceleration factor, and the
value is between [0, 1]
Jerk factor, the maximum speed
of each axis is multiplied by this
JerkFactor Jerk factor LREAL 0-1 1
acceleration factor, and the value
is between [0, 1]
Initial
VAR_OUTPUT Name Data type Efficient range Description
value
TRUE when instruction execution
Done Completed BOOL TRUE/FALSE FALSE
is completed
TRUE when the function block
Busy In execution BOOL TRUE/FALSE FALSE
execution has not ended
Active In control BOOL TRUE/FALSE FALSE TRUE in control
CommandAborted Instruction BOOL TRUE/FALSE FALSE Module execution interrupted is

71
interrupted TRUE
Motion TRUE when the module
CommandAccepted BOOL TRUE/FALSE FALSE
accepted successfully calls the axis group
Error Error BOOL TRUE/FALSE FALSE Function block execution error
ErrorID Error code SMC_ERROR - 0 Error identification
TRUE when the motion is
MovementId Motion flag SMC_Movement_Id TRUE/FALSE FALSE
executing or completed

5-2-2-14. Axis group overshoot [MC_GroupSetOverride]

(1) Instruction overview


When the axis group is in the moving state, change the movement speed of the axis group.
Instruction Name Graphic representation ST representation

Set axis group


MC_GroupSetOverride
overshoot

(2) Related variables


VAR_IN_OUT Initial
Name Data type Efficient range Description
value
AXIS_GROUP
AxisGroup Axis group - - Specified axis group
_REF_SM3
Initial
VAR_INPUT Name Data type Efficient range Description
value
Execute Valid BOOL TRUE/FALSE FALSE Execute current instruction
Speed factor, the maximum speed of
VelFactor Speed factor LREAL 0-1 1 each axis multiplied by this speed factor,
and the value is between [0, 1]
Acceleration factor, the maximum speed
Acceleration of each axis multiplied by this
AccFactor LREAL 0-1 1
factor acceleration factor, and the value is
between [0, 1]
Jerk factor: the maximum speed of each
JerkFactor Jerk factor LREAL 0-1 1 axis is multiplied by this jerk factor, and
the value is between [0, 1]
Combined velocity factor, the maximum
Combined speed
PathVelFactor LREAL 0-1 1 combined velocity of the whole axis
factor
group motion track multiplied by this

72
velocity factor, and the value is between
[0, 1]
Combined acceleration factor, the
Combined maximum combined acceleration of the
PathAccFactor acceleration LREAL 0-1 1 whole axis group motion track
factor multiplied by this combined acceleration
factor, and the value is between [0, 1]
Combined jerk factor, the maximum
combined jerk of the whole axis group
Combined jerk
PathJerkFactor LREAL 0-1 1 motion track multiplied by this
factor
combined jerk factor, and the value is
between [0, 1]
Initial
VAR_OUTPUT Name Data type Efficient range Description
value
Overshoot factor setting completed is
Enabled Setting completed BOOL TRUE/FALSE FALSE
TRUE
TRUE when the function block
Busy In execution BOOL TRUE/FALSE FALSE
execution has not ended
Error Error BOOL TRUE/FALSE FALSE Function block execution error
ErrorID Error code SMC_ERROR - 0 Error identification

5-2-2-15. Kinematic coordinate transformation [MC_SetKinTransform]

(1) Instruction overview


Set the kinematic conversion of axis group, from ACS coordinate system to MCS coordinate system.
Instruction Name Graphic representation ST representation

Kinematic
MC_SetKinTransform coordinate
transformation

(2) Related variables


VAR_IN_OUT Initial
Name Data type Efficient range Description
value
AxisGroup Axis group AXIS_GROUP_REF_SM3 - - Specified axis group
Initial
VAR_INPUT Name Data type Efficient range Description
value
The rising edge of the input
Execute Valid BOOL TRUE/FALSE FALSE value will start the execution of
the function block
Kinematic TRAFO.MC_KIN_REF_
KinTransform - - Kinematic transformation
transformation SM3

73
value
VAR_OUTPU Initial
Name Data type Efficient range Description
T value
TRUE when instruction
Done Completed BOOL TRUE/FALSE FALSE
execution is completed
TRUE when the function block
Busy In execution BOOL TRUE/FALSE FALSE
execution has not ended
Error Error BOOL TRUE/FALSE FALSE Function block execution error
ErrorID Error code SMC_ERROR - 0 Error identification

5-2-2-16. Absolute circular interpolation [MC_MoveCircularAbsolute]

(1) Instruction overview


The axis group performs the arc interpolation movement in the absolute position mode.
Instruction Name Graphic representation ST representation

Absolute
MC_MoveCircularAbsolute circular
interpolation

(2) Related variables


Initial
VAR_IN_OUT Name Data type Efficient range Description
value
AXIS_GROUP_
AxisGroup Axis group - - Specified axis group
REF_SM3
Initial
VAR_INPUT Name Data type Efficient range Description
value
Execute Valid BOOL TRUE/FALSE FALSE Execute current instruction

74
Specify the method of arc
interpolation:
SMC_CIRC_ Border/Center/
CircMode Arc mode - Border: three-point arc
MODE Radius
Center: Center arc
Radius: radius arc
Auxiliary SMC_POS_ Specify an auxiliary point in the
AuxPoint - -
point REF coordinate system. Refer to CircMode
SMC_POS_ Specify the end position in the
EndPoint End point - -
REF coordinate system
Motion direction:
CLOCKWISE/
MC_CIRC_ CLOCKWISE: closewise
PathChoice Direction COUNTER_ -
PATHCHOICE COUNTER_CLOCKWISE:
CLOCKWISE
counterclockwise
Maximum combined speed [command
Velocity Speed LREAL 0, positive value 0
unit/s]
Deceleration positive value Max combined deceleration speed
Deceleration LREAL 0
speed [command unit/s2]
positive value Max combined jerk speed [command
Jerk Jerk speed LREAL 0
unit/s3]
Initial
VAR_INPUT Name Data type Efficient range Description
value
Reference
SMC_COORD_ SMC_COORD_
CoordSystem coordinate - Reference coordinate system
SYSTEM SYSTEM
system
MC_BUFFER_ Specifies the action when multiple
BufferMode Buffer mode - 0
MODE motion commands are started.
TMNone: no mixing
Corner TMNone/
MC_TRANSITIO TMStartVelocity: mix based on speed
TransitionMode transition TMStartVelocity/ -
N_MODE TMCornerDistance: mix based on
mode TMCornerDistance
distance
array
Corner [0..(SMC_RCNS
TransitionParameter transition T.MAX_TRANS 0, positive value 0 Corner transition parameters
parameters _PARAMS - 1)]
OF LREAL
GreatCircle: Move from the start
position to the target position along the
shortest path. In this mode, even if the
start position and the end position are
Interpolation within the specified area, the realized
SMC_ORIEN GreatCircle/
OrientationMode positioning - path may leave the area
TATION_MODE Axis
mode Axis: The positioning axis moves
within the specified area from the start
position to the end position. Not all
kinematic transformations support this
mode

75
Speed factor, the maximum speed of
VelFactor Speed factor LREAL 0-1 1 each axis multiplied by this speed
factor, and the value is between [0, 1]
Acceleration factor, the maximum
Acceleration speed of each axis multiplied by this
AccFactor LREAL 0-1 1
factor acceleration factor, and the value is
between [0, 1]
Jerk factor, the maximum speed of
JerkFactor Jerk factor LREAL 0-1 1 each axis multiplied by this jerk factor,
and the value is between [0, 1]
Initial
VAR_OUTPUT Name Data type Efficient range Description
value
TRUE when instruction execution is
Done Completed BOOL TRUE/FALSE FALSE
completed
TRUE when the function block
Busy In execution BOOL TRUE/FALSE FALSE
execution has not ended
Active In control BOOL TRUE/FALSE FALSE Becomes TRUE in control
Instruction
CommandAborted BOOL TRUE/FALSE FALSE Module execution interrupted is TRUE
interrupted
Motion TRUE when the module successfully
CommandAccepted BOOL TRUE/FALSE FALSE
accepted calls the axis group
Error Error BOOL TRUE/FALSE FALSE Function block execution error
ErrorID Error code SMC_ERROR - 0 Error identification
SMC_Movement Valid when CommandAccepted or
MovementId Motion flag TRUE/FALSE FALSE
_Id Done is TRUE

76
5-2-2-17. Relative circular interpolation [MC_MoveCircularRelative]

(1) Instruction overview


The axis group perform arc interpolation movement in relative position mode.
Instruction Name Graphic representation ST representation

Relative circular
MC_MoveCircularRelative
interpolation

(2) Related variables


Initial
VAR_IN_OUT Name Data type Efficient range Description
value
AXIS_GROUP_R
AxisGroup Axis group - - Specified axis group
EF_SM3
Initial
VAR_INPUT Name Data type Efficient range Description
value
Execute Valid BOOL TRUE/FALSE FALSE Execute the current command
Specify the method of arc
interpolation:
SMC_CIRC_ Border/Center/
CircMode Arc mode - Border: three-point arc
MODE Radius
Center: Center arc
Radius: radius arc
Specify an auxiliary point in the
Auxiliary
AuxPoint SMC_POS_REF - - coordinate system. Refer to
point
CircMode
Specify the end position in the
EndPoint End point SMC_POS_REF - -
coordinate system
Motion direction:
CLOCKWISE/
MC_CIRC_ CLOCKWISE: clockwise
PathChoice Direction COUNTER_ -
PATHCHOICE COUNTER_CLOCKWISE:
CLOCKWISE
counterclockwise

77
Max combined speed [command
Velocity Speed LREAL 0, positive value 0
unit/s]
Deceleration Max combined deceleration speed
Deceleration LREAL positive value 0
speed [command unit/s2]
Max combined jerk speed [command
Jerk Jerk speed LREAL positive value 0
unit/s3]
Reference
SMC_COORD SMC_COORD_
CoordSystem coordinate - Reference coordinate system
_SYSTEM SYSTEM
system
Initial
VAR_INPUT Name Data type Efficient range Description
value
MC_BUFFER Specifies the action when multiple
BufferMode Buffer mode - 0
_MODE motion commands are started
TMNone: no mixing
Corner TMNone/ TMStartVelocity: mix based on
MC_TRANSITIO
TransitionMode transition TMStartVelocity/ - speed
N_MODE
mode TMCornerDistance TMCornerDistance: mix based on
distance
Array
Corner [0..(SMC_RCNS
TransitionParameter transition T.MAX_TRANS_ 0, positive value 0 Corner transition parameters
parameters PARAMS - 1)]
OF LREAL
GreatCircle: Move from the start
position to the target position along
the shortest path. In this mode, even
if the start position and the end
Interpolation position are within the specified area,
SMC_ORIEN GreatCircle/
OrientationMode positioning - the realized path may leave the area
TATION_MODE Axis
mode Axis: The positioning axis moves
within the specified area from the
start position to the end position. Not
all kinematic transformations support
this mode
Speed factor, the maximum speed of
VelFactor Speed factor LREAL 0-1 1 each axis multiplied by this speed
factor, and the value is between [0, 1]
Acceleration factor, the maximum
Acceleration speed of each axis multiplied by this
AccFactor LREAL 0-1 1
factor acceleration factor, and the value is
between [0, 1]
Jerk factor, the maximum speed of
JerkFactor Jerk factor LREAL 0-1 1 each axis multiplied by this jerk
factor, and the value is between [0, 1]
Initial
VAR_OUTPUT Name Data type Efficient range Description
value

78
TRUE when instruction execution is
Done Completed BOOL TRUE/FALSE FALSE
completed
TRUE when the function block
Busy In execution BOOL TRUE/FALSE FALSE
execution has not ended
Active In control BOOL TRUE/FALSE FALSE Becomes TRUE in control
Instruction Module execution interrupted is
CommandAborted BOOL TRUE/FALSE FALSE
interrupted TRUE
Motion TRUE when the module successfully
CommandAccepted BOOL TRUE/FALSE FALSE
accepted calls the axis group
Error Error BOOL TRUE/FALSE FALSE Function block execution error
ErrorID Error code SMC_ERROR - 0 Error identification
SMC_Movement Valid when CommandAccepted or
MovementId Motion flag TRUE/FALSE FALSE
_Id Done is TRUE

5-2-2-18. Absolute position fast positioning [MC_MoveDirectAbsolute]

(1) Instruction overview


All axes in the control axis group run to the end of absolute position at the specified speed.
Instruction Name Graphic representation ST representation

Absolute position
MC_MoveDirectAbsolute
fast positioning

(2) Related variables


Initial
VAR_IN_OUT Name Data type Efficient range Description
value
AXIS_GROUP_REF
AxisGroup Axis group - - Specified axis group
_SM3
Initial
VAR_INPUT Name Data type Efficient range Description
value
Execute Valid BOOL TRUE/FALSE FALSE Execute the current command
Absolute target position in the
Position Position SMC_POS_REF - -
specified reference coordinate system
MovementType PTP motion SMC_PTP_MOVEMEN - - Fast (0): PTP motion mode with time

79
mode T_TYPE priority
Path_Invariant: PTP motion with
fixed path
Reference
SMC_COORD_SYSTE SMC_COORD_
CoordSystem coordinate Reference coordinate system
M SYSTEM
system
Specifies the action when multiple
BufferMode Buffer mode MC_BUFFER_MODE - 0
motion commands are started
TMNone: no mixing
TMNone/
Corner TMStartVelocity: mix based on
MC_TRANSITION TMStartVelocit
TransitionMode transition - speed
_MODE y/TMCornerDis
mode TMCornerDistance: mix based on
tance
distance
Array
Corner
Transition [0..(SMC_RCNST.MAX
transition 0, positive value 0 Corner transition parameters
Parameter _TRANS_PARAMS -
parameters
1)] OF LREAL
Speed factor, the maximum speed of
VelFactor Speed factor LREAL 0-1 1 each axis multiplied by this speed
factor, and the value is between [0, 1]
Initial
VAR_INPUT Name Data type Efficient range Description
value
Acceleration factor, the maximum
Acceleration speed of each axis multiplied by this
AccFactor LREAL 0-1 1
factor acceleration factor, and the value is
between [0, 1]
Jerk factor, the maximum speed of
JerkFactor Jerk factor LREAL 0-1 1 each axis multiplied by this jerk
factor, and the value is between [0, 1]
Initial
VAR_OUTPUT Name Data type Efficient range Description
value
TRUE when instruction execution is
Done Completed BOOL TRUE/FALSE FALSE
completed
TRUE when the function block
Busy In execution BOOL TRUE/FALSE FALSE
execution has not ended
Active In control BOOL TRUE/FALSE FALSE Becomes TRUE in control
Instruction Module execution interrupted is
CommandAborted BOOL TRUE/FALSE FALSE
interrupted TRUE
Motion TRUE when the module successfully
CommandAccepted BOOL TRUE/FALSE FALSE
accepted calls the axis group
Error Error BOOL TRUE/FALSE FALSE Function block execution error
ErrorID Error code SMC_ERROR - 0 Error identification
TRUE when the motion is executing
MovementId Motion flag SMC_Movement_Id TRUE/FALSE FALSE
or completed

80
5-2-2-19. Relative position fast positioning [MC_MoveDirectRelative]

(1) Instruction overview


All axes in the control axis group run to the end of the relative position at the specified speed.
Instruction Name Graphic representation ST representation

Relative position fast


MC_MoveDirectRelative
positioning

(2) Related variables


VAR_IN_OUT Initial
Name Data type Efficient range Description
value
AXIS_GROUP_REF
AxisGroup Axis group - - Specified axis group
_SM3
Initial
VAR_INPUT Name Data type Efficient range Description
value
Execute Valid BOOL TRUE/FALSE FALSE Execute the current command
Relative Relative target position in the specified
Distance SMC_POS_REF - -
position reference coordinate system
Fast (0): PTP motion mode with time
PTP motion SMC_PTP_MOVEM priority
MovementType - -
mode ENT_TYPE Path_Invariant: PTP motion with fixed
path
Reference
SMC_COORD_ SMC_COORD_
CoordSystem coordinate Reference coordinate system
SYSTEM SYSTEM
system
MC_BUFFER_MOD Specifies the action when multiple
BufferMode Buffer mode - 0
E motion commands are started
TMNone: no mixing
Corner TMNone/TMSta
MC_TRANSITION_ TMStartVelocity: mix based on speed
TransitionMode transition rtVelocity/TMC
MODE TMCornerDistance: mix based on
mode ornerDistance
distance
Corner Array
Transition
transition [0..(SMC_RCNST.M 0, positive value 0 Corner transition parameters
Parameter
parameters AX_TRANS_PARA

81
MS - 1)] OF
LREAL
Speed factor, the maximum speed of
VelFactor Speed factor LREAL 0-1 1 each axis multiplied by this speed factor,
and the value is between [0, 1]
Acceleration factor, the maximum speed
Acceleration of each axis multiplied by this
AccFactor LREAL 0-1 1
speed factor acceleration factor, and the value is
between [0, 1]
Initial
VAR_INPUT Name Data type Efficient range Description
value
Jerk factor, the maximum speed of each
Jerk speed
JerkFactor LREAL 0-1 1 axis multiplied by this jerk factor, and
factor
the value is between [0, 1]
Initial
VAR_OUTPUT Name Data type Efficient range Description
value
TRUE when instruction execution is
Done Completed BOOL TRUE/FALSE FALSE
completed
TRUE when the function block
Busy In execution BOOL TRUE/FALSE FALSE
execution has not ended
Active In control BOOL TRUE/FALSE FALSE Becomes TRUE in control
Command Instruction
BOOL TRUE/FALSE FALSE Module execution interrupted is TRUE
Aborted interrupted
Command Motion TRUE when the module successfully
BOOL TRUE/FALSE FALSE
Accepted accepted calls the axis group
Error Error BOOL TRUE/FALSE FALSE Function block execution error
ErrorID Error code SMC_ERROR - 0 Error identification
TRUE when the motion is executing or
MovementId Motion flag SMC_Movement_Id TRUE/FALSE FALSE
completed

82
5-2-2-20. Absolute position linear interpolation [MC_MoveLinearAbsolute]

(1) Instruction overview


Linear interpolation motion in the absolute position mode of the axis group in the specified coordinate system.
Instruction Name Graphic representation ST representation

Absolute
position
MC_MoveLinearAbsolute
linear
interpolation

(2) Related variables


VAR_IN_OUT Initial
Name Data type Efficient range Description
value
AXIS_GROUP_
AxisGroup Axis group - - Specified axis group
REF_SM3
Initial
VAR_INPUT Name Data type Efficient range Description
value
Execute Valid BOOL TRUE /FALSE FALSE Execute the current command
Absolute target position in the specified
Position Position SMC_POS_REF - -
reference coordinate system
Velocity Speed LREAL 0, positive value 0 Max combined speed [command unit/s]
positive value Max combined acceleration speed
Acceleration Acceleration LREAL 0
[command unit/s2]
positive value Max combined deceleration speed
Deceleration Deceleration LREAL 0
[command unit/s2]
positive value Max combined jerk speed [command
Jerk Jerk speed LREAL 0
unit/s3]
Reference
SMC_COORD_ SMC_COORD_
CoordSystem coordinate - Reference coordinate system
SYSTEM SYSTEM
system
MC_BUFFER_ Specifies the action when multiple
BufferMode Buffer mode - 0
MODE motion commands are started
Corner MC_TRANSITIO TMNone/TMSta TMNone: no mixing
TransitionMode -
transition N_MODE rtVelocity/TMC TMStartVelocity: mix based on speed

83
mode ornerDistance TMCornerDistance: mix based on
distance
Array
Corner [0..(SMC_RCNS
TransitionParameter transition T.MAX_TRANS 0, positive value 0 Corner transition parameter
parameter _PARAMS - 1)]
OF LREAL
Initial
VAR_INPUT Name Data type Efficient range Description
value
GreatCircle: Move from the start position
to the target position along the shortest
path. In this mode, even if the start
position and the end position are within
Interpolation
SMC_ORIENTA GreatCircle/ the specified area, the realized path may
OrientationMode positioning -
TION_MODE Axis leave the area
mode
Axis: The positioning axis moves within
the specified area from the start position
to the end position. Not all kinematic
transformations support this mode
Speed factor, the maximum speed of each
VelFactor Speed factor LREAL 0-1 1 axis multiplied by this speed factor, and
the value is between [0, 1]
Acceleration factor, the maximum speed
Acceleration of each axis multiplied by this
AccFactor LREAL 0-1 1
factor acceleration factor, and the value is
between [0, 1]
Jerk factor: the maximum speed of each
JerkFactor Jerk factor LREAL 0-1 1 axis is multiplied by this jerk factor, and
the value is between [0, 1]
Initial
VAR_OUTPUT Name Data type Efficient range Description
value
TRUE when instruction execution is
Done Completed BOOL TRUE/FALSE FALSE
completed
TRUE when the function block execution
Busy In execution BOOL TRUE/FALSE FALSE
has not ended
Active In control BOOL TRUE/FALSE FALSE Becomes TRUE in control
Command
CommandAborted BOOL TRUE/FALSE FALSE Module execution interrupted is true
interrupted
Motion TRUE when the module successfully
CommandAccepted BOOL TRUE/FALSE FALSE
accepted calls the axis group
Error Error BOOL TRUE/FALSE FALSE Function block execution error
ErrorID Error code SMC_ERROR - 0 Error identification
SMC_Movement TRUE when the motion is executing or
MovementId Motion flag TRUE/FALSE FALSE
_Id completed

84
5-2-2-21. Relative position linear interpolation [MC_MoveLinearRelative]

(1) Instruction overview


Linear interpolation movement in the relative position mode of the axis group in the specified coordinate system.
Instruction Name Graphic representation ST representation

Relative position
MC_MoveLinearRelative
linear interpolation

(2) Related variables


Initial
VAR_IN_OUT Name Data type Efficient range Description
value
AXIS_GROUP_REF
AxisGroup Axis group - - Specified axis group
_SM3
Initial
VAR_INPUT Name Data type Efficient range Description
value
Execute Valid BOOL TRUE/FALSE FALSE Execute the current command
Relative Relative target position in the specified
Distance SMC_POS_REF - -
position reference coordinate system
0, positive Max combined speed [command
Velocity Speed LREAL 0
value unit/s]
Acceleration Max combined acceleration speed
Acceleration LREAL positive value 0
speed [command unit/s2]
Deceleration Max combined deceleration speed
Deceleration LREAL positive value 0
speed [command unit/s2]
Max combined jerk speed [command
Jerk Jerk speed LREAL positive value 0
unit/s3]
Reference
SMC_COORD_ SMC_COOR
CoordSystem coordinate - Reference coordinate system
SYSTEM D_SYSTEM
system
MC_BUFFER_ Specifies the action when multiple
BufferMode Buffer mode - 0
MODE motion commands are started

85
Initial
VAR_IN_OUT Name Data type Efficient range Description
value
TMNone/TMS TMNone: no mixing
Corner
MC_TRANSITION_ tartVelocity/T TMStartVelocity: mix based on speed
TransitionMode transition -
MODE MCornerDista TMCornerDistance: mix based on
mode
nce distance

Initial
VAR_INPUT Name Data type Efficient range Description
value
Array
Corner [0..(SMC_RCNST.M
0, positive
TransitionParameter transition AX_TRANS_PARA 0 Corner transition parameter
value
parameter MS - 1)] OF
LREAL
GreatCircle: Move from the start
position to the target position along the
shortest path. In this mode, even if the
start position and the end position are
Interpolation within the specified area, the realized
SMC_ORIENTATIO GreatCircle
OrientationMode positioning - path may leave the area
N_MODE /Axis
mode Axis: The positioning axis moves
within the specified area from the start
position to the end position. Not all
kinematic transformations support this
mode
Speed factor, the maximum speed of
VelFactor Speed factor LREAL 0-1 1 each axis multiplied by this speed
factor, and the value is between [0, 1]
Acceleration factor, the maximum
Acceleration speed of each axis multiplied by this
AccFactor LREAL 0-1 1
factor acceleration factor, and the value is
between [0, 1]
Jerk factor: the maximum speed of
JerkFactor Jerk factor LREAL 0-1 1 each axis is multiplied by this jerk
factor, and the value is between [0, 1]
Initial
VAR_OUTPUT Name Data type Efficient range Description
value
TRUE when instruction execution is
Done Completed BOOL TRUE/FALSE FALSE
completed
TRUE when the function block
Busy In execution BOOL TRUE/FALSE FALSE
execution has not ended
Active In control BOOL TRUE/FALSE FALSE Becomes TRUE in control
Command
CommandAborted BOOL TRUE/FALSE FALSE Module execution interrupted is true
interrupted
CommandAccepted Motion BOOL TRUE/FALSE FALSE TRUE when the module successfully

86
accepted calls the axis group
Error Error BOOL TRUE/FALSE FALSE Function block execution error
ErrorID Error code SMC_ERROR - 0 Error identification
TRUE when the motion is executing or
MovementId Motion flag SMC_Movement_Id TRUE/FALSE FALSE
completed

5-2-2-22. Read axis group feedback position [MC_GroupReadActualPosition]

(1) Instruction overview


Read the feedback position of the axis group in the specified coordinate system.
Instruction Name Graphic representation ST representation

Read axis
group
MC_GroupReadActualPosition
feedback
position

(2) Related variables


Initial
VAR_IN_OUT Name Data type Efficient range Description
value
AxisGroup Axis group AXIS_GROUP_REF_SM3 - - Specified axis group
Initial
VAR_INPUT Name Data type Efficient range Description
value
Must be set to TRUE to
Enable Valid BOOL TRUE/FALSE FALSE enable processing of function
blocks
Apply
CoordSystem coordinate SMC_COORD_SYSTEM - - Apply coordinate system
system
Initial
VAR_OUTPUT Name Data type Efficient range Description
value
Obtain the If the output value is valid, it
Valid BOOL TRUE/FALSE FALSE
flag is TRUE
TRUE when the function
Busy In execution BOOL TRUE/FALSE FALSE
block execution has not ended
Function block execution
Error Error BOOL TRUE/FALSE FALSE
error
ErrorID Error code SMC_ERROR - 0 Error identification
Position Position SMC_POS_REF - - Axis group actual position
Kinematic configuration of
Motion
KinematicConfig TRAFO.CONFIGDATA - - the current position. Set only
configuration
when the coordinate system is

87
Initial
VAR_IN_OUT Name Data type Efficient range Description
value
a Cartesian coordinate system
(i.e. not set in case of ACS)

5-2-2-23. Read axis group feedback speed [MC_GroupReadActualVelocity]

(1) Instruction overview


Read the feedback speed of the axis group in the specified coordinate system.
Instruction Name Graphic representation ST representation

Read axis
group
MC_GroupReadActualVelocity
feedback
speed

(2) Related variables


VAR_IN_OUT Initial
Name Data type Efficient range Description
value
AxisGroup Axis group AXIS_GROUP_REF_SM3 - - Specified axis group
Initial
VAR_INPUT Name Data type Efficient range Description
value
Must be set to TRUE to enable
Enable Valid BOOL TRUE/FALSE FALSE
processing of function blocks
Apply
CoordSystem coordinate SMC_COORD_SYSTEM - - Apply coordinate system
system
Initial
VAR_OUTPUT Name Data type Efficient range Description
value
Obtain the If the output value is valid, it is
Valid BOOL TRUE/FALSE FALSE
flag TRUE
In TRUE when the function block
Busy BOOL TRUE/FALSE FALSE
execution execution has not ended
Error Error BOOL TRUE/FALSE FALSE Function block execution error
ErrorID Error code SMC_ERROR - 0 Error identification
Current feedback speed of the axis
group. If the Cartesian coordinate
system is selected, Velocity.c
Velocity Speed SMC_POS_REF - - contains Cartesian velocities: (X, Y,
Z) are velocity vectors, (A, B, C) are
angular velocities around the X, Y, Z
axes respectively

88
5-2-2-24. Read axis group configuration parameters [MC_GroupReadConfiguration]

(1) Instruction overview


Read the configuration parameters such as axes and quantity contained in the axis group.
Instruction Name Graphic representation ST representation

Read axis
group
MC_GroupReadConfiguration
configuration
parameters

(2) Related variables


VAR_IN_OUT Initial
Name Data type Efficient range Description
value
Axis
AxisGroup AXIS_GROUP_REF_SM3 - - Specified axis group
group
Initial
VAR_INPUT Name Data type Efficient range Description
value
Must be set to TRUE to enable
Enable Valid BOOL TRUE/FALSE FALSE
processing of function blocks
IDENT_IN_GROUP_REF_ 0, positive Corresponding axis no. in the input
IdentInGroup Axis no. 0
SM3 value axis group
Initial
VAR_OUTPUT Name Data type Efficient range Description
value
Reference POINTER TOAXIS_REF_
pAxis - - Selected reference axis
axis SM3
Axis 0, positive
NumAxes UDINT 0 Axis numbers in the axis group
number value
Obtain the If the output value is valid, it is
Valid BOOL TRUE/FALSE FALSE
flag TRUE
In TRUE when the function block
Busy BOOL TRUE/FALSE FALSE
execution execution has not ended
Error Error BOOL TRUE/FALSE FALSE Function block execution error
ErrorID Error code SMC_ERROR - 0 Error identification

89
5-2-2-25. Read axis group error [MC_GroupReadError]

(1) Instruction overview


Get the error information of the axis group.
Instruction Name Graphic representation ST representation

Read axis
MC_GroupReadError
group error

(2) Related variables


VAR_IN_OUT Initial
Name Data type Efficient range Description
value
Axis AXIS_GROUP_REF
AxisGroup - - Specified axis group
group _SM3
Initial
VAR_INPUT Name Data type Efficient range Description
value
Must be set to TRUE to enable processing
Enable Valid BOOL TRUE/FALSE FALSE
of function blocks
VAR_OUTPU Initial
Name Data type Efficient range Description
T value
Obtain
Valid BOOL TRUE/FALSE FALSE If the output value is valid, it is TRUE
the flag
In TRUE when the function block execution
Busy BOOL TRUE/FALSE FALSE
execution has not ended
Error Error BOOL TRUE/FALSE FALSE Function block execution error
Error
ErrorID SMC_ERROR - 0 Single axis error code indication
code
Error
GroupErrorID SMC_ERROR - 0 Axis group error code indication
code

90
5-2-2-26. Read the axis group current motion status [MC_GroupReadStatus]

(1) Instruction overview


Obtain the current motion state of the axis group.
Instruction Name Graphic representation ST representation

Read the axis


MC_GroupReadStatus group current
motion status

(2) Related variables


VAR_IN_OUT Initial
Name Data type Efficient range Description
value
AXIS_GROUP_REF
AxisGroup Axis group - - Specified axis group
_SM3
Initial
VAR_INPUT Name Data type Efficient range Description
value
Must be set to TRUE to enable
Enable Valid BOOL TRUE/FALSE FALSE
processing of function blocks
Initial
VAR_OUTPUT Name Data type Efficient range Description
value
Obtain the If the output value is valid, it is
Valid BOOL TRUE/FALSE FALSE
flag TRUE
TRUE when the function block
Busy In execution BOOL TRUE/FALSE FALSE
execution has not ended
Error Error BOOL TRUE/FALSE FALSE Function block execution error
ErrorID Error code SMC_ERROR - 0 Single axis error code indication
GroupErrorID Error code SMC_ERROR - 0 Axis group error code indication
GroupMoving Moving BOOL TRUE/FALSE FALSE Axis group in motion is TRUE
GroupHoming Homing BOOL TRUE/FALSE FALSE Axis group homing is TRUE
Axis group report error and stop
GroupErrorStop Error stop BOOL TRUE/FALSE FALSE
is TRUE
Ready to
GroupStandby BOOL TRUE/FALSE FALSE Axis group standby is TRUE
move
GroupStopping Stop BOOL TRUE/FALSE FALSE Axis group stop is TRUE
Disable axis Axis group invalid status is
GroupDisabled BOOL TRUE/FALSE FALSE
group TRUE
TrackingDynamicCS Current BOOL TRUE/FALSE FALSE True if the dynamic coordinate

91
dynamic system is currently used
coordinate
system
In continuous interpolation
motion, it is true when the
On path or acquired position belongs to the
InSync already in BOOL TRUE/FALSE FALSE specified path. True when the
place current position is equal to the
target position in ordinary point
position and interpolation motion
Motion 0, positive Identifier of the active move. ID
ActiveMovementId SMC_Movement_Id -
segment no. value is 0 indicates no active movement
Initial
VAR_OUTPUT Name Data type Efficient range Description
value
Identifier of the last accepted
LastAcceptedMovem Motion 0, positive
SMC_Movement_Id 0 motion. ID is 0 indicates that no
entId segment no. value
action has been accepted

5-2-2-27. Startup the axis group [SMC_StartupAxisGroup]

(1) Instruction overview


Used for testing and commissioning the axis group.
Instruction Name Graphic representation ST representation
Startup
SMC_StartupAxisGroup the axis
group

(2) Related variables


Efficient Initial
VAR_IN_OUT Name Data type Description
range value
Axis
AxisGroup AXIS_GROUP_REF_SM3 - - Specified axis group
group

92
5-2-2-28. Axis group enable [SMC_GroupPower]

(1) Instruction overview


Enable all the axes in the axis group, equivalent to calling MC_Power for all axes in the axis group.
Instruction Name Graphic representation ST representation

Enable
SMC_GroupPower
axis group

(2) Related variables


VAR_IN_OUT Efficient Initial
Name Data type Description
range value
Axis
AxisGroup AXIS_GROUP_REF_SM3 - - Specified axis group
group
Efficient Initial
VAR_INPUT Name Data type Description
range value
Input TRUE to make the module
Enable Valid BOOL TRUE/FALSE FALSE
operate
Set to TRUE to make the axis group
bRegulatorOn Enable BOOL TRUE/FALSE FALSE
enable
Must be set to TRUE to turn off
Drive
bDriveStart BOOL TRUE/FALSE FALSE emergency stop processing for the
start
function block
Efficient Initial
VAR_OUTPUT Name Data type Description
range value
Status Operable BOOL TRUE/FALSE FALSE TRUE if the axis group is ready
Obtain
Valid BOOL TRUE/FALSE FALSE If the output value is valid, it is TRUE
the flag
In TRUE when the function block
Busy BOOL TRUE/FALSE FALSE
execution execution has not ended
Error Error BOOL TRUE/FALSE FALSE Function block execution error
Error
ErrorID SMC_ERROR - 0 Error code
code

93
5-2-2-29. Interrupt the axis group [SMC_GroupInterruptAt]

(1) Instruction overview


Interrupts the currently moving axis group.
Instruction Name Graphic representation ST representation

Interrupt the
SMC_GroupInterruptAt
axis group

(2) Related variables


Initial
VAR_IN_OUT Name Data type Efficient range Description
value
AXIS_GROUP_REF_
AxisGroup Axis group - - Specified axis group
SM3
Continue SMC_AXIS_GROUP_C Motion information when axis
continueData - -
motion data ONTINUE_DATA group motion is interrupted
Initial
VAR_INPUT Name Data type Efficient range Description
value
Execute Valid BOOL TRUE/FALSE FALSE Execute current instruction
SMC_GroupInterrupt Where the ongoing movement will
Position Position - -
Position be interrupted
Initial
VAR_OUTPUT Name Data type Efficient range Description
value
TRUE when instruction execution
Done Completed BOOL TRUE/FALSE FALSE
is completed
In TRUE when the function block
Busy BOOL TRUE/FALSE FALSE
execution execution has not ended
Signal indicates that the function
Interrupting Interrupting BOOL TRUE/FALSE FALSE
block is currently being interrupted
Instruction Module execution interrupted is
CommandAborted BOOL TRUE/FALSE FALSE
interrupted TRUE
Error Error BOOL TRUE/FALSE FALSE Function block execution error
ErrorID Error code SMC_ERROR - 0 Error code
mvtIdInterrupt Interrupt MovemenID corresponding to the
- - -
Position position ID interrupt location

94
5-2-2-30. Restart after error reset [SMC_GroupEnableResumeAfterError]

(1) Instruction overview


Restore the status of the axis group interrupted due to an error.
Instruction Name Graphic representation ST representation

Restart
SMC_GroupEnableResume
after error
AfterError
reset

(2) Related variables


VAR_IN_OUT Initial
Name Data type Efficient range Description
value
AxisGroup Axis group AXIS_GROUP_REF_SM3 - - Specified axis group
Continue SMC_AXIS_ Axis group position when
continueData - -
moving data GROUP_CONTINUE_DATA motion is interrupted
Initial
VAR_INPUT Name Data type Efficient range Description
value
Enable Valid BOOL TRUE/FALSE FALSE Enable command function
Initial
VAR_OUTPUT Name Data type Efficient range Description
value
TRUE when the function
Busy In execution BOOL TRUE/FALSE FALSE block execution has not
ended
Active Calling BOOL TRUE/FALSE FALSE Writing the continous data

95
5-2-2-31. Axis group jogging [SMC_GroupJog]

(1) Instruction overview


Control the jog motion of the axis group in the specified coordinate system.
Instruction Name Graphic representation ST representation

Axis group
SMC_GroupJog
jogging

(2) Related variables


Initial
VAR_IN_OUT Name Data type Efficient range Description
value
AXIS_GROUP
AxisGroup Axis group - - Specified axis group
_REF_SM3
Initial
VAR_INPUT Name Data type Efficient range Description
value
Execute Valid BOOL TRUE/FALSE FALSE Execute current instruction
Reference
SMC_COORD_
CoordSystem coordinate - - Reference coordinate system
SYSTEM
system
The internal coordinate system for jogging
PCS
SMC_COORD_ is PCS, use
CoordSystemPCS coordinate - -
SYSTEM SMC_SetDynCoordTransformEx to change
system
when required
Speed factor, the maximum speed of each
VelFactor Speed factor LREAL 0-1 1 axis multiplied by this speed factor, and the
value is between [0, 1]
Acceleration factor, the maximum speed of
Acceleration
AccFactor LREAL 0-1 1 each axis multiplied by this acceleration
factor
factor, and the value is between [0, 1]
Jerk factor, the maximum speed of each axis
JerkFactor Jerk factor LREAL 0-1 1 multiplied by this jerk factor, and the value
is between [0, 1]
The X axis in the coordinate system, set to 0
AxisX Axis X IAxisRef - 0
if it is not used
AxisY Axis Y IAxisRef - 0 The Y axis in the coordinate system, set to 0

96
if it is not used
The Z axis in the coordinate system, set to 0
AxisZ Axis Z IAxisRef - 0
if it is not used
Control the A coordinate (rotation around
AxisA Axis A IAxisRef - 0 the Z axis) or the first tool axis. Set to 0 if
not applicable

Initial
VAR_INPUT Name Data type Efficient range Description
value
Control the B coordinate (rotation around
AxisB Axis B IAxisRef - 0 the Y axis) or the second tool axis. Set to 0
if not applicable
Control the C coordinate (rotation around
AxisC Axis C IAxisRef - 0 the Z axis) or the third tool axis. Set to 0 if
not applicable
If TRUE, the positions of AxisA, AxisB and
AxisC will be interpreted as the target
position of the tool kinematic axis,
otherwise as the ZYZ representation of the
Start
direction.
ABC_as_ACS coordinate BOOL TRUE/FALSE FALSE
If CoordSystem is set to ACS, it will be
conversion
ignored. If TRUE, the kinematic
transformation of the axis group must be
Kin_ Coupled type and support
SMC_ORIENTATION_ MODE. Axis
Initial
VAR_OUTPUT Name Data type Efficient range Description
value
In TRUE when the function block execution
Busy BOOL TRUE/FALSE FALSE
execution has not ended
InitialPosition Received
BOOL TRUE/FALSE FALSE -
Reached position
Command
CommandAborted BOOL TRUE/FALSE FALSE Module execution interrupted is TRUE
interrupted
Error Error BOOL TRUE/FALSE FALSE Function block execution error
ErrorID Error code SMC_ERROR - 0 Error code

97
5-2-2-32. Axis group wait [SMC_GroupWait]

(1) Instruction overview


Set the delay waiting of the axis group.
Instruction Name Graphic representation ST representation

Axis group
SMC_GroupJog
waiting

(2) Related variables


Initial
VAR_IN_OUT Name Data type Efficient range Description
value
AXIS_GROUP_
AxisGroup Axis group - - Specified axis group
REF_SM3
Initial
VAR_INPUT Name Data type Efficient range Description
value
Execute Valid BOOL TRUE/FALSE FALSE Execute the current command
0, positive
WaitTime Wait time LREAL 0 Time to wait on the path, in seconds
value
Initial
VAR_OUTPUT Name Data type Efficient range Description
value
TRUE when instruction execution is
Done Completed BOOL TRUE/FALSE FALSE
completed
TRUE when the function block
Busy In execution BOOL TRUE/FALSE FALSE
execution has not ended
Active In control BOOL TRUE/FALSE FALSE Becomes TRUE in control
Instruction Module execution interrupted is
CommandAborted BOOL TRUE/FALSE FALSE
interrupted TRUE
Motion TRUE when the module successfully
CommandAccepted BOOL TRUE/FALSE FALSE
accepted calls the axis group
Error Error BOOL TRUE/FALSE FALSE Function block execution error
ErrorID Error code SMC_ERROR - 0 Error identification
True when the motion is executing or
MovementId Motion flag SMC_Movement_Id TRUE/FALSE FALSE
completed

98
5-2-3. Axis group function application
Example: This example introduces the motion control of a SCARA system that implements two nodes.
Program operation:
(1) click [Application] in the project bar, select [add object]—[AxisGroup], and name as AxisGroup and open it.
Select the SCARA kinematics model through the kinematics model interface.

(2) Configure kinematic parameters: the length of the big and small arms is set to 500, and the angle offset is all
zero. Axis parameter configuration, mapping axis position.

99
(3) According to the motion trajectory, compile the kinematics instructions and configure the motion
parameters.

100
5-3. CAM function

5-3-1. CAM instruction list


Instruction Function
MC_CamTableSelect Connect the selected CAM table to the actual CAM table
MC_CamIn CAM binding
MC_CamOut CAM unbinding
MC_GearIn Set the master-slave axis gear ratio and start the electronic gear
Set the master-slave axis synchronization distance and gear ratio and
MC_GearInPos
start the electronic gear
MC_GearOut Disconnect the master-slave axis electronic gear
MC_Phasing Phase offset
SMC_CAMBounds Master axis coupling slave axis
SMC_CAMBounds_Pos Slave axis coupling master axis
SMC_CamEditor Show CAM table in visualization
SMC_CamRegister Read tappet information only
SMC_GetCamSlaveSetPosition Obtain CAM table slave axis position
SMC_GetTappetValue Evaluating output tappet
SMC_ReadCAM Read CAM table
SMC_WriteCAM Write CAM table

101
5-3-2. CAM instructions

5-3-2-1. CAM table assignment [MC_CamTableSelect]

(1) Instruction overview


Select the CAM table to be executed, it should be used together with MC_CamIn.
Instruction Name Graphic representation ST representation

Cam table
MC_CamTableSelect
assignment

(2) Related variables


VAR_IN_OUT Name Data type Efficient range Initial Description
value
Master Master axis AXIS_REF - - Map to master axis
Slave Slave axis AXIS_REF - - Map to slave axis
CamTable CAM table MC_CAM_REF - - Map to cam table description
VAR_INPUT Name Data type Efficient range Initial Description
value
Rising edge signal, execute current
Execute Valid BOOL TRUE/FALSE FALSE
command
TRUE: execute the specified cam table
Periodic Repeat mode BOOL TRUE/FALSE FALSE periodically and repeatedly
FALSE: execute cam table only once
Master axis
TRUE: absolute coordinates
MasterAbsolute absolute BOOL TRUE/FALSE FALSE
FALSE: relative coordinates
mode
Slave axis
TRUE: absolute coordinates
SlaveAbsolute absolute BOOL TRUE/FALSE FALSE
FALSE: relative coordinates
mode
VAR_OUTPUT Name Data type Efficient range Initial Description
value
TRUE when instruction execution is
Done Completed BOOL TRUE/FALSE FALSE
completed
TRUE when the function block execution
Busy In execution BOOL TRUE/FALSE FALSE
has not ended
Error Error BOOL TRUE/FALSE FALSE Function block execution error
ErrorID Error code SMC_ERROR - 0 Error identification

102
Valid Select valid Cam_ID, used together with
CamTableID MC_CAM_ID - -
CAMID CamTableID in MC_CamIn

5-3-2-2. CAM binding [MC_CamIn]

(1) Instruction overview


The master-slave axis is bound, and the engagement mode of the slave axis and the related speed can be set.
Instruction Name Graphic representation ST representation

CAM action
MC_CamIn
start

(2) Related variables


Name Data type Efficient range Initial Description
VAR_IN_OUT
value
Master Master axis AXIS_REF - - Map to master axis
Slave Slave axis AXIS_REF - - Map to slave axis
Name Data type Efficient range Initial Description
VAR_INPUT
value
Execute the current command at the
Execute Valid BOOL TRUE/FALSE FALSE
rising edge of the signal
MasterOffset Master axis offset LREAL - 0 Offset on the master table
SlaveOffset Slave axis offset LREAL - 0 Offset on the slave table
MasterScaling Master axis scale LREAL - 1 Master configuration file scale factor
SlaveScaling Slave axis scale LREAL - 1 Slave configuration file scale factor
0: absolute (absolute position)
1: relative (relative position)
2: ramp_in (Ramp cut in)
Slave axis
StartMode MC_StartMode 0-4 absolute 3: ramp_in_pos (positive ramp cut
engagement mode
in)
4: ramp_in_neg (negative ramp cut
in)

103
Define the use of cam table, used
together with MC_Cam
CamTableID Cam table MC_CAM_ID - -
TableSelect output point
CamTableID
Negative
Maximum speed of superimposed
VelocityDiff Speed LREAL value, 0, 0
motion [u/s]
positive value
Negative
Acceleration Target acceleration LREAL value, 0, 0 Acceleration speed [u/s2]
positive value
Negative
Deceleration Target deceleration LREAL value, 0, 0 Deceleration speed [u/s2]
positive value
Negative
Jerk Target jerk speed LREAL value, 0, 0 Jerk speed [u/s3]
positive value
TappetHysteresis Lag size of tappet LREAL - - Lag size of tappet

Name Data type Efficient range Initial Description


VAR_OUTPUT
value
TRUE indicates that the slave axis is
InSync Cam valid BOOL TRUE/FALSE FALSE synchronized with the master axis
according to the cam table
TRUE when the function block
Busy In execution BOOL TRUE/FALSE FALSE
execution has not ended
Command Module execution interrupted is
CommandAborted BOOL TRUE/FALSE FALSE
interrupted TRUE
Error Error BOOL TRUE/FALSE FALSE Function block execution error
ErrorID Error code SMC_ERROR - 0 Error identification
Curve Pulse output: cycle end of cam
EndOfProfile BOOL TRUE/FALSE FALSE
completed profile
For tappet signal processed by
Tappets Tappet table SMC_TappetData - -
SMC_GetTappetValue

104
5-3-2-3. Cam unbinding [MC_CamOut]

(1) Instruction overview


Release the cam coupling relationship between the specified slave axis and its corresponding master axis.
Instruction Name Graphic representation ST representation

Release cam
MC_CamOut
action

(2) Related variables


VAR_IN_OUT Name Data type Efficient range Initial Description
value
Slave Slave axis AXIS_REF - - Map to the axis
Name Data type Efficient range Initial Description
VAR_INPUT
value
Execute the current command at the
Execute Valid BOOL TRUE/FALSE FALSE
rising edge of the signal
Name Data type Efficient range Initial Description
VAR_OUTPUT
value
TRUE when instruction execution is
Done Completed BOOL TRUE/FALSE FALSE
completed
In TRUE when the function block
Busy BOOL TRUE/FALSE FALSE
execution execution has not ended
Error Error BOOL TRUE/FALSE FALSE Function block execution error
ErrorID Error code SMC_ERROR - 0 Error identification

105
5-3-2-4. CAM action start [MC_GearIn]

(1) Instruction overview


Set the master-slave axis gear ratio and start the electronic gear.
Instruction Name Graphic representation ST representation

MC_GearIn Cam action start

(2) Related variables


VAR_IN_OUT Name Data type Efficient range Initial Description
value
Master Master axis AXIS_REF - - Map to master axis
Slave Slave axis AXIS_REF - - Map to slave axis
Name Data type Efficient range Initial Description
VAR_INPUT
value
Execute the current command at the
Execute Valid BOOL TRUE/FALSE FALSE
rising edge of the signal
Numerator of
RatioNumerator DINT Positive value 1 Offset on the master table
gear ratio
Denominator
RatioDenominator UDINT Positive value 1 Offset on the slave table
of gear ratio

Target
Acceleration LREAL Positive value 0 Acceleration speed [u/s2]
acceleration

Target Positive value


Deceleration LREAL 0 Deceleration speed [u/s2]
deceleration
Target Jerk Positive value
Jerk LREAL 0 Jerk speed [u/s3]
speed
MC_BUFFER_
BufferMode Buffer mode - - -
MODE
Name Data type Efficient range Initial Description
VAR_OUTPUT
value
The slave moves at the given master
Gear ratio
InGear BOOL TRUE/FALSE FALSE speed ratio, and the target speed
reached
reached by the slave axis is TRUE

106
VAR_IN_OUT Name Data type Efficient range Initial Description
value
TRUE when the function block
Busy In execution BOOL TRUE/FALSE FALSE
execution has not ended

Active In control BOOL TRUE/FALSE FALSE Becomes TRUE in control

Command Module execution interrupted is


CommandAborted BOOL TRUE/FALSE FALSE
interrupted TRUE
Error Error BOOL TRUE/FALSE FALSE Function block execution error
ErrorID Error code SMC_ERROR - 0 Error identification

5-3-2-5. Position assignment gear action [MC_GearInPos]

(1) Instruction overview


Set the electronic gear ratio between the main axis and the slave axis to perform the electronic gear action.
Specify the master axis position to start synchronization, the slave axis position, and the synchronization distance
of the master axis, to complete the action of cutting in the electronic gear.
Instruction Name Graphic representation ST representation

Position assignment
MC_GearInPos
gear action

(2) Related variables


VAR_IN_OUT Name Data type Efficient range Initial Description
value
Master Master axis AXIS_REF - - Map to master axis
Slave Slave axis AXIS_REF - - Map to slave axis
Name Data type Efficient range Initial Description
VAR_INPUT
value
Execute the current command at the
Execute Valid BOOL TRUE/FALSE FALSE
rising edge of the signal
Numerator of
RatioNumerator DINT Positive value 1 Offset on the master table
gear ratio

107
Denominator of
RatioDenominator UDINT Positive value 1 Offset on the slave table
gear ratio
Main axis
Negative, 0, Main position of axis synchronous
MasterSyncPosition synchronization LREAL 0
positive operation
position
Slave axis
Negative, 0, Slave position of axis synchronous
SlaveSyncPosition synchronization LREAL 0
positive operation
position
Perform
Main distance of gears in the
synchronous Negative, 0,
MasterStartDistance LREAL 0 program (start the slave axis to
master axis positive
enter synchronization)
position
MC_BUFFER_
BufferMode Buffer mode - - -
MODE
Set to FALSE, reversed when the
physical position of the slave axis
is advanced. Set to TRUE if the
reverse operation of the slave axis
AvoidReversal Reverse inhibit BOOL TRUE/FALSE FALSE is physically impossible or
dangerous. Applicable only under
modal axis. If reversal cannot be
avoided, the axis will stop for the
error.
Name Data type Efficient range Initial Description
VAR_OUTPUT
value
Start TRUE if the electronic gear starts
StartSync BOOL TRUE/FALSE FALSE
synchronization processing
Arrival Electronic gear command
InSync BOOL TRUE/FALSE FALSE
synchronization completed

Name Data type Efficient range Initial Description


VAR_OUTPUT
value
TRUE when the function block
Busy In execution BOOL TRUE/FALSE FALSE
execution has not ended

Active In control BOOL TRUE/FALSE FALSE Becomes TRUE in control

Command Module execution interrupted is


CommandAborted BOOL TRUE/FALSE FALSE
interrupted TRUE
Error Error BOOL TRUE/FALSE FALSE Function block execution error
ErrorID Error code SMC_ERROR - 0 Error identification

108
5-2-3-6. Release gear action [MC_GearOut]

(1) Instruction overview


Disconnect the slave axis from the electronic gear coupling of the master axis.
Instruction Name Graphic representation ST representation

Release gear
MC_GearOut
action

(2) Related variables


VAR_IN_OUT Name Data type Efficient range Initial Description
value
Slave Slave axis AXIS_REF - - Map to the axis
Name Data type Efficient range Initial Description
VAR_INPUT
value
Execute the current command at the rising
Execute Valid BOOL TRUE/FALSE FALSE
edge of the signal
Name Data type Efficient range Initial Description
VAR_OUTPUT
value
TRUE if the electronic gear coupling between
Done Completed BOOL TRUE/FALSE FALSE the slave axis and the master axis is
disconnected
In TRUE when the function block execution has
Busy BOOL TRUE/FALSE FALSE
execution not ended
Error Error BOOL TRUE/FALSE FALSE Function block execution error
ErrorID Error code SMC_ERROR - 0 Error identification

109
5-2-3-7. Master-slave axis phase offset [MC_Phasing]

(1) Instruction overview


Specify the phase offset between the master and slave axis.
Instruction Name Graphic representation ST representation

Master-slave axis
MC_Phasing
phase offset

(2) Related variables


Name Data type Efficient range Initial Description
VAR_IN_OUT
value
Master Master axis AXIS_REF - - Map to master axis
Slave Slave axis AXIS_REF - - Map to slave axis
Name Data type Efficient range Initial Description
VAR_INPUT
value
Execute the current command at the rising
Execute Valid BOOL TRUE/FALSE FALSE
edge of the signal
Phase Negative, 0,
PhaseShift LREAL 0 Specify the master axis phase compensation
compensation positive
Maximum speed value when performing
Velocity Speed LREAL 0, positive 0
phase offset [command unit/s]
0, positive Maximum acceleration speed value when
Acceleration Acceleration LREAL 0
performing phase offset [command unit/s2]
0, positive Maximum deceleration speed value when
Deceleration Deceleration LREAL 0
performing phase offset [command unit /s2]
0, positive Maximum jerk speed value when
Jerk Jerk speed LREAL 0
performing phase offset [command unit /s3]
Name Data type Efficient range Initial Description
VAR_OUTPUT
value
TRUE if the electronic gear coupling
Done Completed BOOL TRUE/FALSE FALSE between the slave axis and the master axis
is disconnected
TRUE when the function block execution
Busy In execution BOOL TRUE/FALSE FALSE
has not ended
Command
CommandAborted BOOL TRUE/FALSE FALSE Module execution interrupted is TRUE
interrupted

110
Error Error BOOL TRUE/FALSE FALSE Function block execution error
ErrorID Error code SMC_ERROR - 0 Error identification

5-2-3-8. CAM range [SMC_CAMBounds]

(1) Instruction overview


When the slave axis is coupled with the master axis cam, the maximum position, speed and acceleration of the
slave axis can be calculated through this function block.
The master axis moves under the input maximum speed and acceleration/deceleration limit. This command can
check whether the curve is correct when designing the cam table, provided that the maximum acceleration and
deceleration, speed, etc. of the master axis are known.
Instruction Name Graphic representation ST representation

SMC_CAMBounds Cam range

(2) Related variables


VAR_IN_OUT Name Data type Efficient range Initial Description
value
Cam Cam MC_CAM_REF - - Map to the cam
Name Data type Efficient range Initial Description
VAR_INPUT
value
Execute the current command at the rising
bExecute Valid BOOL TRUE/FALSE FALSE
edge of the signal
Maximum master axis speed in absolute
dMasterVelMax Max speed LREAL - 1
mode
Max
Maximum master axis acceleration in
dMasterAccMax acceleration LREAL - 0
absolute mode
speed
dMasterScaling Scale factor LREAL - 1 Master axis CAM application scale factor
dSlaveScaling Scale factor LREAL - 1 Slave axis CAM application scale factor
Name Data type Efficient range Initial Description
VAR_OUTPUT
value
bDone Completed BOOL TRUE/FALSE FALSE TRUE if the electronic gear coupling

111
VAR_IN_OUT Name Data type Efficient range Initial Description
value
between the slave axis and the master axis
is disconnected
TRUE when the function block execution
bBusy In execution BOOL TRUE/FALSE FALSE
has not ended
bError Error BOOL TRUE/FALSE FALSE Function block execution error
nErrorID Error code SMC_ERROR - 0 Error identification
Calculate the maximum position of the
dMaxPos Max position LREAL - 0
slave axis according to the cam table
Calculate the minimum position of the slave
dMinPos Min position LREAL - 0
axis according to the cam table
Calculate the maximum speed of the slave
dMaxVel Max speed LREAL - 0
axis
Calculate the minimum speed of the slave
dMinVel Min speed LREAL - 0
axis
Max Calculate the maximum acceleration of the
dMaxAccDec LREAL - 0
acceleration slave axis
Min Calculate the minimum acceleration of the
dMinAccDec LREAL - 0
acceleration slave axis

5-2-3-9. CAM position range [SMC_CAMBounds_Pos]

(1) Instruction overview


When the slave axis is coupled with the master axis cam, the maximum position and minimum position of the
slave axis can be calculated through this function block. Compared with SMC_CAMBounds, this function block
has no calculation of maximum acceleration, and other functions are the same.
Instruction Name Graphic representation ST representation

CAM position
SMC_CAMBounds_Pos
range

(2) Related variables


Name Data type Efficient range Initial Description
VAR_IN_OUT
value
Cam Cam MC_CAM_REF - - Map to the cam
VAR_INPUT Name Data type Efficient range Initial Description

112
value
Execute the current command at the rising
bExecute Valid BOOL TRUE/FALSE FALSE
edge of the signal
Maximum master axis speed in absolute
dMasterVelMax Max speed LREAL - 1
mode
Max Maximum master axis acceleration speed in
dMasterAccMax LREAL - 0
acceleration absolute mode
dMasterScaling Scale factor LREAL - 1 Scale factor in master axis cam application
dSlaveScaling Scale factor LREAL - 1 Scale factor in slave axis cam application
Name Data type Efficient range Initial Description
VAR_OUTPUT
value
TRUE if the electronic gear coupling
bDone Completed BOOL TRUE/FALSE FALSE between the slave axis and the master axis is
disconnected
TRUE when the function block execution
bBusy In execution BOOL TRUE/FALSE FALSE
has not ended
bError Error BOOL TRUE/FALSE FALSE Function block execution error
nErrorID Error code SMC_ERROR - 0 Error identification
Calculate the maximum position of the
dMaxPos Max position LREAL - 0
slave axis according to the cam table
Calculate the minimum position of the slave
dMinPos Min position LREAL - 0
axis according to the cam table

113
5-3-2-10. Show cam table in visualization [SMC_CamEditor]

(1) Instruction overview


This function block is used to display the cam table in the visualization. This function block does not work
without TargetVisu or WebVisu.
Instruction Name Graphic representation ST representation

Show cam table in


SMC_CamEditor
visualization

(2) Related variables


VAR_IN_OUT Name Data type Efficient range Initial Description
value
Cam Cam MC_CAM_REF - - Map to the cam
Name Data type Efficient range Initial Description
VAR_INPUT
value
bEnable Valid BOOL TRUE/FALSE FALSE Modify cam table when TRUE
VAR_OUTPU Name Data type Efficient range Initial Description
T value
The cam in the visualization has
bCAMchanged Completed BOOL TRUE/FALSE FALSE
changed. Then is TRUE
bError Error BOOL TRUE/FALSE FALSE Function block execution error
nErrorID Error code SMC_ERROR - 0 Error identification

114
5-3-2-11. CAM tappet control [SMC_CamRegister]

(1) Instruction overview


Realize cam tappet control (cam switch). During cam editing, master-slave axis curve no need to be edited. Tappet
control can be realized through this function block by configuring tappet table.
Instruction Name Graphic representation ST representation

Cam tappet
SMC_CamRegister
control

(2) Related variables


VAR_IN_OUT Name Data type Efficient range Initial Description
value
Master Master axis AXIS_REF - - Map to the master axis
Map to an electronic cam which is an
CamTable Cam table MC_CAM_REF - -
instance of electronic cam
ARRAY
[1..MAX_NUM
bTappet Tappet output - - Tappet point output
_TAPPETS]OF
BOOL
Name Data type Efficient range Initial Description
VAR_INPUT
value
Enable Execution BOOL TRUE/FALSE FALSE Execute the current command is TRUE
Master axis
MasterOffset LREAL - 0 Offset on the master table
offset
Master axis
MasterScaling LREAL - 1 Scale factor of master configuration file
scale
Lag size of
TappetHysteresis LREAL - - Lag size of tappet
tappet
Dead time compensation in seconds. The
DeadTimeCompen Dead time
LREAL - 0 expected master axis position will be
sation compensation
calculated by linear extrapolation
Name Data type Efficient range Initial Description
VAR_OUTPUT
value
TRUE when the function block execution
Busy In execution BOOL TRUE/FALSE FALSE
has not ended
Error Error BOOL TRUE/FALSE FALSE Function block execution error
ErrorID Error code SMC_ERROR - 0 Error identification

115
VAR_IN_OUT Name Data type Efficient range Initial Description
value
Curve period TRUE if the master axis position is greater
EndOfProfile BOOL TRUE/FALSE FALSE
completed than or equal to the set cycle

5-3-2-12. Obtain cam slave axis position [SMC_GetCamSlaveSetPosition]

(1) Instruction overview


Read the position, speed, acceleration of the cam table slave axis.
Instruction Name Graphic representation ST representation

Obtain
SMC_GetCamSlaveSet cam slave
Position axis
position

(2) Related variables


VAR_IN_OUT Name Data type Efficient range Initial Description
value
Master Master axis AXIS_REF - - Map to the master axis
Slave Slave axis AXIS_REF - - Map to the slave axis
Name Data type Efficient range Initial Description
VAR_INPUT
value
Execute the current command at the rising
Execute Valid BOOL TRUE/FALSE FALSE
edge of the signal
Master axis
MasterOffset LREAL - 0 offset on the master table
offset
Slave axis
SlaveOffset LREAL - 0 offset on the slave table
offset
Master axis Scale factor of the master configuration
MasterScaling LREAL - 1
scale file
Slave axis
SlaveScaling LREAL - 1 Scale factor of the slave configuration file
scale
Define the use of cam table, use together
CamTableID Cam table MC_CAM_ID - - with the output point CamTableI of
MC_CamTable Select
Name Data type Efficient range Initial Description
VAR_OUTPUT
value
fStartPosition Slave axis LREAL - 0 Slave axis position obtained from cam

116
VAR_IN_OUT Name Data type Efficient range Initial Description
value
position table and current master axis information
Slave axis Slave axis speed obtained from cam table
fStartVelocity LREAL - 0
speed and current master axis information
Slave axis Slave axis acceleration obtained from cam
fStartAcceleration LREAL - 0
acceleration table and current master axis information
TRUE when the function block execution
Busy In execution BOOL TRUE/FALSE FALSE
has not ended
Error Error BOOL TRUE/FALSE FALSE Function block execution error
ErrorID Error code SMC_ERROR - 0 Error identification

5-3-2-13. Obtain tappet output value [SMC_GetTappetValue]

(1) Instruction overview


Read the current tappet status, need to use together with MC_CamIn.
Instruction Name Graphic representation ST representation

Obtain tappet
SMC_GetTappetValue
output value

(2) Related variables


VAR_IN_OUT Name Data type Efficient range Initial Description
value
Tappet Tappet SMC_Tappet Data - - Map to a tappet
Name Data type Efficient range Initial Description
VAR_INPUT
value
Tappet
iID INT Positive, 0 0 Tappet group ID
group ID
Initial Initial value of tappet to be assigned at
bInitValue BOOL TRUE/FALSE FALSE
value the first calling
If TRUE, the output value of the tappet
will be set to the initial value when the
Tappet CamIn function block is restarted.
bSetInitValueAtReset BOOL TRUE/FALSE FALSE
reset If FALSE, the tappet value will be
maintained when the CamIn function
block is restarted
Name Data type Efficient range Initial Description
VAR_OUTPUT
value
Tappet
bTappet BOOL TRUE/FALSE FALSE Tappet value
value

117
5-3-2-14. Read the cam table [SMC_ReadCAM]

(1) Instruction overview


Instruction Name Graphic representation ST representation

Read the
SMC_ReadCAM
cam table

(2) Related variables


VAR_INPUT Name Data type Efficient range Initial Description
value
bExecute Execution BOOL TRUE/FALSE FALSE Execute the function block at the rising edge
The name of the file that contains the cam
sFileName File name STRING(255) - -
description that defines the ASCII format
VAR_OUTP Name Data type Efficient range Initial Description
UT value
bDone Completed BOOL TRUE/FALSE FALSE TRUE when the Cam is read
In TRUE when the function block execution has not
bBusy BOOL TRUE/FALSE FALSE
execution ended
bError Error BOOL TRUE/FALSE FALSE Function block execution error
nErrorID Error code SMC_ERROR - 0 Error identification
STRUCT(nEle
CAM - MC_CAM_REF ments := 0, - -
nTappets := 0)

118
5-3-2-15. Change the cam table [SMC_WriteCAM]

(1) Instruction overview


Used to store the cam table created in the cam editor to a file at run time.
Instruction Name Graphic representation ST representation

Change the
SMC_WriteCAM
cam table

(2) Related variables


Name Data type Efficient range Initial Description
VAR_IN_OUT
value
CAM Cam MC_CAM_REF - - Map to the cam
Name Data type Efficient range Initial Description
VAR_INPUT
value
Execute the function block at the rising
bExecute Execution BOOL TRUE/FALSE FALSE
edge
The name of the file that contains the
sFileName File name STRING(255) cam description that defines the ASCII
format
VAR_OUTPU Name Data type Efficient range Initial Description
T value
bDone Completed BOOL TRUE/FALSE FALSE TRUE if cam write to file is complete
In TRUE when the function block
bBusy BOOL TRUE/FALSE FALSE
execution execution has not ended
bError Error BOOL TRUE/FALSE FALSE Function block execution error
nErrorID Error code SMC_ERROR - 0 Error identification

119
5-3-3. CAM function application
Example 1:
The electronic cam is used to realize the master axis running speed mode. The speed is 15 pulse/s, the acceleration
is 100 pulse/s2, and the direction is positive. The slave station operates according to cam table.
Program operation:
(1) right click [application] in the project bar, select the [add object]—[cam table], name as Cam and open.
Add the cam parameters as the following diagram.

(2) Add enable module MC_Power in the main program POU_1, master axis speed module
MC_MoveVelocity, calling cam module MC_CamTableSelect, configure cam module MC_CamIn,
unbinding cam module MC_CamOut.

120
Note:
If the slave axis is in motion during the execution of Camout, the slave axis will continue to run at the original
speed after the command is executed. It can stop through MC_ Stop, MC_ Halt command.

Example 2:

The master axis running speed mode is realized by using the electronic gear. The speed is 15 pulse/s, the
acceleration is 100 pulse/s2, and the direction is positive. The slave station moves according to the electronic gear
ratio of 2. Then the speed of the slave station is 30 pulse/s.

121
122
6. Q&A
When running or debugging PLC, users may encounter some difficult problems due to lack of experience. This
part mainly aims at the problems that users are most likely to encounter, and puts forward solutions for users'
reference.

Q1: When the user newly installs the Codesys software and opens it for compilation, there will be many reasons
for error reporting.
A1: Generally, it is caused by the missing library. Double click the library manager - click download missing
Libraries... And wait for the missing library to be downloaded.

Q2: Why the gateway displays red dots?


A2:
The gateway service may be shut down by an unknown force. You can open the service "Codesys gateway V3" in
task management or restart the computer.

Q3: Reasons for warning prompt after adding multiple EtherCAT slave stations?
A3:
Because the servo station number is repeated, it will not affect the use. If you want to clear the warning and
double blue underline, scan the servo again, and then modify the repeated station number.

Q4: The reason why the communication will be cut off once the EtherCAT axis is running?
A4:
The EtherCAT related POU must be placed under the EtherCAT task. It has a position synchronization cycle.

Q5: How to cancel password login?


A5:
(1) Click [chang communicaton Policy] in [device] of scanning device interface, change to [Optional User
Management] for the [New Policy] in the [Device User Management].
(2) Select [Device], right click and select [Reset Origin Device[Device]].
After this operation, it no needs password when login.
If user needs password when login, please click [chang communicaton Policy] in [device], change to [Enforced
User Management] for the [New Policy] in the [Device User Management].
WUXI XINJE ELECTRIC CO., LTD.

No.816, Jianzhu West Road, Binhu District,

Wuxi City, Jiangsu Province, China

214072

Tel: 400-885-0136

Fax: (510) 85111290

www.xinje.com

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy