Position Control (CM1)
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 |
|---|
| CM1-PS02A |
| CM1-PS08N |
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. This requires 4 or 12 data registers. For value ranges, refer below. |
| 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
S & S+1
S+1 Assignment
The position data is assigned as follows:
- The value of S+1 can be 1, 2, 6, 9, or 10. for the position data.
- If the value of S+1 is 1, 2, 6, or 9, refer to the below table.
- This requires 4 WORDs.
- If the value of S+1 is 10, refer to this table below.
- This requires 12 WORDs.
- If the value of S+1 is 1, 2, 6, or 9, refer to the below table.
1, 2, 6, or 9
| Data Register or Constant | Description |
|---|---|
| S | Motion Control Axis 1: X-axis control 2: Y-axis control |
| S+1 | Control Code 1: Change current position address 2: Change operation speed 6: Change target address 9: Error clear. Input 1 for S+2 to clear the error of the corresponding axis. |
| S+2 | Assign a value according to the control code Lower WORD of the DWORD S+2 and S+3 |
| S+3 | Assign a value according to the control code Upper WORD of the DWORD S+2 and S+3 |
10
| Data Register or Constant | Description |
|---|---|
| S | Motion Control Axis 1: X-axis control 2: Y-axis control |
| S+1 | Control Code 10: Indirect positioning data |
| S+2 | Positioning Data Refer to this table |
| S+3 | M Code (0 ~ 65,535) This is an additional function for sub operations There are 3 modes: - After Mode - With Mode - None If M code is ON, the following positioning operation is not executed. M code can be turned OFF by the PLC program. |
| S+4 | Dwell Time (0 ~ 65,535) |
| S+5 | Reserved |
| S+6 | Operation Speed Lower WORD of the DWORD S+6 and S+7 |
| S+7 | Operation Speed Upper WORD of the DWORD S+6 and S+7 |
| S+8 | Destination Address or Movement Amount Lower WORD of the DWORD S+8 and S+9 |
| S+9 | Destination Address or Movement Amount Upper WORD of the DWORD S+8 and S+9 |
| S+10 | Circular Interpolation Lower WORD of the DWORD S+10 and S+11 |
| S+11 | Circular Interpolation Upper WORD of the DWORD S+10 and S+11 |
Position Data 600
Positioning Data number 600 is for internal use. If a value is assigned to Positioning Data number 600, that value is NOT retained.
Position Data (S+1 is 10)
| Bit | Bit 0 ~ 1 | Bit 2 ~ 3 | Bit 4 ~ 5 | Bit 6 ~ 7 | Bit 8 ~ 15 |
|---|---|---|---|---|---|
| Item | Control Type | Interpolation Axes | Acceleration Number | Deceleration Number | Control Instructions |
D Data Register Result
| Result Type | Bits | Description |
|---|---|---|
| Error Code | H00 | No error |
| Error Code | H01 | Command not found |
| Error Code | H10 | Incorrect positioning control data |
| Error Code | H80 | Axis error |
| 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 POSCTRL instruction be used with a pulse contact as an execution condition.