Teach Positioning Data
Instruction Parameters
Supported PLC Series
| XPnA/1R | XPnB | XPnE | XPnF | CP3A/B/P/U CP4A~D/U | CPnE | CPnF | BP | PLC-S |
|---|---|---|---|---|---|---|---|---|
| ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | - | ✓ |
Supported Positioning Modules
| CM1 Series | CM3 Series |
|---|---|
| CM1-PS02A | CM3-SP16MDTF CM3-SP16MDCF |
| CM3-SP32MDTF-SD CM3-SP32MDCF-SD | |
| CM3-SP02POS |
Unsupported Module
The CM1-PS08N model does NOT support the TEACH1 and TEACH2 instructions.
Supported Data Registers
| M | X | Y | K | L | F | T | C | S | Z | R | Q | D | @D | Constant | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Base/Slot | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | - | ✓ | - | ✓ | ✓ | ✓ | ✓ |
| S | ✓ | ✓ | ✓ | ✓ | ✓ | - | - | - | - | ✓ | - | ✓ | ✓ | ✓ | ✓ |
| D | ✓ | - | ✓ | ✓ | ✓ | - | - | - | - | ✓ | - | ✓ | ✓ | ✓ | - |
Supported Flags
| Flag | Bit | Support |
|---|---|---|
| Error | F11.0 | ✓ |
| Zero | F11.1 | - |
| Carry | F11.2 | - |
Number of Steps
| Steps |
|---|
| 4 |
Operands
| Operand | Description |
|---|---|
| Base/Slot | The 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. |
| S | The second operand. Entries are WORD data registers or constants. This is where the control data is stored. The value range is 0 ~ 2. |
| D | The 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.
Base/Slot (CM1)
| Base Number | Slot Number | |
|---|---|---|
| H | 0A | 0B |
| Hexadecimal | 2 Digits in Hexadecimal | 2 Digits in Hexadecimal |
| Base Number | Slot | Example |
|---|---|---|
| Local Base | Slot Number 5 | H0005 or 5 |
| 1st Expansion | Slot Number 3 | H0103 |
| 10th Expansion | Slot Number 7 | H0A07 |
| 14th Expansion | Slot Number 12 | H0E0C |
| 16th Expansion | Slot Number 10 | H100A |
IMPORTANT: Base Number and Slot Number have specific parameters:
- Base Number and Slot Number could be different according to the PLC CPU and base type.
- Base Number:
- Local base: H00
- Expansion range: H01 ~ H10
- Slot Number:
- Range: H00 ~ H0B
Module/Slot (CM3)
| Module | Slot | Example |
|---|---|---|
| CPU | Slot 0 | H0000 or 0 |
| 1st Expansion | Slot 1 | H0001 or 1 |
| 5th Expansion | Slot 5 | H0005 or 5 |
| 10th Expansion | Slot 10 | H000A |
| 15th Expansion | Slot 15 | H000F |
PLC-S Mini Modular CPU
If the CPU module is a PLC-S Mini Modular CPU, assign H0000 to Base/Slot.
S
| Data Register | Description |
|---|---|
| S | Select 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: CM1 or CM3 - CM1: 1,000,000pps (pulses per second) - CM3: 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 ~ 11 | Bit 12 ~ 15 |
|---|---|
| Positioning Data Number CM1: 1 ~ 600 (H001 ~ H258) CM3: 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 Type | Bits | Description |
|---|---|---|
| Error Code | H00 | No error |
| Error Code | H01 | Writing parameters and positioning data to flash memory failed |
| Error Code | H02 | Writing positioning data to the flash memory failed |
| Error Code | H03 | Writing parameters to the flash memory failed |
| Error Code | H04 | Instruction operated more than 25 times after executing |
| Error Code | H10 | Incorrect parameter |
| Error Code | HFF | Instruction not supported |
| Operation Status | Bit 0 | 1 when the instruction executes |
| Operation Status | Bit 1 | 1 when instruction execution finishes |
| Operation Status | Bit 2 | 1 when an error occurs Simultaneously sets with Bit 1 |
| Operation Status | Bit 3 ~ 7 | Reserved |
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.