CTIO
Published on CTIO (http://www.ctio.noao.edu/noao)

CTIO Home > Hydra > Software > The Hydra Positioner Software

The Hydra Positioner Software

Overview

Hydra-CTIO GUI runs on ctioa6 and connects to the Hydra instrument through an RS-422 serial line. The ctioa6 machine is also connected to the local ethernet network allowing Hydra GUI to request status and send commands to the TCS [1] through the GWC router.

The FOPS Guider machine is also connected to the local ethernet network allowing Hydra-CTIO to send direct commands to enable/disable guiding. The FOPS Guider machine send the guiding command thorugh an RS-232 serial line to the TCS program running on ctiox0.

 

hydra_hw_setup.gif

 

The TCS program running on ctiox0 doesn't have native support for the GWC libraries so an auxiliary program running on ctiot2 provides that support. The program running on ctiot2 is called tcsrouter [2] and basically routes messages from other applications, coming through the router, to the TCS.

 

Embedded Galil Software Coding Standard

Software for the Galil controller will adhere to the following standards:

Any file containing more than just plain Galilreadable Code will begin with the line containing:

%ENHANCED

 

1) Commenting embedded code

The Galil box does not provide for a commenting mechanism. Therefore, the source will be run through a pre-processor before being downloaded into the galil box. This is written in Visual basic and runs along with the various V.B. tools under Windows.

Any line beginning with a '%' is a comment. In addition, any content on a line that follows a '%' on the line will be treated as a comment, up to the newline.

 

Special tags in comments

A set of special tags will be used to help make the code readable. These tags are used to identify the locations where functions and variables are defined for the first time. They are listed below, as well as with the specification for each item.

%D%G --a global variable that can be used across files
%D%L --a Local variable that should only be used within a file
%D%A --an argument variable for a function
%D%R --a result variable for a function
%D%I --an internal variable for a function

%BeginFunction -- the marker that this is code to be downloaded.

An example of the syntax is

#foofunc %BeginFunction

[...]

EN

The downloading routines start out by assuming that all data is to be immediately exectuted as commands. A buffer is built up and then sent to the black box before any software is downloaded. The %BeginFunction Tag causes the following lines to go into the "program" buffer until an "EN" is encountered.

Variables are defined as in the following example:

fooARG1 = 0 %D%A Argument #1 for the function "foo".

Note that it is the programmer's repsonsibility to create and maintain these tags to insure their accuracy. The meanings of the terms "global", "local", "argument", "result", and "internal" are given in the section on variables.

 

2) File Header

Each file will contain a comment block that contains the Name of the file, the date created, modification dates, and the names of the authors. This will be followed by a detailed description of what the subsequent code does, and a general discussion of why it was written the way it was.

 

3) Functions

All functions will be preceded by a comment block that describes the function, and its design. Since the Galil software does not provide for a return stack for function for setting arguments and/or results, each function may have a variables for supplying input data and returning results. The naming convention for these is "xxxARGn" and "xxxRSLTn" where 'xxx' is the first 3 characters of the name of the function, and 'n' is a number that differentiates the various args/results. These variables must use the case convention shown above.

Note that more explanitory suffix can be used in some cases, such as "MovARGx" and "MovARGy".

Functions are not re-entrant, and recursion is not allowed.

 

4) Variables

While all variables in the box are global, certain conventions will make reading the code easier...

All variables will be "created" by assigning them a value of zero via the interactive mode of the box. i.e. outside of a "%BeginFunction" segment. Creating variables by reference, other than for exclusive use within a function, is forbidden.

 

Globals

All variables that are to be used globally will appear after the header block, with a description of their purpose. In addition, their definition line will contain a comment that begins with the tag %D%G. It is suggested that global variable names begin with an upper case letter.

 

Function Variables

All variables that are only used locally by a subroutine will appear after the header for that subroutine. No variable declared within a function block will be referenced except by that function with the following exception: functions will be allowed to use function argument and function result variables as discussed below.

 

Function Arguments

A function argument is a variable that must be set to a value before the invocation of the associated function. As with all variables it should be declared before the "%BeginFunction" segment of the function. In addition it must be commented with a %D%A tag. The naming convention is "abcARGn" where abc is the first 3 characters of the function name, and n is and additional identifier. Example:

abcARG1 %D%A --first argument to function "abcdefg"

 

Function Results

A function result is a variable that is analagous to a function variable, but is set by the function to a result code before the function exits. As with all variables it should be declared before the "%BeginFunction" segment. In addition it must be commented with a %D%R tag. The naming convention is "abcRSLTn" where abc is the first 3 characters of the function name, and n is and additional identifier. Example:

qrsRSLTx %D%A --result 'x' of function "qrstuv"
qrsRSLTy %D%A --result 'y' of function "qrstuv"

 

Function local variables.

In some cases, A function may need it's own internal variables. These variables may have any name, but a suggestion would be to keep the first 3 letters the same as the first 3 of the function name, since all variables in the box are global in reality. An example:

qrsKarma %D%I --the internal karma of function "qrstuv"

 

Last Modified: April 27, 2000
rcantarutti

 

Embedded Galil Software Files

The embedded galil software source code is written according to the "embedded galil software coding standard [3]". The embedded galil software source code is distributed in seven files: buttmove.g, coldstrt.g, errors.g, gripops.g, main.g, periphio.g and xyops.g

Another file called "makefile.mak" list the files above and is used by the "Source Edit Tool" of the "Visual Basic Maintenance Tool" to download the files into the galil box.

 

1) buttmove.g

This file contains all the code related to moving buttons at the black box level. Right now we are only using #Move. None of the other functions is in use.

INCL. FUNCTIONS:

(Note: that all embedded functions begin with a "#" This is a Galil Firmware convention.)

#Move --Move a button to a new location.

GLOBAL VARIABLES DEFINED IN THIS FILE:

Pi = 3.141592653 TwoPi = 6.283185307

The following variables are the basis of ALL the plate geometry. Don't edit them except in this file!

MaxFib = 288 --the number of fibers in the system.

rPark = 215000 --radius of the park circle, encoder steps
rStow = 214250--radius of the stow circle, encoder steps
rStep = 214200 --radius of the stair step, encoder steps

GrpOutX = -200000 --X position for parking gripper
GrpOutY = -200000 --Y position for parking gripper

phiStow = 0.0001 --angular offset between stow and park positions.

thetaSep = 360 / MaxFib --The angle between buttons park positions with respect to the center of the plate
(possible values for ButtI[n] )

The following "global" variable is a record of which button was last known to be in the gripper. It is used in the event there is a failure to drop a button, or the system comes on line with a button in the gripper.

InGrip = -1 --Button Currently in gripper

These variables allow the move velocities for x-y operations to be changed during operation of the positioner without re-loading the code. These are the default values. from early in the project.

MovAccel = 1000000 --Acceleration for moving buttons
GoToVel = 1000000 --Velocity for traveling to buttons
MovVel = 500000 --Velocity for moving buttons
SloVel = 500000 --Special velocity for moving FOPS

 

2) coldstrt.g

This file contains the initialization routines for the high level system. individual axis initialization functions are in the drivers for the respective axis.

INCL. FUNCTIONS:

(Note that all embedded functions begin with a "#". This is a Galil Firmware convention.)

#Cold -- starts up the system
#ShutDn -- shuts down the system

GLOBAL VARIABLES DEFINED IN THIS FILE

(none)

 

3) errors.g

This file contains various error handling functions.

INCL FUCNTIONS:

#OrthStp -- interrupt handler for stage mis-alignment.
#Fault -- interrupt handler for master fault.
#Panic -- empty
#IntrOn -- allows user to re-enable interrupts after error.

GLOBAL VARIABLES DEFINED IN THIS FILE

rtBitON = 4 -- Mask to enable the orthogonality interrupt
OrtBitOF = 251 -- Mask to disable the orthogonality interrupt.
FauBitON = 16 -- Mask to enable the "fault" interrupt.
FauBitOF = 239 -- Mask to disable the "fault" interrupt.

 

4) gripops.g

This file contains the code that operates the gripper and z stage.

INCL. FUNCTIONS:

#Grab -- picks up a button
#Drop -- drops up a button
#Open -- opens the gripper
#Close -- closes the gripper
#IfButt -- see if a button is in the gripper
#Zinit -- initializes the z axis
#Zhome -- homes the z axis
#zgo - move the z axis to the specified position.
#Ginit -- initializes the gripper axis
#Ghome -- homes the gripper axis

LOCAL VARIABLES INCLUDED IN THIS FILE:

zCarry = 100 -- Z value at which to carry buttons.
zPlate = -4500 -- Z value at which to position buttons on plate.
zPark = -6700 -- Z value at which to position buttons on park circle.
zToClr = -500 -- Z offset that clears a just released button.
PushDist = 30 -- Additional amount to push button into plate when dropping.
zAccel = 800000 -- acceleration for Z axis
zVel = 3000000 -- velocity for Z axis
zHAccel=10000 -- acceleration for himing Z axis
zHVel = 60000 -- velocity for homing Z axis
gAccel = 1000 -- acceleration for gripper
gVel = 200 -- velocity for gripper
gWOpen = 130 -- wide open position
gOpen = 110 -- open position
gRelax = 85 -- relax position

 

5) main.g

This file contains the top level function that starts up the box on reset. It also holds the "reserved" functions that are defined by the Galil Firmware for interrupt handling and various error conditions.

INCL. FUNCTIONS:

#AUTO -- This function is called on system reset.
#CMDERR -- traps command errors.
#ININT -- reserved by the box as the input interrupt handler.

GLOBAL VARIABLES INCLUDED IN THIS FILE

Reboot = 1 -- Flag to indicate system has rebooted and must be initialized.
IntMask = 20 --Interrupt mask for system. 20 means that interrupts 3 and 5 are enabled.
Inhibit = 1 --Flag not to move. Set true by error handlers. Cleared by XYhome.
DbVoid = 1 --Flag that the internal database has been reset and must be reloaded.

Controller Tuning Parameters:

KPX = 16.0
KPY = 14.0
KPZ = 600.0
KPW = 16.0
KDX = 45.0
KDY = 26.0
KDZ = 2178.0
KDW = 48.0
KIX = 2.13
KIY = 2.0
KIW = 3.0
KIZ = 31.0

Software Limits:

FLX = 230000
FLY = 227000
FLW = 240000
BLX = -230000
BLY = -226000
BLZ = -227000

 

6) periphio.g

This file contains the various functions for controlling assorted peripheral devices such as the focal plane plate.

INCL. FUNCTIONS:

#Led -- Sets the on/off/brightness of the gripper LED
#Plate -- Warps or flattens the focal plane plate
#IsWarpd -- Returns warp/flat status of plate
#Temp -- Reads back a specified thermal probe
#Fan -- Turns the electronic's box fan on or off
#Pwr -- Reads and returns the status of various power monitors.

GLOBAL VARIABLES DEFINED IN THIS FILE

Tscale = 1 -- Scaling factor for thermal sensor calibration.
Toofset= 1 -- Offset factor for thermal sensor calibration.

 

7) xyops.g

This file contains the code that executes xy/motion Along with the initialization routines for the xy gantry system.

INCLUDED FUNCTIONS:

(Note that all embedded functions begin with a "#" This is a Galil Firmware convention.)

#XYinit --Main Gantry initialization.
#XYhome --Main Gantry Homing function.
#xhome --Homes X only
#whome --Homes W only
#yhome --Homes Y only
#encCalc --Computes position based on encoder index marks
#Brakes --Locks and unlocks the brakes
#xygo --The *MAIN* x/y motion routine.
#where --Reports the various axis positions as tcl set.

GLOBAL VARIABLES DEFINED IN THIS FILE

Note that the following variables are the only means by which to adjust the plate center.

EncCx = -179628 --Zero point offset for primary x axis linear encoder. Use this value to offset *both* X/W. i.e. the plate center.

EncCy = -259064 --Zero point offset for y axis linear encoder.

EncLn = 500000 --Length of the x encoder in pulses (appx) This is used as part of a kludge since the X encoder had to be mounted backwards.

EncCw = -130081 --Zero point offset for slaved w axis linear encoder. Use this value to correct orthoganality only.

Hvel = 50000 --Velocity for homing x,y
Haccel = 80000 --Acceleration for homing x,y

 

Last Modified: April 27, 2000
rcantarutti

Embedded Galil Software Routines

AUTO Brakes Close CMDERR Cold Drop encCal Fan
Fault Ghome Ginit Grab IfButt INIT IntrOn IsWarpd
Led Move Open OrthStp Park Plate Pwr ShutDn
Temp where xhome, yhome & whome xygo XYhome XYinit
    zgo Zhome Zinit      

 

AUTO

This function is called on system reset. It's a special label (Galil Firmware) to create an autostart program on power-up. Everything starts from here. One of it's main functions is to flag that nothing is initialized. Various functions read the variable "Reboot" and terminate if it is non zero. Other functions are to lock the brakes and turn the drives off.

File: main.g

Args: (none)

Results: (none)

Messages sent to the Mid-level code: (none)

Embedded functions called from this one:

JS #Brakes
JS #DbCreat
JS #Temp

back to top

Brakes

This function locks/unlocks the brakes on the x/y gantry.

File: xyops.g

Args:

BraARG1 -- Lock/unlock flag
0 = lock Brakes
<> 0 = un-lock Brakes

Results:

BraRSLT1
0 = No Error.
>0 = Gallil error code resulting from "OB" command.

Messages sent to the Mid-level code:
           (normal)

MG "boxBrakes set state starting"
MG "boxBrakes set mode locked"
MG "boxBrakes set mode unlocked"
MG "boxBrakes done"

(errors)

MG "boxBrakes set result error"
MG "boxBrakes set error NoBrakes"

back to top

Close

This function closes the gripper. It then tests for button presence. It takes no arguments and set two different result variables before it exits. Result variable CloRSLT1 is set to the result of closing the gripper. Result variable CloRSLT2 is set to zero if the gripper is empty after closing the jaw. If after closing the jaw a button is present CloRSLT2 is set to one.

File: gripops.g

Args: (none )

Results:

CloRSLT1 Result of closing gripper.
0 = No error, i.e. closed
2-99 = Error. Value from galil "SC" command.

CloRSLT2 Button presence after gripper close.
0 = Gripper empty
1 = Button in gripper

Messages sent to the Mid-level code:
        (normal)

MG "boxClose set state starting"
MG "boxClose set result ok"
MG "boxClose set mode closed"
MG "boxClose done"

(errors)

MG "boxClose set result error"
MG "boxClose set error NoClose"


Embedded functions called from this one: (none)

back to top

CMDERR

This function traps command errors and causes them to retrun an error code to whatever function happened to be running at the time. Basically this is a "I forgot to test for it" trap.

File: main.g

Args: (none)

Results: (none)

Messages sent to the Mid-level code: (none)

Embedded functions called from this one: (none)

back to top

Cold

This function starts up the system. First, the system is put in a safe state. Next the satus monitor is started up. Finally, the initialization functions (init and home) for each axis are called with safety checks along the way. The initialization will abort if there is an unexpected error.

File: coldstart.g

Args:

ColARG1 = Level of safety override
0 = No safety overrides.
1 = Initialize with a button present.

Results: (none)

Messages sent to the Mid-level code:
           (normal)

MG "boxCold set state starting"
MG "boxCold set result ok"
MG "boxCold done"

(errors)

MG "boxCold set result error"
MG "boxCold set error ButtonOnInit"
MG "boxCold set error ButtonNotID"
MG "boxCold set error GripInit"
MG "boxCold set error NoStatMon"
MG "boxCold set error NoGripInit"
MG "boxCold set error NoZInit"
MG "boxCold set error NoXYInit"
MG "boxCold set error UnknownErrInit"
 

Embedded functions called from this one:

JS #Ginit -- initializes the gripper axis
JS #Ghome -- homes the gripper axis
JS #IfButt -- see if a button is present
JS #Zinit -- initializes z axis
JS #Zhome -- homes the z axis
JS #XYinit -- initializes xy gantry system
JS #XYhome -- home the xy gantry system

back to top

Drop

This function drops up a button on the plate using the user supplied argument to decide how much to descend on the z axis. It determines the Z distance based on current radius from the center of the plate. Set argument variable DroARG1 to zero to compute the drop height based on x/y position. Set GraARG1 to 1 to assume drop on plate. Set GraARG1 to 2 to assume drop on park circle.

File: gripops.g

Args:

DroARG1 = Plate distance. See comment block above.
0 = Compute drop height from x/y position
1 = Assume drop on plate.
2 = Assume drop on park circle.
 

Results:

DroRSLT1 = Result of attempt to drop button.
0 = No Error.
1 = button still in gripper.
2 = Motion error
3 = Bad Argument

DroRSLT2 = Z status after dropping.
0 = No Error.
>1 = Galil "SC" result for last z move

DroRSLT3 = griper status after dropping.
0 = No Error.
>1 = Galil "SC" result for last gripper move
 

Messages sent to the Mid-level code:
           (normal)

MG "boxDrop set state starting"
MG "boxDrop set result ok"
MG "boxDrop done"

(error)

MG "boxDrop set result error"
MG "boxDrop set error GripInop"
MG "boxDrop set error NotDropped"
MG "boxDrop set error zInop"
MG "boxDrop set error BadArg"
Embedded functions called from this one:
#Open -- opens the gripper
#Close -- closes the gripper

back to top

encCalc

This function computes the encoder position from the distance between two reference marks. Note that this algorithm is specific to the Heidenhain Encoders. Variable names follow those in the documentation from the manufacturer.

The basic premise of this scheme is that index marks can be positioned in such a way that one only need traverse two of them and knowing the direction of travel, the absolute position of the first mark encountered can be determined.

The xhome, whome, and yhome routines all call this function as they all use the same type of encoder. This is a generic routine for any encoder of this type.

Note that this function is used internally and sends no messages back to the mid level code.

One should read the encoder documentation and the source for a complete understanding of how these routines work.

Args:

encARG1 = encoder position of 1st index mark encountered
encARG2 = encoder position of 2nd index mark encountered
encARGz = direction of travel

Results:

encRSLT1 = result of encoder formula.

back to top

Fan

This function turns the electronic box cooling fan on/off. Set the argument variable FanARG1 to zero if you want to turn the fan off, and set it to one if you want to turn the fan on. The function use output 16 of the Galil Box to command the fan.

File: periphio.g

Args:

FanARG1
0 = Fan Goes off
1 = Fan Goes on

Results: (none, just writes an i/o bit)

Messages sent to the Mid-level code:

MG "boxFan set state starting"
MG "boxFan set mode 0"
MG "boxFan set mode 1"
MG "boxFan set result ok"
MG "boxFan done"

Embedded functions called from this one: (none)

back to top

Fault

This function handles the hardware "error" interrupt. This interrupt is assigned to input 5.

File: errors.g

Args: (none)

Results: (none)

Messages sent to the Mid-level code: (none)

Embedded functions called from this one: (none)

back to top

Ghome

This function homes the Gripper axis. First it checks to see if it's already into the home switch. If so, it backs out of it. Then it jogs slowly into the switch.

File: gripops.g

Args: (none)

Results:

GhoRSLT1 = 0 % Result code.
0 = No error

Messages sent to the Mid-level code:
           (normal)

MG "boxGhome set state starting"
MG "boxGhome set result ok"
MG "boxGhome done"

(error)

MG "boxGhome set result error"
MG "boxGhome set error NoHome"

Embedded functions called from this one: (none)

back to top

Ginit

This function initializes the gripper axis. Every time this function is called it loads the GripPos array. Then configures the encoders and motor type for G and enable the motor.

File: gripops.g

Args: (none)

Results:

GinRSLT1 = Result of homing gripper.
0 = No error

Messages sent to the Mid-level code:

MG "boxGinit set state starting"
MG "boxGinit set result ok"
MG "boxGinit done"

Embedded functions called from this one: (none)

back to top

Grab

This function picks up a button from the plate using the user supplied argument to decide how much to descend on the z axis. It determines the Z distance based on current radius from the center of the plate. Set argument variable GraARG1 to zero to compute the distance based on x/y position. Set GraARG1 to 1 to assume gripper is over the plate. Set GraARG1 to 2 to assume gripper is over the park/stow area.

File: gripops.g

Args:

GraARG1 = What height to use
0 = Compute z distance based on x/y position
1 = Assume gripper is over the plate
2 = Assume gripper is over the park/stow area.

Results:

GraRSLT1 = Result code.
0 = No Error.
1 = Gripper Inoperative.
2 = No button found.

Messages sent to the Mid-level code:
(normal)

MG "boxGrab set state starting"
MG "boxGrab set result ok"
MG "boxGrab done"

(errors)

MG "boxGrab set result error"
MG "boxGrab set error GripInop"
MG "boxGrab set error NotFound"
MG "boxGrab set error BadArg"

Embedded functions called from this one:

#Open -- opens the gripper #Close -- closes the gripper

back to top

IfButt

This function Determines if a button is in the gripper. It first insures that the gripper is configured such that the test is valid. Under the present design, this means closing the jaws, and returning the result of the close operation. Later, it might be possible to detect a button no matter what the state of the gripper, and this function would be modified accordingly.

File: gripops.g

Args: (none)

Results:

IfBRSLT1 = Result of test for button.
0 = No Button.
1 = Button in gripper.
>1 = Gripper Error ( See "Close" )

Messages sent to the Mid-Level code:
(normal)

MG "boxIfButt set state starting"
MG "boxIfButt set mode nobutton"
MG "boxIfButt set mode button"
MG "boxIfButt set result ok"
MG "boxIfButt done"

(errors)

MG "boxIfButt set result error"
MG "boxIfButt set error NoClose"

Embedded functions called by this one:

#Close -- closes the gripper

back to top

ININT

This function is reserved by the box as the input intterupt handler. If any of the input interrupts have been enbled by the "II" command, this routine will called when the associated input bit goes low. From there, this routine will poll to see what needs service. "Reboot" and terminate if it is non zero.

File: main.g

Args: (none)

Results: (none)

Messages sent to the Mid-level code: (none)

Embedded functions called by this one: (none)

back to top

IntrOn

This function allows a user to reenable interrupts after an error.

File: errors.g

Args: (none)

Results: (none)

Messages sent to the Mid-level code: (none)

Embedded functions called by this one: (none)

back to top

IsWarpd

This function read back the vacuum sense switch on the plate. It takes no arguments. The current on/off state of the sense switch is returned in result variable IsWRSLT1. The function reads analog input 9 to check the switch out.

File: periphio.g

Args: (none)

Results:

IsWRSLT1 = sense sqitch status.
0 Plate is flat.
1 Plate is warped.

Messages sent to the Mid-level code:

MG "boxIsWarpd set state starting"
MG "boxIsWarpd set mode", IsWRSLT1 {F2.0}
MG "boxIsWarpd set result ok"
MG "boxIsWarpd done"

Embedded functions called from this one: (none)

back to top

Led

This function turn the gripper LED on to the specified level (Or else off....). Set argument variable LedARG1 to the desire level of intensity. A value of zero will turn the gripper LED off. The function uses the lowest 3 bits of I/O port 0 on the Galil Box to select the desired level (mask used with "OP" is 65532 or "1111 1111 1111 1000").

File: periphio.g

Args:

LedARG1 = intensity level.
0 = Led off
1 = On, low
2 = On, medium
3 = On, high.

Results: (none, just sets IO bits)

Messages sent to the Mid-level code:

MG "boxLed set state starting"
MG "boxLed set result ok"
MG "boxLed done"

Embedded functions called by this one: (none)

back to top

Move

Caution: This page is meant to be an abstract of calling conventions and function behavior and does not document the details of the code.

The #Move function moves a fiber from one location to another as specified in the arguments. This is the fundemental function of the system, and all other functions are secondary to this one.

Pre-move safety checks include making sure of no collisions, valid destination, and no button presence in the gripper. All this checkings must be made by the mid/high-level code before moving a fiber. If you are using this function directly then be very careful because no safety checks are made by this function.

Next, the gripper travels to the button (see the functions in "xyops.g"), and attempts to grab it. (documented with the file "gripops.g") If successful, the gripper relax and the button is carried to the new location, and an attempt made to drop it. If the drop fails, the button can be parked directly from the gripper.

File: buttmove.g

Args:

MovARG1 = x current location
MovARG2 = y current location
MovARG3 = x destination location
MovARG4 = y destination location
 

Results:

MovRSLT1 = Result code. Note that 0-4 are same as button status.
0 = No Error.
1 = Locked.
2 = Not found
3 = Dropped
4 = Positioner not operational
5 = Last move not yet broadcast.
6 = Could not drop
7 = X,Y Motion Failure
8 = Button present on entry
9 = Database has not been initialized since reboot
 

Messages sent to the Mid-level code:
(normal)

MG "boxMove set state starting"
MG "boxMove set state seek"
MG "boxMove set state grab"
MG "boxMove set state carry"
MG "boxMove set state drop"
MG "boxMove set result ok"
MG "boxMove done"

(errors)

MG "boxMove set error FibLocked"
MG "boxMove set error NotFound"
MG "boxMove set error LostInTransit"
MG "boxMove set error PosNotOp"
MG "boxMove set error LastNotBroadcast"
MG "boxMove set error NotDropped"
MG "boxMove set error NoXYmove"
MG "boxMove set error GripNotEmpty"
MG "boxMove set error DbaseUndef"
 

Embedded functions called from this one:

JS #IfButt -- see if a button is present.
JS #xygo -- the xy move function
JS #Grab -- pick up the button.
JS #xygo -- the xy move function
JS # IfButt -- see if a button is present.
JS #Drop -- drop the button.

back to top

Open

This function opens the gripper. The user supplied argument is used to determine the final position. If OpeARG1 is 0 then the final position will be "closed". If set to 1 the final position will be "relaxed". If set to 2 final position will be "normal open" position. If set to 3 the final position will be "open wide" position. This are the same values used in the array GripPos.

File: gripops.g

Args:

OpeARG1 = Position to open gripper to.
0 = Closed position
1 = Relaxed position
2 = Normal open position
3 = Open wide position

Note that the values used are in the array "GripPos", defined at the top of this file. Note also that this function doesn't return any button presence and that an open with an arg of zero is NOT the same as a "close" The first option is just there for completeness.
 

Results:

OpeRSLT1 = Result of opening gripper.
0 = No error, i.e. open
2-99 = Error moving gripper jaws. Value from galil "SC" command
 

Messages sent to the Mid-level code:
          (normal)

MG "boxOpen set state starting"
MG "boxOpen set mode ", OpenARG1
MG "boxOpen set result ok"
MG "boxOpen done"

(errors)

MG "boxOpen set result error"
MG "boxOpen set error NoOpen"
Embedded functions called from this one: (none)

back to top

OrthStp

This function is called by the interrupt handler to see if the interrupt was caused by a stage mis-alignment.

File: errors.g

Args: (none)

Results:

OrtRSLT1
0 = No Orthoganality Problem
1 = Stages mis-aligned, System stopped.
2 = Stages mis-aligned, Couldn't stop.

Messages sent to the Mid-level code:(none)

Embedded functions called from this one: (none)

back to top

Park (not used)

DISCUSSION

This function parks the specified button. It is simply a shell wrapped around the Move function. It generates the appropriate destination coordinate mathematically, and adds one additional return value: "button already parked". The computations used to determine the park position are discussed below:

Compute the angle, at the center of the plate, between the "zero" fiber and the park position of the target fiber. thetaSep is the angle between adjacent parked buttons, in a polar coordinate system coincident to the center of the focal plane plate.

thetaP = thetaSep * ParARGid

Since variables are scarce, use the input variables for the move command as working storage... Then, if we actually move, they'll already be ready to go.

MovARGx = rPark * @COS[ thetaP ] MovARGy = rPark * @SIN[ thetaP ]

We always test for already being there. First, compute the x,y errors from the desired position, and then skip the rest if both are less than the prescribed value. tmp1 and tmp2 are scratch variables and my get used by other functions. Don't count on them being valid any time after this function ends.

tmp1 = @ABS[ MovARGx - ButtX[MovARGid] ] distance from "parked" in X
tmp2 = @ABS[ MovARGy - ButtY[MovARGid] ] distance from "parked" in Y

tmp1 and tmp2 then get tested against a tolerance.

File: buttmove.g

Args:

ParARGid , button to be moved.
 

Results:

ParRSLT1 , Result code. Note that the first 8 are the same as "Move" and are simply passed back from it.

0 = No Error.
1 = Locked.
2 = Not found
3 = Dropped
4 = Positioner not operational
5 = Last move not yet broadcast.
6 = Could not drop
7 = X,Y Motion Failure
8 = Button present on entry
9 = Already parked, no action.
 

Messages sent to the Mid-level code:
          (normal)

MG "boxPark set result ok"
MG "boxPark done"

(errors)

MG "boxPark set result error"
MG "boxPark set error NotParked"
MG "boxPark set error AlreadyParked!"
 

Embedded functions called from this one:

JS #Move % Call the Move Subroutine.

back to top

Plate

This function warp or flatten the focal plane plate. Set PlaARG1 to 0 to flatten the focal plate. Set PlaARG1 to 1 to warp the focal plate. The function uses output bit 10 to open/close the vaccum valve thus warping or flattening the plate.

File: periphio.g

Args:

PlaARG1 = Warp or flatten.
0 = Flatten plate
1 = Warpe plate
 

Results:

PlaRSLT1 = Result code.
0 = NoError
1 = Plate didn't warp
2 = Plate didn't flatten
 

Messages sent to the Mid-level code:
          (normal)

MG "boxPlate set state starting"
MG "boxPlate set mode warp"
MG "boxPlate set mode flat"
MG "boxPlate set result ok"
MG "boxPlate done"

(errors)

MG "boxPlate set state error"
MG "boxPlate set error NoWarp"
MG "boxPlate set error NoFlat"
 

Embedded functions called from this one:

JS #IsWarpd -- read back the vaccum sense switch.

back to top

Pwr

This function returns the status of various power monitoring bits. Use this function to check the status of the power supplies and U.P.S. Bit 0 (blackbox input 11) refers to the 'on battery' U.P.S. condition. Bits 1 (blackbox input 12) refers to the 'low battery' U.P.S. condition. A value of one for bits 0 and 1 indicates that the condition is active. Bit 3 (blackbox input 14) shows the status of the 5V power suply. Bit 4 (blackbox input 15) shows the status of the 12V power supply. A value of zero for bits 3 and 4 indicates fault condition.

File: periphio.g

Args: (none)

Results:

PwrRSLT1, returns an integer with the appropriate bits
 

Messages sent to the Mid-level code:

MG "boxPwr set state starting"
MG "boxPwr set mode", PwrTmp {F3.0}
MG "boxPwr set result ok"
MG "boxPwr done"

Embedded functions called from this one: (none)

back to top

ShutDn

This function shut's down the system to an inert state system. Each level representents a progressively greater shutdown and includes the operations from the level below it.

File: coldstart.g

Args:

ShuARG1, how far the shut down
0 = Gripper Moves out
1 = Brakes lock and Drives power off.
2 = All switchable Optos go off.
3 = DataBase is invalidated.
 

Results:

ShuRSLT1, result of shutting down
0 = No Error.
 

Messages sent to the Mid-level code:
          (normal)

MG "boxShutDn set state starting"
MG "boxShutDn set state GripOut"
MG "boxShutDn set state DrivesOff"
MG "boxShutDn set state OptosOff"
MG "boxShutDn set result ok"
MG "boxShutDn done"

(errors)

MG "boxShutDn set result error"
MG "boxShutDn set error NoShutDown"
 

Embedded functions called from this one:

JS #xygo -- moves the xy gantry system
JS #Brakes -- lock/unlock brakes on xy gantry system

back to top

Temp

This function choose and read back one of the temperature sensors. The temperature sensors are selected by writing the given 3 bit mask TemARG1 to the I/O port 0 on the box. The function uses bits 5-7 of this port. The mask used with "OP" is 65311 or "1111 1111 0001 1111". Once the channel is selected the function reads back analog input 5. This readout is then scaled and corrected using local constants "Tscale" and "Toofset" to get the actual temperature.

File: periphio.g

Args:

TemARG1, 3 bit mask for selection of channel
 

Results:

TemRSLT1, number respresenting temp.
 

Messages sent to the Mid-level code:

MG "boxTemp set state starting"
MG "boxTemp set mode", TempVal {F3.2}
MG "boxTemp set result ok"
MG "boxTemp done"

Embedded functions called from this one: (none)

back to top

where

This function Simply returns the positions of the various axis as a TCL set.

File: xyops.g

Args: (none)

Results: Outpouts a string

Messages sent to the Mid-level code:
           (normal)

MG "boxwhere set state starting"
MG "boxwhere set mode { ", {N}
MG " ", _TPX {F7.0}, {N}
MG " ", _TPY {F7.0}, {N}
MG " ", _TPW {F7.0}, {N}
MG " ", _TPZ {F6.0}, {N}
MG "}"
MG "boxwhere done"

back to top

xhome, yhome & whome

These functions home the various gantry axis (note that this function is essentially identical for all 3 axis and only the variable names change. The one exception to this is that the X encoder is mounted backwards and there is a bit of extra code in "xhome" to compensate for that). These homing routines are *entirely* dependent on the Heidenhein encoders and their coded referrence marks. This will not work with any other kind of encoder. The axis moves until two index pulses are found and then the positions are fed to an algorithm that determines the absolute position of the first index mark. The stage moves back to that mark and then sets the encoder value to the computed position, offset by a user supplied constant that is used to put the zero point at the convenient position.

File: xyops.g

Args: (none)

Results:

xhRSLT1
0 = No Error.
1 = Motion didn't start.
2 = No index pulses were found.
 

Messages sent to the Mid-level code:
          (normal)

MG "boxxhome set state starting"
MG "boxxhome set result ok"
MG "boxxhome done"

(errors)

MG "boxxhome set result error"
MG "boxxhome set error NoMotion"
MG "boxxhome set error NoIndexMark"

Embedded functions called from this one:

JS #encCalc

back to top

xygo

This function Moves the x/y gantry system to the specified coordinates.
NOTE: This is the master function for x/y motion and should be the only one used since it impliments various safety checks. Direct operation of the x,y,w axis should be avoided. Moves generated using this function will be coordinated in X and Y. This function also makes sure that all the drives are on, and sets up a non-orthognality interrupt.

File: xyops.g

Args:

xygARGx -- New X position
xygARGy -- New Y position
xygARGa -- Acceleration along the vector
xygARGv -- Velocity along the vector
 

Results:

xygRSLT1
0 = No Error.
1 = No motion
2 = Motion inhibited
3 = No Drives
 

Messages sent to the Mid-level code:
          (normal)

MG "boxxygo set state starting"
MG "boxxygo set result ok"
MG "boxxygo done"

(errors)

MG "boxxygo set result error"
MG "boxxygo set error NoDrive"
MG "boxxygo set error NoMotion"
MG "boxxygo set error Inhibited"

Embedded functions called from this one: (none)

back to top

XYhome

This function homes the x/y gantry system including setting the orthoganality of x/y. If the argument is zero, it will exit upon finding a button in the gripper, without moving anything. The steps followed are:

1 Check for buttons.
2 Gear X to W.
3 Home W.
4 Gear W to X
5 Home X
6 Send X/W to the average of their positions. (This is the orthoganality correction)
7 Define the true position of X/W.
8 Home Y
9 Define the true position of Y.
10 Move the gantry to the 0,0 point (tradition)

File: xyops.g

Args:

XYhARG1 Level of safety override
0 = No safety overrides.
1 = Home with button present.
2 = Continue even if one axis fails
 

Results:

XYhRSLT10 = No Error.
1 = Called before initialization
2 = Unknown button in jaws.
3 = Individual axis failure.
 

Messages sent to the Mid-level code:
           (normal)

MG "boxXYhome set state starting"
MG "boxXYhome set state wHome"
MG "boxXYhome set state xHome"
MG "boxXYhome set state align"
MG "boxXYhome set state yHome"
MG "boxXYhome set result ok"
MG "boxXYhome done"

(errors)

MG "boxXYhome set error NoInit"
MG "boxXYhome set state error"
MG "boxXYhome set error ButtonFound"
MG "boxXYhome set error AxisFailure"
Embedded functions called from this one:
JS #whome
JS #xhome
JS #yhome
JS #xygo

back to top

XYinit

This function initializes the x/y gantry system to the proper modes. See the Galil DMC1500 manual and the source for an explanation of the initialization commands used. Most of the commands called have no real return code so this function tends to be dependent on working on the first pass. If this function won't run to completion, nothing else is going to.

File: xyops.g

Args: (none)

Results:

XYiRSLT1
0 = No Error.
1 = Brakes not released
 

Messages sent to the Mid-level code:
           (normal)

MG "boxXYinit set state starting"
MG "boxXYinit set result ok"
MG "boxXYinit done"

(errors)

MG "boxXYinit set result error"
MG "boxXYinit set error NoXYinit"
Embedded functions called from this one:
JS #Brakes

back to top

zgo

This function moves the z gantry to the specified coordinate. The new Z position must be in encoder steps. The screw lead is 0.2 inches and the motor resolution is 2000 steps per revolution. The scale is then 2.54 microns per step.

File: gripops.g

Args:

zgoARGz = New Z position
zgoARGa = Acceleration along the vector
zgoARGv = Velocity along the vector
 

Results:

zgoRSLT1

0 = No Error.
 

Messages sent to the Mid-level code
           (normal)

MG "boxzgo set state starting"
MG "boxzgo set result ok"
MG "boxzgo done"

(errors)

MG "boxzgo set result error"
MG "boxzgo set error NoDrive"
MG "boxzgo set error NoMotion"
MG "boxzgo set error Inhibited"
 

Embedded functions called from this one: (none)

back to top

Zhome

This function homes the Z axis. First make sure that the motor and the opto for the home switch are on. Then moves the motor until it find the edge on home switch and gets a little ways off the edge in the positive direction. Then it makes a nice and slow final aproach to the the edge.

File: gripops.g

Args: (none)

Results:

ZhoRSLT1 = 0 Result code.

0 = No error


Messages sent to the Mid-level code:
           (normal)

MG "boxZhome set state starting"
MG "boxZhome done"

(errors)

MG "boxZhome set result error"
MG "boxZhome set error NoHome"
 

Embedded functions called from this one: (none)

back to top

Zinit

This function initializes the Z axis. It configures the encoders and motor type for Z. It also configures the Z home switch level, make sure sure the opto is on and enable the motor.

File: gripops.g

Args: (none)

Results:

ZinRSLT1 Result of z axis initialization.

0 = No error
 

Messages sent to the Mid-level code:
           (normal)

MG "boxZinit set state starting"
MG "boxZinit set result ok"
MG "boxZinit done"

(errors)

MG "boxZinit set result error"
MG "boxZinit set error NoInit"

Embedded functions called from this one: (none)

 

back to top


Last Modified: March 23, 2000
rcantarutti

Galil Box Input assignments

(First byte)

Galil ID Conn# Function Notes
INP1 J5-25 Index mark latch: X  
INP2 J5-24 Index mark latch: Y  
INP3 J5-23 Non-Orthogonal (1 degree, 1 = ok)  
INP4 J5-22 Index mark latch: W  
INP5 J5-21 Master Fault (1 = ok) XA1-58
INP6 J5-20 Gripper; Closed sense switch (0 = closed)  
INP7 J5-19 Gripper; Open (wide) sense switch  
INP8 J5-18 Gripper; Button sense switch (0 = empty)  

 

(Second byte)

INP9 JD5-25 Vac sense switch, plate (1 = warp)  
INP10 JD5-24 Vac sense switch, source -unsused
INP11 JD5-23 UPS input; /ON BATTERY  
INP12 JD5-22 UPD input; /LOW BATTERY  
INP13 JD5-21 Drive Power (1 = on)  
INP14 JD5-20 Power Monitor +5V O.K. XA3 U18-13 1=ok
INP15 JD5-19 Power Monitor +12V O.K. XA3 U18-11 1=ok
INP16 JD5-18 Output of optical switch Z-axis (HOMEZ)


(Third byte)

INP17 JD5-1 X Drive Fault  
INP18 JD5-2 W (X2) Drive Fault  
INP19 JD5-3 Y Drive Fault  
INP20 JD5-4 Z Drive Fault  
INP21 JD5-5 X1 Level 2 Safety Fault (1 = ok)  
INP22 JD5-6 W (X2) Level 2 Safety Fault (1 = ok)  
INP23 JD5-7 Y Level 2 Safety Fault (1 = ok)  
INP24 JD5-24 (unassigned) -unused 

 

Last Modified: April 27, 2000
rcantaruttiATnoao.edu

Hydraassign

(based on Philip Massey's "whydra")

"Hydraassign" is an useful program for assigning fibers that comes as part of the Hydra-CTIO software distribution [4]. It takes an input file containing celestial coordinates of objects and determines a "pretty good" assignment of fibers for Hydra. Phil Massey has written an instruction guide [5].

 

Basic Use:

The objects in the input file should be listed in priority order, with the most important objects at the top of the list. The coordinates of clean sky positions and field-orientation-probe stars ("fops stars") should also be included in the same file. The file must also contain the coordinates of the field center, along with a number of things that are needed to properly account for the effects of differential refraction. The output file will contain all of the input objects, assigned or not, with fiber assignments indicated with a numerical value in the "STATUS=" field. The stars with assigned fibers are rotated to the bottom of the list, but the input order is otherwise preserved; thus, one can use each output file as a new input file, with previously assigned stars dropped in priority.

The input file must begin by specifying nine keywords, one per line. Each keyword ends with a colon followed by a value. The order in which they appear is not relevant.

FIELD NAME - <= 64 character ID

INPUT EPOCH - Equinox of the input coordinates; must be 1855-2010.

CURRENT EPOCH - Epoch of the proposed observations, e.g., 1992.251, must be 1991-2010

SIDEREAL TIME - LST at mid-exposure, must be 0.00-23.999

EXPOSURE LENGTH - Decimal hours expected for exposure, 0.0-10.0

WAVELENGTH - Wavelength of spectrograph in A

CABLE - Either SMALL or LARGE

WEIGHTING - Possible answers are STRONG (default), WEAK, or NONE

GUIDEWAVE - wavelength of TV camera, defaults to 6000 A

After the keywords is the list of coordinates. Each coordinate entry consists of a single line, and includes the following. The format is fixed.

Integer ID (4 digits or less). This should be a unique number that allows you to tell the fiber positioner what star you are talking about if you wish to drive the gripper over that locale. It will also be kept as a secondary identifier when you reduce the data with IRAF. COLS1-4

Name (20 characters or less). This name is the principle object identifier; it will be kept with the individual spectrum when you reduce the data with IRAF. COLS 6-25

RA. This should be specified the usual way, e.g., "02 12 14.123". The leading zeros are not required. Since we are reading this numbers in a fixed format, you may include colons (or anything else) where the spaces go. COLS 27-38

DEC. This should be specified the usual way, e.g., "-01 12 13.21". For positive declinations the plus sign is optimal. The value of the degrees must be between -89 and 89, and the values of the minutes and seconds < 60. The SIGN goes into COL 40; the rest go in COLS 41-51.

CLASS. This is a one letter code that specifies what type of object this is. COL 53. Possible answers are:

C Center. There must be exactly one of these in the file; it is the coordinates of the plate center.

O Object. This is the default if the item is unspecified, and is a normal program object. Currently the maximum number of objects is 2000.

S Sky. Currently the maximum number of sky positions is 2000.

F Field orientation probe star (FOPS). Currently the maximum number of FOPS is 2000.

In order to provide some capability for you to document what you are doing, we interpret any line that begins with a pound sign ("#") to denote a comment field. These will be retained in the output file. Items with double pound signs will not be retained ; these are used in the output files to denote warning messages.

When running hydraassign you will be asked for the input and output file names, as well as the number of fops and skies you require. In the example below user hydra specified the name of the input file as lepusastrom.hydra and the output file name as test2.hydra. The user required 3 FOPS and 6 skies to be assigned :

hydra% hydraassign
## CTIO Concentricities file Version 2.1 12/8/98
## v2.1 FOPS, Large fibers, no small fibers
## proper slit to fiber assignments for large cable
## -----------------------------------------------
##
## Astroparams Version 3.0 10/05/98
## -----------------------------------------------
##
## Systemparams Version 3.0 12/23/98
## -----------------------------------------------
Input file name: lepusastrom.hydra [6]
Output root name: test2
test2.hydra
There are 3 fops stars found
How many fops need to be assigned to fops stars?: 3
There are 75 objects found
There are 20 skies found
How many skies are required?: 6
Would you like to tweak the center? y or n: n

Field center= 15.4505 22 22.456 -19 06 25.67 1950.00 Ag= 179.988
Assigned: 49/ 75 objs; 6/ 20 skys; 3/ 3 fops; Total wts= 4.01

Last Modified: April 27, 2000
rcantarutti

Source Code

The Hydra-CTIO positioner GUI software lives in ctioa6:/home/hercules/Hydra. The structure of the source directory tree is as follows:

  • Hydra

    • bin
    • data

      • coords
      • inits
      • scripts
      • status
    • doc

      • guider
      • html
      • hydraassign
      • legacy
    • galil
    • lib

      • bitmaps
      • tclhydra
    • man

      • man1
      • man7
      • mann
    • share

      • lib

        • tcl7.6
        • tk4.2
        • tix4.1
      • include

        • gwc
        • msg
        • names
    • src

      • astroLib
      • astrometry
      • fileioLib2.0
      • hydraassign
      • include
      • kaboomLib2.0
      • main
      • serialLib
      • slaLib
      • transition2.0

The Hydra positioner GUI consists of an extended TCL/TK interpreter plus a set of TCL/TK scripts that build the functionality required by the application. The extended TCL/TK interpreter lives at sub directory Hydra/src/main. Support is provided for compiling the interpreter under Linux, SunOs and Solaris. The TCL/TK scripts live at sub directory Hydra/lib/tclhydra.

 

Last Modified: May 9, 2000
rcantarutti

Init, Status, Script and Coord Files

LINKS

1. Init Files

The init files live in directory Hydra/data/inits. There are four of them: astroparams, concentricities, limitparams and systemparams.

1.1 astroparams

This file defines several important constants and values for doing astrometry calculations. The list below shows the names and a a short description for each of the included values.

CTIO_LAT - Obserbatory Latitude : -30.16542

CTIO_ALT - Height of the observatory: 2200 m

CTIO_ATM_PRESS - Typical atmospheric pressure in milibars

LAPSE_RATE - Temperature lapse rate in the troposphere (degK/meter)

POLAR_FLAG - Activate polar misalignment corrections

ME, MA - Polar misalignment correction parameters

REFRACT_PREC - Refraction calculation precission

REFRACT_PTS - Number of refractions points.

TEMP_MONTH - Comma separated list with average nightime temperatures for each moth

FOCALLEN - Focal length in mm

D3 - Parameter d3 of the optic correction model

D5 - Parameter d5 of the optic correction model

CTIO_SCALE - Plate scale in arcsec/mm

CTIO_RADIUS - Radius of curvature (mm) of focal surface located 6 mm above mid-plate radius

CTIO_WARP_DISTANCE - Border to decide waht curve to use when applying warp model (mm)

CTIO_INNERMID_RADIUS - Radius of the mid-plate in mm (measured plate radius plus thickness devided by two) for inner warp model

CTIO_OUTERMID_RADIUS - Radius of the mid-plate in mm for outer warp model

UNWARP_A1 - First coefficient to the model for unwarping the plate

UNWARP_A2 - Second coefficient to the model for unwarping the plate

ENCODER_SCALE - Encoder steps per mm of travel: 1 step/mm

DEFAULT_WAVECAM - Default wave length: 6000 A

ROT_CORRECTION - Rotational mis-alignment correction

 

1.2 concentricities

This file contains the cable and fiber definitions. The format for a cable definition is a line containing 5 fields. The first field is the cable identifier consisting of one upper case character. The second field is the cable label. It is a character, either 'A' or 'N'. It affects references to slit position inquiries. 'A' means that fibers are identified with alpha characters (A-Z, limit of 26 fibers in cable). 'N' means that integers are used to reference them. For alpha references a slit position of 1 maps to 'A', 2 maps to 'B', etc. The third field is a character 'Y' or 'N' saying if this cable can be selected. The fourth field isthe cable name, consisting of a string with no spaces and case insensitive. Finally, the fifth field is a short description of the cable been defined.

NOTE: a cable doesn't exists if it's not listed in this file.

The format for a fiber definition is a line containing six fields. The first field is the fiber number on plate represented by an integer and beginning from zero. The second field is a positive integer representing the slit position for that fiber. The third field is a single character saying to which cable this fiber belongs to. The fourth field is a single character flag stating the status of this fiber: 'A' for active fiber, 'B' for broken fiber, 'L' for locked fiber and 'Z' for noexistant fiber. The fifth field is a floating point number in encoder units representing the concentricity offset of the fiber. The sixth field is a floating point number in radians representing the concentricity angle.

The concentricity offset and angle data can be measured at any time as described in chapter Measuring Concentricities. [7]

The latest concentricities files are available here:

  • alternating_concentricities [8] --for use with the Air Schmidt camera.
  • concentricities [9] --for use with the 400m Bench Schmidt camera.

 

1.3 limitparams

This file contains the data for the initialization of the data structures that are used in testing for limit conditions.

 

1.4 systemparams

This file include instrument specific parameters like the plate radii, button diameter, tube diameter,etc. It also includes the mechanical correction parameters (coefficients to the mechanical model of the positioner). The list below describes some of the constants declared in this file.

PLATE Plate radius in microns

STOW Radius of the fiducial stow position circle in microns

PARK Radius of the park position circle in microns

PIVOT Radius of the fiber pivot in microns

STOWSLOP Not used

STOWOFFSET Offset added to the stow position angle of a fiber when the x/y stow position is calculated.

MAXANGLE Is the max angle in radians for flexing a fiber without overstressing it.

ANGLE_SOFTNESS Offset in radians added to MAXANGLE before checking for overflexure.

PARKEDATRISK Not used

BUTTONHEIGHT Not used

GRABHEIGHT Not used

BUTTONDIA Diameter of a button in microns

TUBEDIA Diameter of a tube in microns

BUTTON_TUBE_MARGIN Offset for interactions between a tube and a button

BUTTON_BUTTON_MARGIN Offset for interactions between two buttons.

REQPREC Not used

CRITICALANGLE Not used

MAXFORPRECALC Constant used in fiber to button distance calculations.

THERM_COEF Thermal expansion coefficient (K^-1)

TZERO Thermal expansion zero point (Celcius degrees)

XSCALE_ADJUST, YSCALE_ADJUST, DXY_LINEAR, DYX_LINEAR,DXY_QUAD, DYY_QUAD. Stage distorsion correction constants. Units in terms of encoder steps.

FDXX_LINEAR, FDYY_LINEAR, FDXX_QUAD, FDYY_QUAD Constants used to do final tweaking of positional error; units interms of encoder steps.

XH_LINEAR, XH_QUAD, XD_LINEAR, XD_QUAD, YH_LINEAR, YH_QUAD, YD_LINEAR, YD_QUAD. Constants used in flexure calculations. X-Y Gravitational terms

COMPLAMP_TIMEOUT Timeout when waiting for comparison lamps to complete motion.

 

2. Status Files

 

3. Script Files

A set of scripts are available for doing repetitive job automatically. Things like parking all the fibers of one type or configuring the fibers in a circle type pattern are easily made by executing script files. The script files are kept at "ctioa6:/home/hercules/Hydra/data/scripts". You can either use the execfile [10] cli command or use the "File/Run Script..." menu option to source a script file.

viewlarge, viewsmall, viewfops - Use these scripts to take a look at the fibers by type. Hydra CTIO has three type of fibers installed: LARGE, SMALL and FOPS. The gripper will go fiber after fiber waiting exactly one second before moving to the next one. For example to view the FOPS fibers type at the CLI/Script Tool command line:

Fiborg3.2.0> execfile viewfops

parklarge, parksmall, parkfops - Use these scripts to park the fibers by type. For example to park the large fibers type at the CLI/Script Tool command line:

Fiborg3.2.0> execfile parklarge

configparklarge, configparksmall, configparkfops - Use these scripts to park the fibers by type. This scripts use the configure -c [11] commad to execute "parklarge", "parksmall" and "parkfops" saving time by doing an "intelligent" transition from the current configuration to park position.

largecircle, smallcircle, fopscircle - These scripts put the fiber in a circle.

configlargecircle, configsmallcircle, configfopscircle - These scripts put the fiber in a circle. This scripts use the configure -c [11] commad to execute "largecircle", "smallcircle" and "fopscircle" saving time by doing an "intelligent" transition from the current configuration to circle type pattern. Otherwise you would have to park all the fiber and then run the circle script. For example to configure a circle using the small fibers type at the CLI/Script Tool command line:

Fiborg3.2.0> execfile configsmallcircle

measlarge, meassmall, measfops - This scripts drive the user through the process of measuring the concentricities. The script will go fiber after fiber allowing the user to correct for fiber position and grab the button and fiber coordinates. For examples to measure the concentricities for the small fiber type:

Fiborg3.2.0> execfile meassmall

 

4. Coords Files

The coord files are the ouput files after doing the astrometry calculations for configuring a star field. The format is no different to the one of the input files to the hydraassign program [12] but it adds an extra field for specifying the x-y plate coordinates:

FIELD NAME - <= 64 character ID.

INPUT EPOCH - Equinox of the input coordinates; must be 1855-2010.

CURRENT EPOCH - Epoch of the proposed observations, e.g., 1992.251, must be 1991-2010

SIDEREAL TIME - LST at mid-exposure, must be 0.00-23.999.

EXPOSURE LENGTH - Seconds expected for exposure, 0.0-10.0.

WAVELENGTH - Wavelength of spectrograph in A.

CABLE - Either SMALL or LARGE.

WEIGHTING - Possible answers are STRONG (default), WEAK, or NONE.

GUIDEWAVE - wavelength of TV camera, defaults to 6000 A.

After the keywords is the list of coordinates. Each coordinate entry consists of a single line, and includes the following. The format is fixed.

Integer ID (4 digits or less). This should be a unique number that allows you to tell the fiber positioner what star you are talking about if you wish to drive the gripper over that locale. It will also be kept as a secondary identifier when you reduce the data with IRAF. COLS1-4

Name (20 characters or less). This name is the principle object identifier; it will be kept with the individual spectrum when you reduce the data with IRAF. COLS 6-25

RA. This should be specified the usual way, e.g., "02 12 14.123". The leading zeros are not required. Since we are reading this numbers in a fixed format, you may include colons (or anything else) where the spaces go. COLS 27-38

DEC. This should be specified the usual way, e.g., "-01 12 13.21". For positive declinations the plus sign is optimal. The value of the degrees must be between -89 and 89, and the values of the minutes and seconds < 60. The SIGN goes into COL 40; the rest go in COLS 41-51.

CLASS. This is a one letter code that specifies what type of object this is. COL 53. Possible answers are:

C Center. There must be exactly one of these in the file; it is the coordinates of the plate center.

O Object. This is the default if the item is unspecified, and is a normal program object. Currently the maximum number of objects is 2000.

S Sky. Currently the maximum number of sky positions is 2000.

F Field orientation probe star (FOPS). Currently the maximum number of FOPS is 2000.

STATUS. This is empty, OK or a number (0-287). Empty means that the object is outside the plate bounderies. OK means that the object is inside the plate bounderies but was not assigned to a fiber. A number means that a fiber was assigned to that object.

PLATE. This are the plate coordinates of the object after astrometry corrections.

CAMERA. This are the plate coordinates seen by the camera.

 

Last Modified: April 16, 2004
 

User Interface

1. Starting the program

Open an xterm window and type hydractio to start the program (or hydrasim to start the simulator). This start up shell script will search your home directory for file .fiborg to set the environment before running. For example to start the program you would type.

% hydractio

No & sign is required.

2. Command Line Interface Tool

cli_tool.gif

Hydra CTIO presents a terminal window to type commands and send them to the instrument. This command line interface to the Hydra-CTIO instrument gives complete control over the instrument and its functionality. Following is the list with the available commands and a short description of what they do and their arguments.

coldstart [13] - Initialize the motors, find the home positions for the X, Y, and Z axes and resets the encoder to correspond to the center of the focal plate.

home [14] axis - This procedure homes the specified axis and reset the zero point. Available axes are xy, x, w, y, z and gripper. Be aware that homing x, y or w individually *doesn't ensures orthogonality*. Also remember that if x and w are not electrically geared then the gantry can run out of the orthogonal limits.

minit [15] axis - This procedure initialize the specified axis. Available axis are xy, x, y, w, z, gripper. Although you can call x, y or w individually there's only one embedded galil function for initializing the x/y gantry system. This means that no matter you specified x, y or w you will also initialize the other two axes too.

brakes [16] option - Turn the stage brakes on or off. Multiple ways for giving the same order are allowed. To lock the brakes use lock/on/1 as argument. To unlock the brakes use unlock/off/0.

gox [17] x ?vel? ?accel? ?sys? - Move the gripper to the specified position in x leaving the y position the same. Used defaults for the one's that are not supplied in the command line.

goy [18] y ?vel? ?accel? ?sys? - Move the gripper to the specified position in y leaving the x position the same. Used defaults for the one's that are not supplied in the command line.

goxy [19] x y ?vel? ?accel? ?sys? - Move the gripper to the specified position. Used defaults for the one's that aren't supplied in the command line.

gotag [20] tagid - This procedure move the x/y gantry system to the location recorded in the specified tag.

goz [21] z - Move the Z axis to the specified position. Use defaults for missing arguments. The units for position are encoder steps.

gripin [22] - Power up and bring in the gripper.

gripout [23] - This procedure moves the gripper to its stow position. If running under real mode then check for button presence and warn if a button is in the gripper.

tag [24] id ?x? ?y? - This procedure tag the specified location for future reference. It receives as arguments a tag id and an optional coordinate. If only the id is specified by the user, then the current gripper location is taged. The coordinates are x,y sky coordinates.

view [25] name/number ?type? - This procedure let the user view the specified button/object/slit by moving the x/y gantry system to that position. If no type is specified then it will be assumed that the number correspond to a fiber number. Valid names are characters identifying FOPS. Valid type specifiers are "o" for object, "f" for fiber, "s" for slit and "P" for FOPS.

gopen [26] - Open the gripper to its normal open position.

relax [27] - Open the gripper to its relaxed position.

gclose [28] - Close the gripper.

openwide [29] - Open the gripper to its wide open position.

griptest [30] - Test the gripper functionality and return a report.

abump [31] amount direction - Nudge the gripper by the specified amount of arcseconds in the specified cardinal direction. Valid directions are "w", "e", "n" and "s".

bump [32] amount direction - Nudge the gripper by the specified amount of steps in the specified cardinal direction. Valid directions are "w", "e", "n" and "s".

offset [33] dx dy ?vel? ?accel? - Incrementally offset from the current position. Substitute default values for missing arguments.

dropit [34] - Put down a button (if there is one...) at the current location. If the fiber in trouble structure is not empty, calculate and record new information for that fiber.

mark [35] button - This procedure let the user view a button an mark it as the button to be remembered when later you decide to correct the button.

move [36] button x y ?deadzone? - Move a button to the specified location. If the difference beetwen the current location of the button and its target position is smaller than the specified deadzone then the button is assumed to be at the target position.

park [37] button - Move a button to its parked position.

thisis [38] - Handle failures to grab and drop buttons and it helps to identify unknown buttons in the gripper.

ThisIs [39] button - Bring the specified button to the current gripper location. This routine is used to tweak button positions to corrected coordinates interactively.

unstow [40] button - Move the button specified in the argument from its stow position to its park position. If the specified button happens to be the current button in troubles then its trouble condition is cleared.

aload [41]   filename - Load a star field. It first looks for it in the directories in environment variables FIBFIELDS and STDFIELDS. If this variables are not defined attempt loading the file using filename as a complete path/filename name.

assign [42] userid button - Attempt to assign the specified object to a button. If the assignment is valid then the button is moved to the object position. The userid corresponds to the id given by the user to each one of the objects of the star field.

configure [43]  filename - This procedure configure the star field in file filename.

config1 [44] id x y - This function is much like procedure "configure" except that it takes as an argument a fiber and a coordinate which it passes on to the transition program. This procedure always leave unused fibers alone.

preview [45] first last time - This procedure view the set of objects whoes internal id are beetwen the "first" and "last" specified values. It waits for "time" seconds to get to the next object.

save [46]   filename - This procedure save the currently loaded field including tweaks, unassignments, etc been made.

setup field [47] - This command step the astronomet through the field configuration process in order to simplify the instrumental configuration. For a complete description read The Setup Field Command [48].

configmode [49] boolean - This procedure turns the configuration flag on or off. correct Bring the "current" button to the current gripper location. The current button is the last one that was moved or viewed. In some cases, there may not be a current button. This routine is used to tweak button positions to corrected coordinates interactively.

concenmode [50] boolean - Turn the button concentricity correction on/off.

flexmode [51] boolean - Turn the gravitational flexure mapping on or off.

thermmode [52] boolean - Turn the thermal expansion correction on or off.

scalemode [53] boolean - Turn the stage characteristic curve mapping on or off.

lit [54] ?arg arg ...? - This procedure sends its argument list directly to the controller and return just the controller first answer.

ping [55] - This procedure performs a simple test to check communcation towards the Galil Box. It sends a TP command and shows the response. This is the procedure suggested by the vendor to test communications. With good communications you would expect to get a bunch of numbers indicating the current motor positions.

dangle [56] declination - Set the global variable that holds the declination angle. This value is used in flexure calculations.

hangle [57] hourangle - Set the global variable that holds the hour angle. This value is used in flexure calculations.

setcable [58] cable - Set the current cable to the specified cable.

thermval [59] val - Set the instrument temperature to the specified value.

hist [60] - This procedure will open an xterm terminal to show the current session log file.

listdump [61] mode - This procedure when called with argument mode set to "i" dump the iraf file for the currently loaded field and eventually tell the gwc world that it just made it. If called with argument mode set to "c" then dump the currently loaded field to disk and open an xterm running the view program displaying the file contents.

listtag [62] tagid - This procedure will print the coordinates in the tag entry for the specified tag id.

status [63] - Print a summary of the system status. This summary include the current exposure information and the correction flags that are currently working.

where [64] - Return a the encoder positions and corrections.

whereis [65] name/number ?type? - This procedure returns the location of the specified fiber, object, slit or FOPS. The first argument for this procedure can be either an alpha character or an integer. If an alpha character (A, B, C ...) the argument is supposed to be a FOP. If an integer the argument is supposed to be a fiber. A second optional argument can be added to specify what is this integer identifying. Type "f" for fiber, "o" for object and "s" for slit.

purge [66] - Close, compress, and re-open the position archive.

restore [67] - Restore the internal database of button locations from the disk file.

xparked [68] button - This procedure force the software to update a button location to be the parked position.

xstowed [69] button - This procedure force the software to update a buttons location to be the stowed position. If the specified button happens to be the current button in troubles then its trouble condition is cleared.

zdb [70] option - This procedure will zero the database to either stowed or parked position. Set argument position to "parked" to zero to park position and "stowed" to zero to stowed position.

listTI [71] - List the Galil Box Input assignments

listTS [72] - Show the current status of Galil Box switches.

inputchart [73] - Display a window showing the Galil Box inputs.

swchart [74] - Display a window showing the Galil Box switches.

execfile [75]  - Source the specified script.

complamp [76] off|tha|etalon|pen|qua|hene - Turn the complams system on/off.

led option ?arg? - This command let the user turn the bank of LEDs on/off and set the current intensity for the light of the LEDs. To turn the LEDs on set argument option to "on". To turn the LEDs off set argument option to "off". To set the current intensity set argument option to "illum" and specify the desired intensity with a number from 1 to 3.

help - Dump the current list of commands and a short description.

plate [77] boolean - Flat/warp the focal plate.

quit [78] - This command exits the application cleanly saving all what has to be saved and leaving the system in a known state.

 

3. Field Display Tool

The field display tool window is the main point of interaction between the user and the instrument. The Field Display Tool allow the user to do from basic things, like commanding the X-Y stages to move, to more high level stuff like configuring a star field using assignment files. It also provide an interface to other systems like the FOPS guider and the comparison lamps.

field_display_tool.gif

 The field display tool include a menu bar, a field info panel, positioner, comparison lamps and FOPS guider control pages, a status bar and a field display.

 

3.1 Menu Bar

The menu bar has six options: File, Setup, Modes, Windows, View and Help

3.1.1 File Menu

file_menu.gif

3.1.1.1 Load Field

Use the Load Field option to load a star field file. The Hydra-CTIO simulator [79] includes three files of this type that can be used as examples to create your own files. When loaded the objects in the file will be presented in the field display area as springgreen circles, the FOPS as blueviolet circles and the sky positions as lightskyblue squares. Click on the circles and squares to present the name and current assignment of the objects. The related CLI command is aload.

3.1.1.2 Save Field

Use the Save Field option to save a star field and you current fiber assignments. Fibers not assigned to objects will be saved as random sky positions. The associated CLI command is save.

3.1.1.3 Run Script

Use the Run Script option to run command scripts. The associated CLI command is execfile.

3.1.1.4 Quit

Use the Quit option to exit the application. Before actually exiting the application will prompt the user to decide if he really wants to exit the application. It will also prompt to decide if the X-Y stages have to be left at their transport position (remove from telescope). The user must answer yes to this question only if Hydra is about to be removed from telescope. Finally the user will be prompted to answer yes or no to turn the drives off. We recomend turning the drives off only if you are planning to finish the observing night.

 

3.1.2 Setup Menu

setup_menu.gif

In order to simplify the instrumental configuration, we have created user commands which step the astronomer through the configuration process.

3.1.2.1 Setup Field...

Use this option to configure a star field using a assignment files. When selected a dialog box as the one showed below will come up.

setupfield_db.gif

Enter the name of the configuration file you are planning to use in the text entry labeled "Name of hydra file". You can use a complete path or just the name. In this last case the Configuration Tool will search for the requested file at the fields directory. You can also browse to find the configuration file by pressing the button with a folder on it. A file open dialog box will came up and let you select your configuration file.

Press the button labeled "Load Field" to load the configuration file. If the file is not designed for the currently selected fiber cable, a warning message will be given and you will have the opportunity to switch to the cable that your field is designed for. NOTE: This only changes a software flag of cable type. You must still verify that the Bench Spectrograph has the appropriate cable installed. (The cable installed on the Bench Spectrograph should be displayed in the HYDRA-GRAPHICS display.)

Here you will be given the opportunity to modify how long you plan to observe the field in this configuration and what the anticipated midpoint sidereal time will be. Both of these values will be used to fine tune the atmospheric refraction component of the astrometry. If you are rerunning a setup due to a button problem, make sure that you answer these questions in an identical manner as before or the positioner may end up tweaking each and every fiber instead of picking up where it had left off.

You have the option to either park all unused fibers or leave unused fibers where they are as long as they don't interfere with fiber placement by clicking on the check box labeled "Park unused fibers". Leaving them where they are allows such fibers to be flagged as random sky positions and also decreases the configuration overhead since the positioner doesn't have to spend time moving them.

The program will then check certain aspects of the instrument status (plate flat, comps off, rotator at zero degrees), compute the new astrometry, and proceed to move the fibers.

When all fibers have been positioned, the .iraf file will be generated and fiber information will be passed to the CCD for inclusion in the data headers.

NOTE: The instrument is not yet ready to take the observations. You MUST execute the setup observe command.

You can always abort the configuration precedure by pressing the abort button or by typing ^C at the command line. The associated CLI command is setup field.

3.1.2.2 Setup Observe...

Use this option to prepare the instrument to start observing. First the gripper LEDs will be turned off, the X-Y stages will move to the field center and the user will be prompt to see if he wants to view any fibers. Answering yes will pop up a window to view the desired fibers by fiber name, by slit position or by assigned object.

view_tool.gif

Next either you finish viewing fiber or you answer no to view any fibers, the gripper will be parked. Then you are ready to begin observing. The associated CLI command is setup observe.

3.1.2.3 Setup Comps...

Use this option to prepare the instrument to start taking comparison lamps exposures. The gripper LEDs will be turned off and the X-Y stages will be parked. The associated CLI command is setup comps.

3.1.2.4 Setup Flats...

Use this option to prepare the instrument to start taking flats. The gripper LEDs will be turned off, the comparison lamps sources will be turned off and the X-Y stages will be parked. The associated CLI command is setup flats.

3.1.2.5 (re) Connect FOPs Guider

Use this option to open a connection to the FOPS guider. Not very useful since the automatic recovery procedure was implemented.

3.1.2.6 Alarm Bell

Use this option to turn the audible alarm tone on or off.

3.1.3 Mode Menu

modes_menu.gif

Use this menu to turn on/off the different types of corrections applied by the model to the x-y coordinates. The thermal expansion correction corrects for thermal expansion in the linear encoders according to vendor specifications. The concentricity correction corrects for the small offset between the center of the button and the fiber. The stage/screw distorsion correction compensate for small distorsion in the stages. The gravitational flexure corrections correct for gravitational effects over the stages.

 

3.1.4 Window Menu

window_menu.gif

Use this option to open an xterm window showing the current log file and to open an xterm window showing the currently loaded assignment file.

 

3.1.5 View Menu

view_menu.gif

Use this option to show/hide objects, fops, fibers and sky positions at the field display. The Reset option show all the object types in the field.

 

3.1.6 Help Menu

help_menu.gif

Use this option to open an xterm window with the available CLI commands.

 

3.2 Field Info Panel

The status panel consists of a set of labels that show information about the currently loaded star field. The information include header information plus assignment statistics and fiber object cross references.

field_info_panel.gif

When the user click over an object or a fiber in the field, the Fiber and/or the Obect entry shows the id of the object and its assigned fiber/object.

 

3.3 Positioner, Lamps and Guider Tabs

 

3.3.1 Positioner Tab

The positioner tab present a graphic interface to some common user commands to the instrument. Two buttons allow the user to park and activate the gripper. When parked the gripper is moved out of the field and the motor drives are turned off.
Another button allow the user to warp the plate. An animation let the user wait untill the plate is flat or warped before moving fibers.
Another button control the gripper LEDs state and their intensity. There are three available intensities ranging from low to high.

positioner_tab.gif

A paddle let the user cruise around using different step sizes. To use the paddle the user must press the button that says "Paddle Disabled". The button will turn green an its text will change to "Paddle Enabled". The arrows keys will change their disable condition to active. Click in the arrows to move the stages. The size of the step in microns can be changed by moving the scale at the right side of the paddle.

The positioner tab also include the x-y coordinates of the cursor while over the field display area and the field display scale control.

 

3.3.2 Lamps Tab

The lamps tab allow the user to turn the comparison lamps system on/off and to select the comparison lamps sources.

lamps_tab.gif

When no motion is sensed, the status labels are blue and white. When a mechanism is active or moving the status labels blink and the background color goes yellow to reflect the new status. If no status information is available or an error condition is sensed the status labels blink and the background goes red.

 

3.3.3 Guider Tab

The guider bab allow the user to remotely turn the FOPS guider on/off an to enable/disable specific FOPS for guiding.

guider_tab.gif

 

3.4 Status Bar

The status bar present the communication links status. The Hydra-CTIO GUI communicates with the FOPS guider through a socket connection and with the TCS through the GWC router. When the communication is working the status labels are green. When the communication links is broken the status labels go red.

status_bar.gif

 

Last Modified: May 9, 2000
rcantarutti

 

IRAF Output File

Specifications of Hydra .iraf Output File

Here are the specs for the iraf file generation capabilities of the Hydra-CTIO software. The hydra cli command listdump [80] writes out an Aperture Identification File, readable by the IRAF multi-fiber packages. The filename of this file will be the Hydra filename with .irafN appended where N is a correlative number. In that way the software never destroy another APF file and the most recent one always has the biggest number. At the end of a field configuration this file is automatically written. The file consists of 3 columns:

1st col Slit number in ascending order.

2nd col "Beam number". To get beam number, look at the title. If it contains the letters "sky" "Sky" or "SKY", write 0. If no object assigned, write -1. Otherwise write 1.

3rd col If the fiber is broken this field will be set to "Broken Fiber". If the fiber is ok and it's on its target position then the field is set to the object title followed by the user number in parentheses. If the fiber is ok and in a place different from the target and park positions then the field is set to "Random position". If the fiber is ok but parked then the field will be set to "not assigned". If there's no fiber attached to this slit position then the field is set to "Gap".

Here is a sample file:

1 0   Sky (909)
2 1   M71 A9 (101)
3 1   M71 NW303 (116)
4 0   Inner Sky (911)
5 1   M71 X (43)
6 -1   not assigned
7 0   sky outer regions (900)
8 0   SKY (902)
9 -1   not assigned
10 1   M71 SE1033 (23)
.
.
.
.
     

 

Last Modified: April 27, 2000
rcantarutti

 

GWC Variables

1. Field and Slit GWC Status Variables

Hydra-CTIO software publishes through the GWC router the hydra.field and hydra.assign streams. The stream hydra.field define the following status variables:

hydra.field.fldname - Contains the name of the configuration file currently configured.

hydra.field.fldtime - Containd the time at the end of the configuration proccess.

hydra.field.fldlst - Contains the anticipated siderial time at the middle of the exposure.

hydra.field.fldcoord - This is an array of three string specifying the coordinates of the field center. The
first one is the right ascention, the second one is the declination and the third one is the current epoch.

hydra.field.cable - Contains the name of the cable in use (LARGE/SMALL).

hydra.field.cablesize - Contains the number of fibers for the current cable slit.

The stream hydra.assign contains several variables of type "hydra.assign.SLFIBX", where "X" is a number from 0 to the max number of fiber for the slit. This variables have a type of ENG_STRING
and are an array of five fields.

field[0] contains the slit position of the fiber.

field[1] contains the type code for this fiber:

-2 for fiducial fiber ("Gap").
-1 for not assigned fibers and broken fibers ("Broken Fiber" and "not assigned").
0 for skies
1 for objects ("Object Name (ID#))
3 for random positions ("Randon Position")

field[2] contains the right ascention

field[3] contains the declination

field[4] contains the name of the fiber:

"Broken Fiber"
"Gap"
"Random Position"
"not assigned"
"object name (ID#)"

2. FOPs GWC Variables

For the benefit of the Hydra Guider, (and anyone else who cares) the hydra program publishes, via GWC, a set of variables that contain useful information about the FOPs (Field Orientation Probes). The GWC names of these variables are

hydra.fops.fopX

where "X" is a character from "A" to "L" inclusive. There are,therefore, 12 fops and 12 variables. These variables have a type of ENG_FLOAT and are an array of seven fields. The contents of the flields are as follows.

field[0]

Contains the X axis coordinate of the FOP's button in the Hydra encoder coordiante system. Valid values range from 0.0 to +/- 90000.0 (appx)

field[1]

Contains the Y axis coordinate of the FOP's button in the Hydra encoder coordiante system. Valid values range from 0.0 to +/- 90000.0 (appx)

field[2]

Contains the distance from the origin to the mechanical center of the FOP in encoder units.

field[3]

Contains the angle (in radians) between this FOP's pivot point and the pivot point of fiber #0.

field[4]

Contains the angle (in radians) between a tangent to the tube at the button, and the radial line of the tube. (The radial line is the line drawn from the pivot point to the origin.)

field[5]

Contains the angle (in radians) between this FOP's button and the pivot point of fiber #0.

field[6]

A value indicating the current status of the FOP. Only the integer portion has any meaning. Valid values are:

0 FOP_INACTIVE This FOP is either parked or broken.

1 FOP_ASSIGNED_OBJ This FOP is assigned to a guide star and should be valid for guiding.

2 FOP_ASSIGNED_SKY This FOP is assigned to a known sky location.

3 FOP_RANDOM_SKY This FOP is extended but not guaranteed to be detecting only sky.

These variables will be updated under only two sets of circumstances.

1) The FOP is relocated.
2) The hydra operator marks the FOP to be ignored.

 

Last Modified: April 27, 2000
rcantarutti

Trouble-shooting

1. Common problems

The graphical display doesn't show an object properly assigned.

This is common symptom that you gave the same number to two or more different objects in your hydra file. Check the number and make sure it is unique.

2. Hydra Error Messages

Hydra error messages start with the word ERROR followed by a sequence of collon separated list of precedure names and explanatory messages. Most of the time is the last part of the message the one that gives more information about what's wrong with the system.

ERROR: ... : already running or not initialized -

The system returns this error message when the user attempt to execute a Galil box macro while the same Galil macro is under execution. Following are examples of real error messages of this type.

ERROR: gripin: couldn't bring gripper in: gripIn: ColdStart: st_sequence: boxCold: already running or not initialized
ERROR: home: HomeMotors: st_sequence: boxGhome: already running or not initialized
ERROR: move: unresolved: buttonPresent: unable to test: st_sequence: boxIfButt: already running or not initialized
ERROR: tempsense: can't sense temperature: st_sequence: boxTemp: already running or not initialized

ERROR: ... : can't grab the box -

The system returns this error messages when the user attempt to execute a Galil box macro while another Galil box macro is under execution. Following are examples of reat error messages of this type.

ERROR: bump: offsetToXY: unresolved: buttonPresent: unable to test: st_sequence: boxIfButt: can't grab the box
ERROR: coldstart: led: st_sequence: boxLed: can't grab the box
ERROR: gripin: couldn't bring gripper in: gripIn: ColdStart: st_sequence: boxCold: can't grab the box
ERROR: gripout: buttonPresent: unable to test: st_sequence: boxIfButt: can't grab the box
ERROR: minit: InitMotors: st_sequence: boxGinit: can't grab the box
ERROR: move: unresolved: buttonPresent: unable to test: st_sequence: boxIfButt: can't grab the box
ERROR: park: buttonPresent: unable to test: st_sequence: boxIfButt: can't grab the box
ERROR: plate: st_sequence: boxIsWarpd: can't grab the box
ERROR: plate: st_sequence: boxPlate: can't grab the box
ERROR: view: buttonPresent: unable to test: st_sequence: boxIfButt: can't grab the box

ERROR: ... : NoResponse -

The system returns this error message when a Galil box macro command has been succesfully written to the serial port, but no response was received in the last 25 seconds. The last under the assumption that no operation takes longer than that. Following are examples of real error messages of this type.

ERROR: brakes: Brakes: st_sequence: boxBrakes: NoResponse
ERROR: coldstart: ColdStart: st_sequence: boxCold: NoResponse
ERROR: coldstart: led: st_sequence: boxLed: NoResponse
ERROR: gox: unresolved: buttonPresent: unable to test: st_sequence: boxIfButt: NoResponse
ERROR: goz: no motion: GoToZ: can't move: st_sequence: boxzgo: NoResponse
ERROR: gripin: couldn't bring gripper in: gripIn: ColdStart: st_sequence: boxCold: NoResponse
ERROR: gripout: buttonPresent: unable to test: st_sequence: boxIfButt: NoResponse
ERROR: home: HomeMotors: st_sequence: boxXYhome: NoResponse
ERROR: home: HomeMotors: st_sequence: boxZhome: NoResponse
ERROR: home: HomeMotors: st_sequence: boxGhome: NoResponse
ERROR: minit: InitMotors: st_sequence: boxGinit: NoResponse
ERROR: minit: InitMotors: st_sequence: boxXYinit: NoResponse
ERROR: minit: InitMotors: st_sequence: boxZinit: NoResponse
ERROR: move: unresolved: buttonPresent: unable to test: st_sequence: boxIfButt: NoResponse
ERROR: move: MoveButt: unknown error: st_sequence: boxMove: NoResponse
ERROR: openwide: OpenWide: st_sequence: boxOpen: NoResponse
ERROR: park: ParkButt: MoveButt: unknown error: st_sequence: boxMove: NoResponse
ERROR: park: buttonPresent: unable to test: st_sequence: boxIfButt: NoResponse
ERROR: plate: st_sequence: boxPlate: NoResponse
ERROR: view: buttonPresent: unable to test: st_sequence: boxIfButt: NoResponse
ERROR: view: buttonview: ViewButt: GoToXY: can't move: st_sequence: boxxygo: NoResponse

The error message above may indicate problems in the serial link between Hydra Instrument and its host computer.

Check that the Galil Box is up and running and that the serial link is OK. Try the ping command [55] to test the link. If it works then the Galil Box might be in error condition. Try cycling the power.

ERROR: ... : NoDrive -

This error message indicates that the drive power is off. Following are examples of real error messages of this type.

ERROR: gripout: gripOut: no xy motion: GoToXY: can't move: st_sequence: boxxygo: NoDrive
ERROR: minit: InitMotors: st_sequence: boxZinit: NoDrivePower
ERROR: view: buttonview: ViewButt: GoToXY: can't move: st_sequence: boxxygo: NoDrive

ERROR: ... : NoZInit -

This error message indicates that the Z motor was not properly initialize during a cold start sequence (i.e. coldstart [81] and gripin [22] commands). During a cold start sequence the Z motor is powered up and then initialized to its zero point. Following are examples of real error messages of this type.

ERROR: coldstart: ColdStart: st_sequence: boxCold: NoZInit
ERROR: gripin: couldn't bring gripper in: gripIn: ColdStart: st_sequence: boxCold: NoZInit

To figure out what exactly caused the problem try manually initializing the motor using the minit z command [15] and the home z command [14]. Then look for the new error messages in this trouble shooting guide.

ERROR: ... : NoHome -

This error message indicates that the motor was unable to find the fiducial point. The motor is then probably at one of its limits. Following are examples of real error messages of this type.

ERROR: gripout: gripOut: HomeMotors: st_sequence: boxZhome: NoHome
ERROR: home: HomeMotors: st_sequence: boxZhome: NoHome

Unfortunately often this failure to find the fiducial hangs the Galil built in macro to find the zero point and prevent the box from answering to further command macro requests. Below is a crude procedure to try to clear this fault.

  1. ping the Galil Box with the ping command [55]. If the Galil Box answer a bunch of numbers then you know at least the box is alive. If not then try resetting the box and start over again.
    Fiborg3.2.5> ping
    0000000 0000000 000000000 0000000 0000000\r
     
  2. Then repeat the home procedure for the axis in trouble (more probably Z in the Hydra system) using the home command [14]. If the answer is ok then the motor is working again. If the answer is NoResponse is still trying to find the zero point. If the answer is NoHome go back to step 1.
    Fiborg3.2.5> home z
    ERROR: home: HomeMotors: st_sequence: boxZhome: NoResponse
     
  3. Reset the Galil Box by software using the "lit RS" command. This command will send the built in command RS to the Galil Box to reset the box. All the variable values set at program startup time will be cleared.
    Fiborg3.2.5> lit RS
    :
  4. Try initializing the motor again using the minit command [15] and then the home command [14]. If the answer is ok the motor is working again. If the answer is NoResponse go back to step 3. If the answer is NoHome go back to step 1.

If the above doesn't work you might have to check hardware issues like drive power, limit switches, optical switch, etc.

ERROR: ... : FsaOrthoRFL2 -

This error message indicates that at least one of the following safety intelock signals has been activated: FSA interlocks, orthogonality switch, forward and reverse X-Y limits. Following are examples of real error messages of this type.

ERROR: goxy: no motion: GoToXY: can't move: st_sequence: boxxygo: FsaOrthoRFL2
ERROR: gripout: gripOut: no xy motion: GoToXY: can't move: st_sequence: boxxygo: FsaOrthoRFL2
ERROR: view: buttonview: ViewButt: GoToXY: can't move: st_sequence: boxxygo: FsaOrthoRFL2

Each of the interlocks mentioned above are AND gated before input to the Galil Box. So when the this error message occurs all three possible causes has to be checked, that is, check that the FSA is properly closed, check that the second forward and reverse limits are clear and check that the system is orthogonal. Read the listTI command [71] documentation since it can be of great help when dealing withi problem.

ERROR: ... : Inhibited -

This error message indicates that the stages had not been initialized. Use the coldstart command [81] to initialize the system. Following are examples of real error messages of this type.

ERROR: goxy: no motion: GoToXY: can't move: st_sequence: boxxygo: Inhibited
ERROR: gripout: gripOut: no xy motion: GoToXY: can't move: st_sequence: boxxygo: Inhibited
ERROR: view: buttonview: ViewButt: GoToXY: can't move: st_sequence: boxxygo: Inhibited

ERROR: ... : BelowHome -

This error message appears when the system has been commanded to move while the gripper is below its home position. The home position for the gripper is high enough to clear the fibers on the field as well as the fiber slots. Following are examples of real error messages of this type.

ERROR: dropit: releaseHere: DisposeButt: GoToXY: can't move: st_sequence: boxxygo: BelowHome
ERROR: park: ParkButt: DisposeButt: GoToXY: can't move: st_sequence: boxxygo: BelowHome
ERROR: view: buttonview: ViewButt: GoToXY: can't move: st_sequence: boxxygo: BelowHome

To clear this problem move the gripper up at least to its home position. In order to do that you can either home the gripper with the coldstart command [81] or move it with the goz command [21] and a positive value.

ERROR: ... : AxisFailure -

This error message indicates that an error ocurred during the initialization of the x and y motors. Following are examples of real error messages of this type.

ERROR: home: HomeMotors: st_sequence: boxXYhome: AxisFailure

Use the listTI command [71] to figure out which of the motors is causing the problem and why.

ERROR: ... : ButtonOnInit -

This message indicates that the system has found a button in the gripper at the moment of initialization. You may have to follow a recovery procedure to drop the button before initializing the system. Following are examples of real error messages of this type.

ERROR: coldstart: ColdStart: st_sequence: boxCold: ButtonOnInit
ERROR: gripin: couldn't bring gripper in: gripIn: ColdStart: st_sequence: boxCold: ButtonOnInit

The recovery procedure starts by initializing the gripper motor and the Z axis motor using the minit command [15] and then the home command [14] for each axis.

For example to initialize the axis:

Fiborg3.2.5> minit gripper
Fiborg3.2.5> home gripper
Fiborg3.2.5> minit z
Fiborg3.2.5> home z

The second step is to drop the button by using the dropit command. It may be necessary to issue the command several times before the system
drop the button. If no success open the gripper to its wide open position and try removing the button from the gripper jaws manually.

ERROR: ... : NoMotion -

This message appear when the motor is not able to finish its motion. Try the listTI command [71] for more diagnosis information. Following are examples of real error messages of this type.

ERROR: goz: no motion: GoToZ: can't move: st_sequence: boxzgo: NoMotion

ERROR: gripper is disabled, use gripin to activate -

This message appear when a the system has been ordered to move the stages while the stages are at their park position. Following are examples of real error messages of this type.

ERROR: bump: offsetToXY: GoToXY: gripper is disabled, use gripin to activate
ERROR: goxy: no motion: GoToXY: gripper is disabled, use gripin to activate
ERROR: move: MoveButt: gripper is disabled, use gripin to activate
ERROR: park: ParkButt: MoveButt: gripper is disabled, use gripin to activate
ERROR: view: buttonview: ViewButt: GoToXY: gripper is disabled, use gripin to activate

Activate the gripper either by using the GUI button or typing the gripin command [22]

ERROR: please wait a few seconds and try again -

This message appear if the user has tried to activate the gripper too soon after parking it. For some unknown reason the motor drives have to rest a few seconds after been turned off to prevent the Galil Box to run into a fault condition. Following are examples of real error messages of this type.

ERROR: coldstart: ColdStart: please wait a few seconds and try again
ERROR: gripin: couldn't bring gripper in: ColdStart: please wait a few seconds and try again

ERROR: ... : target is beyond X-Y limits -

This message appear when the user tries to move the gripper to a non valid position. Following are examples of real error messages of this type.

ERROR: bump: offsetToXY: GoToXY: target is beyond X-Y limits

ERROR: ... : fiber <fiber number> doesn't physically exists... -

This message tell the user he has tried to move a fiber that has been marked as "non existant" in the concentricities [82] configuration file. Following are examples of real error messages of this type.

ERROR: configure: mqu_orderMoves: ERROR: park: ParkButt: MoveButt: fiber #102 doesn't physically exists...
ERROR: configure: mqu_orderMoves: ERROR: physmove: MoveButt: fiber #2 doesn't physically exists...
ERROR: configure: orderMoves: ERROR: physmove: MoveButt: fiber #2 doesn't physically exists...
ERROR: fieldsetup2: ERROR: configure: mqu_orderMoves: ERROR: park: ParkButt: MoveButt: fiber #232 doesn't physically exists...
ERROR: fieldsetup2: ERROR: configure: mqu_orderMoves: ERROR: physmove: MoveButt: fiber #232 doesn't physically exists...
ERROR: move: MoveButt: fiber #10 doesn't physically exists...
ERROR: park: ParkButt: MoveButt: fiber #102 doesn't physically exists...

Check the concentricities [82] configuration file for more information about the fiber.

ERROR: ... : button 249 is not stowed -

This error message tell the user he has tried to stowed a fiber that is not actually stowed, that is, is not at its fiducial position in the plate. Following are examples of real error messages of this type.

ERROR: unstow: Unstow: button 249 is not stowed

ERROR: ... : can't move with plate warped -

This message appear when the user tries to move a fiber with the plate at its warp position. Following are examples of real error messages of this type.

ERROR: configure: can't move with plate warped
ERROR: move: can't move with plate warped
ERROR: park: can't move with plate warped

Use either the GUI button or the plate command [77] to unwarp the plate.

ERROR: ... : invalid move requested for button <button number> -

This message appear when the user tries to move a fiber to a non-valid position. The actual reason why the target position is not valid can be found at the xterm window from which hydractio was launched. Following are examples of real error messages of this type.

ERROR: configure: mqu_orderMoves: ERROR: physmove: invalid move requested for button #207
ERROR: configure: orderMoves: ERROR: physmove: invalid move requested for button #159
ERROR: fieldsetup2: ERROR: configure: mqu_orderMoves: ERROR: physmove: invalid move requested for button #88
ERROR: move: invalid move requested for button #0

ERROR: ... : it's not safe to grab button at current location -

This message tell the user that the position that the known position of the fiber is out of bounder. Following are examples of real error messages of this type.

ERROR: configure: mqu_orderMoves: ERROR: park: ParkButt: MoveButt: it's not safe to grab button at current location
ERROR: fieldsetup2: ERROR: configure: mqu_orderMoves: ERROR: park: ParkButt: MoveButt: it's not safe to grab button at current location

This is a very unusual error message and may be an indication that the Galil Box variables that are set the first time the application starts up has been corrupted some how or the result of incorrect use of either thisis [38] or ThisIs [39] recovery commands.

ERROR: ... : couldn't pick up button <button number> -

This message tell the user that the system failed in grabing the specified button. Following are examples of real error messages of this type.

ERROR: configure: mqu_orderMoves: ERROR: park: ParkButt: MoveButt: couldn't pick up button 1
ERROR: configure: mqu_orderMoves: ERROR: physmove: MoveButt: couldn't pick up button 101
ERROR: configure: orderMoves: ERROR: park: ParkButt: MoveButt: couldn't pick up button 159
ERROR: configure: orderMoves: ERROR: physmove: MoveButt: couldn't pick up button 247
ERROR: fieldsetup2: ERROR: configure: mqu_orderMoves: ERROR: park: ParkButt: MoveButt: couldn't pick up button 0
ERROR: fieldsetup2: ERROR: configure: mqu_orderMoves: ERROR: physmove: MoveButt: couldn't pick up button 7
ERROR: move: MoveButt: couldn't pick up button 0
ERROR: park: ParkButt: MoveButt: couldn't pick up button 84

To actually pick up the button we recommend using the thisis [38] or ThisIs [39] command to correct the known coordinates of the software. You will have to cruise around and center the gripper on top of the button and then issue one of the two commands. Then park the button.

ERROR: ... : gripper has no button to drop -

This message indicate that the button was lost during the move. This is a very dangerous situation sice is not possible to know were the button was left. Following are examples of real error messages of this type.

ERROR: configure: orderMoves: ERROR: physmove: MoveButt: gripper has no button to drop
ERROR: fieldsetup2: ERROR: configure: mqu_orderMoves: ERROR: park: ParkButt: MoveButt: gripper has no button to drop
ERROR: fieldsetup2: ERROR: configure: mqu_orderMoves: ERROR: physmove: MoveButt: gripper has no button to drop
ERROR: move: MoveButt: gripper has no button to drop
ERROR: park: ParkButt: MoveButt: gripper has no button to drop

You can use the gripper camera two see if you can find the button and then update its last known coordinates to its current position with the ThisIs command [39] . The other way to go is to manually stow the fiber and then tell the software with the xstowed command [69] that the fiber is now stowed.

ERROR: ... : couldn't drop button <button number> -

This message tell the user that the gripper still has the button in the gripper after trying to drop it at its target position. Following are examples of real error messages of this type.

ERROR: configure: mqu_orderMoves: ERROR: park: ParkButt: MoveButt: couldn't drop button 88
ERROR: configure: mqu_orderMoves: ERROR: physmove: MoveButt: couldn't drop button 174
ERROR: dropit: releaseHere: DisposeButt: DropButt: couldn't drop button!
ERROR: move: MoveButt: couldn't drop button 170
ERROR: park: ParkButt: DisposeButt: DropButt: couldn't drop button!
ERROR: park: ParkButt: MoveButt: couldn't drop button 103

Try releasing the fiber using the dropit command [34]. This command will try to cleanly release the fiber at the current gripper position. Try it several times, sometimes takes more than one try to release the offending fiber.
If the above doesn't work you can still try opening the gripper jaws to their open wide position using the openwide command [29]. This command will open the jaws more than usual hopefully releasing the button. If not then try releasing it manually.

ERROR: dropit: why drop a button that is not there -

This message tell the user that there is no button in the gripper to drop.

ERROR: The software thinks another button is already at this location -

This message tell the user that the software has a record of another fiber at the current gripper position when using the thisis command [38] . This prevents from giving a button the coordinates of another button.

ERROR: ... : fiber in jaws - this message appear when trying to park the gripper while holding a button in the gripper. Following is an example of this type of message.

ERROR: gripout: fiber in jaws

ERROR: ... : can't move button # with # in transit -

This message tell the user that te system won't move any other fiber until he resolves the problem with a lost fiber. Following is an example of this type of message.

ERROR: configure: mqu_orderMoves: ERROR: physmove: can't move button 0 with 168 in transit

You will have to find the lost fiber and then update its current location with the thisis [38] or ThisIs [39] command. Only then you will be able to continue moving fibers. Not knowing the lost fiber position can result in fiber collisions.

ERROR: ... : temperature is to large/small -

The read temperature value is out of range. You can override the read value by manually entering the temperature value using the themval command [59]. Following are some examples of this type of message.

ERROR: tempsense: can't set current temperature: ERROR: thermval: temperature is to large/small

ERROR: ... : unable to do the transition. Please ... -

This message tell the user that it was not possible for the software to do a transition from its current configuration to the one specified by the assignment file. The error message now includes information about the offending fiber. Following are examples of real error messages of this type.

ERROR: configure: mqu_orderMoves: ERROR: transition: unable to do the transition. Please check your assignment file for invalid moves.
ERROR: transition: unable to do the transition. Please check your assignment file for invalid moves.

The short way to solve this problem is to comment out the line in your assignments file containing the offending fiber assignment. The long way is to run hydraassign and get new assignments for the objects in the file.

ERROR: Attempt to load a null astrometry param file -

The init file astroparams [83] is corrupted or the environment variable that holds the path to the file is undefined. Check your environment for the ASTROPARAMS environment variable, check you read permissions to the astroparams file and check that the file actually exists.

ERROR: Attempt to load a null system param file-

The init file systemparams [84] is corrupted or the environment variable that holds the path to the file is undefined. Check your environment for the SYSTEMPARAMS environment variable, check you read permissions to the systemparams file and check that the file actually exists.

the transition program was unable to open the script containing fiber moves.
ERROR: configure: mqu_orderMoves: ERROR: transition: hydra file "parkall" not found.
ERROR: transition: hydra file "parkall" not found.

ERROR: ... : transition couldn't find file... -

The transition program was unable to find the plate coordinates file created by the astrometry program. Following are examples of this type of message.

ERROR: configure: mqu_orderMoves: ERROR: transition: transition couldn't find file: "GM.1.out1.hydra.coords"
ERROR: transition: transition couldn't find file: "GM.1.out1.hydra.coords"

Check for error messages about the astrometry program.

ERROR: ... : <file name> doesn't exists -

the scpecified file name doesn't exist. Following are examples of this type of message.

ERROR: fieldsetup2: ERROR: aload: file /home/hydra/fields/GM.out2.hydra doesn't exists

ERROR: User interrupt while sourcing <script> -

The user interrupt the script execution by typing ^C. Following are examples of this type of message.

ERROR: User interrupt while sourcing largecircle

ERROR: no socket connection to FOPS guider -

This message tell the user that no connection was opened to the FOPS guider. Check the ethernet connection and check that the FOPS guider program is actually running.

ERROR: guider: can't send command to guider -

This message tell the user that the program failed to send the command to the FOPS guider. Check the ethernet connection and check that the FOPS guider program is actually running.

ERROR: guider: can't read guider response -

This message tell the user that the program failed to read the command response coming from the FOPS guider. Check the ethernet connection and check that the FOPS guider program is actually running.

 

Last Modified: May 9, 2000
rcantarutti

Appendix

Measuring Concentricities

The measurement of concentricities has to be made off telescope probably at the Coude Room. The minimal setup required to measure the concentricities includes, besides Hydra, a video monitor, an ICCD controller, a video cursor, a light source and the Hydra Laptop (or the Hydra PC). The video monitor plus the ICCD controller display the video signal from the gripper camera. The light source is used to illuminate the fibers from behind. And the Laptop controls the instrument. When illuminating the fibers environmental light has shown to be sufficient for the small and large fibers. To illuminate the FOPS it's not necessary to remove the FOPS camera. Removing the filter in front of the camera will allow you to introduce enough light through the space left by the filter.

If you are using the Hydra Laptop to control the instrument during this procedure you better be sure that the "CurrentLocations" and "statusFile" are not different from the ones in ctioa6 (Hydra PC). Copying this files from ctioa6 to the laptop will ensures that the software knows exactly where the fibers are. For example if the Ethernet connection is available, typing the following commands in a shell window will do it for you. Don't forget to login as "hydra".

% cd Hydra/data/status
% rcp ctioa6:/home/hercules/Hydra/data/status/CurrentLocations .
% rcp ctioa6:/home/hercules/Hydra/data/statuc/statusFile .

Now you can start "hydractio" or "hydractio-comm" if you don't want to communicate with the TCS and FOPS Guider systems (this will be often the case).

1. Taking Concentricities Data

The canonical procedure is first to put the fibers in a circle. There is a script that can do this job for you. For example, if you are measuring the concentricities for the small fibers type at the CLI/Script Tool command line:

Fiborg3.2.0> execfile configsmallcircle

After it finishes you can execute the script to actually measure the offset between the button position and the fiber position for every fiber. Don't forget to check that your light source is illuminating the fibers evenly before executing the script. What the script does is to go fiber after fiber grabbing its current position, allowing you to correct the position by offsetting the gripper and grabbing the new position. The idea is to use a video reference (video cursor) to center, by moving the gripper, the light beam coming from the fiber and use the offset between the original (button position) and final position (fiber position) to calculate the concentricity correction for that particular fiber. You should repeat the process a minimum of three times (five is a good number of repetitions), that is parking all the fibers, putting them back in a circle and grabbing the corrections. Make sure you also do FOPS concentricities measurements interleaved with the small or large concentricities measurements. The FOPS serve as the zero point correction. It is recommended to do all the fibers (small, large and FOPS) with the same TV setup just to ensure that they are all on the same zero point. All the recorded positions are kept in the log file of the current session.

For example, if you want to record concentricity data for the small fibers you should type at the CLI prompt:

Fiborg3.2.0> execfile meassmall

The gripper will move to the first small fiber and will wait for you to move the gripper. You can use the arrow buttons in the "Field Display Tool" window or the keyboard by typing "h, j, k, l" (make sure the mouse cursor is on top of the "Field Display Tool" window) to offset the gripper. You can change the size of the step by moving the red slider in the field display or by pressing a key from 1 to 9. After you finish with the first fiber type "q" or press the "Enabled" green button. At this moment the "Enabled" button will go red, the gripper will move to the second small fiber and the "Enabled" button will go green again. Repeat the process above until you finish all the small fibers.

 

2. Creating New Concentricities Files

After you finish logging the concentricities raw data you can use the "concenctio" program to generate a new concentricities file. [82] This program lives in /home/hydra/src/concenct. First you'll have to copy the old concentricities files to that directory plus the log file(s) containing the raw data. The old concentricities file will be used as a template to produce the new file. If the name of your current concentricities file is different than "concentricities" you will have to rename it as "concentricities". Then run the program to generate the new concentricities file. The name of the new file will be "nconcentricities". For example, to generate a new concentricities file from the current "concentricities" file plus the "hydra.currentLog" log file you should do:

% cd /home/hydra/src/concenct
% cp /home/hydra/Hydra/data/inits/concentricities .
% cp /home/hydra/fiblogs/hydra.currentLog .
% concen

Enter the name of the log file: hydra.currentLog
Small Concentricities
Group 1 Average is X= 0.000000 Y= 0.000000 for 135 measurements

Another file to read? (y or n): n
ave x = 0.000000, ave y = 0.000000, sdev x = 0.000000, sdev y = 0.000000
ave r = 0.000000, sdev r = 0.000000
var = 0.000000
var = 0.000000
var = 0.000000
ave x = 0.000000, ave y = 0.000000, sdev x = 0.000000, sdev y = 0.000000
ave r = 0.000000, sdev r = 0.000000
var = 0.000000
var = 0.000000
var = 0.000000
.
.
.

ave x = 0.000000, ave y = 0.000000, sdev x = 0.000000, sdev y = 0.000000
ave r = 0.000000, sdev r = 0.000000
var = 0.000000
var = 0.000000
var = 0.000000
%

If the data is contained in more than one log file, then copy all the log files to the concenct directory and answer yes to the question "Another file to read? (y or n):". The program will prompt you for the name of the second file, third file, etc.
When you run the program, make sure you also enter the large fiber and FOPS concentricity measurements (either a new set or old data took previously) to make sure that the zero point correction is handled appropriately.

Besides the nconcentricities file there are four other output files: raw.dat, ave.dat, con.dat and plot.macro. "plot.macro" is a supermongo script to generate individual plots for the concentricity measurement for each fiber. It uses the "ave.dat" and "raw.dat" files. File "con.dat" is for diagnostic value in case something looks strange. For example, to print the concentricity measurement plots:

% sm (sm is available in solaris and sunos workstations)
Hello hydra, please give me a command
: macro read plot.macro
: device postlandfile plotset1.ps
: plotset1
: device postlandfile plotset2.ps
: plotset2
: device postlandfile plotset3.ps
: plotset3
: device postlandfile plotset4.ps
: plotset4
: device postlandfile plotset5.ps
: plotset5
: device postlandfile plotset6.ps
: plotset6

Remember to place a comment in the header of the new concentricities file and to increment its version number. Then copy the new concentricities files to its final location at the Hydra PC and test at the telescope by configuring a standard field.

 

Last Modified: April 27, 2000
rcantarutti
 

Downloading the Galil Software

1. Setting Things Up

Before you can download code, you need to have the appropriate hardware and software configurations. Various switches and software items need to be configured. These are discussed below for both the host machine and the Galil Box.

a) Host Machine

The easiest way to download the code is to use the "Editor Tool" provided with the Visual Basic Tool. In order to use this software you will need your host machine to be running under Windows95 and the Visual Basic Tool installed.

b) Galil Box

While a comprehensive discussion of the Galil DMC-1500 is ledt to the Galil User Manual, a few pointers are given below.

In order to be able to do anything with the box, you have to be able to talk to it. To that end, a cable and the correct switch settings are required. No other hardware is necessary to talk to the box. Notice the little set of dip switches next to the serial ports on the black box. Set them as follows:

switch # Name Position
1 MRST OFF
2 1200 OFF
3 9600 OFF
4 19.2k OFF
5 HSHK OFF

 

This will set up things up for a baudrate of 9600 with no hardware handshake.

2. Download

Now that you have the right hardware and software configuration you can start the Visual Basic Tool and get ready to download the code.

Start the Visual Basic Tool application and press the button labeled "Source Edit". The Editor Tool window will appear. Use the file directory window to browse for your makefile file. The Editor Tool use this file to load the files containing the code you are planning to download. This is a simple text file with a newline separated list of file names. If you are downloading the Galil Embedded Code [85] that file is "makefile.mak". It includes seven files: buttmove.g, coldstrt.g, errors.g, gripops.g, main.g, periphio.g and xyops.g.

Choose the makefile by clicking on it. The contents of the file will be showed in the "Make File Contents" entry. Here the Editor Tool gives you the opportunity to check the code in the files you just loaded before you attempt to make a download. Remember that each time you make a download the current code is lost. Click a file name in the "Make File Contents" box and the source code and declared variables will be showed.

editor_tool.gif

The final step is to download the code into the Galil. Press the button labeled "Download all files" to download the code. The download will take approximately 25 seconds. If everything went O.K. then a dialog box should pop up saying "Download OK".

 

Last Modified: April 27, 2000
rcantarutti

How to obtain the Hydra CTIO Simulator

First, download the Simulator:

Software binaries are available to run under Linux and Solaris. The latest versions will be found in hydrasimLinux [86] for Linux and in hydrasimSolaris [87] for Solaris. Both versions can also be found in the Tucson mirror of the CTIO ftp site [88] (updated nightly). Current version of the software is 4.0.2.

You will probably also want to download the the documentation file hydraassign.ps [5]. Thanks to Phil Massey for providing the documentation and software for the Hydra-CTIO version of hydraassign  [12]. 

 

Install the software:

First, be sure you are running the c-shell or one of its derivatives (e.g. tsch). If you are running the bash shell, you can change to the c-shell using the command chsh -s /bin/csh Put the tar file in your home directory, change to your home directory and then

Under Linux run

gunzip hydrasimLinux.tar.gz
tar -xf hydrasimLinux.tar

Under Solaris run

uncompress hydrasimSolaris.tar.Z
tar -xf hydrasimSolaris.tar

Now change to subdirectory "/Hydra/bin" and execute "~/install.org". This is a script that will create three sub-directories (fiblogs, fields & stdfields) in your home directory. Copy the file "~/Hydra/bin/sample.fiborg" to .fiborg in your home directory as well. Then include in the "set path" command of either your ".login" or ".cshrc" file the following path:

~/Hydra/bin

Also, add the folowing line to your .login or .cshrc file to source the .fiborg and set the environment:

source ~/.fiborg

Log out and back in to allow the new path to be activated or type "source ~/.login" (or source ~/.cshrc or whatever is your particular rc file). If you chose not to decompress and de-tar the downloaded file in your home directory change variable FIBHOME in file ".fiborg" to reflect the new location of the software as well as the bin path for the "set path" command.

 

Start the simulator with the command: hydrasim

Two windows will appear. One is a simple command line window (CLI/Script Tool window) and the other is a window showing a graphical representation of the fibers and the focal plate. It also includes various information about the current star field and status. The terminal window used to launch the program will be used as a console.

 

Last modified: October 17, 2001


Source URL (modified on 06/14/2011 - 11:34): http://www.ctio.noao.edu/noao/content/Hydra-Positioner-Software

Links
[1] http://www.ctio.noao.edu/noao/content/tcs-commands
[2] http://www.ctio.noao.edu/noao/content/tcs-router
[3] http://www.ctio.noao.edu/noao/content/Embedded-Galil-Software-Coding-Standard
[4] http://www.ctio.noao.edu/noao/content/How-obtain-Hydra-CTIO-Simulator
[5] http://www.ctio.noao.edu/noao/sites/default/files/instruments/spectrographs/hydraassign.ps
[6] ftp://ftp.ctio.noao.edu/ctio/hydra/lepusastrom.hydra
[7] http://www.ctio.noao.edu/noao/content/measuring-concentricities
[8] http://www.ctio.noao.edu/noao/sites/default/files/instruments/spectrographs/alternating_concentricities
[9] http://www.ctio.noao.edu/noao/sites/default/files/instruments/spectrographs/concentricitieslarge.txt
[10] http://www.ctio.noao.edu/noao/content/user-interfase#execfile
[11] http://www.ctio.noao.edu/noao/content/user-interfase#configure
[12] http://www.ctio.noao.edu/noao/content/hydraassign
[13] http://www.ctio.noao.edu/noao/content/hydra-cli-coldstar
[14] http://www.ctio.noao.edu/noao/content/hydra-cli-home
[15] http://www.ctio.noao.edu/noao/content/hydra-cli-minit
[16] http://www.ctio.noao.edu/noao/content/hydra-cli-brakes
[17] http://www.ctio.noao.edu/noao/content/hydra-cli-gox
[18] http://www.ctio.noao.edu/noao/content/hydra-cli-goy
[19] http://www.ctio.noao.edu/noao/content/hydra-cli-goxy
[20] http://www.ctio.noao.edu/noao/content/hydra-cli-gotag
[21] http://www.ctio.noao.edu/noao/content/hydra-cli-goz
[22] http://www.ctio.noao.edu/noao/content/hydra-cli-gripin
[23] http://www.ctio.noao.edu/noao/content/hydra-cli-gripout
[24] http://www.ctio.noao.edu/noao/content/hydra-cli-tag
[25] http://www.ctio.noao.edu/noao/content/hydra-cli-view
[26] http://www.ctio.noao.edu/noao/content/hydra-cli-gopen
[27] http://www.ctio.noao.edu/noao/content/hydra-cli-relax
[28] http://www.ctio.noao.edu/noao/content/hydra-cli-gclose
[29] http://www.ctio.noao.edu/noao/content/hydra-cli-openwide
[30] http://www.ctio.noao.edu/noao/content/hydra-cli-griptest
[31] http://www.ctio.noao.edu/noao/content/hydra-cli-abump
[32] http://www.ctio.noao.edu/noao/content/hydra-cli-bump
[33] http://www.ctio.noao.edu/noao/content/hydra-cli-offset
[34] http://www.ctio.noao.edu/noao/content/hydra-cli-dropit
[35] http://www.ctio.noao.edu/noao/content/hydra-cli-mark
[36] http://www.ctio.noao.edu/noao/content/hydra-cli-move
[37] http://www.ctio.noao.edu/noao/content/hydra-cli-park
[38] http://www.ctio.noao.edu/noao/content/hydra-cli-thisis
[39] http://www.ctio.noao.edu/noao/content/hydra-cli-thisis-0
[40] http://www.ctio.noao.edu/noao/content/hydra-cli-unstow
[41] http://www.ctio.noao.edu/noao/content/hydra-cli-aload
[42] http://www.ctio.noao.edu/noao/content/hydra-cli-assign
[43] http://www.ctio.noao.edu/noao/content/hydra-cli-configure
[44] http://www.ctio.noao.edu/noao/content/hydra-cli-config1
[45] http://www.ctio.noao.edu/noao/content/hydra-cli-preview
[46] http://www.ctio.noao.edu/noao/content/hydra-cli-save
[47] http://www.ctio.noao.edu/noao/content/hydra-cli-setup
[48] http://www.ctio.noao.edu/noao/content/hydra-cli-setup-field-command
[49] http://www.ctio.noao.edu/noao/content/hydra-cli-configmode
[50] http://www.ctio.noao.edu/noao/content/hydra-cli-concenmode
[51] http://www.ctio.noao.edu/noao/content/hydra-cli-flexmode
[52] http://www.ctio.noao.edu/noao/content/hydra-cli-thermmode
[53] http://www.ctio.noao.edu/noao/content/hydra-cli-scalemode
[54] http://www.ctio.noao.edu/noao/content/hydra-cli-lit
[55] http://www.ctio.noao.edu/noao/content/hydra-cli-ping
[56] http://www.ctio.noao.edu/noao/content/hydra-cli-dangle
[57] http://www.ctio.noao.edu/noao/content/hydra-cli-hangle
[58] http://www.ctio.noao.edu/noao/content/hydra-cli-setcable
[59] http://www.ctio.noao.edu/noao/content/hydra-cli-thermval
[60] http://www.ctio.noao.edu/noao/content/hydra-cli-hist
[61] http://www.ctio.noao.edu/noao/content/hydra-cli-listdump
[62] http://www.ctio.noao.edu/noao/content/hydra-cli-listtag
[63] http://www.ctio.noao.edu/noao/content/hydra-cli-status
[64] http://www.ctio.noao.edu/noao/content/hydra-cli-where
[65] http://www.ctio.noao.edu/noao/content/hydra-cli-whereis
[66] http://www.ctio.noao.edu/noao/content/hydra-cli-purge
[67] http://www.ctio.noao.edu/noao/content/hydra-cli-restore
[68] http://www.ctio.noao.edu/noao/content/hydra-cli-xparked
[69] http://www.ctio.noao.edu/noao/content/hydra-cli-xstowed
[70] http://www.ctio.noao.edu/noao/content/hydra-cli-zdb
[71] http://www.ctio.noao.edu/noao/content/hydra-cli-listti
[72] http://www.ctio.noao.edu/noao/content/hydra-cli-listts
[73] http://www.ctio.noao.edu/noao/content/hydra-cli-inputchart
[74] http://www.ctio.noao.edu/noao/content/hydra-cli-swchart
[75] http://www.ctio.noao.edu/noao/content/hydra-cli-execfile
[76] http://www.ctio.noao.edu/noao/content/hydra-cli-complamp
[77] http://www.ctio.noao.edu/noao/content/hydra-cli-plate
[78] http://www.ctio.noao.edu/noao/content/hydra-cli-quit
[79] http://www.ctio.noao.edu/noao/content/how-obtain-hydra-ctio-simulator
[80] http://www.ctio.noao.edu/noao/content/user-interfase#listdump
[81] http://www.ctio.noao.edu/noao/content/hydra-cli-coldstart
[82] http://www.ctio.noao.edu/noao/content/init-status-script-and-coord-files#concentricities
[83] http://www.ctio.noao.edu/noao/content/init-status-script-and-coord-files#astroparams
[84] http://www.ctio.noao.edu/noao/content/init-status-script-and-coord-files#systemparams
[85] http://www.ctio.noao.edu/noao/content/embedded-galil-software-files
[86] ftp://ftp.ctio.noao.edu/ctio/hydra/hydrasimLinux.tar.gz
[87] ftp://ftp.ctio.noao.edu/ctio/hydra/hydrasimSolaris.tar.Z
[88] ftp://ftp.noao.edu/ctio/hydra