Position Control (CM3)
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
| CM3 Series |
|---|
| CM3-SP16MDTF |
| CM3-SP16MDCF |
| CM3-SP32MDTF-SD |
| CM3-SP32MDCF-SD |
| CM3-SP02POS |
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, 5, or 10 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.
Module/Slot (CM3)
| Base Number | Slot Number | |
|---|---|---|
| H | 0A | 0B |
| Hexadecimal | 2 Digits in Hexadecimal | 2 Digits in Hexadecimal |
| 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 & S+1
S+1 Assignment
The position data is assigned as follows:
- The value of S+1 can be 1, 2, 3, 6, 7, 8, or 10. for the position data.
- If the value of S+1 is 1, 2, 3, or 6, refer to the below table.
- This requires 4 WORDs.
- If the value of S+1 is 7, refer to this table below.
- This requires 4 WORDs.
- If the value of S+1 is 8, refer to this table below.
- This requires 5 WORDs.
- If the value of S+1 is 10, refer to this table below.
- This requires 10 WORDs.
- If the value of S+1 is 1, 2, 3, or 6, refer to the below table.
1, 2, 3, or 6
| 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 3: Inching operation 6: Change target address |
| 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 |
7
| Data Register or Constant | Description |
|---|---|
| S | Motion Control Axis 1: X-axis control 2: Y-axis control |
| S+1 | Control Code 7: Change Parameters (WORD) |
| S+2 | Parameter Offset Refer to this table |
| S+3 | Assign a value according to the parameter offset (WORD) |
8
| Data Register or Constant | Description |
|---|---|
| S | Motion Control Axis 1: X-axis control 2: Y-axis control |
| S+1 | Control Code 8: Change Parameters (DWORD) |
| S+2 | Parameter Offset Refer to this table |
| S+3 | Assign a value according to the parameter offset *Lower WORD of the DWORD S+3 and S+4 |
| S+4 | Assign a value according to the parameter offset *Upper WORD of the DWORD S+3 and S+4 |
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 | Parameter Offset Refer to this table |
| S+3 | Reserved |
| 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 | Target Address *Lower WORD of the DWORD S+8 and S+9 |
| S+9 | Target Address *Upper WORD of the DWORD S+8 and S+9 |
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
| Offset | Item | Description |
|---|---|---|
| 0 | Positioning Data | Bit 0 ~ 1: Control type Bit 2 ~ 3: Interpolation axes Bit 4 ~ 5: Acceleration number Bit 6 ~ 7: Deceleration Number Bit 8 ~ 15: Control instructions |
| 1 | Reserved | - |
| 2 | Dwell Time | 0 ~ 65,535ms (milliseconds) |
| 3 | Reserved | - |
| 4 | Operation Speed (Lower WORD) | 1 ~ 100,000pps (pulses per second) |
| 5 | Operation Speed (Upper WORD) | 1 ~ 100,000pps (pulses per second) |
| 6 | Target Address (Lower WORD) | -2,147,483,648 ~ 2,147,483,647 (232 signed) pulse |
| 7 | Target Address (Upper WORD) | -2,147,483,648 ~ 2,147,483,647 (232 signed) pulse |
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.