- 86 - 2. LX2OO Test Program Once you have the RS-232 cable constructed you will want to test the cable. Below is a simple program called "LX2OO TEST" that is written in GW Basic programming language and will work with virtually IBM compatible computer. LX2OO Test is an effective program to fully check the RS-232 line communications from your personal computer to the LX2OO, allowing you to concentrate on de-bugging your RS-232 cable. To enter the following program, first load BASIC or GWBASIC (which ever your computer system uses), then type in the following program When complete, be sure to save the program as "LX2OOTST.BAS." 10 CLS 20 DEFINT A-X 30 OPEN "COM1:9600,N,8,1,CD0,CS0,DS0,RS, " FOR RANDOM AS #1 50 keyl$ = INKEY$: IF keyl$ = "" THEN GOTO 50 60 REM KEYlS 70 IF keyl$ = CHRS(119) THEN GOSUB 200: REM "w" key 80 IF keyl$ = CHR$(101) THEN GOSUB 200: REM "e" key 90 IF keyl$ = CHR$(110) THEN GOSUB 200: REM "n" key 100 IF keyl$ = CHR$(115) THEN GOSUB 200: REM "S" key 105 IF keyl$ = "x" THEN END: REM To exit test. 110 GOTO 50 120 END 200 REM directions 210 REM west 220 IF keyl$ = "w" THEN a$ = "#:Mw#": PRINT #1, a$: REM GO west 230 REM east 240 IF keyl$ = "e" THEN a$ = "#:Me#": PRINT #1, a$: REM GO east 250 REM north 260 IF keyl$ = "n" THEN a$ = "#:Mn#": PRINT #1, a$: REM GO north 270 REM south: 280 IF keyl$ = "s" THEN a$ = "#:Ms#": PRINT #1, a$: 290 keyl$ = INKEY$: 300 IF keyl$ = CHR$(32) THEN GOTO 400 ELSE GOTO 200 400 REM This stops motion (by hitting SPACE bar) . 410 B$ = "#:Qe#": PRINT #1, B$ 420 B$ = "#:Qw#" : PRINT #1, B$ 430 B$ = "#:Qn#": PRINT #l, B$ 440 B$ = '#:Qs#" : PRINT #1, B$ 450 RETURN 460 END REM GO south To use the above program, connect the completed cable to your PC serial port and to the LX2OO RS-232 Port. Load BASIC (or GWBASIC), if not already loaded, and run "LX2OOTST.BAS" Nothing will a~pear on the computer screen. Press any one of the N, S, E, or W (lower case) keys on your PC keyboard, this will move the LX2OO North, South, East, or West respectively. Press the space bar on the PC keyboard to stop. Press X to exit the program. If the LX2OO does not respond to the N, S, E, or W keys, be sure the CAPSLOCK is OFF. If it still does not work, check the PC serial port pinouts for your computer to be sure they are wired correctly to the LX2OO 6 line connector. With a successful check-out of the PC link with the LX2OO using "TEST", you are now ready to write your own software program using the LX2OO Command Set, or to use the sample program called "DEMO" that is written in Ouick Basic software language. 3. LX2OO Command Set Intended for professional programmers, the LX2OO Command Set is used to write custom software for remote operation of the telescope with a PC. Each command is listed in a section appropriate to its type. Each entry in the command list includes the command name, any parameters, any return values, and a description. The parameters and the return data are shown in a manner that indicates their format. These formats are listed below along with examples of how the data might really appear, the legal range of values, and a short description. Below is a detailed description: a. Command Set Formats HH:MM.T Exam~le: 05:47.4 Range: 00:00.0 - 23:59.9 Hours, minutes, and tenths of minutes. sDD*MM Example: +45*59 Range: -90*00 - +90*00 Signed degrees and minutes (the '*' represents ASCII 223 which appears on the handbox as a degree symbol). DDD*MM Example 254*09 Range. 000*00 - 359*59 Unsigned degrees and minutes. HH:MM:SS Example: 13:15:36 Range: 00:00:00 - 23:59:59 Hours, minutes, and seconds. MM/DD/YY Example: 02/06/92 Range: 01/01/00 - 12/31199 (see description) Month, day, and year. The two digit year indicates the following: 92 through 99 = 1992 through 1999 OO through 91 = 2000 through 2091 sHH Example: -5 Range: -24 - +24 Signed hour offset. NNNN Example: 3456 Range: 0000 - 9999 Four digit object number. sMM.M Example: -02.4 Range: -05.5 - 20.0 Signed magnitude value. NNN Example: 134 Range: 000 - 200 Three digit object size (minutes). DD* Example: 56* Range: 00* - 90* Higher' parameter (degrees). TT.T Example: 59.2 Range: 56.4 - 60.1 Tracking 'frequency'. info Example: CNGC1976 SU DNEB MAG 3.9 SZ 66.0' Range: n/a Object information Ok Example: 1 Range: 0 or 1 Status value returned after setting values. If the value is legal 1 is returned otherwise 0 is returned. b. General Telescope Information Command ACK (ASCII 6) Returns A, L, P or G Gets alignment status, A for alt-az, L for land, P for polar, G for German mount polar. Command :GR# Returns +HH:MM.T# Gets the current Right Ascension. Command :GD# Relurns SDD*MM# Gets the current declination. Command :GA# Returns SDD*MM# Gets the current altitude. Commanci :GZ# Returns DDD*MM# Gets the current azimuth. Command :GS# Returns HH:MM.SS# Gets the current sidereal time Command :SS HH.MM:SS# Returns Ok Sets the sidereal time. Command :GL# :Ga# Returns HH:MM'SS# Gets the local time either in 24 hour (GL) or 12 hour (Ga) format. Command :SL HH:MM:SS# Returns Ok Sets the (ocal time. NOTE: The parameter should always be in 24 hour format. Command :GC# Returns MM/DD/YY# Gets the calendar date. Command :SC MM/DDIYY# Returns Ok (see description) Sets the calen~ar date. NOTE: After the Ok, if the date is valid, two strings will be sent. The first will contain the message "Updating planetary data," the second (sent after the planetary calculations) will contain only blanks. Both strings will be terminated by the '#' symbol. Command :Gt# Returns SDD*MM# Gets the latitude of the currently selected site. Command :St SDD*MM# Returns Ok Sets the latitude of the currently selected site. Command :Gg# Returns DDD*MM# Gets the longitude of the currently selected site. Command :Sg DDD*MM# Returns Ok Sets the longitude of the currently selected site. Command :GG# Returns sHH# Gets the offset from Greenwich Mean Time. Command :SG sHH# Returns Ok sets the offset from Greenwich Mean Time. Command :W1# :W2# :W3# :W4# Returns Nothing Sets the current site number. C. Telescope Motion Command :Mn# :Ms# :Me# :Mw# Returns Nothing Starts motion in the specified direction at the current rate. Command :MS# Returns 0, 1, or 2 (see description) Slews telescope to current object coordinates. 0 is returned if the telescope can complete the slew, 1 is returned if the object is below the horizon, and 2 is returned if the object is below the 'higher' limit. If 1 or 2 is returne~, a string containing an appropriate message is also returned. Command :Qn# :Qs# :Qe# :Qw# Returns Nothing Stops motion in the specified direction. Also stops the telescope if a slew to object is in progress. Command :O# Returns Nothing Stops a slew to an object. Command :RG# :RC# :RM# :RS# Returns Nothing Sets the motion rate to guide (RG), center (RC), find (RM), or slew (RS). d. Library/oblects Command :Gr# returns HH:MM.T# gets object right ascension Command :Sr HH:MM:T# Returns Ok Sets object Right Ascension. Command .Gd# Returns SDD*MM# Gets object Declination Command :Sd SDD*MM# Returns Ok Sets object Declination. Command CM# Returns (see description) Sync. Matches current telescope coordinates to the object coordinates and sends a string indicating which object's coordinates were used. Command :Gy# Returns GPDCO# Gets the 'type' string for the FIND operation. A capital letter means that the corresponding type is selected while a lower case letter indicates it is not. Command :Sy GPDCO# Returns Ok Sets the 'type' string for the FIND operation. ' Command :Gq# Returns SU#, EX#, VG#, GD#, FR#, PR#, or VP# Gets the current minimum quality for the FIND operation Command Sq# ' Returns Nothing Steps to the next minimum quality for the FIND operation. Command :Gh# ' Returns DD*# Gets the current 'higher' limit. Command :Sh DD# ' Returns Ok Sets the current 'higher' limit. Command :Gb# Gf# ' Returns sMM.M# Gets the brighter (Gb) or fainter (Gf) magnitude limit for the FIND operation. Command .Sb sMM.M# :Sf sMM.M# ' Returns Ok Sets the brighter (Gb) or fainter (Gf) magnitu~e lim(t for the FIND operation. Command :GI# :Gs# 'Returns NNN'# Gets the larger (GI) or smaller (Gs) size limit for the FIND operation. Command :SI NNN# :Ss NNN# Returns Ok Sets the larger (GI) or smaller (Gs) size limit for the FIND operation. Command :GF# Returns NNN'# Gets the field radius of the FIELD operation. Command :SF NNN# Returns Ok Sets the field radius of the FIELD operation. Command :LF# Returns Nothing Starts a FIND operation. Command :LN# Returns Nothing Finds the next object in a FIND sequence. Command :LB# Returns Nothing Finds the previous object in a FIND sequence. Command :Lf# Returns (see description) Performs a FIELD operation returning a string containing the number of objects in the field and the object that is closest to the center of the field. Command .LC NNNN# :LM NNNN# :LS NNNN# Returns Nothing Sets the object to the CNGC (LC), Messier (LM), or Star (LS) specified by the number. Planets are 'stars' 901-909. Command .LI# Returns Object Information Gets the current object information. e. Miscellaneous Command :B+# :B-# :BO# :B1# :B2# :B3# Returns Nothing Increases (B+) or decreases (B-) reticle brightness, or sets to one of the flashing modes (BO, Bi, B2, or B3). Command :F+# :F-# :FQ# :FF# :FS# Returns Nothing Starts focus out (F+), starts focus in (F-), stops focus change (FQ), sets focus fast (FF), or Command :GM# :GN# :GO# :GP# Returns XYZ# Gets site name (XYZ). M through P correspond to 1 through 4. Command :SM XYZ# :SN XYZ# :SO XYZ# :SP XYZ# Returns Ok Sets site name. -92- Command :GT# Returns TT.T# Gets the current track 'frequency'. Comman~ :ST TT.T# Returns Ok Sets the current track 'frequency'. Command :TM# :TQ# :T+# :T-# Returns Nothing Switch to manual (TM) or quartz (TM). Increment (T+) or decrement (T-) manual frequency by one tenth. Comman~ :Gc# Returns (12) or (24) Get 12/24 hour status of clock. Command :H# Returns Nothing Toggle 12/24 hour mode. Command :P# Returns "HIGH PRECISION" when ON "LOW PRECISION" when OFF Toggles the High Precision Mode ON or OFF. Command .U# Returns Nothing Toggles the long format ON or OFF When the long format is active, whenever a request to send or receive position data, the following format is used: HH:MM:SS Example: 05:47:45 Range: 00:00.0 - 23:59:59 Hours, minutes, and seconds. sDD*MM:SS Example. +45*59.45 Range: -9O*OO - +90*00 Signed degrees, minutes, and seconds (the '*' represents ASCII 223 which appears on the handbox as a degree symbol). DDD*MM:SS Example: 254*09:45 Range: 000*00 - 359*59:59 Unsigned degrees, minutes, and seconds. Command :Lo N# Returns Ok Sets the NGC object library type. 0 is the NGC library, 1 is the IC library, and 2 is the UGC library. This operation is successful only if the user has a version of the software that includes the desired library. -93- Command :Ls N# Returns Ok Sets the STAR object library type. 0 is the STAR library, 1 is the SAO library, and 2 is the GCVS library. This operation is successful only if the user has a version of the software that includes the desired library: f. Keypad Hand Controller Specific Command: D# Returns (see description) Gets the distance 'bars' string. Command: $Q (1-5)# Returns Nothing Toggles Smart Drive status. Command: ?# Command : ?+# Comman~: ?-# Returns Page of Help Information Starts (??) or moves through (?+ or ?-) Help. Command: GO# Command: G1# Command: G2# Returns Alignment Menu Entry Used to implement alignment menu. 4. LX2OO Demo Program The RS-232 interface communicates with your computer at 9600 Baud Rate, Parity = None, 8 Data Bits, 1 Stop Bits For those who are familiar with programming, the LX2OO Command Set is written in ASKII character format and can be used to write your own programs. The LX2OO Demo Program is written in Quick Basic and is intended to demonstrate how commands can be sent to the telescope and information received from the telescope. It is not a "polished" program and does not incorporate all of the RS-232 features available. The program is set-up to operate on serial port 2 (COM2:). To operate on serial port 1 (COM1:) line 4 should be changed from :COM2:" to "COM1:". The program is as follows: Please note that Meade Instruments does not support these programs, or programs that you may write in any way: For questions relating to after-market software programs, refer back to those manufacturers.