Changes to TCS In order to be able to use WinTICS with DFM TCS, several changes have to be made to TCS: First, you should make a null modem cable to go between Com port 1 on the TCS computer and the Com port you want WinTICS to use. Below are diagrams for several different null modem cables: 25-pin to 25-pin null modem cable: 1-------------------------------1 2-------------\ /---------------2 / 3-------------/ \---------------3 4--- ---4 | | 5--- ---5 6--- ---6 | | 8--- ---8 | | 20-- ---20 7-------------------------------7 This cable is for 9-pin to 9-pin: 2-------------\ /---------------2 / 3-------------/ \---------------3 7--- ---7 | | 8--- ---8 6--- ---6 | | 1--- ---1 | | 4--- ---4 5-------------------------------5 Finally, for the *really lucky*, here's a 9-pin to 25-pin null modem: 9-pin side: 25-pin side: 2-------------------------------2 3-------------------------------3 7--- ---4 | | 8--- ---5 6--- ---6 | | 1--- ---8 | | 4--- ---20 5-------------------------------7 1) If you plan to control a DFM GAM, you must have a version of TCS that supports TCS control of the GAM. This upgrade should be gotten from DFM Engineering, Inc. 2) In order to use WinTICS with TCS, several commands must be added to TCS: a) Uncomment a few lines of handshaking code in EXEC.ASM b) Command 29: Sends telescope coordinates from TCS to WinTICS. c) Command 40: Slew to Cover Position. Available from WinTICS only, never from TCS. This command slews the telescope to a location convenient for removing and replacing the telescope covers. d) Command 35: Sends coordinates back to WinTICS during slews which allows WinTICS to update its Slew Progress Bars. Details of making these changes to TCS appear below: Edit EXEC.ASM and uncomment (i.e. remove the leading ; ) the following lines, found in the serhan1 subroutine (Do not uncomment the corresponding lines in serhan2):: cmp al,xoff ;is character xoff? jne short shan110 ;jump if not mov sendstop1,0ffh ;set flag to stop sending jmp shan190 shan110: cmp al,xon ;is character xon? jne short shan115 ;jump if not mov sendstop1,00h ;clear flag jmp shan190 shan115: cmp al,xon ;is character xon? jne short shan115 ;jump if not mov sendstop1,00h ;clear flag jmp shan190 shan115: To add Commands 29 and 40, add the following code to the given task#.xpl files: NOTE: This TASK0.XPL code is only provided for compatibilty with older systems. After 1/1/2000, slew to cover is only accessible from WinTICS, in order not to conflict with the DFM command "WritePoint" for taking pointing model data. Additionally, and for the same reason, the command number for cover changed from 30 to 40. These changes should be made in all previous installations, then tasks 1, 3, and 8 should be recompiled (ma1, ma2, ma3) and TCS then relinked (matcs). task0.xpl (after the definition for proc STOP): proc COVER; begin CLRWIND; WTXT(1, 0, "-- SLEW TO COVER POSITION -- Turn front panel TRACK switch ON"); loop begin if BYESNO(11, ^N, " ", "Any changes?") then else quit; end; if KEY =ESC then return; COMMAND:= 30; \SET COMMAND FOR TASK3 end; \COVER Now, revise the movement menu proc in task0 to look like this: procMOVEMENU;\Show movement menu begin loop begin CLRWIND; WTXT(4, 0, "-- MOVEMENT MENU -- 1. Set slew position 2. Set offset 3. Select library object 4. Select table entry 5. Set zenith position 6. Start trail 7. Start slew 8. Stop 9. Set cover position Selection: _"); loopbegin PARAMS(0):= ^_; GETFLD(0, 1, 11, 11, true, "Selection: _"); if KEY =ESC then return; case STR2INT(PARAMS\+0\, 1) of 0:return; 1:[SLEW; quit]; 2:[OFFSET; quit]; 3:[OBJECT; quit]; 4:[TMOVE; quit]; 5:[ZENITH; quit]; 6:[TTRAIL; quit]; 7:[GO; quit]; 8:[STOP; quit]; 9:[COVER; quit] other BUZMSG("PLEASE TYPE ^"0^" THRU ^"9^""); end; end;\loop end;\MOVEMENU Next, you must add Commands 29 and 30 to task3.xpl (after Command 28): \---------------------------------------------------------- proc NEXTCOORDS; \COMMAND 29 NEXT OBJECT COORDS TO EXCOM \DESIGNED FOR OUTPUT TO TICS BY R. LEE HAWKINS real NOAIRMASS, \NEXT OBJECT AIRMASS PROBEXPOS, PROBEYPOS, JULIANOUT; begin; PROBEXPOS:=4096.; PROBEYPOS:=4096.; JULIANOUT:=JULIAN; JULIANOUT:=JULIANOUT+2.415020E6; NOAIRMASS:= NOAM(NOHA,NODEC); \CALCULATE NOAIRMASS FORMAT(4,6); RLOUT(EC,HA); CHOUT(EC,CR); RLOUT(EC,RA); CHOUT(EC,CR); RLOUT(EC,DEC); CHOUT(EC,CR); FORMAT(4,2); RLOUT(EC,EPOCH); CHOUT(EC,CR); FORMAT(4,2); RLOUT(EC,AIRMASS); CHOUT(EC,CR); FORMAT(4,3); RLOUT(EC,ZDIST); CHOUT(EC,CR); FORMAT(4,1); RLOUT(EC,DOMEAZ); CHOUT(EC,CR); FORMAT(4,0); RLOUT(EC,TFOCUS); CHOUT(EC,CR); FORMAT(4,6); RLOUT(EC,NOHA); CHOUT(EC,CR); RLOUT(EC,NORA); CHOUT(EC,CR); RLOUT(EC,NODEC); CHOUT(EC,CR); FORMAT(4,2); RLOUT(EC,NOEPOCH); CHOUT(EC,CR); FORMAT(4,2); RLOUT(EC,NOAIRMASS); CHOUT(EC,CR); FORMAT(4,3); RLOUT(EC,NOZDIST); CHOUT(EC,CR); FORMAT(4,0); RLOUT(EC,PROBEXPOS); CHOUT(EC,CR); RLOUT(EC,PROBEYPOS); CHOUT(EC,CR); FORMAT(4,4); RLOUT(EC,UT); CHOUT(EC,CR); INTOUT(EC,MONTH);CHOUT(EC,^-);INTOUT(EC,DAY); CHOUT(EC,^-); INTOUT(EC,FIX(RLFIX(YEAR))); CHOUT(EC,CR); RLOUT(EC,ST); CHOUT(EC,CR); FORMAT(4,3); RLOUT(EC,JULIANOUT); CHOUT(EC,CR); COMMAND:= 0; \CLEAR THE COMMAND FORMAT(4,3); \RESET FORMAT end; \NEXTCOORDS \---------------------------------------------------------- proc ICOVER; \COMMAND 30 begin DATA(1) := CHKRA(ST + 4.5); \RA OF COVER POSITION DATA(2) := 0.0; \DEC OF COVER POSITION DATA(3) := 0.0; \DISPLAY EPOCH ISLEW; \SET UP SLEW COMMAND := 0; end; \ICOVER \---------------------------------------------------------- Now add Commands 29 and 30 to the setup for task3.xpl (near the end of the file). Here are the last few lines, with Command 30 added (be careful of the semicolons): 27: AFOCUS; 28: POINT; 29: NEXTCOORDS; 30: ICOVER other; DELAY(10); Now add Commands 29 and 30 to task8.xpl. This code goes after Command 28: \---------------------------------------------------------- proc NEXTCOORDS; \GET NEXT OBJECT COORDS begin COMMAND:= 29; end; \NEXTCOORDS \---------------------------------------------------------- proc COVER; \SLEW TO COVER POSITION begin COMMAND := 30; end; \COVER \---------------------------------------------------------- Now add Commands 29 and 30 into the DOEXCOM proc in task8.xpl: 27: AFOCUS; \SLEW TO FOCUS 28: POINT; \SEND BACK POINTING DATA 29: NEXTCOORDS; \SEND NEXT OBJECT COORDS 30: COVER; \SLEW TO THE COVER POSITION Now, you need to add the functions that calculate the next object airmass and zenith distance into task3.xpl. These should go below the variable definitions at the top of the file: \VERSION OF AIRMASS STOLEN FROM TASK 2 FOR CALCULATING NOAM func real NOAM(HA,DEC); \RETURNS AIRMASS AS A FUNCTION OF HA & DEC real HA, DEC; real COSH, COSD, SIND, COSZ, SZ, SZM1, DX; begin COSH:= COS(HA *15. *DEG2RAD); COSD:= COS(DEC *DEG2RAD); SIND:= SIN(DEC *DEG2RAD); COSZ:= RLABS(SINLAT *SIND + COSLAT *COSD *COSH); SZ:= 1.0 /COSZ; SZM1:= SZ -1.0; DX:= 1.8167E-3 *SZM1 + 2.875E-3 *SZM1 *SZM1 + 8.083E-4 *SZM1 *SZM1 *SZM1; return SZ -DX; end; \AIRMASS \CALCULATES NEXT OBJECT ZENITH DISTANCE \RLH, 16 AUGUST, 1995 func real NOZDIST(NOHA,NODEC); real NOHA, NODEC, NOALPH, SINNOA, COSNOA, SINNOD, COSNOD, TNO, ; begin NOALPH:= RAD(NOHA * 15.); SINNOA:= SIN(NOALPH); COSNOA:= COS(NOALPH); COSNOD:= COS(NODEC *DEG2RAD); SINNOD:= SIN(NODEC *DEG2RAD); TNO:= SINNOD *SINLAT + COSNOD *COSNOA *COSLAT; return ACOS(TNO) * 180. / PI; \NEXT OBJECT ZENITH DISTANCE end; Finally, you must add command 35 to task8.xpl, to allow TCS to send RA/Dec updates to WinTICS during slews. This allows WinTICS to show Slew Progress Bars. After Command 34 in task8, add Command 35: \---------------------------------------------------------- proc HADECUPDATE; \send HA and Dec to EXCOM during slew begin \COMMAND:=35; DELAY(50); FORMAT(4,6); RLOUT(EC,HA); CHOUT(EC,CR); RLOUT(EC,DEC); CHOUT(EC,CR); \COMMAND:=0; \\CLEAR COMMAND end; \HADECUPDATE; \---------------------------------------------------------- And then add Command 35 to the DOEXCOM procedure: begin \DOEXCOM case FIX(RLIN(EC)) of \BRANCH TO COMMAND DATA GATHERING 1: UPDATE; 2: ZDOME; 3: ZPOINT; 4: ZROTAT; 5: ZFOCUS; 6: SLEW; 7: OFFSET; 8: OBJECT; 9: TMOVE; 10: ZENITH; 11: TTRAIL; 12: GO; 13: STOP; 14: TRACK; 15: GUIDE; 16: SET; 17: TRAIL; 18: COSDEC; 19: RATECOR; 20: DOME; 21: GUIDER; 22: DOEPOCH; 23: MARK; 24: COEFFICIENTS; \CHANGE MODEL COEFF'S 25: COORDS; \SEND COORDINATES TO EXCOM 26: STAT; \SEND STATUS TO EXCOM 27: AFOCUS; \SLEW TO FOCUS 28: POINT; \SEND BACK POINTING DATA 29: NEXTCOORDS; \SEND BACK NEXT OBJECT COORDS 30: COVER; \SLEW TO THE COVER POSITION \gam commands 31: MOTOR; \SET GAM MOTOR POSITION 32: DOIO; \SET GAM I/O 33: MSTAT; \GET GAM MOTOR SETTING 34: IOSTAT; \GET GAM I/O SETTING \end gam commands 35: HADECUPDATE \SEND HA AND DEC TO EXCOM DURING SLEW other; DELAY(10); end; \DOEXCOM After all these changes have been made, do a masm exex.asm (accepting the defaults), ma0, ma3, ma8, and matcs to rebuild the system, then reboot, reset your GAM, and begin testing.