Skip to main content

Position Control (CM1)

Instruction Parameters

Supported PLC Series

XPnA/1RXPnBXPnEXPnFCP3A/B/P/U
CP4A~D/U
CPnECPnFBPPLC-S
--

Supported Positioning Modules

CM1 Series
CM1-PS02A
CM1-PS08N

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.
This requires 4 or 12 data registers.

For value ranges, refer below.
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.

Base/Slot (CM1)

Base NumberSlot Number
H0A0B
Hexadecimal2 Digits in Hexadecimal2 Digits in Hexadecimal
Base NumberSlotExample
Local BaseSlot Number 5H0005 or 5
1st ExpansionSlot Number 3H0103
10th ExpansionSlot Number 7H0A07
14th ExpansionSlot Number 12H0E0C
16th ExpansionSlot Number 10H100A

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.
1, 2, 6, or 9
Data Register or ConstantDescription
SMotion Control Axis
1: X-axis control
2: Y-axis control
S+1Control 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+2Assign a value according to the control code
Lower WORD of the DWORD S+2 and S+3
S+3Assign a value according to the control code
Upper WORD of the DWORD S+2 and S+3
10
Data Register or ConstantDescription
SMotion Control Axis
1: X-axis control
2: Y-axis control
S+1Control Code
10: Indirect positioning data
S+2Positioning Data
Refer to this table
S+3M 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+4Dwell Time (0 ~ 65,535)
S+5Reserved
S+6Operation Speed
Lower WORD of the DWORD S+6 and S+7
S+7Operation Speed
Upper WORD of the DWORD S+6 and S+7
S+8Destination Address or Movement Amount
Lower WORD of the DWORD S+8 and S+9
S+9Destination Address or Movement Amount
Upper WORD of the DWORD S+8 and S+9
S+10Circular Interpolation
Lower WORD of the DWORD S+10 and S+11
S+11Circular 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)
BitBit 0 ~ 1Bit 2 ~ 3Bit 4 ~ 5Bit 6 ~ 7Bit 8 ~ 15
ItemControl TypeInterpolation AxesAcceleration NumberDeceleration NumberControl Instructions

D Data Register Result

Result TypeBitsDescription
Error CodeH00No error
Error CodeH01Command not found
Error CodeH10Incorrect positioning control data
Error CodeH80Axis error
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 POSCTRL instruction be used with a pulse contact as an execution condition.

Examples