You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 26 Next »

Tables of Contents

Introduction

This section explains how to use the CM1-T Cool Muscle motor with EtherNet/IP. It is assumed there is a basic knowledge of EtherNet/IP and PLC programming. The implementation makes use of the different Modes Of Operation in the motor. It does not use CML logic and bank programming. However, setup (K) and controller gain (H) parameters are used for things like motor resolution, s-curve, software limits, etc. These are all accessible to be setup with Control Room or over explicit messages.

Device Profile

The CM1-T uses a generic device profile. This is to allow it to be flexible and operate in a number of control modes.

I/O Messages

The breakdown of the I/O messages is shown below.

T2O (Input) Message

The input message is 32 bytes long.

ByteNameData Type
0-3us50CounterDINT
4-7ActualPositionDINT
8-11MotionTargetDINT
12-15ActualSpeedDINT
16-17MotorStatusINT
18-19PercentActualCurrentINT
20-21PercentOverloadTorqueINT
22-23AnalogININT
24-25DCVoltageINT
26-27PADINT
28DigitalINSINT
29TemperatureSINT
30ModeOfOperationDisplaySINT
31ErrorCodeSINT

O2T (Output) Message

The output message is 20 byes long

ByteNameData Type
0-3TargetPositionDINT
4-7TargetSpeedDINT
8-9TargetTorqueINT
10-11TargetAccelertionINT
12-13TargetDecelerationINT
14-15ControlwordINT
16ModeOfOperationSINT
17DigitalOUTSINT
18-19PADINT

Control Modes

This section focuses on controlling the motor with the provided Add on Instructions (AOIs). These will satisfy most applications, however, if required, the motor can be controlled by setting the CM1-T objects directly (see I/O Messages). Understanding the Modes Of Operation will be important in this case.

There are currently 3 main control modes available while running the motor over EtherNet/IP. 

  1. Position - this mode sets the motor to run to a target position. The position could be absolute or relative
  2. Speed - this mode allows the motors speed to be controlled for continuous motion
  3. Torque - this mode allows the motors torque to be controlled.

The control modes are mapped to the ModeOfOperation value from the CM1T_ControlMode  AOI:

Control ModeCM1T_ControlMode AOI valueO2T ModeOfOperation Value
Position03
Speed13
Torque211


In addition:

  • Homing is an additional mode that can be executed at any point. Homing should start from a known safe state to avoid unexpected changes in motion
  • All modes can be switched to during motion. It is recommended the state is switched during a known safe state.
  • Torque can be limited in all modes. Running in torque mode will disable errors such as position error which can still occur in other modes if the set torque is too low. The torque is set in 0.1% of rated torque. The range is [0,1100]. By default the torque is set to 1100 when using the AOIs supplied.


All modes use common objects such as position, speed, torque, acceleration and controlword. Switching parameters in another mode will change the value in the existing mode.

Setting the Start bit to 0 will NOT halt motion. The HALT bit must be used to interrupt motion.

Position Mode

Absolute position and relative position both use the position mode. The key difference in operation between the two is the usage of the start bit in the CM1T_Controlword. An absolute move will accept a new position immediately if the start bit is 1.

Start Bit Usage

BITNameValueDescription
B0Start/New Set Point

0

  • Do not execute any changes in profile registers
  • Do not start a new profile
  • Any profile currently in motion will be completed
0 → 1
  • Start a profile move defined by the profile registers
  • 0 → 1 transition is required to start a profile after
    • an error has been cleared
    • a home has been completed
    • a stop command has been given from CML or an input.
  • In relative mode transition is required to start the next incremental move.
    • The move is incremented from the current 1ms target position not the actual position.
      • This will be the same if there is no position error
      • This is to account for possible drift in a repetitive motion.
1Execute any changes in any of the profile registers immediately.

Motion Parameters

Position moves will accept the following motion parameters. These will be processed immediately if the start bit is high.

NameUnitData TypeAccess
PositionTargetcountsDINTAOI(2) or Axis tag
SpeedTargetcounts/sDINTAOI or Axis tag
AccelerationTarget1000 counts/s2INTAOI or Axis tag
DecelerationTarget(1)1000 counts/s2INTAOI or Axis tag
TorqueTarget0.1% rated torqueINTAxis Tag

(1) If the deceleration is set to 0 the acceleration value will be used
(2) MoveAbsolute or MoveRelative AOI

Speed Mode

A speed move has no target position and will continue to run at the target speed. Setting a -ve speed value will reverse direction.

Start Bit Usage

BITNameValueDescription
B0Start/New Set Point

0

  • Do not execute any changes in profile registers
  • Do not start a new profile
  • Any profile currently in motion will be completed
0 → 1
  • Start a profile move defined by the profile registers
  • 0 → 1 transition is required to start a profile after
    • an error has been cleared
    • a home has been completed
    • a stop command has been given from CML or an input.
1Execute any changes in any of the profile registers immediately.

Motion Parameters

Speed moves will accept the following motion parameters. These will be processed immediately if the start bit is high.

NameUnitData TypeAccess
SpeedTargetcounts/sDINTAOI(2) or Axis tag
AccelerationTarget1000 counts/s2INTAOI or Axis tag
DecelerationTarget(1)1000 counts/s2INTAOI or Axis tag
TorqueTarget0.1% rated torque (1)INTAxis Tag

(1) If the deceleration is set to 0 the acceleration value will be used
(2) MoveSpeed AOI

Torque Mode

A torque move only uses a target torque and maximum speed. Acceleration of the motor should be limited by adjusting the target torque or speed.

Setting a -ve torque value will reverse direction.

Start Bit Usage

BITNameValueDescription
B0Start/New Set Point

0

  • Do not execute any changes in profile registers
  • Do not start a new profile
  • Any profile currently in motion will be completed
0 → 1
  • Start a profile move defined by the profile registers
  • 0 → 1 transition is required to start a profile after
    • an error has been cleared
    • a home has been completed
    • a stop command has been given from CML or an input.
1Execute any changes in any of the profile registers immediately.

Motion Parameters

Torque moves will accept the following motion parameters. These will be processed immediately if the start bit is high.

NameUnitData TypeAccess
SpeedTargetcounts/sDINTAOI(1) or Axis tag
TorqueTarget

0.1% rated torque

Range: ± 1100

Where:

  • 1100 = peak torque 
  • 1000 = rated torque
INTAOI or Axis Tag

(1) MoveTorque AOI

RSLogix Resources

User Data Types

CM1T_Axis

The CM1-T_Axis data type defines how the bytes are assigned withing the IO message.

NameData TypeDescription
InputSINT[32]Data coming from the CM1-T
OutputSINT[20]Data going to the CM1-T
us50CounterDINTMotor 50us counter
ModeOfOperationSINTSelect control mode
ModeOfOperationDisplaySINTCurrent control mode
ControlwordCM1T_ControlwordControl operation
DriveStatusCM1T_DriveStatusDrive status
PositionTargetDINTTarget position for position move
SpeedTargetDINTMax speed for target move
TorqueTargetINTMax torque for target move
AccelerationTargetINTAcceleration for target move
DecelerationTargetINTDeceleration for target move
PositionActualDINTActual position of the motor
TargetActualDINT1ms target position of the motor
PositionErrorDINTError between actual and target
SpeedActualDINTActual speed of the motor
CurrentActualINTActual current percentage of the motor (0.1% rated)
OverloadActualINT0.1% of overload torque
DCVoltageINT24V DC input value at 0.1V
AnalogININT10bit analog input (0-1023)
DigitalINSINTRead digital inputs
DigitalOUTSINTSet digital outputs
TemperatureSINTDrive temperature in °C
ErrorCodeSINTError in communication module

CM1T_Controlword

NameData TypeDescription
StartBOOLStart/New set point
HaltBOOLHalt current motion
Relative_MoveBOOLExecute position move as relative
Speed_ControlBOOLExecute move as a speed only move
DisableBOOLDisable the drive
Reset_ErrorBOOLReset error with rising edge
Set_to_ZeroBOOLSet the current position to zero with rising edge
HomeBOOLHome the motor with rising edge

CM1T_DriveStatus

NameData TypeDescription
StatusValueSINTMotor status and error type
StatusValue1SINTAdditional motor status
In_PositionBOOLMotor is in position and ready to move
MovingBOOLMotor is currently moving
DisabledBOOLDrive is disabled
ErrorBOOLDrive is in error state
MoveCompleteBOOLMove is completed
NewStartRequiredBOOLRising edge required to restart motion
HomeAchievedBOOLHoming has been achieved

Add-On Instructions

The following tables outlines the available add-on instructions

NameDescriptionRequired
CM1T_DataExchangeExchanges data between the drive and the drive variableYes
CM1T_EnableEnables the motorNo
CM1T_DisableDisables the motorNo
CM1T_ClearFaultClears any faults on the driveNo
CM1_TControlModeSet the type of control mode requiredNo
CM1T_MoveAbsoluteExecutes an absolute position moveNo
CM1T_MoveRelativeExecutes a relative position moveNo
CM1T_MoveSpeedExecutes a speed moveNo
CM1T_MoveTorqueExecutes a torque moveNo
CM1T_MoveHomeExecutes a home routineNo


CM1T_DataExchange

This AOI is required if any other AOIs are used. One instance is required for each CM1-T axis being controlled.

It has a number of functions

  1. It exchanges data between the motor connections and the motor/drive tag.
  2. It places the Controlword bits into the Controlword data type
  3. It retrieves the drive status and places it into the DriveStatus variable.

Parameters

OperandTypeFormatDescription
CM1T_DataExchangeCM1T_DataExchangeTagInstance tag for the AOI
DriveInputAB:ETHERNET_MODULE_SINT_32Bytes:I:0TagModule defined connection input for the CM1-T
DriveOutputAB:ETHERNET_MODULE_SINT_20Bytes:O:0TagModule defined connection output for the CM1-T
CM1T_AxisCM1T_AxisTagWorking tag for the CM1-T axis

Execution

ConditionAction
Prescan
  • Initialize tag and local variables
  • rung-condition-out is set to false
Rung Condition - TRUE
  • Process DataExchange
  • rung-condition-out is set to true
Rung Condition - FALSEN/A - rung-condition-out is set to false

CM1T_Enable

This AOI enables the motor and drive. Torque will be present.

Parameters

OperandTypeFormatDescription
CM1T_EnableCM1T_EnableTagInstance tag for the AOI
CM1T_AxisCM1T_AxisTagWorking tag for the CM1-T axis

Execution

ConditionAction
prescan

N/A - rung-condition-out is set to false

rung-condition-in is true
  1. Drive disable bit is set to false (drive is enabled)
  2. rung-condition-out is set
    1. true - when drive status bit shows drive enabled
    2. false - when drive status bit show drive disabled
rung-condition-in is false

N/A - rung-condition-out is set to false

CM1T_Disable

This AOI disables the motor and drive. Torque will not be present

Parameters

OperandTypeFormatDescription
CM1T_DisableCM1T_DisableTagInstance tag for the AOI
CM1T_AxisCM1T_AxisTagWorking tag for the CM1-T axis

Execution

ConditionAction
prescan

N/A - rung-condition-out is set to false

rung-condition-in is true
  1. Drive disable bit is set to true (drive is disabled)
  2. rung-condition-out is set
    1. true - when drive status bit shows drive disabled
    2. false - when drive status bit show drive enabled
rung-condition-in is false

N/A - rung-condition-out is set to false

CM1T_ClearFault

This AOI clears any drive fault/error condition. This will also enable the motor. The rung-out-condition indicates the drive error state (true or false).

Parameters

OperandTypeFormatDescription
CM1T_ClearFaultCM1T_ClearFaultTagInstance tag for the AOI
CM1T_AxisCM1T_AxisTagWorking tag for the CM1-T axis

Execution

ConditionAction
PrescanN/A
rung-condition-in is true
  • Assert clear error bit
  • rung-condition-out is set
    • true - when drive status bit shows drive error
    • false - when drive status bit shows no drive error
rung-condition-in is false
  • Deassert clear error bit
  • rung-condition-out is set
    • true - when drive status bit shows drive error
    • false - when drive status bit shows no drive error

CM1T_ControlMode

This AOI set the motion control mode.

Parameters

OperandTypeFormatDescription
CM1T_DisableCM1T_ControlModeTagInstance tag for the AOI
CM1T_AxisCM1T_AxisTagWorking tag for the CM1-T axis
ControlMode_ValueDINT

Immediate
Tag

A value that sets the type of control mode required

0 - POSITION
1 - SPEED
2 - TORQUE

Execution

ConditionAction
prescan

N/A - rung-condition-out is set to false

rung-condition-in is true
  • Sets ModeOfOperation value and Controlword bits to set the control mode required
  • rung-condition-out is true
rung-condition-in is false

N/A - rung-condition-out is set to false

CM1T_MoveAbsolute

This AOI will execute an absolute position move.

Parameters

OperandTypeFormatDescription
CM1T_MoveAbsoluteCM1T_MoveAbsoluteTagInstance tag for the AOI
CM1T_AxisCM1T_AxisTagWorking tag for the CM1-T axis
PositionDINT

Immediate
Tag

Target absolute position

SpeedDINTImmediate
Tag
Target speed
AccelerationINTImmediate
Tag
Target acceleration
Deceleration (optional)INTImmediate
Tag
Target deceleration
(uses acceleration if set to 0)

Execution

ConditionAction
prescan

N/A - rung-condition-out is set to false

rung-condition-in is true
  • Processes values and sets start bit
  • rung-condition-out is true
rung-condition-in is false

N/A - rung-condition-out is set to false

CM1T_MoveRelative

This AOI will execute a relative position move.

Parameters

OperandTypeFormatDescription
CM1T_MoveRelativeCM1T_MoveRelativeTagInstance tag for the AOI
CM1T_AxisCM1T_AxisTagWorking tag for the CM1-T axis
PositionDINT

Immediate
Tag

Target absolute position

SpeedDINTImmediate
Tag
Target speed
AccelerationINTImmediate
Tag
Target acceleration
Deceleration (optional)INTImmediate
Tag
Target deceleration
(uses acceleration if set to 0)
StartBOOL

Immediate
Tag

0 → 1 transition will execute a new relative move.

If a motion is currently in process it will increment relative to the current position

Execution

ConditionAction
prescan

N/A - rung-condition-out is set to false

rung-condition-in is true
  • Processes values and sets start bit as per Start input variable
  • rung-condition-out is true
rung-condition-in is false

N/A - rung-condition-out is set to false

CM1T_MoveSpeed

This AOI will execute a speed move.

Parameters

OperandTypeFormatDescription
CM1T_MoveSpeedCM1T_MoveSpeedTagInstance tag for the AOI
CM1T_AxisCM1T_AxisTagWorking tag for the CM1-T axis
SpeedDINTImmediate
Tag
Target speed
AccelerationINTImmediate
Tag
Target acceleration
Deceleration (optional)INTImmediate
Tag
Target deceleration
(uses acceleration if set to 0)

Execution

ConditionAction
prescan

N/A - rung-condition-out is set to false

rung-condition-in is true
  • Processes values and start the speed move
  • rung-condition-out is true
rung-condition-in is false

N/A - rung-condition-out is set to false

CM1T_MoveTorque

This AOI will execute a torque move.

Parameters

OperandTypeFormatDescription
CM1T_MoveSpeedCM1T_MoveSpeedTagInstance tag for the AOI
CM1T_AxisCM1T_AxisTagWorking tag for the CM1-T axis
TorqueINTImmediate
Tag
Target torque
MaxSpeedDINTImmediate
Tag
Target speed

Execution

ConditionAction
prescan

N/A - rung-condition-out is set to false

rung-condition-in is true
  • Processes values and start the torque move
  • rung-condition-out is true
rung-condition-in is false

N/A - rung-condition-out is set to false

Adding CM1-T and AOIs to Project

Download and extract the CM1T_AOIs support file.

The file includes the following

  1. CM1T_SampleApplication.ACD - This a sample application built RSLogix. It shows how to
    1. Run the motors in each of the modes
    2. Reset from faults
    3. Enable/Disable the motor
  2. User Data Types (UDT)
  3. Add-On Instructions (AOI)

TODO: ADD FILE

Import User Data Types (UDTs)

The following steps show how to import the UDTs used by the CM1-T module.

  1. Right click on Data Types → User-Defined and select "Import Data Type..."
  2. Browse to the location where the CM1T_AOI support file was extracted. Select the CM1T_Axis and click import. 
  3. On the Import Configuration window click OK
  4. The CM1T_Axis, CM1T_Controlword and CM1T_DriveStatus should all have been import as shown below. If they were not repeat steps 1-3 with the CM1T_Controlword and CM1T_DriveStatus.

Import Add-On Instructions (AOIs)

The following steps show how to import the CM1-T modules AOIs. The only required AOI is CM1T_DataExchange. All the other AOIs depend on this one to populate the data type.

  1. Right click on Add-On Instructions and select "Import Add-On Instruction..."
  2. Browse to the extracted AOI folder and select CM1T_DataExchange. Click Import
  3. On the Configuration Import window click OK.
  4. Repeat steps 1-3 until all required AOIs are imported
  5. The Add-On Instruction tree will look as follows once all AOIs are imported

Add CM1-T Module

The following steps show how to add an CM1-T module in RSLogix. At present the EtheNet/IP is in testing and the CM1-T is added a a generic module.

  1. Open an existing project or start a new one
  2. In the Controller Organizer expand I/O Configuration and right click on "Ethernet". Select "New Module"
  3. Search "Generic", Select "ETHERNET-MODULE" and click Create
  4. Fill in the following properties shown below
    1. Name: Give the drive a name. E.g. CM1T_Drive, Axis1, LabelXAxis, etc
    2. Comm Format: Data - SINT
    3. IP Address: Enter the IP Address of the CM1-T you are adding.
    4. Connection Parameters
      1. Input: Assembly Instance = 100, Size = 32
      2. Output: Assembly Instance = 112, Size = 20
      3. Configuration: Assembly Instance = 1, Size = 0
    5. Click OK
  5. The Module Properties window should open. If it does not double click on the newly created module inside the Ethernet heading.
    Select the Connection Tab
    1. Set the packet interval as required. Typically this would be 10ms.
    2. Check the boxes as shown in the picture above

The final set of steps below shows how to add the CM1T_DataExchange AOI and configure it to exchange data between the tag created for the CM1-T and the CM1-T module. A single instance of the CM1T_DataExchange should be created per module. There should never be more than one per module.

  1. Add the CM1T_DataExchange AOI to a rung
  2. Create a CM1T_DataExchange Tag and attached it to this instance. In this example it is called FB_CM1T_DataExchnage
  3. Expand the DriveInput drop down menu and select the CM1T_Drive module input create earlier
  4. Expand the DriveOuput drop down menu and select the CM1T_Drive module output create earlier
  5. Create a new CM1T_Axis tag and attach it to the instruction. This is the tag that will be used in all other AOIs


All CM1-T AOIs are now ready to be used. See the example application for more details on running the motor.

Example Logic

The following logic is from the sample application supplied. The example shows how to run the motor in each of the modes, enable, disable, halt, and recover from an error.




  • No labels