------------------------------------------------------------------------------- pntcb - pointing cookbook of how to do things. last mod:05jul13 0. NOTES: 1. A SAMPLE SESSION. 2. START POINTING PROGRAM on the observer or control workstation: 3. INITIALIZE for TRACKING. 4. INSTALL POINTING MODEL. 5. TRACKING A SOURCE. 6. STOP TRACKING. 7. SWITCHING WRAPS. 8. PROCEDURES AVAILABLE. 9. THE PNT COMMAND. 10. Generic commands that can be sent to pointing 0. NOTES: 1. the > prompt is for sun. The % prompt refers to pntProg input. 2. abbreviations used are :g,gr gregorian, c,ch carriage house. az azimuth, za zenith angle. 3. when axis are used. 1-az,2-gr 4=ch,3-az+gr,5-az+ch,6-gr+ch,7-az+gr+ch 4. wraps: 1: 0..360, 2:360 720, 0:autoSwitch, -1:stay away 630-720 dome, stay awy 0-270 ch. 5. If you are running a procefure, ctrl-c will get you out of the procedure. 6. CTRL-D will cause the pntProg to exit. 7. The pntProg sends commands to the agcProg (az,gr,ch control program). 8. The help files are ascii files under /home/online/Tcl/Help/help.procname. From pntProg try, help, help pnt, help pntcb. ------------------------------------------------------------------------------- 1. A SAMPLE SESSION. >pointing .. from the operator workstation, user opusr ..... to use the gregorian lband wide %trkinit lbw .. init tracking. tracks current az/za. %set ra 112233.11 %set dec 102131.21 %pnt tr $ra $dec .. track ra,dec. %pnt tr hold .. stop the telescope from moving %pnt tr send .. start sending the positions again ..... to switch to the carriage house %trkinit ch .. switch to the carriage house %pnt tr $ra $dec .. track position in ra dec .... to switch back to gregorian sband narrow feed %trkinit sb %pnt tr $ra $dec .. track position in ra dec .... now some procedures to run.. %bmapaz $ra $dec .. do beammap with defaults. %cross $ra $dec 15 .. do 15 crosses with default values % hit ctrl-c .. to exit procedure before it completes signal interrupt .. returned after ctrl-c 'ing the procedure %pnt tr hold .. stop sending positions %pnt mode stop 7 .. make sure all axis are stopped % exit .. to exit (in normal operations you shouldnt' exit) % in pntEndProg.... .. program exits > back to sunos.. ------------------------------------------------------------------------------- 2. START POINTING PROGRAM on the operator workstation: >pointing .. you should have logged into sunos as opusr You should only run one copy of the pointing program on the operator workstation. ------------------------------------------------------------------------------- 3. INITIALIZE for TRACKING. %trkinit lb,lbw,sb,sbw,cb,430,ch .. lband,lbandwide,sband narrow, sbandwide,cband,430 dome, carriage house 430 This will do the following for you: %pnt tr clr ... The program track queue of vertex is cleared. %pnt mode stop axis ... Stop axis not in use (if vme had control). %pnt master g,c ... Master is set to gr or ch (depending on feed selected) %pnt tr curaz curza -CX...Src set to current az,za (curaz,za are computed). %pnt tr send ... Send the computed positions to the agcProg. %pnt xctrl vme axis... Transfer control of axis to vme (axis is computed). %pnt mode pt axis ... Place axis in program track mode (axis is computed). %pnt cor inpmod modelTouse %pnt cor inpenc enctbl %pnt cor model This routine can be called to switch between feeds. It can also be used to stop the telescope from moving since a side affect is to track the current az, za (with no model correction). ------------------------------------------------------------------------------- 4. INSTALL POINTING MODEL. Pointing corrections can be : encoder, model, or none. The encoder correction applies a fixed correction to the az and za. The pointing model applies corrections as a function of az and za. Some models use a zenith angle encoder table to make make corrections in the azimuth and zenith angle as a function of zenith angle. TRKINIT above will automatically input the model & encoder file for you and set the correction to model. The model file names are: trkinit lb .. modelLB (gregorian lbandnarrow) trkinit lbw .. modelLBW (gregorian lbandwide) trkinit 430 .. model430 (gregorian 430) trkinit sb .. modelSB (sband narrow). trkinit sbw .. modelSBW (sband wide). trkinit cb .. modelCB (cband). trkinit ch .. modelCH (carriage house 430 mhz), trkinit chlb.. modelCHLB (carriage house lband), enbtbl za encoder table for azimuth and za. The carriage house encoder table is set to all zeros. Model related commands: %pnt cor ? ...query pointing correction enabled: model, enc, none returned with model & enc offsets. %pnt cor model ...enable model corrections (done by default). %pnt cor inpmod filename ... input model filename (done by trkinit) %pnt cor inpenc filename ... input encoder table filename (done by trkinit) %pnt cor inpmod ? ... print out current model parameters. %pnt cor inpenc ? ... print out current encoder table. ------------------------------------------------------------------------------- 5. TRACKING A SOURCE. After completing steps 2.,3.,4. you can then track sources. The tr command requires the 2 coordinates and has many options. The units default to the regular units of the coordinate system (d-deg,h-hour,m-min,s-sec): coord 1 coord 2 default units gal ddd.ddd dddd.ddd ra/dec ha/dec hhmmss.sss ddmmss.ss az/za ddd.ddd dddd.ddd You can type the coordinates in directly to the command, or you can store them in variables and then pass the variable names to the command (setting variables uses the name, passing the variable to a command requires a dollar sign in front of the name). %pnt tr 112233.22 122323.11 ... track 112233.22 122323.11 in J2000 %set ra 112233.22 ... load ra variable %set dec 122323.11 ... load dec variable %pnt tr $ra $dec ... track ra,dec in J2000 %pnt tr $ra $dec -cB ... track ra,dec in B1950 ------------------------------------------------------------------------------- 6. STOP TRACKING. You can stop the telescope from tracking while still computing the positions by entering: %pnt tr hold The positions are computed and displayed in the Pointing requested positions window but they are not sent to the agcProg. To start sending the positions to the telescope program enter: %pnt tr send You can also stop the telescope motion by telling it to track the current az, za. This is a byproduct of trkinit. %trkinit lb,lbw,sb,cb,430,ch In this case the positions are still sent to the agcProg. ------------------------------------------------------------------------------- 7. SWITCHING WRAPS. The wrap can be set to -1,0,1, or 2. Wrap 1 will force the telescope to remain between 0 and 360 degrees. Wrap 2 will force the telescope to remain between 360 and 720 degrees. Wrap 0 will cause the telescope to move to the azimuth position closest to the current azimuth position. Wrap -1 is the same as wrap 0 except it will not got past 630 for dome master, or below 270 for ch master. The default is wrap 0 (this is displayed in the upper right corner of the pnt req pos display). The command is: %pnt wrap -1,0,1,2 .... set the wrap to use If you want the telescope to switch wraps, enter the wrap command. You should then switch back to wrap 0 after the current telescope position is closer to the new wrap than the old wrap (see wrap 0 algorithm above). ------------------------------------------------------------------------------- 8. PROCEDURES AVAILABLE. Procedures (proc) are available to do many telescope motions: -beam maps in azimuth -crosses (great circle or little circle in azimuth) -on then off source for integral number of minutes. -strip in azimuth, azimuth great circle, zenith angle -When doing these procedures it is a good idea to get close to the position before calling the routine (via pnt tr $ra $dec). The routines wait a maximum of 10 minutes to be on source before erroring out. A list of the current procedures can be found via %help in vxWorks or helpdt on the sun and then look under the POINTING: section. Each procedure is described via: %help procedurename on vxworks or helpdt procedurename on the sun. These are ascii files located under /home/online/Tcl/Help/help.procedurename. A few examples are: Arguments in { } are optional with the default value next to them. If you take a default value, all the arguments to the right should also be defaulted. - CROSS SCAN Do a strip in azimuth (little circle offset), followed by a strip in za. The offsets are in arcMinutes (little circle for azimuth) and the duration of a strip is in minutes. There is one minute of time moving between az and za. The call with all arguments is: cross $ra $dec {toloop 1} {azOff -60} {zaOff -15} {azTm 2} {zaTm 2} %cross $ra $dec .. 1 cross 120x30 arcminutes, 2 min each strip %cross $ra $dec 3.. 3 crosses 120x30 arcminutes, 2 min each strip %cross $ra $dec 3 -50 -20.. 3 crosses 100x40 amin, 2 min each strip %cross $ra $dec 3 -50 -20 2 3..3 crosses 100x40 amin, 2 min az,3 min za - BEAMMAP drive in azimuth Do a beam map driving in azimuth (drive in 1 direction only) then step in za. The user specifies the width in azimuth and za (both are great circle arcMinutes). The number of strips in azimuth is also specified. Each strip takes 2 minutes with 1 minute to move back to the next position. An odd number of steps will cause one strip go through the center position. The call with all arguments is: bmapaz $ra $dec {azWidth 20} {zaWidth 20} {numstrips 21} %bmapaz $ra $dec .. 20x20 arcminutes 21 strips, 2 min/strip %bmapaz $ra $dec 30 30 31 .. 30x30 arcminutes 31 strips ------------------------------------------------------------------------------- 9. THE PNT COMMAND. The pntProg is a tcl interpreter with a pnt command added. Most of the procedures listed above are tcl procedures using the pnt command. The user will normally use a subset of the pnt command and let the procedures do the dirty work. The format is: pnt modifier options. You must type enough characters of modifier to make it unique (the characters enclosed in () below). To list the pnt command options: %pnt ? .. list the point command CMD Args (?) this listing without the added comments. (c)orrection [? , {enc,model,off} , {setoff azGc,za} {inpModel file} {inpenc file} ] pnt c ? ..will output current state:{enc,model,or off} {model offsets az,za} {setoff az,za} pnt c {enc,model,off}..will set correction to encoder, model or none. pnt c setoff azGc za ..add to any model correction. The angles are great circle degrees. pnt c inpmod filename..input the model in filename pnt c inpenc filename..input the encoder table in filename pnt c inpmod ? ..print out the current model values. pnt c inpenc ? ..print out the current encoder table values. (d)oppler pnt d velCrdSys vel ..given velCrdSys and vel in that system, return secMid,dopCorFactor,usersVelProj corSys:topo,geo,helio,lsr, vel are km/sec (e)phm ? [ld type filename {yymmdd secmd}] [get secmid] pnt e ? .. returns the following: yymmdd secmid secEntry NumEntry Nopts ephmFileNm -yymmdd secMid: is the ast time for first entry loaded. 0's are returned if no file is loaded. -secEntry : the number of seconds between entries -NumEntry : number of entries that have been loaded -Nopts : number of options (tokens after ra,dec) -ephmFileNm: name of ephemeris file that was loaded pnt e ld type filenamme {yymmdd secmd} .. loads an ephemeris file type:1 = standard radar ephemeris 2 = date time ra dec then optional values date,time,ra,dec are same format as the radar ephem. filename: name of the file to load. If no directory is entered then it will look in /share/olda/Ephm (the standard radar ephem dir. Note that this file must be accessible from vxWorks. The user project directory is ok to use. {yymmdd secMid} AST time for the first entry in file to load If this is not supplied, then the current time is used. pnt e get secMid .. get information from ephemeris file for secMd ast This returns: secMid hhmmss.ss ddmmss.s ff.ff ff.ff ff.ff (optvals in %16.7g) -secMid is the requested AST time from the request -hhmmss.ss: is the ra interpolated to secMid -ddmmss.s : is the dec interpolated to secMid -ff.ff are the optional values interpolated to secMid (ma)ster [? , g,c,gsupc,csupg] pnt ma ? .. print out current master pnt ma g .. set gr to master pnt ma c .. set ch to master pnt ma gsubc,csupgc ..not implemented yet. (mod)e [? ,[stop, rate deg/sec ,pos deq,stow,pt,aux 0..8 axis]] pnt mod ? .. ouput current mode each axis pnt mod stop axis .. stop axis (1,2,4..etc). pnt mod rate velDegPersec axis.. axis to rate mode pnt mod pos posDeg axis .. axis moves to posDeg in preset mode. pnt mod stow axis .. axis moves to stow position. pnt mod pt axis .. axis moves to program track mode pnt mod aux motgrpnum axis..axis motgrp turned off (mon)req [criticalBlk,fullBlk,posveltim] {waitTickProc} pnt mon c .. display pointing critical data block pnt mon f .. display pointing full data block pnt mon p .. display time,azPos,grPos,chPos,azVel,grVel,chVel (o)perparms encCorAz, encCorGr,enccorCh ,ptOffsetSec (n-->ignore) don't use this unless you know what you're doing. (pw)r turn on the vertex system power pnt pw ..power on vertex shelter. (r)esetflts axis pnt r axis..reset faults 1-az,2-gr,4-ch,8-general faults (se)ttle query or set the settle time before tracking pnt se 10 .. set settle time to 10 seconds pnt se ? .. return current settle time in seconds.1 (si)ren toggle the state of the siren pnt s .. toggle state of the siren (tr)ack .. send position,offset,rate to track pnt tr {-Ux} p1 p2 -Cx -Tx {-o o1 o2 -Cx -Tx} {-r r1 r2 -Cx -Tx } -Ux units Radians Degs Normal(hhmmss,ddmmss, etc) {-o .. includes an offset} {-r .. includes a rate} Cx coordSys x=J,B,G,H,C,.2000,1950,gal,HourAngDec,Current A,F,X,S...srcAzZa,FdAzZa,FdAzZaNoModel,SinzaGC E,R,T .. EphemJ2000,Rcvephm,Txephem Tx startTime x= secsFromMidnite (tr)ack {hold,send,clr} pnt tr hold .. don't send point positions to agcProg pnt tr send .. send point positions to agcProg pnt tr clr .. clear the program track buf on agcProg/vertex pnt tr ? .. return Pos: Off: Rat: Rslt: tracking info. see monpnt display output. (tol)erance {?} {arcseconds} minimum error to be tracking ..tiedown related (td) pos Td12 Td4 Td8 ... slew to position (in inches) eg. pnt td 14.44 14.44 13.33 move to 14.44 14.44 13.33 on the jacks. (td) ptd Td12 Td4 Td8 V12 v3 v8 time.. progTrk data. eg. pnt td ptd 12 12 12 .001 .001 .001 46500 send data to tiedown tracking buffer to be at 12,12,12 moving at .001 in/sec at 46500 secFromMidnite. (needs to be in tracking mode to take effect). (td) pv p12 p4 p8 v12 v4 v8 startTm ..constant vel from position. eg. pnt td pv 12 12 12 .002 .003 .004 46500 slew to 12,12,12 and then start moving with velocity .002,003,.004 at 46500 secFromMidnite. This will put the tiedowns in tracking mode. (td) scan pS12 pS4 pS8 pE12 pE4 pE8 moveTime startTm..scan pS<->pE eg. pnt td scan 12 12 12 13 13 13 30 46600 continuously scan between 12 and 13 inches. Take 30 seconds to move each way and start at 46600. This puts the tiedowns in tracking mode. (td) sin p12 p4 p8 ampI frqHz phase startTm..sine wave about pos eg. pnt td sin 12 12 12 .5 .01 46300 continuously do a sine wave about 12 inches with amplitude .5 inches taking 100 seconds (1/.01) for 1 cycle. (td) [clrflt,clrptq,off(power),query,reset,stop,fdbkenc,pt] clrflt: clear fault log, clrptq:clear program track queue. off: turn off power. query:return position tension,etc. reset: reset to close the safety relay. stop: stop moving, pt: go to program track mode, fdbkenc not used.. (td) time offsetSecs ... set time offset secs relative to aotime eg. pnt td 0 set time in micro (little star) have 0 offset from station clock. (td) use [0-7] ... 1-td12,2-td4,4-td8,7-all eg. pnt td use 7 send commands to all 3 tiedowns. (td) track {temp,pos,all} pos12 pos4 pos8 offTmp ...std track az,za,tmp. (td) track {1=temp,2=avghght,3=prf 4-prfTemp 5-prfOffset} off12 off4 off8 offTmp Put tiedowns in tracking mode. Offsets are relative to the default values. 1-temp track using just the temperature 2-avghght track the average height using the distomats 3-prf track using the pitch,roll,focus model 4-prfTemp track using the pitch,roll,focus model plus temp. 5-prfOffset track using the pitch,roll,focus model plus offsets ..turret related (tu)r pos degrees ... slew to position eg. pnt tur pos 309.12 move to position 309.12 degrees. (tu)r pv posdeg vel startTm .. constant vel from position eg. pnt tur pv 309.12 .01 35400 slew to 309.12 then start moving at .01 deg/sec at 35400. (tu)r sin posD ampD frqHz phase starTm...sine wave about posD eg. pnt tur sin 76.6 8 .0666667 0 46500 do a sine wave about 76.6 degrees with amplitude 8 degrees and frequency .066667 (15sec period) starting at 46500 with 0 phase. (tu)r [clrflt,clrptq,off(power),query,reset,stop] clrflt:clear fault log, clrptq: clear program track queue, off: turn off the power, queury:return position,velocity etc. reset:try and close the safety relay, stop: stop moving. (tu)r time offsetSecs ... set time offset secs relative to aotime eg. pnt tur time 0 set turret micro time offset to 0 secs relative to station clock. (wa)it tracking timeouticks pnt wa tr timeoutSecs.. wait to be tracking (wa)it position value axis timeouticks pnt wa p posDeg axis timeoutSecs.. wait for axis to be at posDeg (wr)ap [0,1,2,?] set the wrap to wrap -1,1, 2, or 0 pnt wr 0 .. set wrap to 0. (x)ctrl [? ,[[ lcu,ocu,pcu,vme] axis] pnt x ? .. return control location for az,gr,ch pnt x vme axis .. set axis to vme control. ------------------------------------------------------------------------------- 10. Generic command that can be sent to pointing A number of generic query requests can be sent to the pointing program using aog generic pntMProg "request". These requests are listed below. requests description. ? lr .. return laser ranging info timeStampSecs tempDegF avgHght lrStatWd statwd is a bitmap: hghtOk 1B,tempOk 1B,inputOk 1 B,distOk 6B ? lst .. return local sidereal time.. seconds ? par .. return parallactic angle in use. parallacticAngledegs timeStampSecondsFromMidniteAst ? prf .. pitch,roll,focus offsets added to computed values. pitchDeg rollDeg FocInches Routines that perform some of these queries: pntqlr() .. query laser rangeing pntqonsrc().. returns: 1 if onsrc and tracking (within tolerance for settle time secs and not new point within 2 secs). 0 not on src and tracking pntqparang.. return parallactic angleDeg and time stamp astSecMid for the requested position. lst({notboth}} return lst in secs from midnite. If both arg passed in return lst and ast secs from midnite. ------------------------------------------------------------------------------- LASTMOD :pntcb :18feb04