Skip to main content
Skip table of contents

Registers

All registers should be set or initialized before they are called in a bank. A register is set by sending the register and register number you with to set followed by and equals sign and the value you wish to set, e.g.: P1.1=100, S10.1=500, V1.2=-50, V2.1=”Ux”.

It is possible to set a register inside a bank in CML, but it cannot be set directly with a number. Any register set inside of a bank must be set from another register:

Correct CML

Incorrect CML

V1.1=100

B1.1
A1.1=V1.1
END.1

B1.1
A1.1=100
END.1

However in Control Room when using CMP script it is possible to assign a constant value directly in a bank. This is because Control Room will compile a CMP script to a CML script. The compiler will assign the constant to an unassigned register and replace it in the CML script before sending to the motor. For example:

CMP Script

Compiled CML Output

B1.1
A1.1=100
END.1

N1.1=100

B1.1
A1.1=N1.1
END.1

Any register can be queried by sending only the register number, E.g. to query P15.1 simply send:

P15.1

A response will be returned from the motor in the format P15.1=# where # is the value stored in that register.

List of Registers

P

Position

Unit: Pulses

P1-P25

Min: -1000000000

Max: 1000000000

P registers define target positions as measured in pulses. 

P5.1=1000

Set position 5 in motor 1 to 1000.

S

Speed

Unit: Pulses per Second

(see K37)

S1-S15

Min:-5000000

Max: 5000000

S registers define the target speed in a unit defined in parameter K37 . 

S2.1=430

Set speed 2 in motor 1 as 430.

A

Acceleration

Unit: Thousand Pulses per  

         Second Squared

A1-A8

Min:-32767

Max:32767

A registers define the target acceleration in thousands of pulses per second squared.  

A8.1=50

Sets acceleration 8 in motor 1 as 50.

T

Timer

Unit: millisecond

T1-T8

Min: 0

Max: 32767

T registers define a timer in milliseconds. This timer can be called in program or logic banks to wait for the specified amount of time.   

T1.1=25000

Sets timer 1 in motor 1 to 25000 (25s).

M

Torque

Unit: Percent of Peak torque

M1-M8

Min: 0

Max: 100

M registers define the torque limit for a move, as measured in a percentage of the motors peak torque.    

M2.1=80

Sets the torque register 2 in motor 1 as 80%.

V

Variable Data

Unit: -

V1-V15

Min: -2147483648

Max: 2147483647

Variable registers serve a number of purposes. Variable can be set to use current motor states as well as predefined numbers and text strings.

When using the motor state variables or text strings, these must be defined using quotations. A comprehensive list and description of the internal
state variables can be found under Internal Variables.

V2.1=”Px”

V3.1=”abcd”

V8.1=5432

Sets variable two in motor one as current position.

Sets variable three in motor one as text string “abcd”.

Sets variable eight in motor one as 5432.

N

Center Point / General Use

Unit: Pulses

N1-N25

Min: -2147483648

Max: 2147483647

 N registers are used to define the center point of a circle when using two motors in a coordinated motion system. For more information see coordinated motion.

Can also be used as general purpose variable if coordinated motion is not used.  

N12.1=1375

Sets center point data 12 in motor 1 to 1375.

R

Radius / General Use

Unit: Pulses

R1-R25

Min: -1000000000

Max: 1000000000

R registers are used to define the radius of a circle when using two motors in a coordinated motion system. For more information see coordinated motion.

Can also be used as general purpose variable if coordinated motion is not used. 

R5.1=25000

Sets radius data five in motor one to 25000.

JavaScript errors detected

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

If this problem persists, please contact our support.