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

Compare with Current View Page History

Version 1 Next »

Version: 1.0.0

1. Introduction

Modbus gives read/write access to all Cool Muscle registers such as K-parameters, positions, speeds and accelerations. A CML program needs to reside in the motor to execute functions depending on the status of these registers. Below you will find an example program that is used in all Modbus-TCP motors. It uses a control word in the R1 register to execute a number of functions. This code is useful for point-to-point motion and speed control. An application may require a significantly more complex program which can replace the example program. The CML is written to be compiled and sent from Control Room. The user does not need to understand the code but only how to use it. The full program code is supplied for those users wanting to change or get a better understanding of how the program works. Modbus-TCP motors come standard with the Modbus program loaded.

2. Running the motor

The following list of holding registers can be used to the read and write move data to the motor.

 

Holding RegisterParameterDescriptionR/W
40201P1Target positionR/W
40605S1Target speedR/W
40637A1Target accelerationR/W
40301R1Control WordR/W
40003Motor PositionMotors current position in pulsesR
40009Motor StatusMotors current statusR

 

2.1. Position, Speed and Acceleration

The default setting for the motor is K37=3 which sets the following units. This can easily be changed by modifying the value of K37.

RegisterUnit/Resolution
P11000 pulses/revolution
S1100 pulse/s
A11K pulses/s2

 

2.2. Control Word

The R1 register is used for the Control Word. It has the following value options

R1 ValueDescription
0Do nothing
1Start the position move
2Stop the motor
3Enable the motor
4Disable the motor
5Home the motor

 

Some things to note when using the control word

  1. Changing the value of the control word immediately executes the operation 
  2. If the Control Word is left with the value 1 then changing the position once the motor has come to a stop will execute the next move. This allows the Modbus master to only change the position and not need to also toggle the control word to execute the next move.
  3. The home routine is by default set to a hardstop search in the CCW direction. Please see K42 to K48 for home routine options.

 

3. CML

 

 

  • No labels