Main Page | Data Structures | File List | Data Fields | Globals | Related Pages

SiTool - Interactive Si Microstep Drive Control Agent

Version 1.1

Author:
R. Pogge, OSU Astronomy Dept. (pogge@astronomy.ohio-state.edu)
Date:
2004 June 9

Usage

Usage: sitool [rcfile]

Where: rcfile is an optional runtime config file to load.

By default, sitool uses the runtime config file defined by DEFAULT_RCFILE in the client.h header.

Introduction

This program operates an Applied Motion Products Si microstep motor controller connected to a serial port. The serial port may be either a physical port on the localhost (e.g., /dev/ttyS0), or a port on a network serial port server, in our case a Comtrol DeviceMaster RTS).

sitool provides both high- and low-level motor control and diagnostic commands. It gives access to the entire SiNet command language, plus a few higher-level functions for multiparameter queries (e.g., "STATUS" queries all settable microstep controller parameters), and general client control. Its primary purpose is as an engineering testbed application to evaluate motor controller and network serial port server devices for OSU instruments.

sitool can be run as either a standalone interactive program with a command-line interface and backdoor socket interface, or as a client in an ISIS system. Using the agent in standalone mode with the backdoor socket interface (the same UDP socket used for ISIS server communications), we have successfully run the agent from a Perl script and other external processes that know how to communicate in the IMPv2 messaging syntax.

Commands

These are the interactive commands for sitool:
Controller Commands:
  status          - report the current drive parameters
  mstatus         - query/report detailed microstep drive status
  rdpos           - read position encoders
  move <Fcmd>     - execute an F move command with verbose output
  moveabs <steps> - move to an absolute step-count position
  moverel <steps> - move +/- a relative number of step-counts
  moveto <pos>  - move to a fixed indexed position (indexed mechanisms only)
  stop            - stop a move in progress
  abort           - same as stop
  <SCLcmd>        - send raw SCL command to the controller
  cmds            - print list of SCL commands (see also for move)
  Ctrl+C          - ABORT ALL MOVES NOW
Set/Query Parameters:
  current <i>     - set/query drive current in Amps
  accel <a>       - set/query acceleration in rev/s/s
  decel <a>       - set/query deceleration in rev/s/s
  speed <rev/s>   - set/query speed in rev/s
  dist <#steps>   - set/query move distance in steps
  idle <on|off>   - enable/disable drive idle
  idlecur <i>     - set/query the idel current in Amps
  timeout <sec>   - set/query comm timeout in seconds
  polltime <msec> - set/query controller polling time in millisec
  ndata <n>       - set/query number of position data bits (0..8)
  inpos <n>       - set/query number the in-position bit address (0..8)
  ismask <..>     - set/query input status bit mask (8-bits)
  limits <off|open|closed> - set/query limit switches
Client Commands:
  info           - report client information
  version        - report sitool version & compile info
  reset          - reset runtime & controller parameters
  verbose        - toggle verbose output mode
  debug          - toggle debugging output
  quit           - quit sitool
  history        - show command history
  !!             - repeat last command
  !cmd           - repeat last command matching 'cmd'
  help or ?      - view this list
Note that all commands are case-insensitive. All commands that send raw data to the microstep controller are forced into uppercase as required by the SCL syntax.

Runtime Configuration File

This is a typical runtime config file for the sitool agent:

# # sitool runtime config file # # This is for a typical lab test bench setup with # one Si microstep drive attached to a network # serial port server (Comtrol DeviceMaster RTS-4) # # This is setup for port 1, setup as a filter wheel # # R. Pogge, OSU Astronomy Dept. # pogge@astronomy.ohio-state.edu # 2004 June 9 # ################################################################ # sitool's ISIS client info (Host=localhost is implicit) ID SCL1 Port 10701 # Application Mode: either STANDALONE or ISISclient Mode Standalone #Mode ISISclient # ISIS Server Info - only releveant if Mode=ISISclient ISISID IS ISISHost darkstar ISISPort 6600 # Mechanism port parameters (name, port, comm timeout in sec, polling # time in msec) SCLNAME Filter SCLPORT 172.16.1.56:8001 TIMEOUT 5 POLLTIME 100 # Mechanism Default Configuration: # Rotary indexed 8-position wheel, 3 data bits (IN1..IN3), # 1 in-position bit in IN4, no limit switches. # Position sensor switches assert high (1), inputs IN5-IN8 unused (0) ROTARY NPOS 8 DATABITS 3 INPOSADDR 4 LIMITS OFF ISMASK 00001111 # Default Motion Profile (accel, speed, dist, decel) ACCEL 1 SPEED 2.0 STEPPOS 51366 DISTANCE 1 DECEL 1 # Mechanism is run by an Si7080i drive, motor run at 3 amps, default # idle current of 50%, idle is turned off between moves (indexed positions # are kinematically docked) CURRENT 3.0 #IDLECUR 1.0 IDLE OFF # sitool client application runtime flags VERBOSE #nolog #debug

Note that all parameter names are case-insensitive.

Notes

This application uses the ISISclient library (link).

Code to operate the microstep drive is based on the Applied Motion Products SiNet Command Language (SCL) Software Manual for the 7080i microstep controller, 2001 edition.

Modification History

2004 June 8 - new application [rwp/osu]

Todo:

Generated on Thu Jul 22 20:02:06 2004 for SiTool Si Microstepping Motor Controller Agent by doxygen 1.3.7