Page tree
Skip to end of metadata
Go to start of metadata

Controlling the Power Drive System 

State Machine 

The drive state machine is controlled by the Controlword (0x6040) and the status is viewed by the Statusword (0x6041). The state machine can be operated as shown below

There are a few things to note when using the state machine

  • When the mode of operation is set to any CiA402 mode the state machine automatically  transitions to "Ready to switch on".
  • When the transitioning out of "Fault" the state machine automatically transitions to "Ready to switch on".
  • Section A
    • no torque is present on the motor in Section A regardless of if motor power is present
  • Section B
    • motor power must be present to transition to "Switched on".
    • If motor power is switched off or not present a fault will occur.
    • no torque is present on the motor in Section B.
  • Section C
    • If motor power is switched off or not present a fault will occur.
    • Torque is present on the motor in Section C.
    • It is possible for the master to transition straight to "Operation enabled".
  • See the Controlword description for additional information on state transitions 1-15.

Controlword (0x6040) 

The Controlword is used to transition between and set the required states in the state machine. 

The Controlword bits are defined as follows:

BitNameAbbreviation
0Switch onSO
1Enable voltageEV
2Quick stopQS
3Enable operationEO
4-6Operation mode specificOMS
7Fault resetF
8HaltH
9Operation mode specificOMS
10ReservedR
11-15Manufacturer specificMS
  • The drive does not support the Quick stop bit and shall be ignored if set to 0.


The following bits are required when transitioning between states:

TransitionValue (h)

BITS

0
(SO)
1
(EV)
2
(QS)
3
(EO)
4-6
(OMS)
7
(F)
8-15
15Fault → Ready to switch on0x860110xxx1xxxxxxxx

8/9/0

Non fault → Ready to switch on

0x06

0

1

1

0

xxx

0

xxxxxxxx

3/5→ Switched on(1)0x071110xxx0xxxxxxxx
4/4a→ Operation enabled

0x0F/0x1F

1111xxx0xxxxxxxx

(1) The switched on state is often bypassed by the master.

Statusword (0x6041) 

The statusword has the following defined bits

1514131211109876543210
msomsilatrrmmswsodqsvefoesortso

Definitions

  • ms = manufacture specific
  • oms = operation mode specific
  • ila = internal limit active
  • tr = target reached
  • rm = remote
  • w = warning
  • sod = switch on disabled
  • qs = quick stop
  • ve = voltage enabled
  • f = fault
  • oe = operation enabled
  • so = switched on
  • rtso = ready to switch on

FSA States

The Statusword indicates the current state of the drive state machine. The following table outlines the Statusword bits and the represented state

StateStatusword BitsFunctional Meaning
Not ready to switch onxxxx xxxx x0xx 0000No CiA mode of operation selected
Switch on disabled(1)xxxx xxxx x100 0000No motor torque - drive disabled
Ready to switch onxxxx xxxx x01x 0001No motor torque - drive disabled
Switched onxxxx xxxx x01x 0011No motor toque - drive disabled
Operation Enabledxxxx xxxx x01x 0111Motor has torque - drive enabled
Fault reaction active(1)xxxx xxxx x0xx 1111Motor is losing torque - drive disabling
Faultxxxx xxxx x0xx 1000No motor torque - drive disabled
Quick stop active(2)xxxx xxxx x00x 0111Not implemented

(1) these states are automatically transitioned through
(2) quick stop active is not currently implemented

Voltage Enabled - Bit4

The CM1-E has separate control and motor power. The 24V motor power status can be read through bit 4 on the statusword.

  • bit4=1 - 24V motor drive power is detected. 
  • bit4=0 -   motor drive power is not detected. 

The voltage DC value is also available on object 0x6079 (DC link voltage).

Modes of Operation 

CiA402 defines modes of operation. This allows the user to use the drive in a mode that is most suited to the application.

Modes of operation object list

IndexNameFunction
0x6060Modes of operationWrite the required mode of operation
0x6061Modes of operation displayRead the current mode of operation set on the drive


The following modes of operation are available on the drive

Mode of operationAbbreviation0x6060 value
Profile Position modePP mode1
Profile Velocity modePV mode3
Homing ModeHM mode6
Cyclic Synchronous Position modeCSP mode8
Cyclic Synchronous Velocity modeCSV mode9


Switching between modes 

The drive is designed for dynamic switching between modes of operation. The "Modes of operation" and "Modes of operation display" are available in the RxPDO and TxPDO respectively. This allows the user to switch modes of operation without changing the ESM out of Operational. It is recommended the motor is put into a safe known state before switching modes. The master should send PDO data to the current mode of operation and the desired mode while switching modes. This should be continued until the "Modes of operation display" indicates the new mode has been set.

Profile Position Mode 

Profile position mode provides an effective way to run the motor in position mode with very little overhead on the Ethercat master. The EtherCAT master sets the required acceleration, velocity and position before issuing the run command/bit. Single set-point is implemented which means the master can change the target position, speed and acceleration at any point by updating the values and issuing a new run bit. If the drive is required to continuously update position it is recommended that CSP mode is used instead. The Profile mode PDO mapping or the Dynamic Switching of Modes PDO mapping should be selected to effectively run Profile Position mode. See PDO Mappings for more information.

The following objects are used in Profile Position mode

Object

Name

Value

Unit

Description

PDO Mapped
0x6040Controlword--See Controlword for general usage.Yes
0x6041Statusword--See Statusword for general usage.Yes
0x6060Modes of operation1-Sets the mode to Profile Position modeYes
0x607ATarget Position-232 to +231pulsesSets the target position.Yes
0x6081Profile velocitySee Peak Speedspulses/sSets the target velocity of the profile.Yes
0x6083Profile acceleration(1)0 - 32767pulses/s2Sets the profile acceleration. The deceleration uses the same value.

Yes

(1) The acceleration used internally in the drive has a unit of 1000 pulses/s2. As such the value is 0x6083 is rounded to the nearest 1000. If the value is less than 1000 the value of 1000 used.

Use of Controlword and Statusword

The Controlword and Statusword use some additional mode specific bits in Profile Position mode.

Controlword

The following tables show the controlword usage.'

15-109876543-0
See ControlwordChange on set-pointHaltSee Controlwordabs/relChange set immediatelyNew set-pointSee Controlword
BitNameValueDefinition
4New set-point0 → 1Next positioning shall be started immediately.
5Change set immediately1 - N/ABit 5 will always be considered a 1 and will be ignored. Change set immediately is always executed
6abs/relN/AAbsolute positioning is always executed. This bit shall be ignored
8Halt0Positioning shall be executed or continued
1The axis shall be stopped using the deceleration value in 0x6083
9Change on set-pointN/ASingle set point mode is always executed. Bit9 is ignored.


Statusword

The following tables show the statusword usage.

1514131211109-0
See StatuswordFollowing ErrorSet-point ackowledgeSee StatuswordTarget reachedSee Statusword
BitValueDefinition
100

Halt (Bit 8 in controlword) = 0: Target position not reached
Halt (Bit 8 in controlword) = 1: Axis decelerating

1

Halt (Bit 8 in controlword) = 0: Target position reached
Halt (Bit 8 in controlword) = 1: Velocity of axis is 0

120Waiting for new setpoint
1Set point has been processed.
130No following error. The drive is able to follow the commanded trajectory
1Following error. The drive cannot follow the commanded trajectory.

Single set-point handshaking procedure

Use of acceleration and deceleration value

The deceleration value is always set to the acceleration value. 

The acceleration used internally in the drive has a unit of 1000 pulses/s2. As such the value is 0x6083 is rounded to the nearest 1000. If the value is less than 1000 the value of 1000 used.

Profile Velocity Mode 

Profile Velocity mode provides an effective way to run the motor in velocity mode with very little overhead on the Ethercat master. The EtherCAT master sets the required acceleration, deceleration and then issues the target velocity. The drive will ramp up to the target velocity.

The following objects are used in Velocity Profile mode

Object

Name

Value

Unit

Description

PDO Mapped
0x6040Controlword--See Controlword for general usage.Yes
0x6041Statusword--See Statusword for general usage.Yes
0x6060Modes of operation3-Sets the mode to Profile Velocity modeYes
0x60FFTarget speedSee Peak Speedspulses/sSets the target speedYes
0x6083Profile Acceleration0-32767Kpulses/s2Profile AccelerationNo
0x6084Profile Deceleration0-32767Kpulses/s2Profile DecelerationNo

Use of Controlword and Statusword

The Controlword and Statusword use some additional mode specific bits in Profile velocity mode.

The Controlword Bit8 is used a s a Halt bit.

BitValueDefinition
80The motion shall be executed or continued
1The axis shall be stopped using the deceleration value in 0x6084


The Statusword implements 2 additional bits to indicate if the target velocity is reached and/or is the current velocity is 0.

BitValueDefinition
100

Halt (Bit 8 in controlword) = 0: Target not reached
Halt (Bit 8 in controlword) = 1: Axis decelerating

1

Halt (Bit 8 in controlword) = 0: Target reached
Halt (Bit 8 in controlword) = 1: Velocity of axis is 0

120Speed is not equal to 0
1Speed is equal to 0

Use of acceleration and deceleration value

The deceleration value is only used when the target velocity is set to 0 or the halt bit is set. For all other changes in velocity the acceleration value is used.

Homing Mode 

Homing mode can be used to utilize the drives embedded homing routines. These routines allow accurate homing to be achieved without the delays communicating to the controller. The standard Cool Muscle home routines are accessible through the homing modes object. Homing mode does not require any specialized PDO mappings and can be used with any of the standard mappings. See PDO Mappings for more information.

The following objects are used in Profile Position mode

Object

Name

Value

Unit

Description

PDO Mapped
0x6040Controlword--See Controlword for general usage.Yes
0x6041Statusword--See Statusword for general usage.Yes
0x6060Modes of operation6-Sets the mode to Homing modeYes
0x607CHome Offset-3276700 to +3276700

encoder pulses

(50 000 per motor revolution)

Once a home sensor or hardstop has been achieved the motor will move the distance of the offset. The final position will be set to 0.

This value is written to an internal motor register which has a resolution of 100 pulses.
As such the value written into 0x607C will be rounded to the nearest 100 internally.

No
0x6098Homing Method0 to -6-
  • 0: No home routine selected
  • -1: Hardstop CW
  • -2: Hardstop CCW
  • -3: Input 2 sensor CW
  • -4: Input 2 sensor CCW
  • -5: Input 3 sensor CW
  • -6: Input 3 sensor CCW

See Homing Methods for additional information

No
0x6099:01Homing Speed1000 - 500000pulses/sThe homing speed is written to an internal register which has a unit of 100 pulses/s.
The value written into 0x6099 will be rounded to the closest 100.

No

0x609AHoming Acceleration1000-5000000pulse/s2The homing acceleration is written to an internal register which has a unit of 1000 pulses/s.
The value written into 0x609A will be rounded to the closest 1000.
No
0x60F6:1BHoming Torque10-100% rated torque

Set the torque during the home routine.

  1. When homing to a hardstop this value will indicate the limit at which the hardstop is reached
  2. When homing to a switch this value will limit the torque during the home routine.
No


Homing Methods

Two distinct methods are available when executing a home routine.

  1. Hardstop detect - the motor moves towards a hardstop. When the hardstop is reached the driver reads the position of the magnetic encoder. It then moves back 2 teeth of the encoder gear to set the absolute position. Moving back the two teeth allows for high repeatability as fatigue and variance in the hardstop detect can be accounted for automatically.
  2. Sensor detect - the motor moves towards a home sensor. When the sensor is triggered the driver interrupt captures the motor position. The motor decelerates and moves back to the captured position.
    1. If the sensor is detect when the home routine is first initiated the motor will move off the sensor first in the opposite direction to the defined origin search direction. 

Hardstop CW - 0x6098=-1

  1. Motor runs CW towards a hardstop. 
  2. The driver monitors the motor current and detects when a hardstop has been reached. 
  3. Motor backs up CCW to the 2nd previous encoder tooth (improved repeatability) and sets the position to 0.
  4. If an offset is set the motor moves the offset distance
    1. Care should be taken not to set a +ve offset as this will move the load into the hardstop
  5. Sets the final position to 0.


Hardstop CW - 0x6098=-1

  1. Motor runs CCW towards a hardstop. 
  2. The driver monitors the motor current and detects when a hardstop has been reached. 
  3. Motor backs CW up to the 2nd previous encoder tooth (improved repeatability) and sets the position to 0.
  4. If an offset is set the motor moves the offset distance.
    1. Care should be taken not to set a -ve offset as this will drive the load into the hardstop
  5. Sets the final position to 0.

Sensor CW - 0x6098=-3 or -5

INPUT2 - 0x6098=-3

INPUT3 - 0x6098=-5

  • Diagram shown with motor connected to linear actuator.
    • CW rotation moves the load left to right
  • Sensor is connected directly on IN2 or IN3
  1. Motor runs CW waiting for sensor input
  2. Sensor rising edge triggers the input, motor captures encoder position, decelerates and reverses direction
  3. Motor stops on captured position and sets position to 0
  4. If an offset is defined the motor continues to the defined offset and sets the final target position to 0.
    1. Offset could be +ve or -ve. The above diagram shows a -ve offset

Sensor CCW - 0x6098=-4 or -6

INPUT2 - 0x6098=-4

INPUT3 - 0x6098=-6

  • Diagram shown with motor connected to linear actuator.
    • CCW rotation moves the load right to left
  • Sensor is connected directly on IN2 or IN3
  1. Motor runs CCW waiting for sensor input
  2. Sensor rising edge triggers the input, motor captures encoder position, decelerates and reverses direction
  3. Motor stops on captured position and sets position to 0
  4. If an offset is defined the motor continues to the defined offset and sets the final target position to 0.
    1. Offset could be +ve or -ve. The above diagram shows a +ve offset.

Use of Controlword and Statusword

The Controlword and Statusword use some additional mode specific bits in Homing mode.

Controlword

The following tables show the controlword usage.

15-9876-543-0
See ControlwordHaltSee Controlwordreserved (0)Homing operation StartSee Controlword
BitNameValueDefinition
4Homing operation start0 → 1Start or continue homing procedure
8Halt0Enable bit 4
1The axis shall be stopped using the deceleration value in 0x609A


Statusword

The following tables show the statusword usage.

15-14131211109-0
See StatuswordHoming ErrorHoming attainedSee StatuswordTarget reachedSee Statusword
General Definitions
BitValueDefinition
100

Homing procedure is in progress

1

The motor has reached its target position or is currently disabled via the controlword

120

Homing not attained.

  • This value will by default start at 0.
  • This value will be reset to 0 when a new home routine is started.
1

Homing attained

  • This value will be set to 1 when a home has been achieved. I.e. a hardstop has been hit or a sensor has been triggered
  • This value will be reset to 0 when a new home routine is started
  • This value will be reset to 0 if there is a home routine error or the home routine is aborted before the motor reaches target position
130No home routine error
1Home routine error
Bit Sequence
Bit 13Bit 12Bit 10Description
000Homing procedure in progress
001

Homing procedure is interrupted or not started

  • motor could be enabled or disabled depending on controlword
010Homing is attained, but target is not reached
  • Hardstop - hardstop has been detected. Offset not completed
  • Sensor - sensor has been detected. Offset not completed
011Homing procedure is completed successfully. Current position is set to 0.
  • Hardstop - hardstop has been detected. Offset completed
  • Sensor - sensor has been detected. Offset completed
100Homing error occurred, velocity is not 0
101Homing error occurred, velocity is 0
Occurs if any motor error occurs.
111An error exists but a home routine has been completed.

Cyclic Synchronous Position Mode 

Cyclic synchronous position mode is set by setting the Modes of operation to 8. CSP mode is designed to allow the master controller full control of the position target. The 0x6064 position target shall be updated every 1ms. Failure to update the position target at 1ms intervals will result in noisy and poor motion.

The following objects are used in CSP mode

Object

Value

Unit

Description

PDO Mapped
0x6040--See ControlwordYes
0x6041--See StatuswordYes
0x607A

-232 to +231

pulses

Target position

Yes
0x6064-232 to +231pulsesPosition actual valueYes
0x60608-CSP mode setYes

Use of Controlword and Statusword

No additional Controlword and Statusword bits are implemented.

Cyclic Synchronous Velocity Mode 

Cyclic synchronous velocity mode is set by setting the Modes of operation to 9. CSV mode is designed to allow the master controller full control of the instantaneous velocity target. The 0x60FF velocity target shall be updated every 1ms. Failure to update the position target at 1ms intervals will result in noisy and poor motion.

The following objects are used in CSP mode

Object

Value

Unit

Description

PDO Mapped
0x6040--See ControlwordYes
0x6041--See StatuswordYes
0x60FF

See Peak Speeds

pulses/ms

Target velocity

Yes
0x606CSee Peak Speedspulses/msVelocity actual valueYes
0x60609-CSV mode setYes

Motor maximum speeds

Part numberMax Speed RPMMax 0x606C (Target velocity)
CM1-E-17S30D3000 rpm-2,500,000 to +2,500,000
CM1-E-17L30D3000 rpm-2,500,000 to +2,500,000
CM1-E-23S30D3000 rpm-2,500,000 to +2,500,000
CM1-E-23L20D2000 rpm-1,666,667 to +1,666,667

Use of Controlword and Statusword

No additional Controlword and Statusword bits are implemented.

Motor Peak Speeds

The four supported motors have differing peak speeds. See the table below for each motors maximum speed

Model NumberRPMPulses/sPulses/ms
CM1-E-17S30D3000rpm25000002500
CM1-E-17L30D3000rpm25000002500
CM1-E-23S30D3000rpm25000002500
CM1-E-23L20D2000rpm16666661666
  • No labels