StepperII
Dual Axis Stepper Controller
Functions

ConsoleCommands

Functions

void axis (void)
 Select the active axis for subsequent console commands.
void prof (void)
 Set the motion profile for the active axis.
void save (void)
 Write the configuration for the active axis to non-volatile memory.
void show (void)
 Write the configuration for the active axis to the console.
void step (void)
 Relative move.
void stepTo (void)
 Absolute move.
void on (void)
 Turn on stepper motor for the active axis in specified direction.
void off (void)
 Turn off stepper motor for the active axis.
void brakeOn (void)
 Turn on the brake for the active axis.
void brakeOff (void)
 Turn off the brake for the active axis.
void pos (void)
 Write the current position of the active axis to the console.
void wtPos (void)
 Set the position of the active axis (not a motion command)
void state (void)
 Write motion state of the active axis to the console.
void writeCurrentLimit (void)
 Write current limit to onboard non-volatile digital potentiometer.
void readCurrentLimit (void)
 Write the board current limit setting to the console.
void master (void)
 Set the master/slave property for the board.
void nonBlocking (void)
 Set the command type for the active axis motion commands.
void units (void)
 Set the units for the active axis.
void accel (void)
 Set the magnitude of the motion profile acceleration slope for the active axis.
void maxSpeed (void)
 Set the maximum speed of the motion profile for the active axis.
void decel (void)
 Set the magnitude of the motion profile deceleration slope for the active axis.
void msSettle (void)
 Set a settling delay in milliseconds for the active axis. This delay follows any motion command and allows mechanical vibrations in the rotator to dampen.
void noLimits (void)
 Enable/disable travel limits for the active axis.
void lowTravelLimit (void)
 Set the minimum allowable position for the active axis.
void highTravelLimit (void)
 Set the maximum allowable position for the active axis.
void microSteps (void)
 Set stepper motor microstepping for the active axis.
void stepsPayload360 (void)
 Set the number of steps for a 360 degree revolution of the payload for the active axis.
void brakeType (void)
 Set the brake type for the active axis.
void reverse (void)
 Set the rotation convention for the active axis.
void currentLimit (void)
 Set the on-board current limiting hardware.
void home (void)
 Move the active axis to home position.
void homeAll (void)
 Move the both axes to home position.
void demo (void)
 Perform a motion sequence suitable for driving a 1 or 2 axis test.

Function Documentation

void accel ( void  )

Set the magnitude of the motion profile acceleration slope for the active axis.

void axis ( void  )

Select the active axis for subsequent console commands.

This is a modal setting for the console interface.

  • Command line use: n axis
    Parameters:
    n= 0 (horizontal), 1 (vertical), or 2 (vertical slave).
  • Modifies activeAxis and pAxis.
  • Axis selection is modal and can only be changed with the axis command or system reset
  • Motion and configuration commands are routed to the active axis
  • The active axis setting can be read with the show command
void brakeOff ( void  )

Turn off the brake for the active axis.

  • Command line use: brakeOff
    Parameters:
    none
void brakeOn ( void  )

Turn on the brake for the active axis.

  • Command line use: brakeOn
    Parameters:
    none
void brakeType ( void  )

Set the brake type for the active axis.

  • Command line use: n brakeType
    Parameters:
    n= 0 (none), 1 (passive), or 2 (active)
  • Modifies CProfile::brakeType for the active axis
    Note:
    Use save to make any changes non-volatile
void currentLimit ( void  )

Set the on-board current limiting hardware.

  • Command line use: n currentLimit
    Parameters:
    nRange: 0 to 10
  • Sets current limiting from 0.5A to 3.0A in .25A increments (0 is lowest)
void decel ( void  )

Set the magnitude of the motion profile deceleration slope for the active axis.

void demo ( void  )

Perform a motion sequence suitable for driving a 1 or 2 axis test.

This function performs a series of moves and writes each postion to the console.

  • Command line use: hLim hInc vLim vInc quick wait demo
    Parameters:
    hIncis horizontal axis increment for each test position in active units (degrees or steps)
    vLimis vertical axis limit in active units (degrees or steps)
    vIncis vertical axis increment for each test position in active units (degrees or steps)
    quick= 1: Axes reverse direction after reaching their respective limits (quicker test time)
    wait= 1: Systems waits for command line input after each move
  • Setting wait=1 requires user/application input before moving to the next position. Wait provides time for the user/application to collect antenna data.
  • Wait is announced with a "Continue(y/n)?" prompt
  • Sending any data to the console port while the motors are moving will abort the test.
  • The test is initiated with a call to homeAll.
  • homeAll is not executed at the end of the test

To run a 1-axis test, set the limit or increment to zero for the axis you wish to disable.

void highTravelLimit ( void  )

Set the maximum allowable position for the active axis.

void home ( void  )

Move the active axis to home position.

  • Command line use: home
    Parameters:
    none
void homeAll ( void  )

Move the both axes to home position.

  • Command line use: homeAll
    Parameters:
    none
void lowTravelLimit ( void  )

Set the minimum allowable position for the active axis.

  • Command line use: n lowTravelLimit
    Parameters:
    nRange -32767 to 32767 units
  • Should be set at "home" (0), or very close to it
  • Modifies CProfile::lowTravelLimit for the active axis
    See also:
    CProfile::noLimits
    Note:
    Use save to make any changes non-volatile
void master ( void  )

Set the master/slave property for the board.

  • Command line use: f master
    Parameters:
    f= 0 (slave) or 1 (master)
  • This is a board configuration setting, not an "active axis" setting
  • Master manages the console command interface, the horizontal and vertical pulse engines, and horizontal motor driver
  • Slave manages the vertical motor driver
  • Modifies EEPROM variable, no save required
  • The horizontal controller must be master
  • The vertical controller must be slave
void maxSpeed ( void  )

Set the maximum speed of the motion profile for the active axis.

void microSteps ( void  )

Set stepper motor microstepping for the active axis.

  • Command line use: n microSteps
    Parameters:
    n= 200, 400, 800, 1600, or 3200 (default)
  • Modifies CProfile::microSteps for the active axis
    Note:
    Use save to make any changes non-volatile
void msSettle ( void  )

Set a settling delay in milliseconds for the active axis. This delay follows any motion command and allows mechanical vibrations in the rotator to dampen.

  • Command line use: n msSettle
    Parameters:
    nValid range: 0-32767 milliseconds
  • n = 0 effectively disables the settling delay
  • Modifies CProfile::msSettle for the active axis
  • Note:
    Use save to make any changes non-volatile
void noLimits ( void  )

Enable/disable travel limits for the active axis.

void nonBlocking ( void  )

Set the command type for the active axis motion commands.

  • Command line use: f nonBlocking
    Parameters:
    f= 0 (blocking (default)), or 1 (non-blocking)
  • Blocking commands return a command line prompt after axis motion and settling time is complete
  • Non-blocking commands return a command line prompt immediately after initiating axis motion
  • Modifies CProfile::nonBlocking for the active axis
    Note:
    Regardless of the nonBlocking setting, a new motion command is always blocked from executing until a previous motion command has completed. This is a safety feature to protect the integrity of the motion system.
    Use save to make any changes non-volatile
void off ( void  )

Turn off stepper motor for the active axis.

  • Command line use: off
    Parameters:
    none
  • Goes through deceleration to stop.
  • Can be used if motor is on() or in a non-blocking step() operation.
void on ( void  )

Turn on stepper motor for the active axis in specified direction.

  • Command line use: f on
    Parameters:
    f= 0 (negative rotation), 1 (positive rotation)
  • Movement will be limited if limits are active.
void pos ( void  )

Write the current position of the active axis to the console.

void prof ( void  )

Set the motion profile for the active axis.

void readCurrentLimit ( void  )

Write the board current limit setting to the console.

void reverse ( void  )

Set the rotation convention for the active axis.

  • Command line use: f reverse
    Parameters:
    f= 0 or 1. Change value to change rotation convention
  • Modifies CProfile::reverse for the active axis
    Note:
    Use save to make any changes non-volatile
void save ( void  )

Write the configuration for the active axis to non-volatile memory.

  • Command Line Command line use: save
    Parameters:
    none
void show ( void  )

Write the configuration for the active axis to the console.

  • The output serves as a configuration backup and can be sent directly to console as a series of commands
  • Command line use: show
    Parameters:
    none
  • Use this command to display the active axis and all related settings
void state ( void  )

Write motion state of the active axis to the console.

  • Command line use: state
    Parameters:
    none
    Returns:
    Displays CRunProfile::runState for the active axis
  • Use with non-blocking moves to determine move completion
    See also:
    CRunProfile
void step ( void  )

Relative move.

  • Command line use: n step
    Parameters:
    nSigned number of units to move (+/-32767)
  • Move the active axis n units in the signed direction
  • The move is restricted by high/low travel limits, if active.
void stepsPayload360 ( void  )

Set the number of steps for a 360 degree revolution of the payload for the active axis.

  • Command line use: n stepsPayload360
    Parameters:
    nRange: 1 - 32767
  • Modifies CProfile::stepsPayload360 for the active axis
    Note:
    Use save to make any changes non-volatile
void stepTo ( void  )

Absolute move.

  • Command line use: n stepTo
    Parameters:
    nSigned absolute position in units (+/-32767)
  • Move the active axis to the signed absolute position of n units
  • The move is restricted by high/low travel limits, if active.
void units ( void  )

Set the units for the active axis.

  • Command line use: f units
    Parameters:
    f= 0 (degrees (default)), 1 (steps)
  • Modifies CProfile::units for the active axis
  • Use save to make any changes non-volatile
void writeCurrentLimit ( void  )

Write current limit to onboard non-volatile digital potentiometer.

  • Command line use: n writeCurrentLimit
    Parameters:
    nValid values: 0-10 corresponds to 0.5 amps to 3.0 amp in 0.25 amp increments
  • There is one current limit setting per board. This is not an "active axis" setting.
  • Modifies non-volatile registers in the on-board digital potentiometer
    See also:
    CMcp4242.h
void wtPos ( void  )

Set the position of the active axis (not a motion command)

 All Classes Files Functions Variables Defines