Skip to main content

Position Control (CM3)

Instruction Parameters

Supported PLC Series

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

Supported Positioning Modules

CM3 Series
CM3-SP16MDTF
CM3-SP16MDCF
CM3-SP32MDTF-SD
CM3-SP32MDCF-SD
CM3-SP02POS

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, 5, or 10 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.

Module/Slot (CM3)

Base NumberSlot Number
H0A0B
Hexadecimal2 Digits in Hexadecimal2 Digits in Hexadecimal
ModuleSlotExample
CPUSlot 0H0000 or 0
1st ExpansionSlot 1H0001 or 1
5th ExpansionSlot 5H0005 or 5
10th ExpansionSlot 10H000A
15th ExpansionSlot 15H000F
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.
1, 2, 3, or 6
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
3: Inching operation
6: Change target address
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
7
Data Register or ConstantDescription
SMotion Control Axis
1: X-axis control
2: Y-axis control
S+1Control Code
7: Change Parameters (WORD)
S+2Parameter Offset
Refer to this table
S+3Assign a value according to the parameter offset (WORD)
8
Data Register or ConstantDescription
SMotion Control Axis
1: X-axis control
2: Y-axis control
S+1Control Code
8: Change Parameters (DWORD)
S+2Parameter Offset
Refer to this table
S+3Assign a value according to the parameter offset
*Lower WORD of the DWORD S+3 and S+4
S+4Assign a value according to the parameter offset
*Upper WORD of the DWORD S+3 and S+4
10
Data Register or ConstantDescription
SMotion Control Axis
1: X-axis control
2: Y-axis control
S+1Control Code
10: Indirect positioning data
S+2Parameter Offset
Refer to this table
S+3Reserved
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+8Target Address
*Lower WORD of the DWORD S+8 and S+9
S+9Target 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
OffsetItemDescription
0Positioning DataBit 0 ~ 1: Control type
Bit 2 ~ 3: Interpolation axes
Bit 4 ~ 5: Acceleration number
Bit 6 ~ 7: Deceleration Number
Bit 8 ~ 15: Control instructions
1Reserved-
2Dwell Time0 ~ 65,535ms (milliseconds)
3Reserved-
4Operation Speed (Lower WORD)1 ~ 100,000pps (pulses per second)
5Operation Speed (Upper WORD)1 ~ 100,000pps (pulses per second)
6Target Address (Lower WORD)-2,147,483,648 ~ 2,147,483,647 (232 signed) pulse
7Target Address (Upper WORD)-2,147,483,648 ~ 2,147,483,647 (232 signed) pulse

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