The leader in industrial automation and control solutions

Instruction Parameters

Supported PLC Series

PLC-AESPLC-FBPLC-ES

Supported Positioning Modules

PLC Series
PLC-ES0808P
PLC-ES1616P
MOD-SPOS02

Supported Data Registers

MXYKLFTCSZRQD@DConstant
Base/Slot
S
D

Supported Flags

FlagBitSupport
ErrorF11.0
ZeroF11.1
CarryF11.2

Number of Steps

Steps
4

Operands

OperandDescription
Base/SlotThe first operand.
Entries are Hexadecimal data registers or constants.
This is the base and slot number where the positioning module is located.

This location depends on the amount of expansion modules the chassis contains.
If the CPU supports positioning, refer below.
SThe second operand.
Entries are WORD data registers or constants.
This is where the control data is stored.

The value range is 0 ~ 2.
DThe third operand.
Entries are only WORD data registers.
This is where the result of the operation status is stored.

Assignment Example

The following example shows how to assign values to Base/Slot.

Module/Slot (PLC-AES/ES)

ModuleSlotExample
CPUSlot 0H0000 or 0
1st ExpansionSlot 1H0001 or 1
5th ExpansionSlot 5H0005 or 5
10th ExpansionSlot 10H000A
15th ExpansionSlot 15H000F

PLC-AES/ES CPU

If the CPU module is a PLC-AES/ES CPU, assign H0000 to Base/Slot.

S

Data RegisterDescription
SSelect the data type to teach (0 ~ 2) and the positioning data number (1 ~ 600)
Refer to this table
S+1
S+2
Positioning data to teach
Target Address: -2,147,483,648 ~ -2,147,483,648 (232)
Operation Speed: PLC-ES
    – PLC-ES: 100,000pps (pulses per second)
Circular Interpolation Address: -2,147,483,648 ~ -2,147,483,648 (232)
Dwell Time: 0 ~ 65,535ms (milliseconds)

Teach Configuration

Bit 0 ~ 11Bit 12 ~ 15
Positioning Data Number
PLCES: 1 ~ 30 (H001 ~ H01E)
Data Type to Teach:
0: Target address
1: Operation speed
2: Circular interpolation address
3: Dwell time

D Data Register Result

Result TypeBitsDescription
Error CodeH00No error
Error CodeH01Writing parameters and positioning data to flash memory failed
Error CodeH02Writing positioning data to the flash memory failed
Error CodeH03Writing parameters to the flash memory failed
Error CodeH04Instruction operated more than 25 times after executing
Error CodeH10Incorrect parameter
Error CodeHFFInstruction not supported
Operation StatusBit 01 when the instruction executes
Operation StatusBit 11 when instruction execution finishes
Operation StatusBit 21 when an error occurs
Simultaneously sets with Bit 1
Operation StatusBit 3 ~ 7Reserved

Notice

Error Flag (F11.0) Notice

The error flag, F11.0, will be ON for one scan when the address of the data register assigned by @D exceeds the range of the data register, D. The range of the data register, D, is dependent on the CPU type.

Execution Condition

It is recommended that the TEACH1 and TEACH2 instructions be used with a pulse contact as an execution condition.

Instruction Usage

TEACH1 teaches the X axis. TEACH2 teaches the Y axis.

Ladder Diagram Examples

TEACH1

The TEACH1 instruction teaches a certain positioning data assigned to the X-axis on the positioning module Base/Slot. The control control data, S, is

The TEACH1 instruction teaches a certain positioning data assigned to the X-axis on the positioning module Base/Slot. The control control data, S, is the information taught. The operation status is saved in the assigned WORD data register, D.

When the contact, M0.0, is powered ON (1), the TEACH1 instruction teaches the positioning data to the module at H0000.

When the contact, M0.0, is powered ON (1), the TEACH1 instruction teaches the positioning data to the module at H0000. The X-axis data is taught.

The result of the teaching is saved in the data register, M200.

The result of the teaching is saved in the data register, M200.

TEACH2

The TEACH2 instruction teaches a certain positioning data assigned to the Y-axis on the positioning module Base/Slot. The control control data, S, is

The TEACH2 instruction teaches a certain positioning data assigned to the Y-axis on the positioning module Base/Slot. The control control data, S, is the information taught. The operation status is saved in the assigned WORD data register, D.

When the contact, M0.0, is powered ON (1), the TEACH1 instruction teaches the positioning data to the module at H0000.

When the contact, M0.0, is powered ON (1), the TEACH1 instruction teaches the positioning data to the module at H0000. The Y-axis data is taught.

The result of the teaching is saved in the data register, M300.

The result of the teaching is saved in the data register, M300.