Skip to main content
Skip table of contents

Direct Control

Introduction

All the protocols can use the Direct Control method. Using Direct Control allows the user to directly control the motors position, torque and speed. All values can be updated dynamically which allows for very flexible operation. Not only does Direct Control allow you to control the motor but the read registers give a full array of motor information for program use and diagnostics. Direct Control can be executed in motor logic or standard serial communication by writing to specific CML registers. The documentation below describes how to use Direct Control. For additional details on each of the protocols please see their specific sections

Though all the protocols utilize the same set of variables they can work concurrently. If multiple protocols are to be used concurrently then the user should be aware of how the write operations function:

  • EtherNet/IP - Cyclical (1ms)

  • Modbus-TCP - On write

  • TCP/UDP - On write

As can be seen  above, if EtherNet/IP is used it will overwrite any of the other protocols in a write operation. The other protocols can still be used for read operations and diagnostics.

IEC 61131-3 Library

The CM1-T library can be use in all IEC 61131-3 development environments such as Codesys, Schneider's Machine Expert, WAGO’s e!COCKPIT, Beckhoff's TwinCAT and more.

The CM1-T Library can be used with the following protocols

  • EtherNet/IP

  • Modbus/TCP

  • TCP/IP

  • UDP

Read Registers

Register

Description

CPUTime

CPU clock time in 50us counts

ActualPosition

The actual position of the motor in encoder counts

ActualTargetPosition

The actual instantaneous position the motor is currently moving to.

MotorStatus

The motors status (error, homing, in position, etc)

ActualRatedCurrent

Percentage (0.1%) of rated current. 1000 = rated, 1100 = peak.

ActualOverloadTorque

Percentage (0.1%) of overload torque.

AnalogIN

10 bit analog input value (0-1023)

DigitalIO

Digital IO status.

  • B3-B0 = IN4-IN1

  • B5-B4 = OUT2 - OUT1

Temperature

Drive temperature in ºC

DCVoltage

24V DC bus voltage in 0.1V

DigitalOUT

Digital OUT status. B0-B1 = OUT1-OUT2

ModeOfOperationDisplay

Indicates the mode of operation currently set

ActualSpeed

Actual speed of the motor in encoder counts/s

Write Registers

Register

Description

TargetPosition

Final target position

TargetSpeed

Maximum speed

TargetTorque

Maximum torque

TargetAcceleration

Acceleration (used when accelerating to target speed)

TargetDeceleration

Deceleration  (used when stopping)

Controlword

Control the motor operation

ModeOfOperation

Set the required mode of operation

DigitalOUT

Set the 2 digital outputs. Requires K34=44.

Setting Mode Of Operation  

There are a number of modes of operation the motor can be set to.

  1. Standard operation - this is the standard and default operation mode. If no mode is selected, this is the mode the motor Cool Muscle operates in. This is not a Direct Control mode. See Motor Operation.

  2. Direct Control Modes

    1. Profile mode - run position or speed profiles.

    2. Torque mode - run the motor by adjusting the torque and maximum speed values.

    3. Dynamic Position mode - this mode allows you to stream new target positions. Though useful in certain applications it is recommended to use EtherCAT or Contours if custom non-linear motion profiles are required.

The control registers in the mode selected use either standard CML registers or registers set directly such as through Modbus-TCP. The mode of operation selected indicates where the control registers will be received

The following table lists the mode of operation and the associated registers

Mode of Operation

Value

Description

Standard Operation

0

Standard CML operation. Direct Control not initiated. No control registers associated. See Motor Operation.

Profile Mode

2

Profile mode using P1, S1, A1, A2, R1 and N1

3

Profile mode using

  • Modbus control registers (see registers starting 41029).

  • EtherNet/IP IO messaging

  • TCP/UDP port 10002

Dynamic Position Mode

4

Dynamic position mode using P1, A1, R1 and N1

5

Dynamic position mode using

  • Modbus control registers (see registers starting 41029).

  • EtherNet/IP IO messaging

  • TCP/UDP port 10002

Torque Mode

10

Torque mode using N1, S1 and R1

11

Torque mode using

  • Modbus control registers (see registers starting 41029).

  • EtherNet/IP IO messaging

  • TCP/UDP port 10002

  • Bit0 of the mode of operation selects the register source. I.e. P1 to N1 or the direct control registers.

Set the mode of operation by the following

  1. CML

    1. Send "_mop=x" on the CML port when x is the value of the mode of operation

    2. Assign a variable to "mop" and write the variable in a logic bank. E.g. V0="mop".

  2. Direct

    1. Set modbus register 41041 to the value of the required mode of operation.

    2. Set Byte[16] in EtherNet/IP

    3. Set Byte[16] in TCP/UDP Port 10002

Registers

The following registers are used in the different Direct Control modes of operation.

Controlword 

The Controlword is used to control the motor. The usage does depend on the mode that is selected. See the mode for bit usage. B4-B7 are common to all modes.

Register Name

Profile
Mode = 2

Profile Mode = 3

Unit

Description

CML Registers

Modbus Registers

TCP/UPD Bytes

Ethernet/IP O2T Bytes

Controlword

R1

41039

14-15

14-15

N/A

See below

Bit Descriptions:

BIT

Name

Value

Description

B0

Operation mode specific

B1

Operation mode specific

B2

Operation mode specific

B3

Operation mode specific

B4

Disable

0
1
1 → 0

Enable the motor
Disable the motor
Reset any error

B5

Reset Error

0 → 1

Reset any error

B6

Set to Zero

0 → 1

Set the current position to 0

B7

Home

0 → 1

Start a home search(1)

(1) Set the home search parameters with K parameters K42-K48

Statusword

The Statusword returns information on the status of the motor. 

Register Name

Profile Mode = 2

Profile Mode = 3

Unit

Description

CML Registers

Modbus Registers

TCP/UPD Bytes

Ethernet/IP O2T Bytes

Statusword

Query ?99

40009

16-17

16-17

N/A

See below

Bit Descriptions:

BIT

Name

B0

Position overflow alarm

B1

Overspeed alarm

B2

Overload alarm

B3

Inposition

B4

Disable

B5

Pushmode limit

B6

Communication error alarm

B7

Over temperature alarm

B8

Pushmode Timeout warning

B9

E-Stop active

B10

N/A

B11

N/A

B12

N/A

B13

N/A

B14

New start required

B15

Home achieved

TargetPosition

The TargetPosition sets a new target position for the motor.

Register Name

Profile Mode = 2

Profile Mode = 3

Unit

Range

CML Registers

Modbus Registers

TCP/UPD Bytes

Ethernet/IP O2T Bytes

TargetPosition

P1

41029

0-3

0-3

pulses (counts)

-2^31 to +2^31

The motor has a maximum resolution of 50,000 counts per revolution. Regardless of the resolution defined in K37 the motor internally will convert the target position to a position based on 50,000. As such the maximum range depends on the motor resolution. For example if K37=3 and the resolution is 1000 pulses/revolution, the maximum target position is 2^31 ÷ (50,000/1,000) = 2^31 ÷ 50  = 42,949,672.

TargetSpeed

The TargetSpeed sets a new maximum speed.

Register Name

Profile Mode = 2

Profile Mode = 3

Unit

Range

CML Registers

Modbus Registers

TCP/UPD Bytes

Ethernet/IP O2T Bytes

TargetSpeed

S1

41031

4-7

4-7

pulses/second
10 pulses/second
100 pulses/second

-2^31 to +2^31

The unit depends on the motor resolution (K37) value selected. See K37 for more details.

TargetTorque

The TargetTorque sets the maximum torque used by the motor.

Register Name

Profile Mode = 2

Profile Mode = 3

Unit

Range

CML Registers

Modbus Registers

TCP/UPD Bytes

Ethernet/IP O2T Bytes

TargetTorque

N1

41033

8-9

8-9

0.1% rated torque

0-1100
(±1100 in Torque mode)

The torque is set in a percentage of rated torque. The Cool Muscle will only use the torque required so typically this value should be set to 1100 unless the application requires that the torque is limited.

TargetAcceleration

The TargetAcceleration sets the acceleration used by the motion profile.

Register Name

Profile Mode = 2

Profile Mode = 3

Unit

Range

CML Registers

Modbus Registers

TCP/UPD Bytes

Ethernet/IP IO Bytes

TargetAcceleration

A1

41035

10-11

10-11

Kpulses/second2

± 32767

If the TargetAcceleration=0 the profile shall be undefined and may result in an unexpected motion profile.

TargetDeceleration

Register Name

Profile Mode = 2

Profile Mode = 3

Unit

Range

CML Registers

Modbus Registers

TCP/UPD Bytes

Ethernet/IP O2T Bytes

TargetDeceleration

A2

41037

12-13

12-13

Kpulses/s2

± 32767

If the TargetDeceleration=0 the TargetAcceleration shall be used. This allows the user to only change the acceleration if a trapezoid type profile is required.

Modes of Operation

Standard Operation

If no direct control mode is set the Cool Muscle motor operates using its standard internal logic and programming. Details on direct mode and program mode can be found in the CM1-C motor operation.

Profile Mode (Position and Speed)

Profile mode would be a typical mode used in point-to-point motion and/or continuous velocity motion. The following registers are used depending on the profile mode selected.

Torque Mode

Torque mode would be used where there is no target position but the motor is required to continuously hold or move at a required maximum torque. In this mode the toque set is a maximum torque and the torque will only be reached if required.

Dynamic Position Mode

This mode can be used to dynamically stream a target position only and have the motor track it. There is a filter that filters the responsiveness of the position change as no speed or acceleration is defined. For best performance try used a fixed time interval on the position update. 

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.