Internal Variables

Internal state variables are special assignments for variables that give the user access to important motor specific data. The following table lists available state variables

State Variables

The following group of variables deal with the immediate state of the motor. 

NameDescriptionR/WUnit
"Ux"

Status

  • Read the motor operating status
ValueStatus Description
0In motion
4Over torque error
8In position
16Motor disabled

A complete list of status values can be found at Status and Error States

RO-
"Px"

Position

  • Reading this variable will return the motor position
  • Writing this variable will set the motor position to the assigned value

It is recommended a write only occurs when the motor is stationary.

R/WPulses
"Sx"

Speed

  • Read motors speed
ROPulses/second
"Ix"

Current

  • Read motors current

The current limit depends on the motor size. The following table shows the range for each motor

Motor SizeRange
11S30±50
11L30±65
17S30±60
17L30±110
23S30±120
23L30±180
RO-
"Tx"

Target Current

  • Read motors target current

See "Ix" for each motors value range

RO-
"Ex"

Error Status

  •  Read the value of any error/alarm. 

This variable differs from "Ux" in that it will only include status values that indicate a motor error/alarm/fault

RO-
"Pe"

Position Error

  • Read the error between the target position and the actual position
ROPulses

Inputs and Outputs

NameDescriptionR/WUnit
"AIN4"

Analog Input Value

Read the value of the analog on input 4

Range: 0 to 1023

RO-
"Fx"

INPUT2 Frequency

Read the frequency of the signal on input 2

Range: 0 to 2000

RO1KHz
"Cx"

INPUT2 High Speed Counter

Count rising edge triggers in IN2. This counter uses the processor's high speed
counter and will read pulses up to a frequency of 2MHz

Write to the counter to set a clear/set a starting value.

This counter is very sensitive and will pick up noise and bounce in the signal

R/W-
"Cx2"

INPUT2 Counter

Counts pulses every 1ms on IN2. Useful on counting inputs use with relays or mechanical switches.
The internal debounce algorithm eliminates unwanted noise and counts.

R/W-
"Cx3"

INPUT3 Counter

Counts pulses every 1ms on IN3. Useful on counting inputs use with relays or mechanical switches.
The internal debounce algorithm eliminates unwanted noise and counts.

R/W-
"Cx4"

INPUT4 Counter

Counts pulses every 1ms on IN4. Useful on counting inputs use with relays or mechanical switches.
The internal debounce algorithm eliminates unwanted noise and counts.

R/W-
"AO2"

Analog Output Value

Set the analog value on OUT2. K34 and K34 must be set correctly to use.

Range: 0 to 255 (0V to 4.5V)

R/W-

Timers and Counters

NameDescriptionR/WUnit
"Tmr"

1ms count down timer

Writing a value into the countdown timer will start the count down. The count down timer will decrement every 1ms
until 0. 

Range: 0 to +32,767

R/W1ms
"Cnt"

1ms up counter

The "Cnt" counter is a free running up counter. The counter can be set to any +ve value by writing to it.
It will count up from that value every 1ms. When the counter reaches its limit it resets to 0 and continues counting up.

Range: 0 to +2,147,783,647  

R/W1ms

Pushmode Variables

NameDescriptionR/WUnit
"PTmr"

Set the pushmode timer

  • Set the pushmode time (same as K61) dynamically.
  • Value is in milliseconds.
R/W1ms
"PV%"

Set the pushmode value

  • Set as as a value of peak torque
  • Can be changed dynamically during a push mode

Range: 0 to 800

R/W

0.1% of peak torque

"PVal"

This variable has been deprecated. It is recommended to use "PV%" in new designs

  • Read or write the pushmode target value. This value can be changed during a push
  • Maximum value is 80% of the current limit. See "Ix" for limits.
R/W-

Motion Variables


NameDescriptionR/WUnit
"DPos"

Switch on/off dynamic positioning

When using the direct mode positioning command (^) the target position is not updated when a new P0 is set. "DPos" sets the behavior of the ^ function

"DPos" ValueDescription
0Direct position operates as standard. Writing P0 does not immediately change the target position
1Writing to P0 will immediately update the target position. If there is no motion ^ must be sent to start motion
2Writing to P0 will immediately update the target position, If the motor is stationary it will immediately start motion and does not require ^ to start motion.
R/W-
"MOP"

Writing to "MOP" enables the direct control modes of operation

"MOP" ValueDescription
0Off - CML mode (Normal Operation)
2Profile mode
4Dynamic position mode
10Torque mode

See Direct Control in the CM1-T user guide for information on how to use the modes.

R/W-

The motor controller uses an internal motion generator that calculates the 1ms position target. Writing to the variables will overwrite the next 1ms target. Caution should be taken if it cannot be guaranteed to write every 1ms as this could cause intermittent motion

NameDescriptionR/WUnit
"Pt"Read the 1ms position target generated by the motion generatorROpulses
"Dx"

Set the next position target

  • Writing to this variable will overwrite the motion generators next
    position target.
  • To effectively use this the logic must be able to scan and write to "Dx"
    every 1ms. 

It is not recommended to use this variable unless it is guaranteed the value can be updated every 1ms.
Unless this value is written every 1ms the internal motion generator will overwrite the value.

R/Wpulses
"St"

Set the next speed target.

  • This value is set in pulses and is the amount of pulses the motor will increment in the next 1ms.

It is not recommended to use this variable unless it is guaranteed the value can be updated every 1ms.
Unless this value is written every 1ms the internal motion generator will overwrite the value.

R/Wpulses

Data Retention

Two variables can be used to save data to non-volatile memory. Data will be written on a change. 

NameDescriptionR/WUnit
"EEP1"

Memory 1

32 bit

R/W-
"EEP2"

Memory 2

32 bit

R/W-

The memory has a limited amount of writes. Caution should be taken to not excessively write to memory

  • No labels