Leisure Time RS-232Cable, 2.LX200 Test Program, APPENDIX F: LX200 PERSONAL COMPUTER CONTROL

Models: LX20

1 65
Download 65 pages 13.16 Kb
Page 53
Image 53
APPENDIX F: LX200

5 4

APPENDIX F: LX200

PERSONAL COMPUTER CONTROL

Remote operation of a computerized telescope has only been a fanciful dream for most amateur astronomers. The realization of fully controlling a telescope through a personal computer has previously been a staggering proposition involving high monetary cost and expert knowledge of software and hardware.

The LX200's internal software supports the RS-232 interface, requiring only a serial communication program such as Procomm. With a serial communication program, you can use the individual commands from the LX200 Command Set to simulate keypad control functions of the LX200. Every LX200 command and mode is available to explore the Object Library, to adjust slewing speeds, or to adjust focus with the optional #1206 Electric Focuser, just to name a few, with a simple RS-232 line connection to virtually any computer.

If you are not a professional programmer, but wish to explore remote operation of the LX200 with your computer, there are after- market software programs available specifically for the LX200, including AstroSearch from Meade Instruments Corp.

What follows is a schematic for constructing your own RS-232 cable, a program to test the RS-232 communication line called LX200 TEST, the LX200 Command Set, and LX200 DEMO, which is a program that you can enter into your computer to access the Object Library, slew to the object, and center the image.

1. RS-232 Cable

The input hardware uses a standard 6-line telephone jack connector, pre-attached to a 6-conductor flat line telephone style cable (of any length, up to 100' and perhaps even more, depending on the gauge of the cable). You will also need either a 9-pin or 25- pin RS-232 connector, whichever your computer uses for the serial port. All of the above items are available at most electronics hardware stores.

Fig. 29 shows the LX200 pinouts for the 6-line telephone connector. The table below shows standard IBM compatible DB-9 and DB-25 serial port pin outs,** and how they should be connected to the LX200 6-line modular connector.

NOTE: Only 3 wires are required.

2.LX200 Test Program

Once you have the RS-232 cable constructed you will want to test the cable. Below is a simple program called "LX200 TEST" that is written in GW Basic programming language and will work with virtually any IBM compatible computer. LX200 TEST is an effective program to fully check the RS-232 line communications from your personal computer to the LX200, allowing you to concentrate on de-bugging your RS-232 cable.

To enter the following program, first load BASIC or GWBASIC (whichever your computer system uses), then type in the following program. When complete, be sure to save the program as "LX200TST.BAS."

10 CLS

20 DEFINTA-X

30OPEN "COM1:9600,N,8,1,CDO,CSO,DSO,RS," FOR RANDOM

AS #1

50key1$ = INKEY$: IF key1$ = "" THEN GO TO 50

60REM KEY1S

70IF key1$ = CHR$(119) THEN GOSUB 200: REM "w" key

80IF key1$ = CHR$(101) THEN GOSUB 200: REM "e" key

90IF key1$ = CHR$(110) THEN GOSUB 200: REM "n" key 100 IF key1$ = CHR$(115) THEN GOSUB 200: REM "s" key 105 IF key1$ = "x" THEN END: REM To exit test.

110 GO TO 50

120 END

200REM directions

210REM west

220IFkey1$ = "w"THENa$ = "#:Mw#": PRINT #1, a$: REM GO west

230REM east

240IFkey1$ = "e" THEN a$ = "#:Me#": PRINT #1, a$: REM GO east

250REM north

260 IF key1$ = "n" THEN a$ = "#:Mn#": PRINT #1, a$: REM GO north

270 REM south:

280IFkey1$ = "s"THENa $ = "#:Ms#": PRINT #1,a$: REM GO south 290key1$ = INKEY$:

300 IF key1$ = CHR$(32) THEN GO TO 400 ELSE GO TO 200 400 REM This stops motion (by hitting SPACE bar).

410 B$ = "#:Qe#": PRINT #1, BS

420 B$ = "#:Qw#": PRINT #1, B$

430 B$ = "#:Qn#": PRINT #1, BS

440 B$ = "#:Qs#": PRINT #1, B$

450 RETURN

460 END

To use the above program, connect the completed cable to your PC serial port and to the LX200 RS-232 Port. Load BASIC (or GWBASIC), if not already loaded, and run "LX200TST.BAS." Nothing will appear on the computer screen. Press any one of the N, S, E, or W (lower case) keys on your

 

LX200 RS-232 CONNECTOR

PIN OUT CODE LEGEND

 

 

 

 

 

6 WIRE MODULAR CONNECTOR

DESCRIPTION

TO DB-9 CONNECTOR PIN#"*

TO DB-25 CONNECTOR

 

 

 

PIN#*"

 

 

 

 

#1

+12 VOLTS DC

NOT USED

NOT USED

 

 

 

 

#2

MISC. SERIAL OUT

NOT USED

NOT USED

 

 

 

 

#3

PC TRANSMIT DATA

#3

#2

 

 

 

 

#4

GROUND

#5

#7

 

 

 

 

#5

PC RECEIVE DATA

#2

#3

 

 

 

 

#6

MISC. SERIAL IN

NOT USED

NOT USED

 

 

 

 

Page 53
Image 53
Leisure Time instruction manual RS-232Cable, 2.LX200 Test Program, APPENDIX F: LX200 PERSONAL COMPUTER CONTROL