Skip to main content
Version: 5.0.x {stable}

RUN shell command

Using this command you can control the motor from the term od from the scripts.

danger

Use with caution. This command can override the application and put the motor into a dangerous state.

run [command] [mode] [imult] [umult] [rmult]

If the command run is entered with parameters, it typically overrides current command issued from the Application. For example, by entering command run 0.1 1 on an e-bike, motor control from throttle is disabled and motor spins up to 10 %of nominal voltage in motor mode 1.

If the command run is entered without parameters, it cancels the previously issued override. In previous example with ebike, entering the command run cancels the override and motor is again controlled by the throttle.

If the run command is entered with parameters, motor command (with listed parameters) is issued. Parameters that are not listed are not changed. Parameter description:

  • [command] - number in range -1 ... 1; (e.g. in voltage mode, it specifies the fraction of uref applied to the motor, or in current mode it specifies the fraction of applied iref and so on fo other motor modes)
  • [mode] - mode, in which is motor driver. If not specified, the default mode is 1 (VLT)
  • [imult] - iref multiplier value. Scales the Q-axis current. Setting imult to 0.5 has the same effect as setting iref to half of its original value (only in case if no d-axis control is configured). Refer to section 2.8 for iref description.
  • [umult] - uref multiplier value. Works similar as [imult], but is connected with uref.
  • [rmult] - rref multiplier value. Works similar as [imult], but is connected with rref (reverse reference current).

stop

Stops the motor. This command is an alias for the command run 0 0. It overrides the application and puts the motor into freewheeling mode [FRW].