Project

General

Profile

4.6.3. Controller status

Controller tracks its own status and can transfer it in the status structure of the GETS command. Controller status contains information about performed movement, its result, state of power supply, state of encoder, state of motor windings, digital input-output states, numeric information about position and powering voltage and currents and also error flags.

Movement status

MoveSts contains:
  • Movement flag which is set when controller changes motor position.
  • "Target speed reached" flag which is set if current speed is equal to the speed controller should be moving with.
  • Backlash compensation flag, which is set during backlash compensation in the final stage of the movement (see Backlash compensation).

MvCmdSts contains information about the command being executed. All motor movements are initiated by movement commands to the MOVE target position, MOVR shift relative to the last target position, RIGT movement to the right, LEFT movement to the left, smooth stop SSTP or fast stop STOP, HOME home position calibration and LOFT forced backlash compensation. Control by buttons, joystick, sync in pulses, etc. is also performed by these commands. For example, joystick calls right and left movement commands during deflection or smooth stop command in central position (see Joystick control). Current movement command or last command and command status (running/completed) are located in MvCmdSts variable. If the command is completed then another bit shows its result (successful or not). Unsuccessfully completed command means controller could not reach desired position or backlash compensation could not be performed. The reason for this can be a sudden stop due to limit switches or Alarm state. Initial state of this field contains unknown command and successful completion status.

Motor power supply status

PWRSts contains information about supply voltage. Windings' status can be:
  • Disabled (in this case no voltage is applied).
  • Powered by reduced current relative to nominal current (for example if winding current reduction option is used).
  • Powered by nominal current.
  • Powered by an voltage insufficient to reach nominal current in the windings.

Last status frequently appears with high rotation speeds, because for higher step switching speed one needs higher voltage to ensure current rise in motor winding inductance. Insufficient voltage does not mean the motor won't move, it will merely emit excess noise and its torque will drop (see Power control).

Encoder status

EncSts contains information about connected encoder if feedback is disabled (for example for stepper motors). Encoder state can be one of the following:
  • Not connected
  • Unknown state, when there is not enough data to define encoder state.
  • Connected and working.
  • Connected and reversed, in this case it is necessary to enable reverse in encoder settings.
  • Connected and defective.

The last state is realized when switch signals come to encoder inputs but they don't correspond to the motor rotor movement. State change happens after sufficient statistical data is collected. That's why detection doesn't happen immediately. It is also impossible to define encoder status without movement (see Operation with encoders).

Motor windings status

WindSts contains information about windings state. State of each of the two windings is shown separately. They can be:
  • Disconnected from controller
  • Connected
  • Short-circuited
  • In an unknown state.

A state with very small resistance and inductance is considered to be a short-circuit. A state with very high load resistance is considered to be disconnected.

Position status.

All data about stage position and speed is reflected in status structure. Fields of primary position (CurPosition, uStep), secondary position (EncPosition), speeds (CurSpeed, uCurSpeed) are used for this. Primary position is counted in steps and microsteps of stepper motor if control without feedback is used. In case of leading encoder mode
encoder counts are stored in CurPosition and uStep contains 0. Secondary position contains encoder coordinate if no feedback is used for stepper motor, contains steps if a stepper motor with encoder feedback is used and contains 0 if DC motor is used. Speed is always displayed for the primary position and is measured in the same units as the current set speed.

Controller power supply status and temperature.

Status structure reflects:
  • Power current (in mA)
  • Power voltage (in tens of mV)
  • USB current (in mA)
  • USB voltage (in tens of mV)
  • Microprocessor temperature (tenths of degrees Celsius)

Status flags

There are several types of flags: control command error flags, critical parameter flags, general error flags and state flags. Many flags do not remove themselves and should be reset by the STOP command.

Protocol command errors:
  • errc – Unknown protocol command. This error should not appear if the used software corresponds to the used controller protocol version. Flag can’t be removed by itself.
  • errd – Data integrity command check code is incorrect. This error appears in case of data transfer failure. The flag can’t be removed by itself.
  • errv – One or more values sent in the command could not be applied. It appears when command was received and successfully recognized but transferred data were incorrect or out of range. This error can also mean that necessary operation is impossible because of hardware failure. For example, this error appears if you set microstep mode which is not in supported list or if you set zero steps per motor revolution. The flag can’t be removed by itself.
    Critical parameter exceeded errors:
  • Flag which means that controller is in Alarm state.
  • Flag which means that power driver gives overheat signal. The flag is removed by itself depending on critical parameters settings
  • Flag which means that microprocessor temperature is out of acceptable range. The flag is removed by itself depending on critical parameters settings
  • Flag which means that power supply exceeded acceptable value. The flag is removed by itself depending on critical parameters settings
  • Flag which means that power supply voltage is lower than acceptable value. The flag is removed by itself depending on critical parameters settings
  • Flag which means that current drawn from the power unit exceeded acceptable value. The flag is removed by itself depending on critical parameters settings
  • Flag which means that USB voltage exceeded acceptable value. The flag is removed by itlsef depending on critical parameters settings
  • Flag which means that USB voltage is under acceptable value. The flag is removed by itself depending on critical parameters settings
  • Flag which means that current drawn from the USB exceeded acceptable value. The flag is removed by itself depending on critical parameters settings
  • Flag which means that limit switches are mixed up. The flag can’t be removed by itself.
General error flag:
  • Flag which means that position control system detected steps counter and position sensor desynchronization. The flag can’t be removed by itself (except the case of using position correction ).
State flags:
  • Presence of connected stage equipped by EEPROM memory.
  • Presence of external power supply. Otherwise power supply is internal. Is always set.

Digital signals status.

Controller reflects input and output digital signal status as active state flags or as current logical level. Active state corresponds to one or to zero depending on specific block settings, for example on inverting settings. Flags can be:
  • Right limit switch state (one if limit switch is active)
  • Left limit switch state (one if limit switch is active)
  • Right button state (one if button is pressed)
  • Left button state (one if button is pressed)
  • 1 if EXTIO pin operates as output. Otherwise - as input.
  • EXTIO pin state (1 if state is active on input or on output)
  • Hall A sensor state (1 if logical one is on input)
  • Hall B sensor state (1 if logical one is on input)
  • Hall C sensor state (1 if logical one is on input)
  • Magnetic brake state (1 if power supply is applied to brake)
  • Complete revolution sensor state (1 if sensor is active)
  • Input synchronization pin state (1 if synchronization pin is in active state).
  • Output synchronization pin state (1 if synchronization pin is in active state).
  • Input encoder A channel state (1 if logical one is on input)
  • Input encoder B channel state (1 if logical one is on input)
Add picture from clipboard (Maximum size: 977 MB)