Download NextGen Controllers User Manual
Transcript
Runtime Commands R - MicroBasic Run This command is used to start, stop and restart a MicroBasic script if one is loaded in the controller. Syntax: !R [nn] Where: nn = empty: start/resume script nn = 1: same as above nn = 0: stop script nn= 2: reinitialize and start script S - Motor Position-Mode Velocity This runtime command accepts actual RPM values and works in the closed-loop Position Relative and Count Position modes. It determines the speed at which the motor should move from one position to the next. This command requires two arguments: the first to select the motor channel, the second to set the velocity. The motor channel may be omitted in single channel controllers. The velocity is set in actual RPMs in system with speed sensor (encoder or brushless hall sensors). In systems without speed sensors, the velocity parameter will be relative to the Max RPM configuration parameter. Syntax: !S [nn] mm Where: nn = motor channel mm = speed value in RPM Examples: !S 2500: !S 1 2500: set motor1 position velocity to 2500 RPM set motor1 position velocity to 2500 RPM SX - Next Velocity This command is used in Position Count mode. It is similar to S except that it stores a velocity value in a buffer. This value will become the next velocity the controller will use and becomes active upon reaching a previous desired position. See “Position Command Chaining” on page 104. Syntax: !SX nn mm Where: nn = motor channel mm = velocity value Note: If omitted, the command will be chained using the last used velocity value. VAR - Set User Integer Variable This command is used to set the value of user variables inside the controller. These variables can be then read from within a user MicroBasic script to perform specific actions. The total number of variables depends on the controller model and can be found in the product datasheet. Variables are signed 32-bit integers. Syntax: !VAR nn mm Where: nn = variable number mm = value Advanced Digital Motor Controllers User Manual 171