Where: rcfile
is an optional runtime config file to load.
By default, fwheel uses the runtime config file defined by DEFAULT_RCFILE in the client.h header.
fwheel provides both high-level "set filter" commands and low-level motor control and diagnostic commands. Its primary purpose is as an engineering testbed application to evaluate motor controller and network serial port server devices for OSU instruments.
fwheel 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 standalone and backdoor socket interface (the same UDP socket used for ISIS server communications), we have successfully run a filter wheel test using a Perl script that makes a large number (100, 1000, etc.) random moves of the filter wheel. This makes fwheel, and related agents derived from its basic architecture, ideal for testing and prototying of mechanisms in the lab, and for engineering checkout and diagnosis in the field.
High-Level User Commands: status - filter wheel status filter n - move filterNote 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.n
into the beam load n - move filtern
into the load position findpos - seek the nearest valid position init - initialize filter wheel Engineering Commands: restore - restore controller parameters after errors mstatus - read/display microstep drive status rdpos - read position encoders stop - stop a move in progress abort - same as stop steps Nsteps - set/query number of steps/move speed rev/s - set/query speed in rev/sec 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 idle [on|off] - set/query drive idle current timeout s - set/query comm timeout in seconds send SCLcmd - send raw SCL command to the microstep controller query SCLcmd - send raw SCL query to the microstep controller Ctrl+C - ABORTS MOVE IN PROGRESS Client Commands: info - report client information version - report fwheel version & compile info reset - reset runtime & controller parameters verbose - toggle verbose output mode debug - toggle debugging output quit - quit fwheel history - show command history !! - repeat last command !cmd - repeat last command matching 'cmd' help or ? - view this help list on the client console
# # fwheel runtime config file # # Note that while mixed cases are used for readability, entries # are case insensitive *EXCEPT* for network hostnames or Unix # filenames. Beware! # # This is for the MODS1 Red Filter wheel testbed # # R. Pogge, OSU Astronomy Dept. # pogge@astronomy.ohio-state.edu # 2004 June 15 # ########################################################################### # fwheel's ISIS client info (Host=localhost is implicit) ID FW Port 10601 # Application Mode: either STANDALONE or ISISclient Mode Standalone #Mode ISISclient # ISIS Server Info - only releveant if Mode=ISISclient ISISID None ISISHost darkstar ISISPort 6600 # fwheel runtime flags VERBOSE #nolog #debug # Filter Wheel parameters FWNAME Filter # Communications Port, timeout interval (sec), polling time (msec0 FWPORT 172.16.1.56:8001 TIMEOUT 5 POLLTIME 100 # The MODS filter wheel is an-8 position rotary mechanisms, 3 data bits, # 1 in-position bit, inputs assert high. There are no home or position # occupation sensors. The in-beam position is the same as the encoder # position (0 offset), while the load position is offset either +6 # (right-hand port) or -2 (left-hand port). ROTARY NPOS 8 DATABITS 3 INPOSBIT 4 ISMASK 00001111 BEAMOFF 0 LOADOFF 6 # The controller is Si7080i microstep drive operating at 3 amps drive # current, with idle disabled between moves. Drive microstep resolution # is 20000 microsteps/rev CURRENT 3.0 IDLE OFF RESOLUTION 20000 # Motion Profile: # Accelerate 1 rev/s/s out of the detent # drive at a speed of 2 rev/sec for 51366 steps/position # decelerate 1 rev/s/s ACCEL 1 SPEED 2.0 STEPPOS 51366 DECEL 1
Relevant parameters are:
Client Paramaters: ID - ISIS node name of this application Port - Port number to use on localhost for socket I/O Mode - Client mode, Standalone or ISISclient ISISID - name of an ISIS server (None if running Standalone) ISISHost - hostname where the ISIS server is running ISISPort - port number of the ISIS server on ISISHost VERBOSE - enable verbose runtime info DEBUG - enable super-verbose engineering debug info
Port Communications Parameters: FWPORT - comm port with the microstep controller (/dev/ttyxx for direct serial, or IP:port for network serial ports) TIMEOUT - communications timeout interval in seconds POLLTIME - controller polling time in milliseconds
Filter Wheel Parameters: FWNAME - name for the device (e.g., filter wheel)
ROTARY - filter wheels are rotary mechanisms NPOS - number of filter positions in the wheel (e.g. 8) DATABITS - number of input data bits (position encoders) INPOSBIT - address of the inposition bit sensor ISMASK - input status bitmask (see SCLReadStatus()) BEAMOFF - beam position offset from encoder position LOADOFF - load position offset from encoder position
Microstep Drive Parameters: CURRENT - motor drive current in Amps IDLE - idle motor when not moving (OFF|ON) MICROSTEPS - microstep resolution of the drive 20000
Motion Profile: ACCEL - motor acceleration in rev/s/s SPEED - motor drive speed in rev/sec STEPPOS - number of steps per filter position DECEL - motor deceleration in rev/s/sNote that all parameter names are case-insensitive.
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.
2003 Oct 12 - improved command tree version [rwp/osu] 2003 Oct 25 - added a wide range of motor controller commands [rwp/osu] 2003 Oct 26 - experimenting with readline/history [rwp/osu] 2003 Nov 02 - modified for new ReadISISSocket() syntax [rwp/osu] 2004 Mar 18 - completely reworked SCLLib, and firmed up the code structure, now a better template for future apps [rwp/osu] 2004 May 20 - added Doxygen hooks and recast all internal comments [rwp/osu] 2004 Jun 15 - modified to use new si_mechanism struct and motion control API code developed based on earlier versions of fwheel [rwp/osu]