An Automatic Photometric Telescope (APT) has been designed and assembled at Appalachian State University's Dark Sky Observatory. The dome and warmroom were constructed with automated and tended viewing considerations. The attached warmroom provides the means for a temperature-controlled environment, as well as safe storage for the computers and other necessary equipment.
The 16-inch telescope and its associated equipment were modified for optimal automated and tended stellar viewing. A master computer running original control software written in QuickBasic is used to manage the control computer running TCS software from DFM Engineering, Inc. Communications between the two computers is accomplished via an RS-232 connection between the communications ports COM1 of both computers. The control computer carries out the movement commands given by the master computer by sending the appropriate signals to electronic motor control equipment. This subsystem of control equipment uses direct current (dc) motors to adjust the telescope to the desired position and to track the stars. Telescope position is detected by encoders which send feedback information to the control computer, providing a closed-loop system.
Thanks are extended to the following for their cooperation and assistance in the development of this project:
Dan and Susan Caton for their guidance throughout the many intricate levels of this diverse project, and for helping me near the beginning of my academic journey.
DFM Engineering for the miscellaneous parts and the technical interests that made this project possible.
The American Astronomical Society's Small Research Grants Program for providing always appreciated funds.
The Appalachian State University Accessibility to Graduate Education for Minorities Program for providing resources and the help of an undergraduate assistant.
The Appalachian State University Research Committee for their support and interest in the advancement of education.
The Faculty and Staff of the Appalachian State University Department of Physics and Astronomy for their support and interest in this thesis project.
Robert Miller for the time and work, both at the observatory and in the machine shop.
The members of this thesis committee, Sid Clements, Joseph Pollock, and Thomas Rokoske, for all of their teaching, advice, and spare computer parts.
Mark Kelly,P.E. for sharing his knowledge of telescope hardware and software.
Richard Bair, Dustie Culbert, Oscar Knight, Wesley Saylors, and Pamela Wheatley for making the long journey to the observatory to help lift heavy objects and other necessary albeit unpleasant tasks.
Greg Cone, Andrew Graham, and John Hollandsworth for the use of their various collections of equipment and software.
Hurst Manufacturing Company for their timely technical support.
Wanda Burns for setting the foundation, both literally and metaphorically, for this project.
New River Power and Light for their uplifting attitude concerning dome installation and moving telescope hardware.
The Faculty and Staff of the Cratis D. Williams Graduate School for their support and help with the details involved in processing this thesis project.
My parents, John and Janice Thomas for their patience and support throughout my educational career.
In 1981 Appalachian State University and the ASU Foundation established the Dark Sky Observatory (DSO). The 120-acre site is located 20 miles northeast of Boone, North Carolina, at an elevation of nearly one kilometer in the Blue Ridge Mountains. Situated on a ridge overlooking the drop-off to the Piedmont section of the state, the Observatory is in a nearly ideal geographical location. True to its name, Dark Sky Observatory is sufficiently far away from all large cities and the light pollution they generate to increase the number of effective observation nights. Dark Sky Observatory boasts a 16-inch Newtonian for imaging, an 18-inch Cassegrain reflector with photometer, a new 32-inch Cassegrain reflector with an automated Guide-Acquire-Module and instrumentation, and the 16-inch Automatic Photometric Telescope (APT).
Although the practice of automated observing is new to Dark Sky Observatory, the concept is far from new. Several groups attempted to automate parts of the observing process with minor success as early as the 1960s. Although some progress was made in the past, the growing interest and advancing technology of recent years have started a new
method of data acquisition. The advantages of a robotic system have lead some observatories to attempt the ambitious task of having minimal human intervention in the viewing process (Richmond, Treffers, and Flippenko 1993). The realizations of efficient and cost-effective APT hardware and software began in the 1980s. The explosion of the semiconductor industry produced affordable microprocessors which allowed almost every person access to a personal computer. It was not long before the growing technology was adapted by the astronomical community. The basic idea of the APT is to control a telescope and the related equipment using a computer. In a mature APT, an astronomer transmits a command file listing the targets of interest for that night to the control computer via an ordinary telephone line. The next day, the control computer would return the data via the same telephone line. Ideally, no human intervention would be necessary during the viewing session.
In the late 1980s, Boyd, Genet, and Hayes (1987) published what they believed to be a list of the best advantages of the APT system:
1. Increased versatility and control to photometric research.
2. A single phone line with only minutes of communication time, resulting in low communication costs.
3. The ease of sharing the system with multiple institutions, resulting in lower total costs.
4. Detailed instructions providing the flexibility to switch between different observation modes.
5. Relatively easy upgrading of systems currently operating under user control.
6. The user not necessarily needing to be involved with the hardware, software, and maintenance of the system.
On February 15, 1989, a complete remote viewing operation was performed using one of the Jet Propulsion Laboratory telescopes. Since then other APT systems have been established, and the interest in APT use has continued to grow (Genet and Hayes 1989). The modest start of single systems has given way to such ideas as linking multiple systems to form an APT network (Mason 1993). This would be of great benefit to many astronomers. A network would allow an observer to gain observations from multiple latitudes and longitudes without having to travel further than the nearest computer equipped with a modem. Multiple APT systems also would decrease an instrument's idle time during reasonable viewing conditions. A network of APT systems would also provide a pool of back-up systems in the case of one system's failure or over-scheduling. A global network of APT systems would be a revolution to the world of astronomy research.
However, the price to pay for such a complete and powerful network of instruments is the implementation of a rigid instrumentation standard. The computer files used to control one APT would need to be transferable and readable by another APT, either directly or possibly require a minimum of computer-controlled translation. Boyd, Genet, and Hayes (1988) proposed the Automatic Telescope Instruction Set (ATIS). ATIS would provide a standard code for constructing ASCII computer files which can be sent to the control computer of an APT system. As the technology grows, improvements are being made. In 1993, the ATIS definition was expanded and is known as ATIS93 (Hall and Henry 1993). Of course, this newer version is downward compatible with the earlier version of ATIS. Today ATIS versions are used to control automatic telescopes for amateur and professional astronomers around the world.
This thesis project represents the first of the many steps necessary to implement a complete APT system. Figure 2 shows the APT system concept. It is clear that the overall system requires the cooperation of smaller electronic subsystems.
In the ideal fully-automated system, the master computer is the only equipment with which an observer would have any interaction. The user inputs are sent to the master computer via a modem connected to ordinary telephone lines. This computer serves as a virtual observer. The master computer interprets the given inputs and sends the appropriate commands to the control computer at the appropriate times. The master computer also stores all of the images and the observational data, and is capable of transmitting the information back to the observer.
The control computer, which is running the general telescope control software, receives its commands from the master computer via an RS-232 connection between the COM1 ports of both computers. This control computer performs the actions needed to accomplish the task assigned by the master computer. To do this, the control computer conveys the necessary signals to the motor driver boards.
Since the telescope has two axes, right ascension (RA) and declination (DEC), two motor driver boards are needed; one motor driver board is used for each axis. The motor driver boards receive three signals from the control computer: direction, speed, and step count. From the combination of these three control signals, the motor driver boards output the proper voltages to control the direct current (dc) drive motors. The motor driver boards also receive velocity information from encoders mounted on each of the drive motors. As a result, the motor drive boards insure that the drive motors are actually moving and that the motion is in the correct direction at the correct speed. The speed and direction of the drive motors is critical since these motors move the telescope.
Position encoders detect any movement of the telescope. Again, two position encoders are needed for the two axes. When the telescope is in motion, the position encoders send pulses back to the control computer. These feedback pulses are interpreted by the control computer to provide a closed-loop control system.
It is the goal of the Automatic Photometric Telescope to allow a user to observe in an efficient and user-friendly manner. This APT projec t includes some sophisticated wiring and complicated electrical and physical connections which makes this project very graphical by nature. Draftsman John Feirer sums up drawings as the representations which lift an object above a complicated set of ideas or feelings (1963). The construction notes, drawings, software printouts, and wiring diagrams are included here to allow this publication to comprise an "owner's manual" for the Automatic Photometric Telescope.
The Automatic Photometric Telescope (APT) observation dome is composed of three key physical components: the rotating dome, the telescope room, and the warmroom. Figure 3 shows these three main components. Each of these integral components required special consideration and presented their own unique challenges during the construction phase of this project.
To provide power and communication capabilities to the dome, cables were installed underground. The direct burial UF-10 power line runs underground from the meter box, enters the building through conduit embedded in the concrete foundation. The cable terminates at the breaker box which was installed in the interior wall of the telescope room. Figure 4 shows a bird's-eye view of the power and telephone cables.
The telephone line is connected through the wall of the APT building. The power line enters the conduit in the building foundation six inches below grade. These lines are enclosed in 0.75-inch conduit for the section underneath the road for protection from the weight of passing traffic. Except for the section under the road and small sections at its terminals, the direct-burial rated cables are underground without conduit. The approximate path of the lines is marked with cinder blocks buried flush with the ground. The lines run under the unused cable in the road and under the copper ground wire near the meter box. The telephone line runs over the miscellaneous conduit lines between the telephone terminal and the power terminal.
a) Dome Construction
The dome is a 2.5-meter diameter ObservaDome Silver series model made from many aluminium panels. These panels are tapered, growing smaller at the top. To illustrate this, Figure 5 shows the general pattern for the Armstrong foam rubber insulation which was cut to fit over the individual panels. The insulation was cut to be slightly longer than the dome panels and attached with contact cement. Once the contact cement was secure, the excess insulation was trimmed to give the proper fit.
Like the dome panels, the slit doors in the dome are aluminum. They were also covered with insulation. The slit doors for the APT operate with a pulley and cable system. Both of the doors slide to the side to allow viewing. The pulley and cable system distributes any force applied to the doors equally. Therefore it is possible to open, close, and secure the dome slit doors from any point on the doors. This will become an important construction consideration when slit door operation is later fully automated.
The dome rotation is accomplished by a 0.25-horsepower motor. This motor is attached to the North-West side of the base ring, and is spring-loaded to provide the correct contact pressure with the dome during rotation movements.
The aluminum dome sits on an 8-foot diameter steel ring. This ring is attached to the building and does not rotate. Wheels mounted on brackets attached to the ring hold the aluminum section of the dome secure while still allowing the dome to rotate. Although not air-tight, a neoprene-coated fabric apron and an aluminum skirt are layered to prevent rain and snow from entering the telescope room.
b) Telescope Room Construction
Since the dome has an approximate 8-foot diameter, the square telescope room was built to be slightly larger than 8 feet on each side. Keeping in mind that this APT project has been designed for full automation, the approximately 64-square-foot area provides only enough room for the telescope, with minimal storage space for miscellaneous equipment. Although the dimensions of the building required some unique construction details, standard construction practices were used. The interior walls of the telescope room were insulated with R-19 fiberglass insulation and finished with a simulated woodgrain pegboard. The concrete foundation floor was covered with sections of 0.75-inch plywood over 1.5-inch polyisocyanurate insulation. The concrete mass of the foundation is capable of storing a significant amount of heat during the day and releasing it during the viewing hours at night. Therefore, insulation was installed to reduce the heat transference which causes optical distortion due to warmed air escaping through the slit.
The telescope sits on top of a 58-inch concrete pier, 31 inches wide and 36 inches deep. Three 0.75-inch bolts were welded into a set pattern and placed in the concrete when the pier was formed. A top plate was attached permanently to the top of the pier to give a smooth and level resting surface for the telescope equipment. Figure 6 shows the dimensions of the top plate.
This plate provided a foundation which made the fine adjustments of the telescope fork position much easier. Three spherical float washers were placed between the top plate and the base of the telescope. These allow the telescope's equatorial mount to be adjusted to point the pole axis to the North Celestial Pole.
The North-West corner of the telescope room is an important electrical control area. Although electrical outlets were placed strategically in the walls of the telescope room, the North-West corner is the location of the electrical circuit breaker box, the telescope room light switch, the ventilation fan control switch, the dome rotation control switch, and the access panel leading to the warmroom.
c) Warmroom Construction
The warmroom for the APT is separated from the telescope room by a partition wall. This room provides a climate-controlled area for not only the observer, but also for the computer equipment. Electronics, like humans, do not function well in temperature extremes.
Because of the proximity of the rooms, the warmroom climate controls are utilized to control the conditions in the telescope room as well. Like the telescope room, the warmroom walls are insulated with R-19 fiberglass insulation and finished with simulated woodgrain pegboard. However, the warmroom side of the interior wall has a 4-mil plastic vapor barrier.
To control the temperature in the warmroom, a digitally-controlled air conditioner was mounted in the North wall of the building. The vents can be directed in the general direction of the ventilation fan. To provide a controlled air exchange between the rooms, a ventilation fan was mounted in the top corner of the room. Ideally, the telescope room should be the same temperature as the ambient temperature during a viewing session. This fan is used to transfer the chilled air from the air conditioner into the telescope room during the warm hours of daytime.
An electric heater was mounted in the lower part of the interior wall. This heater is used for the comfort of both an observer and the control computers during the winter season. A screened glass window was installed in the interior partition wall between the warmroom and the telescope room. This provides a great deal of flexibility for temperature control, as well as letting the observer actually see the telescope equipment during a tended observing session. A standard metal door was installed next to the window. The window and the door provide the necessary separation between the rooms while at the same time allowing easy access to the equipment.
Another opening provided between the rooms is a small access panel framed in the interior wall. This panel is used to route the control cables from the telescope equipment to the computers as well as to provide a temporary accesss which allows the observer to reach the dome control switch mounted inside the telescope room for manual dome rotations. It is obvious from the construction of the warmroom that the implementation of both electronic control and human control were of a high priority.
The warmroom dimensions are approximately half that of the telescope room. As shown in Figure 7, the warmroom has a sloped roof to provide proper drainage. Outlets were strategically placed to minimize power cable spans and to prevent clutter. A 6-outlet surge suppressor was installed in the outlet used by the control computers. This will protect the computer equipment from lightning and electrical spikes. A set of custom-fit shelves were installed to provide a safe storage area for the control computers as well as a functional work area. Even though the goal of the APT project is to allow an observer to gather data remotely, it has been designed to provide adequate on-site viewing, since the telescope certainly will be used in a "tended" mode initially.
III. TELESCOPE CONTROL COMPUTER CARD
The heart of the APT control system is the telescope control computer card. This is a full-sized internal PC computer card manufactured by DFM Engineering of Longmont, Colorado. The control card contains the circuitry which allows the PC to calculate values, interpret feedback, make decisions, and send commands to control the telescope. This card requires a computer with an 80386 processor or higher. This APT project uses an 80486 system running at 33 Megahertz.
The DFM control card utilizes 4 ports for input and output. Figure 8 shows the card with the ports labeled using the industry standard J-designators. J1 is a standard PC card edge that plugs directly into a PC bus slot on the motherboard of the control computer. J-ports 2 through 4 are special ports composed of pins protruding from the card which are fitted with adaptor plugs. These plugs have pins on top and holes on the bottom which fit the port pins on the DFM card. These port plugs are keyed so the plug can not be installed incorrectly. Additionally, the plugs were labeled to match a particular plug to its assigned port. Plugs connected improperly would not give the desired functions, and could possibly damage the equipment.
Wires were soldered to the necessary pins to enable basic computer control. Not all of the pins were used. Figure 9 shows how the wires were connected to the J-port plugs. General rules for soldering and desoldering were followed (Mims 1988). These wires connect the control computer card J-ports to the ports attached to the computer case. Figure 10 shows the general location of the ports, the DFM card, the wire bundles connecting the ports to the J-ports located on the card, and the 5-volt and ground connections inside the control computer.
The connections between the J-ports and the ports mounted on the computer case became rather intricate. A single diagram of the wire connections would be extremely complicated and confusing. Therefore, the figure representing the wiring has been divided into three separate drawings. Figure 11 shows the connections made to the plug associated with J-port 2. Figure 12 shows the connections for J-port plug 3, and Figure 13 shows J-port plug 4. A true representation of these connections would be made by "superimposing" all three figures into a single image. Tables 1, 2, and 3 show the pin assignments and functions for J-ports 2, 3, and 4, respectively.
The output signals sent to the telescope system and the feedback signals sent from the telescope system exit and enter the control computer through the ports connected to the computer case. Other than the serial connection to the master computer, this array of ports is the only means of communication for the control computer. The previous figures show these ports from inside the computer. Figure 14 shows the labeled ports as seen from outside the computer. The 9-wire ports are male, and the 25-wire ports are female. The handpaddle and the two position encoders have dedicated ports. The computer design and the availability of free wires in the 25-wire ports allowed the external switch box and the connections leading to the motor driver boards to share a port.
. | port pin | J2 pin | Function | Description |
RA port: | 1 | b2 | RA /A | encoder pulse |
. | 3 | b1 | RA A | encoder pulse |
. | 4 | b4 | RA /B | encoder pulse |
. | 5 | -- | +5 VOLTS | encoder power |
. | 8 | b3 | RA B | encoder pulse |
. | 9 | -- | GROUND | encoder ground |
. | case | a3 | RA shield | cable shield |
DEC port: | 1 | b8 | DEC /B | encoder pulse |
. | 3 | b7 | DEC B | encoder pulse |
. | 4 | b6 | DEC /A | encoder pulse |
. | 5 | -- | +5 VOLTS | encoder power |
. | 8 | b5 | DEC A | encoder pulse |
. | 9 | -- | GROUND | encoder ground |
. | case | a7 | DEC shield | cable shield |
Handpaddle | port pin | J2 pin | Function |
port: | 1 | -- | Ground |
. | 2 | -- | Ground |
. | 3 | c3 | Focus - |
. | 4 | a4 | Focus + |
. | 5 | c6 | Slew |
. | 9 | a7 | North |
. | 10 | c7 | West |
. | 11 | b6 | Set |
. | 12 | c8 | East |
. | 13 | b7 | South |
. | 14 | -- | GROUND |
. | 15 | -- | GROUND |
. | 19 | b4 | Dome CCW |
. | 20 | b5 | Dome CW |
Box/Boards port: | 2 | b11 | DEC Fwd/Rev |
. | 11 | b12 | RA Fwd/Rev |
. | 14 | a2 | GROUND |
. | 15 | c10 | DEC x1/x4 |
. | 24 | a11 | RA x1/x4 |
. | 25 | a1 | GROUND |
Computer Ground: -- | c14 | Limit Switch |
. | port pin | J2 pin | Function |
Box/Boards port: | 1 | a7 | DEC Pulse |
. | 6 | a16 | GROUND |
. | 8 | c14 | EXCOM |
. | 9 | c15 | Auto Dome |
. | 12 | b7 | RA Pulse |
. | 18 | a16 | GROUND |
. | 19 | a14 | Drives |
. | 20 | b14 | Tracking |
IV. Motor Driver Control System
To provide access to any part of the sky a telescope is rotated about 2 axes, the right ascension (RA) axis and the declination (DEC) axis. A combination of these two coordinates can allow a telescope to point from horizon to horizon with a 360-degree view. The APT uses an equatorial fork mount, where the axis containing the fork is oriented parallel to the Earth's rotation axis. This allows tracking the nightly motion of a star using motion about this one axis only. Since two axis motors are used, two motor driver boards are required for a complete motor control system.
This motor control system has the desirable feature of using stepper motor control signals to control dc motors. In general, dc motors provide more performance advantages than stepper motors. These advantages include smoother operation and less generation of electrical noise. Also, dc motors offer their highest torque output at stalling conditions. This means that a motor in a possible failure condition will offer a higher performance output. Therefore a dc motor has an intrinsic self-correction feature.
To control the dc motors of the telescope system, the DFM Engineering motor driver boards were used. The most noticeable feature of these motor driver boards is the large heat-dissipating fin attached to the power transistor on each board. As with any electronic circuit, excess heat was a concern. To aid in this problem a 120-volt cooling fan was attached to the external motherboard frame. Figure 15 shows the motherboard, the driver boards, and the cooling fan.
The control computer communicates with each of the motor driver boards with only three signals: Pulse, Forward / Reverse, and Speed X1 / Speed X4. However, other wires are needed for supplying necessary voltages and grounding. Figures 16 and 17 show the connections between the control computer port and the RA motor driver board. Table 4 lists the connections from the computer port plug to the DB-9 cable plug, and the connections from the DB-9 cable plug to the Molex connector. The DEC connections shown in Figures 18 and 19 are slightly more complicated since this cable carries the signals for the driver boards as well as other necessary connections. Table 5 lists the connections from the computer port plug to the DB-9 cable plug, and connections from the DB-9 cable plug to the Molex connector. The figures and the table reflect the extra connection lines.
The extra lines include the +5 volts from the control computer needed by the driver boards and the common ground wire to the +30-volt power supplies to be discussed in Section VII. Tapping into the +5-volt supply line from the control computer eliminated the need, cost, and added complexity gained by using an external power supply. The +5-volt and ground supplied by the computer are sent through the DEC control cable and routed through a one-half-inch plug. The ground wire supplied for the +30-volt power supplies is a single black wire attached at the male side of the plug. This wire is attached to two other wires (which forms a "Y" shape) to route the ground signal to both of the power supplies. Although these connections are made to the same plug connected to the control computer port, they are represented here by separate drawings for clarity.
DB-25 | DB-9 | Molex | Function |
11 | 3 | 2 | RA Fwd/Rev |
12 | 6 | 1 | RA Pulse |
13 | case | - | RA Shield |
24 | 5 | 3 | RA x1/x4 |
25 | 4 | 4 | GROUND |
DB-25 | DB-9 | Molex | Function |
1 | 4 | 1 | DEC Pulse |
2 | 8 | 2 | DEC Fwd/Rev |
3 | 2 | - | +5 volts |
4 | case | - | DEC Shield |
14 | 6 | 4 | GROUND |
15 | 3 | 3 | DEC x1/x4 |
16 | 9 | - | GROUND |
a) Wiring and Noise Control Considerations
The connections between the control computer and the motor driver boards are an important link in the APT system. Great care and planning were required to derive the best design for these cables in terms of lengths and locations. The control computer is approximately 12 feet from the telescope. However, routing the cables along a convenient path gave a required length of 25 feet. For connections of this length, the designer must consider the bandwidth, the signal power, noise sources, timing problems, as well as other basic problems inherent in the field of communications (Lathi 1989). Even without the communication aspects, basic electronic principles for grounding and shielding from interference were observed to prevent damage to the equipment and possible injury to the operator. For several reasons, standard and readily available shielded DB-9 and DB-25 cables were used.
Since DB-9 and DB-25 cables are often used for RS-232 communications, the cable's specifications were evaluated for application in this APT project. The maximum length of RS-232 cable is 50 feet with a maximum transmission rate of 20,000 bits per second (Slater 1989). This APT system uses cable lengths and transmission rates that fall within these limits. However, the RS-232 is used in an atypical application in this instance. Analog and digital signals were sent over the cable. This did not cause any problems with the system operation.
Interference within a system can be classified into three categories: capacitive (electric fields), inductive (magnetic fields), and resistive (ohmic voltages in ground conductors). Capacitive problems are the hardest to avoid. The effects of this interference can be minimized by grounding the cases and shields at strategic points, in essence to make the best of the inherent problem (Monzon 1988).
Inductive interference is also an ever-present problem. However, the designer has a few more preventative options. In this system the inductive concerns entered due to the RA and DEC control lines being pulsed. These high-low alternating signals can generate noise and possibly generate false pulse signals. In an attempt to avoid these problems the control lines from the control computer port to the driver motherboard were housed in separate DB-9 cables, even though a single DB-25 cable could have been used. Of course, both of the cable shields were grounded.
These problematic pulse lines were also shielded within the control computer itself to add an extra level of security. In an added attempt to keep a robust control system, the RA and DEC control lines were kept at opposite ends of the 25-pin connector mounted on the case of the control computer. Physical separation of the signal wires along with proper shielding can significantly reduce the effects of inductive interference.
The shielding of these control lines obviously was an important factor. These cables are a useful standard that add a great deal of versatility to the arrangement of the system. The grounded case of the DB-9 and DB-25 cable could be continuous through multiple cable extensions of ordinary cables. This provides protection from electrical interference as well as any dangerous voltage spikes induced by any occasional lightning strikes. Lightning strikes may appear to be a rare threat, but have caused damage at DSO and deserve some forethought.
The cables from the control computer port to the driver motherboard are shielded over most of their length, but are NOT fully enclosed by shielding. As shown in Figures 17 and 19, the plastic MOLEX connectors pass the signal lines without connecting a shielded case from the computer side to the motherboard side. This is acceptable since the connections to the motherboard are relatively short. Also, the common practice in electronics is to ground the shield at a single point. Grounding the shield at multiple points could contribute to the third form of interference listed above, ground currents leading to unwanted ohmic voltages. In the final analysis, shielded DB-9 cables are an ideal solution for sending the needed signals from the computer to the driver motherboard. The cables provide the versatility of many shielded conductors, some compatibility with other Dark Sky equipment, and easy troubleshooting with timely replacements should they be necessary. However, assuming the cables are functioning properly, the control signals reach the connections underneath the motherboard where they are joined by the +30 volts from the external power supplies.
b) Motor Driver Boards
The RA and DEC driver boards act as interpreters between the control computer and the motors which drive the telescope. They analyze the stepper motor control signals from the control computer and send the appropriate electrical voltages to the dc motors. To maintain the desired motor actions, the driver boards also interpret speed and direction feedback from the motor encoders mounted on the drive motors.
To process these digital signals from the control computer and the motor encoders, the DFM motor driver boards use a Galil GL1200A chip. This Galil chip controls the motor so that the feedback pulses from the encoders remain synchronized with the drive pulses from the control computer. If the telescope falls behind due to inertia, the dc level is increased until the telescope catches up to the desired position. Red light-emitting diodes on the driver boards indicate this condition. It is normal for these diodes to blink intermittently in the course of an automated or manual move.
The motor driver boards are fully interchangeably, as long as the cables and motor power terminals are connected to the corresponding axis. The voltages sent to the drive motors are accessed from the motherboard via two pairs of red and black banana terminals. The other signals are sent from the 10-pin port located in the upper-left-hand side of the driver boards. Figure 20 shows the assigned pin numbers, and Table 6 list the pin numbers and functions for this port.
Pin number | Function | Description |
1 | /A | encoder pulse |
2 | N/C | no connection |
3 | A | encoder pulse |
4 | /B | encoder pulse |
5 | GROUND | ground |
6 | N/C | no connection |
7 | GROUND | ground |
8 | B | encoder pulse |
9 | +5 VOLTS | encoder power |
10 | +5 VOLTS | encoder power |
V. Driver Motors and Motor Encoder System
a) Driver Motors
Two dc motors were used to move the telescope about its two axes. The drive motors for both axes are ElectroCraft E540 models purchased from DFM Engineering. A motor encoder was attached to each of these driver motors to provide velocity feedback. Both axes use BEI M152-25-500HD model encoders. The control signals and necessary voltages are carried from the motor driver boards to the motors and encoders via shielded DB-9 cables.
Figure 21 shows the assigned pin numbers, and Table 7 lists the pin numbers and their functions. These connection ports represented by Figure 21 are located on the motor encoders mounted on the telescope. The DEC motor is located on one arm of the fork, and the RA motor is on the base of the telescope mount. The labeled connection ports are the same for DEC and RA, both on the motor driver boards and the motor encoders. However, sections of the cables connecting these ports are unique. The lengths of cable that connect into the ports located in the upper-left-hand corners of the motor driver boards are specifically designed for their particular axis and can NOT be interchanged. As long as the initial cable sections are connected to the proper driver board, any ordinary DB-9 cables can be connected to extend these connections to any reasonable length desired.
Pin number | Function |
1 | +5 VOLTS |
2 | +5 VOLTS |
3 | N/C |
4 | N/C |
5 | A |
6 | /A |
7 | GROUND |
8 | GROUND |
9 | B |
10 | /B |
b) Motor Encoders
To monitor the speed and direction of the dc drive motors, optical encoders were attached to the driver motor cases. The motor encoders provide a series of offset pulses. The rate of the pulses gives information about the motor speed, and the relative order of the pulsed signals gives information about the motor direction.
Figure 22 shows the basic structure of optical encoders. A wheel made of transparent material with an opaque pattern, or an opaque wheel with a cut-out pattern, rotates between at least one optical emitter and at least two optical sensors. The rotation of the offset patterns in the wheel between the emitters and the sensors gives the series of staggered pulses. Figure 23 shows a sample pulse reading from the motor encoders. For this encoder system, the +5 volt line was supplied by the control computer.
c) Motor Gearing
For this APT project, the drive motors provide 500 steps per revolution. The gear box with a ratio of 80:1 coupled with the telescope gear ratio of 360:1 provides an overall ratio of 28,800:1. These numbers gave the telescope speeds of 0.09 arc second slew steps and 0.0225 arc second track steps. The controller can command 75,000 steps per second, which gave a maximum slew speed of 6,750 arc seconds per second, or 1.875 degrees per second.
The speed of 1.875 degrees per second is an acceptable speed for controlling the telescope. However, the maximum input speed to the Berg reducer is 2,000 revolutions per minute. This limits the slew speed to 0.4 degrees per second. Slews with these gearing ratios will lower the efficiency of the viewing and will operate the gearing system at speeds approaching the upper limits of the recommended ratings. The APT is functional with this speed constraint, but a future gear upgrade will be a high priority.
To remedy this problem, DFM Engineering has recommended that the 80:1 gear boxes be replaced with Berg 20:1 speed reducers, model WX64B4-2. These will provide a 0.36 arc second slew step and a 0.09 arc second track step. The maximum slew speed in this case would be 1.66 degrees per second. Another possible upgrade would be to devise a pair of timing belt stages to achieve a 20:1 ratio in the worm shaft. Without the Berg reducer, faster slews would be available since the input speed restriction would no longer apply (DFM Engineering, 1994).
To ensure that the control software keeps an accurate account of the telescope's true position and true speed, the motor track rates and motor set rates must be set correctly. The numbers were calculated to the following exact values using numbers based on the encoder hardware. In TASK4.XPL, the variable XMTR, the RA axis motor track rate, was replaced with 0.0225. The variable XMSR, the RA axis motor set rate, was replaced with 0.09. Similarly in TASK5.XPL, the DEC axis variables YMTR and YMSR became 0.0225 and 0.09, respectively.
d) Troubleshooting and Wiring Corrections
Although the general function of a telescope system does not vary greatly from telescope to telescope, the actual telescope hardware can be constructed in many unique arrangements. Driver motors can be mounted in various locations, pointing in various directions, and processed by any number of gearing systems. The end result is that a control signal meant to give an East slew, in fact could send the telescope West.
To correct this reversed polarity situation, it is not sufficient to simply switch the power leads to the driver motor. The reversed direction will be sensed by the encoder system. Therefore, the connections of the encoder system must also be adjusted to agree with the true direction of the driver motor. If a motor slews in the direction opposite to its command, the three-step correction procedure is to:
1. Switch the power leads to the motor.
2. Switch encoder line A with encoder line B.
3. Switch encoder line /A with encoder line /B.
For this project, the RA motor was considered backwards in relation to the DFM Engineering standard. The correction was made in the cable that attaches to the port in the upper-left-hand of the RA motor driver board. Even though the pins are defined as A, B, /A, /B, etc. on the connector ports on both the driver board and the motor encoder, the cable connects A to B, and /A to /B. The power leads were also switched inside the cable, so that the red and black banana terminals could still be placed into their same-colored power terminals located on the motherboard. This wire correction is the reason these particular lengths of RA and DEC cables are unique and should only be used with their respective driver boards.
If the cables to the driver motors and the encoders were accidentally switched, minimal troubleshooting would be required. The symptom would be an obvious drop in system performance. Both the RA and DEC driver motors would behave erratically. The information shown in Figures 24 and 25 and Tables 8 and 9 shows the subtle, yet important differences in the control cables. Figure 24 is the cable connection for the DEC. It was constructed following the original specifications. Table 8 lists the connections from the DEC driver board connector to the DB-9 cable plug, and the connections from the DB-9 cable plug to the motor encoder port. Figure 25 shows the cable connection for the RA. Table 9 lists the connections from the RA driver board connector to the DB-9 cable plug, and the connections from the DB-9 cable plug to the motor encoder port. The RA connector cable was modified to switch the motor polarity.
Driver Port Position | DB-9 | Motor Encoder Port Position |
1 | 1 | 6 |
3 | 3 | 5 |
4 | 4 | 10 |
5 | 5 | 7, 8 |
6 | 5 | 7, 8 |
7 | 5 | 7, 8 |
8 | 8 | 9 |
9 | 9 | 1, 2 |
10 | 9 | 1, 2 |
Red plug | 2 | Inside plug |
Black plug | 6 | Outside plug |
Driver Port Position | DB-9 | Motor Encoder Port Position |
1 | 4 | 10 |
3 | 8 | 9 |
4 | 1 | 6 |
5 | 5 | 7, 8 |
6 | 5 | 7, 8 |
7 | 5 | 7, 8 |
8 | 3 | 5 |
9 | 9 | 1, 2 |
10 | 9 | 1, 2 |
Red plug | 6 | Outside plug |
Black plug | 2 | Inside plug |
Pin | DB-9 Pin | Function |
A | 3 | A |
B | 8 | B |
C | 1 | /A |
D | 9 | +5 VOLTS |
E | 4 | /B |
F | 5 | GROUND |
G | CASE | CASE |
b) Encoder Gearing
Since the encoders provided a set number of feedback pulses for a given rotation, it was important to have the control software correctly adjusted to properly interpret these feedback signals. For example, the TCS software with the unmodified DEC ratio formula gave the reading of a 12-degree slew, when in reality the tube moved over 30 degrees. To correct this problem, the ratio variable formulas were changed in the TCS software.
In the module PAR.XPL, the formula for the variable HARATIO, the hour angle or RA encoder ratio, was replaced with 1.063053973 / 15 / 3600. The 15 and the 3,600 were constants for this type of encoder system. However, the first variable in this formula depends on values determined by the hardware.
The number for this variable was obtained by taking the units per revolution for the position encoder, in this case 50,800, and multiplying it by the ratio of pulley diameters. In this case, the ratio of the diameters was 27.50 divided by 1.1459. The units of inches divides out of this ratio. The product of the encoder units and the pulley ratio gave 1.219 x 106 encoder units per revolution of the sky. Dividing this number by 3,600 and then by 360 gave 0.9407 encoder units per arc-second. The inverse of this number is the 1.063 x 106 used in the HARATIO formula. The number used in the TCS software was carried to nine decimal places for accurate positioning of the telescope.
In the same module, the formula for the variable DECRATIO, the DEC encoder ratio, was replaced with 3.1890599 / 3600. Similar to the HARATIO formula, the 3,600 was a constant. The variable number was calculated by taking the 50,800 encoder units per revolution and multiplying it by the pulley diameter ratio. In this case, the pulley diameter ratio was 7.639 divided by 0.9549. The units of inches divided out of the ratio. The product of the encoder units and the pulley ratio gave 4.064 x 105 encoder units per revolution of the sky. Dividing this number by 3,600 and then by 360 gave 0.3136 encoder units per arc-second. The inverse of this number is the 3.189 used in the DECRATIO formula.
Some test slews showed that this new DECRATIO formula gave a slight error, so the formula was modified to 3.234479063556314 / 3600. The modified number with the extra decimal places gave very good results for DEC slews. This type of "fine tuning" adjustment will be necessary only during the initial operating phase until the best values are found.
c) Wiring Corrections
Initially the DEC position encoder was responding backwards due to the arbitrary choice of gearing and encoder mounting. The result was that the DEC motor would move in the direction it was commanded, but the position encoder informed the control computer that the telescope was moving in the opposite direction. This is a similar problem encountered with the RA driver motor and motor encoder. Since no motor was involved, the solution was less complicated than the reversed RA driver motor. To switch the polarity of the DEC position encoder, the signals A and B were switched, as were the signals /A and /B. Unlike the RA driver motor solution, the DEC position encoder wiring was corrected inside the control computer. The wire bundles between the J-port plugs on the control computer card and the computer case port were altered to give the proper function. This means that the RA and DEC position encoder cables are fully interchangeable. The only physical difference between the two is the length. Because the position encoders are located at different heights from the telescope pier, an attempt was made to have the extension cables terminate at roughly the same point.
VII. Miscellaneous Systems
a) The Control Switch Box
Since this APT project used various control equipment and an ordinary 80486 personal computer to simulate a full commercial telescope control system, an extra panel for control switches was needed to simulate part of DFM Engineering's motor driver chassis. Figure 27 shows the connections made from the computer port plug to the 9-hole female cable plug. Table 11 lists the cable functions. As mentioned in Section IV, this computer port plug is the same one shared by the RA and DEC control cables to the driver motor control card motherboard. Again, the other cables are not shown here for clarity. Figure 28 shows the control switch box and the pin assignments for the cable.
DB-25 | DB-9 | Switch Function |
6 | 8 | GROUND |
8 | 4 | EXCOM |
9 | 5 | Auto Dome |
18 | 8 | GROUND |
19 | 3 | Drives |
20 | 2 | Tracking |
b) Handpaddle
The telescope control handpaddle is a necessity for observing. This equipment was constructed to have the paddle usable with one hand, and to have the buttons positioned to be recognizable by touch for use in the dark. The buttons were configured in accordance with DFM standard handpaddles. Figure 29 shows the handpaddle switch configuration. Table 12 lists the assignments and the functions for the pins of the handpaddle port plug.
Handpaddle Pin | Function |
1 | GROUND |
2 | GROUND |
3 | Focus (-) |
4 | Focus (+) |
5 | Slew |
9 | North |
10 | West |
11 | Set |
12 | East |
13 | South |
14 | GROUND |
15 | GROUND |
19 | Dome CW |
20 | Dome CCW |
Even though this project does not currently support all of the functions available on the DFM handpaddle, all of the electrical switch connections have been wired. Like some of the other cables in this system, the handpaddle uses a DB-25 shielded cable. However, the handpaddle uses a 25-pin connector which plugs into a dedicated port. It also can have its length increased by using ordinary 25-pin shielded extension cables.
c) +30-Volt Power Supplies
Another important piece of external hardware is the +30-volt power supplies. The RA and DEC motor driver boards each have their own dedicated supply. The supplies use a transformer, a full-wave bridge rectifier circuit, a filter capacitor, and a standard 120-volt, 60Hz input to produce the dc voltage output. These supplies provide a dc voltage of nearly 40 and -40 volts with no load. With a driver board connected, the load drops the voltage to nearly 34 and -34 volts. These separate supplies are necessary since it is possible for the driver boards, for short periods of time, to demand large currents during telescope moves. Figure 30 shows a power supply with its keyed output plug which connects to the motor driver board motherboard. Table 13 lists the pins with their functions.
Power Supply Pin | Function |
1 | +38.6 VOLTS |
2 | -38.6 VOLTS |
3 | GROUND |
4 | N/C |
d) Mirrors and Focusing Equipment
The original secondary mirror focusing system included the 120-volt alternating current (ac) focusing motor, two limit switches, and an attached bracket used to trigger the switches. The control switch was a Double Position Double Throw (DPDT) switch mounted inside a metal box. The control switch would not travel from one ON position to the other without an intermediate stop in the OFF position. This prevented the motor from switching polarity too quickly. However, it was not a momentary switch and therefore could be accidentally left in the ON position, allowing the motor to travel to an extreme in either direction.
The wires out of the Hurst motor were approximately 3 inches long with other miscellaneous extension wires attached to them. Although it is ambiguous, the speculation is that the original wiring configuration caused the motor to reverse directions if a limit switch was activated. Unfortunately, this action could cause a possible ambiguity in the travel direction. Figure 31 shows the original connections with wire colors labeled for possible future reference. Although DFM Engineering uses an independent position feedback system, no similar arrangement has been duplicated in this telescope's control system.
The modified version of the secondary mirror mounting and focus motor by-passed the limit switches. Two DPDT switches were mounted in plastic cases for added safety from the 120-volt lines. One DPDT switch was mounted in the telescope room and one was mounted in the warmroom. Both of the switches are momentary contact switches to help avoid running the motor too far in either direction.
Figure 32 shows the modified secondary focus wiring. This current focusing system is an intermediate stage in the APT development. It would be desirable to modify the secondary mirror system to simulate the DFM Engineering system in the future, since automatic control would be possible via DFM's TCS software.
VIII. Inter-Computer Communications
The master computer is the computer that receives the desired telescope activity information via modem. For this computer to communicate with the control computer, an RS-232 connection was made between the two COM1 communication ports of both computers. For this connection to work properly, a null modem adapter was needed. Also, to allow the use of standard cables a gender changer was used at the other end of the cable. Figure 33 shows the pin connections for the null modem adaptor and the length of cable with both adaptors attached. The gender changer pin connections are not included since the pins are matched by number (i.e., pin 1 to pin 1, pin 2 to pin 2, etc.).
VIII. Software
a) TCS Software
The APT project uses DFM Engineering's TCS software running on the control computer. The TCS software is provided on the disk labeled "APT-TCS Software". Other utility software is needed to edit the TCS software and re-compile it into the usable "TCS.EXE" file. These editing programs are provided on the disk labeled "APT-TCS Utilities". Directories showing the files on these two disks are listed in Appendix A.
The control computer that runs the TCS software can also be used to update and expand the software. The TCS software is written in the 486 version of the XPL0 computer language. The software is multitasking, dividing time slices to the tasks in such a way that they appear to be operating simultaneously (DFM Engineering 1994). Table 14 gives a brief description of the TCS software tasks.
TASK | FUNCTION |
TASK0 | Service for the menu and keyboard input. |
TASK1 | Calculations for the telescope position display. |
TASK2 | Display of the telescope status. |
TASK3 | Execution of the menu and EXCOM commands. |
TASK4 | Control of the RA motor. |
TASK5 | Control of the DEC motor. |
TASK6 | Handpaddle, limits, and panel inputs. |
TASK7 | Control of the dome. |
TASK8 | Service for the EXCOM serial port. |
Some modifications had to be made to the TCS software. The most important change was to change the AUTOFOCUS lines of the code found in TASK3.XPL to comment statements. Since the autofocusing hardware has not been installed, the software was getting "hung up" waiting for focus encoder data. Instead of deleting the procedure, the lines of code were changed to comments and can be re-installed when the hardware is available.
In TASK4.XPL, the variable XMTR, the x-axis motor track rate, was replaced with 0.0225. The variable XMSR, the motor set rate, was replaced with 0.09. Similarly in TASK5.XPL, YMTR became 0.0225, and YMSR became 0.09.
Another important change was required for the RA and DEC ratios found in PAR.XPL. Without the proper values, the control computer could not accurately gauge the true speed and correct position of the telescope. The end result was a constantly changing RA regardless of the setting of the TRACK switch, and automatic slews that would never terminate due to the runaway RA value. As mentioned in Section VI, the formula for the variable HARATIO was replaced with 1.063053973 / 15 / 3600. Also, the formula for the variable DECRATIO was replaced with 3.234479063556314 / 3600.
To change the TCS software, a text editor is used to change the code. The files which are edited have a ".XPL" extension. Once the changes have been made, the batch file must be used to re-compile the edited file. The batch files are named "MA?.BAT" where the "?" is the number of its associated task. For example if TASK3.XPL was changed, "ma3" would be typed and entered at the computer prompt to re-compile TASK3.XPL.
Once the edited file has been re-compiled, it must be re-linked to the TCS software. The batch file to do this is MATCS.BAT. Therefore typing and entering "matcs" at the computer prompt will re-link all the task object files into the TCS software. In addition, if any changes are made in GLOBE.XPL, all of the modules must be re-compiled before relinking.
b) EXCOM Software Commands
The master computer communicates with the control computer via an RS-232 connection between the COM1 ports of both devices. Table 15 lists the external computer (EXCOM) command numbers with the name of the command function. For a full explanation of the EXCOM commands, Appendix B contains the text provided by DFM Engineering (Kelly 1994).
Command Number | Command Function |
1 | UPDATE |
2 | ZDOME |
3 | ZPOINT |
4 | ZROTAT |
5 | ZFOCUS |
6 | SLEW |
7 | OFFSET |
8 | OBJECT |
9 | MOVE |
10 | ZENITH |
11 | TRAIL |
12 | GO |
13 | STOP |
14 | TRACK |
15 | GUIDE |
16 | SET |
17 | TRAILSET |
18 | COSDEC |
19 | RATECOR |
20 | DOME |
21 | GUIDER |
22 | DOEPOCH |
23 | MARK |
24 | COEFFICIENTS |
25 | COORDS |
26 | STAT |
27 | AFOCUS |
28 | POINT |
c) APT Control Software
The control software for the Dark Sky Observatory APT was written in QuickBasic Version 4.5 by Scott Thomas. This is the software that runs on the master computer of the APT system. From start-up, the program displays a menu which allows the user to select manual operation, semi-automatic operation, or automatic operation. Figure 34 shows a representation of the control software's main menu.
This is control software for an external computer (EXCOM) for a telescope system running under TCS software. The three operating modes are: Manual, Semi-Automatic, and Automatic.
0. EXIT
1. Manual
2. Semi-Automatic
3. Automatic
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Enter the operation mode number (0-3) ...
Figure 37. APT Control Software Main Menu.
If the user selects the manual operation mode from the main menu,
the manual operation menu screen is displayed. The manual menu shows a
numbered list of the EXCOM software commands. Figure 35 shows a
representation of the manual menu.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
| EXCOM SOFTWARE MANUAL MENU |
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
1. UPDATE 2. ZDOME 3. ZPOINT 4. ZROTAT
5. ZFOCUS 6. SLEW 7. OFFSET 8. OBJECT
9. MOVE 10. ZENITH 11. TRAIL 12. GO
13. STOP 14. TRACK 15. GUIDE 16. SET
17. TRAILSET 18. COSDEC 19. RATECOR 20. DOME
21. GUIDER 22. DOEPOCH 23. MARK 24. COEFFCNTS
25. COORDS 26. STAT 27. AFOCUS 28. POINT
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Enter command number (or 0 to quit) ...
Figure 38. APT Control Software Manual Menu.
To chose a particular command, the user types the associated number and presses the enter key. The screen will then display the name of the command, a brief set of instructions for the use of the command, and a prompt for the user to input any information required to execute the command. For example, if the SLEW command were selected, the user would be prompted to enter the RA, DEC, and EPOCH information. A conversion function is used to change the hours, minutes, and seconds into the decimal number required by the EXCOM - TCS link. Before the information is sent to the subprocedure which executes the command, the user is asked to press the enter key to send the information, or to press the Q key to return to the manual menu without sending the command to the control computer. In either case, the program returns the user to the manual menu screen. From the manual menu screen, the user can chose to send another manual command or to return to the main menu.
If the user selects the semi-automatic operation mode from the main menu, the appropriate menu is displayed. Figure 36 shows a representation of the semi-automatic menu.
From this menu the user can open and close the dome, select and slew to a set star, select from a list of targets, and enter the observation mode. Although the dome slit doors are not yet automated, the procedure is included in the menu, and the software can be expanded as the hardware is updated.
To match the telescope position and the software position, a set star of known RA and DEC values is centered in the telescope's imaging field. Then the telescope RA and DEC positions are updated in software. This procedure matches the software position values to the true telescope position.
If the user chooses to slew to a set star from the semi-automatic menu, a list of set stars is displayed. Figure 37 shows the set star selection menu. The user can press the enter key to accept the default set star (Arcturus), enter the number of an alternate set star, or return to the semi-automatic menu without slewing. If a set star is chosen, the associated TCS library number is sent to the control computer.
Once the desired set star number has been sent to the control computer, the master computer then checks one of three status bytes to ensure that the selected object is in the current field of view. If the star is not in range, a message is displayed, and the user can chose another star or return to the semi-automatic menu. If the selected star is in range, the user is prompted to press enter to begin the slew. The master computer then checks the control computer at one-second intervals to see if the telescope has finished its slew. The user is then returned to the semi-automatic menu.
From the semi-automatic menu, the user can select from a list of objects with a method similar to that used to find the set star. Also, the user can put the telescope in its observation mode. These procedures will be expanded and updated to reflect the status of this APT project. If the user chooses to exit this menu, the program returns the display to the main menu.
The third choice from the main menu is the automatic operation mode. When the APT is fully automated, this is the mode in which the master computer will spend most of its time. Choosing this mode will allow the telescope to await for remote commands, receive a list of objects, execute the necessary dome and telescope commands, save image data, and record activity logs. The computer code for the automatic mode of operation was still being developed at the time of this publication. Like some of the semi-automatic commands, the choices in the automatic mode of operation will be expanded as the project evolves. The printout for the control software "APT.BAS" is shown in Appendix C. The printout for a control program that proved to be unsuccessful is included in Appendix D. Although the program was not used, it is included to show examples of QuickBasic file handling techniques. It will also serve as a reference for the development of the automatic operation mode software.
X. Conclusions and Future Work
The construction, assembly, maintenance, and technical intricacies involved in an Automatic Photometric Telescope make the overall project a demanding task. However, when the project is thought to be a series of smaller stages, the task is not quite so daunting. This thesis project is the first of many which will be needed to advance Dark Sky Observatory's APT to the final goal of full automation.
The results of this thesis project are encouraging. The dome, telescope room, and warmroom are finished. The electrical wiring, lights, outlets, switches, and climate controls are wired and on-line. The dome rotates with the user-controlled lever. The master computer and the control computer carry out their two-way communication without any failures. The external switch box, the handpaddle, and the other original hardware systems interfaced with the TCS control computer and performed their functions. The telescope system is oriented and operational under tended control. The telescope optics have provided images through an eyepiece, as well as saved images via CCD video files. Thus, the basic computer control of an automatic photometric telescope has been completed.
Future work includes the completion of the telephone connection. As this and other hardware is updated, the subprocedures for the semi-automatic and the automatic modes of operation would be modified to reflect those changes. Another high priority is the automation of the dome slit doors. A proposed system would be a battery-operated system with solar panel recharging. This, coupled with a radio-controlled interface, would eliminate the need for control cables tethering the rotating dome to the solid building structure. Other smaller functions that would need to be incorporated into the system include automatic focusing, telescope limit switches, weather sensing, computer clock updating with an accurate time source, automatic dome rotation, and security considerations. Fortunately, DFM Engineering has incorporated some of these functions into their software.
The Dark Sky Observatory Computer-Controlled Automatic Photometric Telescope is a very unique tool used for astronomical research with the capability of being expanded to meet many compatibility standards for complete remote operation.
Although the APT is still in its infancy, it is capable of providing small contributions to science. As this project develops, the results will improve and increase the scientific community's confidence of the automated viewing process. This APT project possibly could help direct the current trends in data acquisition to the point where automated viewing is the rule rather than the exception.
REFERENCES
Boyd, L.J., Crawford, D.L., Genet, R.M., and Hayes, D.S. 1989, in Automatic Small Telescopes, ed. D.S. Hayes, Genet D.R., and R.M. Genet (Mesa: Fairborn Press), pp. 19-24.
DFM Engineering, Inc. 1994, private communications.
DFM Engineering, Inc. 1994, TCS386 Operations Manual.
Feirer, J.L. 1963, Drawing and Planning (Peoria: Chas. A. Bennett Co., Inc.), pp.5-10.
Genet, R.M., and Hayes, D.S. 1989, in Remote Access Automatic Telescopes, ed. D.S. Hayes and R.M. Genet (Mesa: Fairborn Press), pp. 1-3.
Hall, D.S. and Henry, G.W. 1993, Communications of the I.A.P.P.P., 52, pp. 82-84.
Hayes, D.S., Genet, R.M., and Boyd, L.J. 1988 in Automatic Small Telescopes, ed. D.S. Hayes and R.M. Genet, (Mesa: Fairborn Press), p. 19.
Kelly, Mark. 1994, EXCOM Text, DFM Engineering, Inc.
Lathi, B.P. 1989, Modern Digital and Analog Communications Systems (Philadelphia: Holt, Rinehart, and Winston, Inc.), pp. 9-11, 75.
Mason, Cindy. 1993, Communications of the I.A.P.P.P., 52, pp. 7-9.
Mims III, F.M. 1988, Schematic Symbols, Device Packages, Design and Testing (Fort Worth: Siliconcepts), pp. 40-43.
Monzon, J.E. 1988, Interfacing Sensors to the IBM-PC, ed. Tompkins, W.J. and Webster, J.G.(Englewood Cliffs: Prentice-Hall), pp. 34-38.
Richmond, M.W., Treffers, R.R., and Filippenko, A.V. 1993, Publications of the Astronomical Society of the Pacific, 105, pp. 1164-1166.
Slater, Michael 1989, Microprocessor-Based Design (Englewood Cliffs: Prentice-Hall), p. 423.
EXCOM Text
EXCOM.TXT
1 DEC 1994
DFM ENGINEERING, INC.
BY MARK S. KELLEY
This is a supplement to the Operations Manual and its purpose is to provide a more detailed description of the DFM external computer interface (EXCOM). This is not the Astronomical Command Language (ACL) interface. Both the ACL interface and the EXCOM interface are resident in the control system and they are selected by the front panel switch.
EXTERNAL COMPUTER
To use the standard DFM External Computer Interface (EXCOM) interface, start TCS with the EXCOM front panel switch in the ON position. The external computer is user supplied and interfaces to the TCS486 telescope controller through a serial port. This feature is designed to provide a control system (TCS486) which can be slaved to a data acquisition computer or general observatory computer used to provide a customer provided interface to the telescope control system. See listings of TASK3 and TASK8 for source code of commands 1-28. The program PCEXCOM.XPL is an example of an external computer user interface. These commands may of course be modified to support any special needs.
The commands used by the external computer are the same as those used by TASK0 (through the keyboard). The commands are given here in numerical order with the input and output shown for the excom users information. All I/O is character I/O. The TCS serial port is COM1. The baud rate is adjustable by reassembling the file EXEC.ASM. The default condition is 9600 Baud, 8 data bits, 1 stop bit, no parity. Transmit, receive and ground are required. The external computer (user supplied) may have special requirements for serial port control lines. For example, DOS machines typically require jumpers between pins 4 & 5 and that 6,8 and 20 be jumpered together. The EXCOM interface can be configured to recognize XON-XOFF. Command numbers are all integers. Interrogation of the status integers will reveal command status. TCS does not store up commands. Commands will be ignored if a previous command is still in progress.
FOR ALL OF THESE DESCRIPTIONS <CR> DENOTES THE CARRIAGE RETURN CHARACTER, HEXADECIMAL $0D. IN DFM'S CHOSEN COMPUTER LANGUAGE (XPL0), I/O ROUTINES (RLIN, INTIN, CHIN), CARRIAGE RETURN IS USED TO TERMINATE AN INPUT OR OUTPUT CHARACTER STRING. THIS IS NOT UNCOMMON IN OTHER COMPILERS (COMPUTER LANGUAGES).
UPDATE COMMAND 1 INITIALIZE / UPDATE TIME AND DATE
THIS PROCEDURE INITIALIZES THE FOCUS ENCODER, SETS THE CLOCKS AND WILL INITIALIZE COORDINATES TO THE ZENITH IF THE SYSTEM IS NOT YET UPDATED. INITIALIZES DATE AND TIME IF SYSTEM IS INITIALIZED.
EXCOM SENDS CHARACTERS COMMENTS
-----------------------------------------
1 <CR> COMMAND #
1994.0 <CR> YEAR
11. <CR> MONTH
22. <CR> DAY
17.123456 <CR> UNIVERSAL TIME (REAL HOURS)
TCS RESPONDS NO RESPONSE
INITIALIZES FOCUS ENCODER
INITIALIZES TELESCOPE TO ZENITH
SETS TIME & DATE.
AFTER FIRST INITIALIZATION, SETS TIME & DATE ONLY.
*** Initialization ***
Set date and time (UPDATE): This command calculates sidereal time based
on input of the date and universal time. TCS Time is kept in a hardware
clock which runs at 200 Hz. The PC Computer has a battery backed up clock
which is reset along with the date when the update command is executed. If
zero is entered for the year in the update command the program gets the time
and date from the battery backed up clock in the PC. If it is the first
initialization: The clocks are updated and then the focus encoder is
initialized by using the Potentiometer and the focus encoder fiducial to set
the up-down counter for the focus encoder. This procedure may take up to a
minute depending on the focus position when the initialization begins. The
focus initialization will return the focus ram to the same position as when
it started. The telescope will be assumed to be at the zenith for the first
initialization (UPDATE). After the first initialization, the status
INITIALIZED will appear on the display screen.
----------------------------------------------------------
ZDOME COMMAND 2
INITIALIZE THE DOME ENCODER
EXCOM SENDS CHARACTERS COMMENTS
-----------------------------------------
2 <CR> COMMAND #
270. <CR> POSITION (0.-->360.)
TCS RESPONDS NO RESPONSE
SETS DOME UP DOWN COUNTER
Set dome position (ZDOME): This command is used to initialize the dome
position. North is zero azimuth, and azimuth increases clockwise looking
down on the dome. If zero is entered as the dome azimuth, TCS will set the
dome azimuth based on the telescope position.
-----------------------------------------------------------
ZPOINT COMMAND 3
INITIALIZE THE RA AND DEC POSITION ENCODERS
ENTER ZEROS FOR NEXT OBJECT
EXCOM SENDS CHARACTERS COMMENTS
-----------------------------------------
3 <CR> COMMAND #
12.012345 <CR> RA (HOURS)
-12.345678 <CR> DEC (DEGREES)
1950. <CR> EPOCH
TCS RESPONDS NO RESPONSE
SETS TELESCOPE POSITION TO RA, DEC
DOES NOT MOVE TELESCOPE
Set telescope position (ZERO POINT): This command sets the position of the
telescope. Three ZERO's will set the telescope position display to the next
object coordinates.
-----------------------------------------------------------
ZROTAT COMMAND 4
INITIALIZE THE POSITION OF THE INSTRUMENT ROTATOR
EXCOM SENDS CHARACTERS COMMENTS
-----------------------------------------
5 <CR> COMMAND #
2000.1 <CR> POSITION (0.-->4096.0)
TCS RESPONDS NO RESPONSE
SETS ROTATOR UP DOWN COUNTER
Set rotator position (ZROTATOR): This command is used to initialize the
instrument rotator encoder. (OPTIONAL)
-----------------------------------------------------------
ZFOCUS COMMAND 5
INITIALIZE THE FOCUS POSITION
EXCOM SENDS CHARACTERS COMMENTS
-----------------------------------------
5 <CR> COMMAND #
2000.1 <CR> POSITION (0.-->4096.0)
TCS RESPONDS NO RESPONSE
SETS FOCUS UP DOWN COUNTER
Set focus position (ZFOCUS): This command is used to initialize the focus
position display. The focus is an absolute pot and an incremental encoder.
This command sets the focus up-down counter to read the input value and thus
display this value as the encoded focus. The Analog focus is absolute, and
will never be offset. The analog focus is displayed above the encoded focus
as AFOCUS.
----------------------------------------------------------
SLEW COMMAND 6
SETS UP AUTOMATIC SLEW
CHECKS DESTINATION COORDINATES FOR HORIZON
SETS NEXT OBJECT COORDINATES
CONVERTS FROM NEXT OBJECT EPOCH TO DISPLAY EPOCH IF REQUIRED
CONVERTS FROM APPARENT COORDS (EPOCH = -1) TO MEAN COORDS IN
DISPLAY EPOCH IF REQUIRED
EXCOM SENDS CHARACTERS COMMENTS
------------------------------------------
6 <CR> COMMAND #
12.012345 <CR> RA (HOURS)
-12.345678 <CR> DEC (DEGREES)
1950. <CR> EPOCH
TCS RESPONDS NO RESPONSE
ENABLES SLEW TO RA, DEC
Set slew position (SLEW): This command prepares TCS to automatically slew
the telescope to the coordinates specified. The EPOCH will be the display
epoch if a ZERO is received. If the telescope is not tracking, the slew may
never terminate because the Earth's rotation is faster than the final
automatic guide speed. After the slew is ENABLED (status bit set) by COMMAND
6, a COMMAND 12 (GO) is required to initiate the slew. If the coordinates
are below the telescope horizon, the TARGET OUT OF RANGE status bit will be
set.
-----------------------------------------------------------
OFFSET COMMAND 7
OFFSETS ARE MOTIONS IN ARC SECONDS FROM THE TELESCOPE MEAN COORDINATES
IN THE DISPLAY EPOCH.
EXCOM SENDS CHARACTERS COMMENTS
-----------------------------------------
7 <CR> COMMAND #
100. <CR> OFFSET RA (ARC SECS + = E)
150. <CR> OFFSET DEC (ARC SECS + = N)
TCS RESPONDS NO RESPONSE
ENABLES SLEW TO OFFSET
Set offset (OFFSET): This is a slew to coordinates relative to the present
coordinates in the display epoch. Input is in seconds of arc. The speed of
the offset is a function of the distance to be offset and not specified by
the user. Status bits for ENABLED and TARGET OUT OF RANGE apply. COMMAND 12
must be sent to move telescope.
-----------------------------------------------------------
OBJECT COMMAND 8 SLEW TO OBJ WITH LOOKUP
SLEW TO LIBRARY OF OBJECTS
EXCOM SENDS CHARACTERS COMMENTS
------------------------------------------
8 <CR> COMMAND #
13 <CR> LIBRARY #
TCS RESPONDS NO RESPONSE
ENABLES SLEW TO LIBRARY OBJECT
Select library object (OBJECT): This is a slew to a library of objects
which are stored in the computer memory. All objects are stored in epoch
2000. The objects are the Sommers-Bausch Observatory Catalog of Astronomical
Objects and a printout of the catalog is supplied with the telescope. The
catalog includes a set of ephemeris stars at one hour intervals which are
useful for initializing the telescope position in the northern hemisphere.
A library for southern hemisphere users as well as custom libraries are
available. Check the status bits for ENABLED and TARGET OUT OF RANGE. A
COMMAND 12 must be sent to move the telescope.
-----------------------------------------------------------
MOVE COMMAND 9
PROCEDURE SLEWS TO AN OBJECT PREVIOUSLY STORED WITH THE MARK COMMAND
EXCOM SENDS CHARACTERS COMMENTS
------------------------------------------
9 <CR> COMMAND #
32 <CR> TABLE #
TCS RESPONDS NO RESPONSE
ENABLES SLEW TO TABLE ENTRY
Select table entry (MOVE): This command is the partner of the Set table
entry (MARK) command in the Miscellaneous submenu. Select table entry is
used to slew to locations previously stored in memory with the Set table
entry command. There are 40 entries possible. Check the status bits for
ENABLED and TARGET OUT OF RANGE. A COMMAND 12 must be sent to move the
telescope.
-----------------------------------------------------------
ZENITH COMMAND 10
SLEWS THE TELESCOPE TO THE ZENITH
EXCOM SENDS CHARACTERS COMMENTS
-----------------------------------------
10 <CR> COMMAND #
TCS RESPONDS NO RESPONSE
ENABLES SLEW TO ZENITH
Set zenith position (ZENITH): This command is used to slew the telescope to
the Zenith. Use TRACK, COMMAND 14 to set the track rates to zero before the
zenith command is used. Failure to set track speed to zero may result in an
unterminated slew to zenith because the earth's rotation is faster than the
automatic guide speed. Recover from an unterminated slew with STOP COMMAND
13. Status bits for ENABLED and TARGET OUT OF RANGE apply. COMMAND 12 must
be sent to move telescope.
-----------------------------------------------------------
TRAIL COMMAND 11
START TRAIL
EXCOM SENDS CHARACTERS COMMENTS
-----------------------------------------
11 <CR> COMMAND #
TCS RESPONDS NO RESPONSE
BEGINS TRAILING
Start trail (TRAIL): This command turns the trail function ON. STOP
COMMAND 13 or the CANCEL button on the front panel are used to end trailing.
Guide while trailing is allowed, so it may be a good idea to stop any
autoguider inputs while trailing.
GO COMMAND 12
INITIATE MOTION COMMANDS
EXCOM SENDS CHARACTERS COMMENTS
-----------------------------------------
12 <CR> COMMAND #
TCS RESPONDS NO RESPONSE
BEGINS AUTOMATIC MOTION
Start slew (GO): This command starts automatic slews.
-----------------------------------------------------------
STOP COMMAND 13
CANCELS AUTO SLEW IN PROGRESS
CANCELS SLEW ENABLED IF MOTION NOT BEGUN
THIS COMMAND CANCELS AUTOMATIC MOTIONS AND COMMANDS
EXCOM SENDS CHARACTERS COMMENTS
-----------------------------------------
13 <CR> COMMAND #
TCS RESPONDS NO RESPONSE
STOPS AUTOMATIC COMMAND
Stop (STOP): This command is used to cancel automatic motion
commands.
----------------------------------------------------------
TRACK COMMAND 14
CHANGE TRACK RATE RA & DEC
EXCOM SENDS CHARACTERS COMMENTS
-----------------------------------------
14 <CR> COMMAND #
15.002. <CR> RA RATE (ARC SECONDS/SECOND)
.05 <CR> DEC RATE (ARC SECONDS/SECOND)
14.545 <CR> AUX RA RATE (ARC SEC/SECOND)
0. <CR> AUX DEC RATE (ARC SECS/SECOND)
TCS RESPONDS NO RESPONSE
CHANGES TRACK RATES
Set track rate (TRACK RATE): This command allows modification of both RA and
DEC track rates. There is provision for an auxiliary track rate which is
useful if comparisons are to be made between sidereal and non-sidereal
objects. The auxilliary track rate is selected with a front panel switch.
For external computer operation, the track rate may simply be changed with
the track rate command for rapid changes. Positive DEC rate is north.
-----------------------------------------------------------
GUIDE COMMAND 15
CHANGE THE GUIDE RATE RA & DEC
EXCOM SENDS CHARACTERS COMMENTS
-----------------------------------------
15 <CR> COMMAND #
7. <CR> RATE (ARC SECONDS/SECOND)
TCS RESPONDS NO RESPONSE
CHANGES GUIDE RATE
Set handpaddle GUIDE rates: Guide is a traditional handpaddle function with
rates superimposed on the track rate. Speeds between 3 and 10 arc seconds per
second are recommended. The response of TCS to guide inputs may be adjusted
with the GUIDE command. An autoguider may require specific rates.
-----------------------------------------------------------
SET COMMAND 16
CHANGE THE SET RATE FOR RA & DEC
EXCOM SENDS CHARACTERS COMMENTS
-----------------------------------------
16 <CR> COMMAND #
200.0 <CR> RATE (ARC SECONDS/SECOND)
TCS RESPONDS NO RESPONSE
CHANGES SET RATE
Set handpaddle SET rates: SET is similar to GUIDE and convenient values are
50 to 300 arc seconds per second.
-----------------------------------------------------------
TRAIL SET COMMAND 17
SET TRAIL RATE, LENGTH, & ANGLE
EXCOM SENDS CHARACTERS COMMENTS
-----------------------------------------
17 <CR> COMMAND #
200.0 <CR> RATE (ARC SECONDS/SECOND)
50. <CR> LENGTH (ARC SECONDS)
0. <CR> POSITION ANGLE (NORTH)
(90. EAST)
TCS RESPONDS NO RESPONSE
CHANGES TRAIL RATES
Set trail rates (TRAIL RATES): This command sets up the parameters for the
trail function. Trail moves at a predetermined rate between two precalculated
endpoints. This function is used to move an object back and forth along the
slit in a spectrograph. Handpaddle guide while trailing is supported.
-----------------------------------------------------------
COSDEC COMMAND 18
TURN ON FUNCTION WHICH DIVIDES THE COMMANDED RA HANDPADDLE RATE BY THE
COSINE OF THE DECLINATION. SPEED CLIPS AT SLEW SPEED
EXCOM SENDS CHARACTERS COMMENTS
-----------------------------------------
18 <CR> COMMAND #
0 <CR> STATUS (OFF)
(1 ON)
TCS RESPONDS NO RESPONSE
CHANGES COSDEC STATUS BIT
(COSDEC): This command turns on a feature that divides commanded Right
Ascension handpaddle rates by the cosine of the Declination so that the
motion of the object in the eyepiece is constant.
----------------------------------------------------------
RATECOR COMMAND 19
TURN ON TRACK RATE CORRECTION FUNCTION
EXCOM SENDS CHARACTERS COMMENTS
-----------------------------------------
19 <CR> COMMAND #
0 <CR> STATUS (OFF)
(1 ON)
TCS RESPONDS NO RESPONSE
CHANGES CORRECTION STATUS BIT
(RATECOR):This command turns on the track rate correction feature of the
control system. Rate corrections are calculated by differentiating the
pointing model and these corrections may be automatically applied to the
track rates.
-----------------------------------------------------------
DOME COMMAND 20
THE DOME ON-OFF FLAG INTERACTS WITH THE FRONT PANEL SWITCH.
IF THE SWITCH IS ON, THE COMMAND CAN TURN THE DOME ON OR OFF, IF THE
SWITCH IS OFF, THE DOME IS OFF AND THIS COMMAND IS IGNORED.
EXCOM SENDS CHARACTERS COMMENTS
-----------------------------------------
20 <CR> COMMAND #
0 <CR> STATUS (OFF)
(1 ON)
TCS RESPONDS NO RESPONSE
CHANGES DOME STATUS BIT
(DOME): This command is used to enable or disable dome function from the
EXCOM.
-----------------------------------------------------------
GUIDER COMMAND 21
THIS IS A CONVENIENCE FOR SETTING THE DISPLAY ONLY
THE GUIDER IS HARDWARE OR'D WITH THE HANDPADDLE
EXCOM SENDS CHARACTERS COMMENTS
-----------------------------------------
21 <CR> COMMAND #
0 <CR> STATUS (OFF)
(1 ON)
TCS RESPONDS NO RESPONSE
SETS DISPLAY MESSAGE
(GUIDER): This command is a convenience to the user to set the display to
reflect the guider status. The guider inputs are wire OR'd with the
handpaddle inputs. It may be useful to reduce the guide rate for high
resolution automatic guiding.
-----------------------------------------------------------
DOEPOCH COMMAND 22
SET THE DISPLAY EPOCH
EXCOM SENDS CHARACTERS COMMENTS
-----------------------------------------
22 <CR> COMMAND #
2000.0 <CR> EPOCH
TCS RESPONDS NO RESPONSE
CHANGES DISPLAY EPOCH
Set display epoch (EPOCH): The display epoch may be set to any value by the
menu.
-----------------------------------------------------------
MARK COMMAND 23
STORE R.A., DEC. & EPOCH INTO THE MARK TABLE AT INDICATED POSITION
EXCOM SENDS CHARACTERS COMMENTS
-----------------------------------------
23 <CR> COMMAND #
1. <CR> TABLE #
21.000000 <CR> RA
-12.000000 <CR> DEC
2000.0 <CR> EPOCH
TCS RESPONDS NO RESPONSE
MAKES ENTRY IN TABLE
Set table entries (MARK): The Set table entries command is used to set up
a list of coordinates which may be slew destinations using the Select table
entry (MOVE) command. An entry number and three ZERO's are sufficient to
mark the present telescope location. There are 40 entries possible. The
table is initialized to zeros.
-----------------------------------------------------------
COEFFICIENTS COMMAND 24
CHANGE TELESCOPE AND POINTING MODEL PARAMETERS FROM EXCOM
EXCOM SENDS CHARACTERS COMMENTS UNITS
-----------------------------------------------------
24 <CR> COMMAND #
120. <CR> ME (ARC SECONDS)
35. <CR> MA (ARC SECONDS)
10. <CR> CH (SECONDS OF TIME)
3. <CR> NP (SECONDS OF TIME)
.8 <CR> TBAR (NO UNITS 0-1)
10. <CR> TFLX (ARC SECONDS)
.000019673 <CR> HARATIO (HR / ENCODER COUNT)
.00027743 <CR> DECRATIO (DEGREES / ENC.CNT.)
TCS RESPONDS NO RESPONSE
TCS CHANGES THE VARIABLES
Set model coefficients (COEFFICIENTS): This command is used for testing,
or for updating the coefficients from the external computer.
----------------------------------------------------------
COORDS COMMAND 25
RETURN TELESCOPE COORDINATES, TIME AND DATE TO THE EXCOM
EXCOM SENDS CHARACTERS COMMENTS UNITS
------------------------------------------------------
25 <CR> COMMAND #
TCS RESPONDS
EIGHT REAL NUMBERS FOLLOWED BY CARRIAGE RETURNS
2.034567 <CR> HA
20.234567 <CR> RA
33.345674 <CR> DEC
1994.5 <CR> EPOCH
1.3456 <CR> AIRMASS
22.034523 <CR> SIDEREAL TIME
5.234153 <CR> UNIVERSAL TIME
1994.82345 <CR> YEAR
COORDS: tcs sends the telescope coordinates out over the serial port to the
external computer.
-----------------------------------------------------------
STAT COMMAND 26
EXCOM SENDS CHARACTERS COMMENTS
----------------------------------------
26 <CR> COMMAND #
TCS RESPONDS THREE STATUS INTEGERS
2345 <CR> STATL
0023 <CR> STATH
1034 <CR> STATLH
STATUS: This command is like COORDS except it sends the three status bytes
out over the serial port to the external computer.
Status Byte Assignments:
BYTE BIT DESCRIPTION
STATL 0 INITIALIZED
1 GUIDE ON/OFF
2 TRACK ON/OFF
3 SLEW ENABLED
4 DOME ON/OFF
5 APPROACHING LIMIT
6 FINAL LIMIT
7 SLEWING
STATH 0 SETTING
1 TRAILING
2 EXCOM ON/OFF
3 DOME OK
4 TARGET OUT OF RANGE
5 COSDEC ON/OFF
6 RATE COR ON/OFF
7 DRIVES ON/OFF
STATLH 0 SLEW COMPUTING
1 DOME TRACK / FREE
2 "N"
3 "S"
4 "E"
5 "W"
6 NEXT OBJECT ACTIVE
7 AUX. TRACK RATE
----------------------------------------------------------
AFOCUS COMMAND 27
SLEW TO FOCUS
EXCOM SENDS CHARACTERS COMMENTS
----------------------------------------
27 <CR> COMMAND #
2000.0 <CR> DESIRED FOCUS
TCS RESPONDS NO RESPONSE
TCS SLEWS TO FOCUS
Move to Focus (AFOCUS): This command slews the focus ram to an encoded focus
position.
----------------------------------------------------------
POINT COMMAND 28
RETURN POINTING MODEL DATA TO THE EXCOM
EXCOM SENDS CHARACTERS COMMENTS
----------------------------------------
28 <CR> COMMAND #
TCS RESPONDS
FIVE REAL NUMBERS SEPARATED BY CARRIAGE RETURNS
2.345678 <CR> NEXT OBJECT RA
25.012345 <CR> NEXT OBJECT DEC
3.000000 <CR> TELESCOPE RA
25.000000 <CR> TELESCOPE DEC
2.000000 <CR> TELESCOPE HA
POINT: This command is intended for use by the external computer only. It
returns the position of the telescope in the format used by the pointing
model programs: NORA, NODEC, RA, DEC, HA.
APPENDIX C
APT Control Software
The following printout shows the QuickBasic computer code used to
create the executable file "APT.EXE". This control software runs on the
master computer of the APT system. The names of the subprocedures are in
bold type.
DECLARE SUB XZPOINT (ra!, dec!, epoch!)
DECLARE SUB XZROTAT (zrot%)
DECLARE SUB XZFOCUS (zfocus%)
DECLARE SUB XOBJECT (onum%)
DECLARE SUB XMOVE (tnum%)
DECLARE SUB XGUIDE (gr!)
DECLARE SUB XSET (sr!)
DECLARE SUB XCOSDEC (stat%)
DECLARE SUB XRATECOR (stat%)
DECLARE SUB XDOME (stat%)
DECLARE SUB XGUIDER (stat%)
DECLARE SUB XDOEPOCH (epoch!)
DECLARE SUB XAFOCUS (focus!)
DECLARE SUB XOFFSET (rao!, deco!)
DECLARE SUB XSLEW (ra!, dec!, epoch!)
DECLARE SUB XTRAILSET (tr!, tl!, pa!)
DECLARE SUB XTRACK (rat!, dect!, arat!, adect!)
DECLARE SUB XMARK (tenum%, ra!, dec!, epoch!)
DECLARE SUB XZENITH ()
DECLARE SUB XTRAIL ()
DECLARE SUB XGO ()
DECLARE SUB XSTOP ()
DECLARE SUB XCOEFFICIENTS (me!, ma!, ch!, np!, tr!, tx!, hr!, dr!)
DECLARE SUB XXCOORDS (ha!, ra!, dec!, epoch!, air!, sidereal!, univ!, year!)
DECLARE SUB XXSTAT (byteone%, bytetwo%, bytethree%)
DECLARE SUB XXPOINT (nora!, nodec!, ra!, dec!, ha!)
DECLARE SUB MANSELECT (comnumber%)
DECLARE SUB OPERMANUAL ()
DECLARE SUB OPERSEMI ()
DECLARE SUB OPERAUTO ()
DECLARE SUB SEMIMENU (choice%)
DECLARE SUB SEMISELECT (choice%)
DECLARE SUB UDOME ()
DECLARE SUB USETSTAR ()
DECLARE SUB UOBSERVE ()
DECLARE SUB UTARGETSET ()
DECLARE FUNCTION CONXMS! (xvariable%, minutes%, seconds%)
DECLARE SUB GTARGETCHECK (rangecheck%)
DECLARE SUB GETTINGTHERE (stat%)
DECLARE SUB MANUALMENU (comnumber%)
DECLARE SUB GETMODE (modenum%)
DECLARE SUB XUPDATE (year%, month%, day%, utime!)
DECLARE SUB XZDOME (position!)
REM AUTOMATIC PHOTOMETRIC TELESCOPE CONTROL SOFTWARE
REM SCOTT THOMAS, APPALACHIAN STATE UNIVERSITY
REM =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-BEGIN MAIN PROGRAM=-=
'CALL GINTRO un-rem this for graphics intro screen
'CALL GINTROTEXT un-rem this for text intro screen
OPEN "com1:9600,n,8,1" FOR RANDOM AS #1
DO
CALL GETMODE(modenum%) 'Gets the operation mode number from the user.
SELECT CASE modenum%
CASE 1
CALL OPERMANUAL 'Manual operation
CASE 2
CALL OPERSEMI 'Semi-Automatic operation
CASE 3
CALL OPERAUTO 'Automatic operation
END SELECT
LOOP UNTIL modenum% = 0
CLOSE #1
END
REM =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-END MAIN PROGRAM=-=
FUNCTION CONXMS! (xvariable%, minutes%, seconds%)
REM This function converts hours, minutes, and seconds OR degrees, minutes,
REM and seconds to a real number.
CONXMS! = xvariable% + minutes% / 60 + seconds% / 3600
END FUNCTION
SUB GETMODE (modenum%)
REM This sub requests the operation mode from the user.
DO
CLS
PRINT "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -=-=-=-=-="
PRINT "| APT Control EXCOM software. ASU, Dark Sky Observatory. |"
PRINT "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -=-=-=-=-="
PRINT "This is control software for an external computer (EXCOM) for a "
PRINT "telescope system running under TCS software. The three operating"
PRINT "modes are: Manual, Semi-Automatic, and Automatic."
PRINT " 0. EXIT"
PRINT " 1. Manual"
PRINT " 2. Semi-Automatic"
PRINT " 3. Automatic"
PRINT "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -=-=-=-=-="
INPUT " Enter the operation mode number (0-3) ... ", modenum%
LOOP UNTIL modenum% >= 0 AND modenum% <= 3
END SUB
SUB GETTINGTHERE (stat%)
' This sub checks the "Slew Enabled" with the STAT command 26. Slew info is
' in the STATL byte ("Slew Enabled = bit 3 of bits 0-7). When the status
' bit is toggled to zero by the control computer, the motion is assumed
' complete and this GETTINGTHERE sub returns a one in the variable stat%.
' If the motion is interrupted, a zero is returned in the stat% variable
' to signify an incomplete slew. The user can interrupt the motion by
' entering a "Q" or a "q". The computer checks the bit at 1-sec. intervals.
' The master computer beeps when it detects the end of a slew.
CLS
PRINT "Telescope in motion. Please wait, or press Q to stop."
stopit$ = ""
DO
SLEEP 1 'delay
CALL XXSTAT(statlow%, dummyone%, dummytwo%)
test% = statlow% AND 8 'test status byte
stopit$ = INKEY$ 'test keyboard user quit
LOOP UNTIL test% = 0 OR stopit$ = "Q" OR stopit$ = "q"
IF test% = 0 THEN 'Slew completed normally
FOR x% = 1 TO 30
BEEP 'beep loop
NEXT x%
stat% = 1 'return GETTINGTHERE status bit
PRINT "End of slew."
SLEEP 2
END IF
IF stopit$ = "Q" OR stopit$ = "q" THEN 'User interrupted slew
BEEP 'single beep
CALL XSTOP 'send stop command
stat% = 0 'return GETTINGTHERE status bit
PRINT "USER INTERRUPT!!!"
SLEEP 2
END IF
END SUB
SUB GINTRO
'This subprocedure draws the animated introduction screen
SCREEN 12
CLS
PRINT " Automatic Photometric Telescope"
PRINT " Dark Sky Observatory, Appalachian State University"
VIEW (1, 50)-(638, 459), , 7
WINDOW (0, -1.7)-(3.2, 3)
'DRAW HORIZON AND STARS
FOR g = 0 TO 3.2 STEP .005
H = SIN(3 * g) + SIN(5 * g)
PSET (g, H)
NEXT g
FOR g = 0 TO 3.2 STEP .1
H = 2 + (SIN(3 * g) + SIN(5 * g) - SIN(10 * g)) / 2
PSET (g, H)
NEXT g
PSET (1.5, 2.6): PSET (2, 2.6): PSET (2, 2.7)
LOCATE 5, 65: PRINT "@"
'DRAW DOME
LINE (1.6, 0)-(1.6, .2)
LINE (1.5, -.03)-(1.5, .2)
LINE (1.5, .15)-(1.6, .15)
LINE (1.5, .2)-(1.505, .22): LINE (1.6, .2)-(1.595, .22)
LINE (1.505, .22)-(1.51, .24): LINE (1.595, .22)-(1.59, .24)
LINE (1.51, .24)-(1.52, .26): LINE (1.59, .24)-(1.58, .26)
LINE (1.52, .26)-(1.53, .28): LINE (1.58, .26)-(1.57, .28)
LINE (1.53, .28)-(1.57, .28)
'TRACK SHOOTING STAR
FOR g = 0 TO 4 STEP .01
PSET (g, 2.5)
PSET (g + .01, 2.54): PSET (g - .01, 2.55)
PSET (g + .01, 2.46): PSET (g - .01, 2.45)
REM (un-rem this line for fast computers) FOR X = 1 TO 300: NEXT X
IF g < 1.2 THEN LINE (1.55, .28)-(1.5, .2)
IF g > 1.2 THEN LINE (1.55, .28)-(1.55, .15)
IF g > 2.4 THEN LINE (1.55, .28)-(1.6, .2)
PRESET (g - .5, 2.5)
PRESET (g + .01, 2.54): PRESET (g - .01, 2.55)
PRESET (g + .01, 2.46): PRESET (g - .01, 2.45)
NEXT g
SLEEP 2
SCREEN 0
END SUB
SUB GINTROTEXT
REM This subprocedure is for EXCOM's without graphics capabilities.
SCREEN 0
CLS
PRINT " Automatic Photometric Telescope"
PRINT " Dark Sky Observatory, Appalachian State University"
PRINT " . . . . ."
PRINT " . . . 0 . ."
PRINT " . . "
PRINT " . ."
PRINT " . . ,"
PRINT " : ; . . ;"
PRINT " . . ."
PRINT " . ."
PRINT " . . . ."
PRINT " . _ ."
PRINT " @@@@@ "
PRINT " @@@@@@@@@@@ "
PRINT " . @@@@@@@@@@@@@@@ "
PRINT " . @@===========@@ . ."
PRINT " . @@[[[[[[[[[[[@@ "
PRINT " @@[[[[[[[[[[[@@ ."
PRINT " _____________________________@@[[[[[[[[[[[@@________________ ________ "
SLEEP 2
LOCATE 16, 38: PRINT "_"
LOCATE 17, 38: PRINT " @@"
LOCATE 18, 36: PRINT "@@ @@@@@"
LOCATE 19, 34: PRINT "@@@@_@@@@@@@"
SLEEP 1
LOCATE 16, 37: PRINT "_ _"
LOCATE 17, 37: PRINT " @"
LOCATE 18, 36: PRINT "@ @@@@"
LOCATE 19, 34: PRINT "@@@___@@@@@@"
SLEEP 1
LOCATE 16, 36: PRINT "_ _"
LOCATE 18, 36: PRINT " @@@"
LOCATE 19, 34: PRINT "@@_____@@@@@"
FOR i = 2 TO 80
LOCATE 7, i: PRINT "*"
FOR g = 1 TO 300: NEXT g
LOCATE 7, i: PRINT "-"
IF i > 10 THEN LOCATE 7, (i - 10): PRINT " "
NEXT i
LOCATE 7, 70: PRINT " "
SLEEP 2
END SUB
SUB GTARGETCHECK (rangecheck%)
REM This sub checks to see if the library object called before the call of
REM this sub is in range or is out of range. The returned status byte is
REM a one if the target is in range, and it is a zero if it is out of range.
SLEEP 1 'delay for computer to update
CALL XXSTAT(dummyone%, statbyte%, dummytwo%) 'Check for TARGET OUT OF RANGE
check% = statbyte% AND 16 'mask off other bits
IF check% = 16 THEN rangecheck% = 0 'out of range returns a zero
IF check% = 0 THEN rangecheck% = 1 'in range returns a one
END SUB
SUB MANSELECT (comnumber%)
REM This sub gets information from the user and sends the manual commands.
REM Note: All command subs that SEND are named with an "X" prefix, and
REM all command subs that SEND AND RECEIVE are named with an "XX" prefix.
CLS
SELECT CASE comnumber%
CASE 0 '=========================================================== ======
PRINT "Command 0: End EXCOM program."
CASE 1 '=========================================================== ======
PRINT "Command 1: UPDATE"
PRINT "The UPDATE command initializes the focus encoder, sets the clocks,"
PRINT "and will initialize coordinates to the zenith if the system is not"
PRINT "yet updated. If the system is already initialized, it initializes"
PRINT "the date and time."
DO
INPUT "Enter the YEAR .................. ", year%
LOOP UNTIL year% >= 0 AND year% < 5000
DO
INPUT "Enter the MONTH ................. ", month%
LOOP UNTIL month% > 0 AND month% <= 12
DO
INPUT "Enter the DAY ................... ", day%
LOOP UNTIL day% > 0 AND day% <= 31
PRINT "...... UNIVERSAL TIME ............"
DO
INPUT "Enter the universal time HOURS....", uhours%
LOOP UNTIL uhours% >= 0 AND uhours% < 24
DO
INPUT "Enter the universal time MINUTES..", uminutes%
LOOP UNTIL uminutes% >= 0 AND uminutes% < 60
DO
INPUT "Enter the universal time SECONDS..", useconds%
LOOP UNTIL useconds% >= 0 AND useconds% < 60
utime! = CONXMS!(uhours%, uminutes%, useconds%)
INPUT "Press ENTER to send this information. Enter q to cancel. ... ", q$
IF q$ <> "q" AND q$ <> "Q" THEN
CALL XUPDATE(year%, month%, day%, utime!)
END IF
CASE 2 '=========================================================== ======
PRINT "Command 2: ZDOME"
PRINT "The ZDOME command sets the dome position. North is zero azimuth, and"
PRINT "azimuth increases clockwise looking down on the dome. If 0 is"
PRINT "entered as the dome azimuth, TCS will set the dome azimuth based on "
PRINT "the telescope position."
DO
INPUT "Enter the position (0 to 360) ...", position!
LOOP UNTIL position! >= 0 AND position! <= 360
INPUT "Press ENTER to send this information. Enter q to cancel. ... ", q$
IF q$ <> "q" AND q$ <> "Q" THEN
CALL XZDOME(position!)
END IF
CASE 3 '=========================================================== ======
PRINT "Command 3: ZPOINT"
PRINT "The ZPOINT command sets the telescope position (ZERO POINT). Entering"
PRINT "three zeros will set the telescope position display to the next"
PRINT "object coordinates. This command does not move the telescope."
PRINT "...... RIGHT ASCENTION ..........."
DO
INPUT "Enter the RA HOURS................", rahours%
LOOP UNTIL rahours% >= 0 AND rahours% < 24
DO
INPUT "Enter the RA MINUTES..............", raminutes%
LOOP UNTIL raminutes% >= 0 AND raminutes% < 60
DO
INPUT "Enter the RA SECONDS..............", raseconds%
LOOP UNTIL raseconds% >= 0 AND raseconds% < 60
ra! = CONXMS!(rahours%, raminutes%, raseconds%)
PRINT "...... DECLINATION ..............."
DO
INPUT "Enter the DEC DEGREES.............", decdeg%
LOOP UNTIL decdeg% >= -90 AND decdeg% <= 90
DO
INPUT "Enter the DEC MINUTES.............", decmin%
LOOP UNTIL decmin% >= 0 AND decmin% < 60
DO
INPUT "Enter the DEC SECONDS.............", decsec%
LOOP UNTIL decsec% >= 0 AND decsec% < 60
dec! = CONXMS!(decdeg%, decmin%, decsec%)
DO
INPUT "Enter the EPOCH ................", epoch!
LOOP UNTIL epoch! > 0 AND epoch! < 5000
INPUT "Press ENTER to send this information. Enter q to cancel. ... ", q$
IF q$ <> "q" AND q$ <> "Q" THEN
CALL XZPOINT(ra!, dec!, epoch!)
END IF
CASE 4 '=========================================================== ======
PRINT "Command 4: ZROTAT"
PRINT "The ZROTAT command is used to initialize the instrument rotator"
PRINT "encoder. (OPTIONAL)"
DO
INPUT "Enter the ZROTATOR position (0 to 4096) ....... ", zrot%
LOOP UNTIL zrot% >= 0 AND zrot% <= 4096
INPUT "Press ENTER to send this information. Enter q to cancel. ... ", q$
IF q$ <> "q" AND q$ <> "Q" THEN
END IF
CALL XZROTAT(zrot%)
CASE 5 '=========================================================== ======
PRINT "Command 5: ZFOCUS"
PRINT "The ZFOCUS command is used to initialize the focus position display."
PRINT "The focus is an absolute pot and an incremental encoder. This "
PRINT "command sets the focus up-down counter to read the input value and"
PRINT "thus display this value as the encoded focus. The analog focus"
PRINT "is absolute, and will never be offset. The analog focus is displayed"
PRINT "above the encoded focus as AFOCUS."
DO
INPUT "Enter the ZFOCUS position (0 to 4096) ....... ", zfocus%
LOOP UNTIL zfocus% >= 0 AND zfocus% <= 4096
INPUT "Press ENTER to send this information. Enter q to cancel. ... ", q$
IF q$ <> "q" AND q$ <> "Q" THEN
CALL XZFOCUS(zfocus%)
END IF
CASE 6 '=========================================================== ======
PRINT "Command 6: SLEW"
PRINT "The SLEW command prepares TCS to automatically slew the telescope to"
PRINT "the coordinates specified. The EPOCH will be the display epoch if "
PRINT "a 0 is received. If the telescope is not tracking, the slew may"
PRINT "never terminate. After this command, a command 12 (GO) is required"
PRINT "to initiate the slew. If the coordinates are below the telescope"
PRINT "horizon, the TARGET OUT OF RANGE status bit will be set."
PRINT "...... RIGHT ASCENTION ..........."
DO
INPUT "Enter the RA HOURS................", rahours%
LOOP UNTIL rahours% >= 0 AND rahours% < 24
DO
INPUT "Enter the RA MINUTES..............", raminutes%
LOOP UNTIL raminutes% >= 0 AND raminutes% < 60
DO
INPUT "Enter the RA SECONDS..............", raseconds%
LOOP UNTIL raseconds% >= 0 AND raseconds% < 60
ra! = CONXMS!(rahours%, raminutes%, raseconds%)
PRINT "...... DECLINATION ..............."
DO
INPUT "Enter the DEC DEGREES.............", decdeg%
LOOP UNTIL decdeg% >= -90 AND decdeg% <= 90
DO
INPUT "Enter the DEC MINUTES.............", decmin%
LOOP UNTIL decmin% >= 0 AND decmin% < 60
DO
INPUT "Enter the DEC SECONDS.............", decsec%
LOOP UNTIL decsec% >= 0 AND decsec% < 60
dec! = CONXMS!(decdeg%, decmin%, decsec%)
DO
INPUT "Enter the EPOCH ................", epoch!
LOOP UNTIL epoch! > 0 AND epoch! < 5000
INPUT "Press ENTER to send this information. Enter q to cancel. ... ", q$
IF q$ <> "q" AND q$ <> "Q" THEN
CALL XSLEW(ra!, dec!, epoch!)
END IF
CASE 7 '=========================================================== ======
PRINT "Command 7: OFFSET"
PRINT "The OFFSET command is a slew to coordinates relative to the present"
PRINT "coordinates in the display epoch. The input is in seconds of arc."
PRINT "The speed of the offset is a function of the distance to be offset, "
PRINT "and not specified by the user. The status bit for ENABLED and"
PRINT "TARGET OUT OF RANGE apply. Command 12 (GO) must be sent to move"
PRINT "the telescope."
INPUT "Enter the RA offset in arc seconds (positive = East) ..... ", rao!
INPUT "Enter the DEC offset in arc seconds (positive = North) ..... ", deco!
INPUT "Press ENTER to send this information. Enter q to cancel. ... ", q$
IF q$ <> "q" AND q$ <> "Q" THEN
CALL XOFFSET(rao!, deco!)
END IF
CASE 8 '=========================================================== ======
PRINT "Command 8: OBJECT"
PRINT "The OBJECT command is used to slew to a library of objects which"
PRINT "are stored in the computer memory. All objects are stored in"
PRINT "epoch 2000. The objects are the Sommers-Bausch Observatory Catalog"
PRINT "of Astronomical Objects. The catalog includes a set of ephemeris"
PRINT "stars at one hour intervals which are useful for initializing the"
PRINT "telescope position in the northern hemisphere. Custom libraries"
PRINT "are available. Check the status bit for ENABLED and TARGET OUT"
PRINT "OF RANGE. Command 12 (GO) must be sent to move the telescope."
INPUT "Enter the library object number .......... ", onum%
INPUT "Press ENTER to send this information. Enter q to cancel. ... ", q$
IF q$ <> "q" AND q$ <> "Q" THEN
CALL XOBJECT(onum%)
END IF
CASE 9 '=========================================================== ======
PRINT "Command 9: MOVE"
PRINT "The MOVE command slews to an object previously stored with the "
PRINT "MARK command. This 'select table entry' command is the partner of"
PRINT "the 'set table entry' in the miscellaneous submenu. There are 40"
PRINT "entries possible. Check the status bits for ENABLED and TARGET OUT"
PRINT "OF RANGE. Command 12 (GO) must be sent to move the telescope."
DO
INPUT "Enter the table number ................. ", tnum%
LOOP UNTIL tnum% >= 1 AND tnum% <= 40
INPUT "Press ENTER to send this information. Enter q to cancel. ... ", q$
IF q$ <> "q" AND q$ <> "Q" THEN
CALL XMOVE(tnum%)
END IF
CASE 10 '=========================================================== ======
PRINT "Command 10: ZENITH"
PRINT "The ZENITH command is used to slew the telescope to the Zenith."
PRINT "Use command 14 (TRACK) to set the track rates to zero before the"
PRINT "ZENITH command is used. Failure to zero the track speed may result"
PRINT "in an unterminated slew to the Zenith. NOTE: Recover from an "
PRINT "unterminated slew with command 13 (STOP). Status bits for ENABLED and"
PRINT "TARGET OUT OF RANGE apply. Command 12 (GO) must be sent to move"
PRINT "the telescope."
INPUT "Press ENTER to set slew to Zenith. Enter q to cancel. ... ", q$
IF q$ <> "q" AND q$ <> "Q" THEN
CALL XZENITH
END IF
CASE 11 '=========================================================== ======
PRINT "Command 11: TRAIL"
PRINT "The TRAIL command turns the trail function ON. Command 13 (STOP)"
PRINT "is used to end trailing. Guide while trailing is allowed, so it"
PRINT "may be a good idea to stop any autoguider inputs while trailing."
INPUT "Press ENTER to begin trail. Enter q to cancel. ... ", q$
IF q$ <> "q" AND q$ <> "Q" THEN
CALL XTRAIL
END IF
CASE 12 '=========================================================== ======
PRINT "Command 12: GO"
PRINT "The GO command is used to start automatic slews."
INPUT "Press ENTER to send the GO command. Enter q to cancel. ... ", q$
IF q$ <> "q" AND q$ <> "Q" THEN
CALL XGO
END IF
CASE 13 '=========================================================== ======
PRINT "Command 13: STOP"
PRINT "The STOP command is used to cancel automatic motions and commands."
PRINT "STOP will cancel an automatic slew if in progress, and will cancel"
PRINT "SLEW ENABLED if the motion has not begun."
INPUT "Press ENTER to send the STOP command. Enter q to cancel. ... ", q$
IF q$ <> "q" AND q$ <> "Q" THEN
CALL XSTOP
END IF
CASE 14 '=========================================================== ======
PRINT "Command 14: TRACK"
PRINT "The TRACK command sets the track rates. There is a provision for an"
PRINT "auxiliary track rate which is useful if comparisons are to be made"
PRINT "between sidereal and non-sidereal objects. Positive DEC rate is North."
INPUT "Enter the RA track rate (arc seconds per second) ....... ", rat!
INPUT "Enter the DEC track rate (arc seconds per second) ....... ", dect!
INPUT "Enter the auxiliary RA track rate (arc sec / sec) ....... ", arat!
INPUT "Enter the auxiliary DEC track rate (arc sec / sec) ....... ", adect!
INPUT "Press ENTER to send this information. Enter q to cancel. ... ", q$
IF q$ <> "q" AND q$ <> "Q" THEN
CALL XTRACK(rat!, dect!, arat!, adect!)
END IF
CASE 15 '=========================================================== ======
PRINT "Command 15: GUIDE"
PRINT "The GUIDE command is used to change the RA and DEC guide rates."
PRINT "Guide is a traditional handpaddle function with rates superimposed"
PRINT "on the track rate. Speeds between 3 and 10 arc seconds per second"
PRINT "are recommended. The response of TCS to guide inputs may be adjusted"
PRINT "with the GUIDE command. An autoguider may require specific rates."
INPUT "Enter the GUIDE rate (arc seconds per second) ........... ", gr!
INPUT "Press ENTER to send this information. Enter q to cancel. ... ", q$
IF q$ <> "q" AND q$ <> "Q" THEN
CALL XGUIDE(gr!)
END IF
CASE 16 '=========================================================== ======
PRINT "Command 16: SET"
PRINT "The SET command is used to change the RA and DEC set rates."
PRINT "This command is similar to command 15 (GUIDE). Convenient values"
PRINT "for the SET command are 50 to 300 arc seconds per second."
INPUT "Enter the SET rate (arc seconds per second) .............. ", sr!
INPUT "Press ENTER to send this information. Enter q to cancel. ... ", q$
IF q$ <> "q" AND q$ <> "Q" THEN
CALL XSET(sr!)
END IF
CASE 17 '=========================================================== ======
PRINT "Command 17: TRAILSET"
PRINT "The TRAILSET (name changed from TRAIL to prevent confusion with"
PRINT "command 11 (TRAIL)) command is used to set up the parameters for the"
PRINT "TRAIL function. Trail moves at a predetermined rate between two"
PRINT "precalculated endpoints. This function is used to move an object back"
PRINT "and forth along the slit in a spectrograph. Handpaddle guide while"
PRINT "trailing is supported."
INPUT "Enter the trail rate (arc sec per sec) .............. ", tr!
INPUT "Enter the length (arc seconds) ...................... ", tl!
INPUT "Enter the position angle (0 = North, 90 = East) ..... ", pa!
INPUT "Press ENTER to send this information. Enter q to cancel. ... ", q$
IF q$ <> "q" AND q$ <> "Q" THEN
CALL XTRAILSET(tr!, tl!, pa!)
END IF
CASE 18 '=========================================================== ======
PRINT "Command 18: COSDEC"
PRINT "The COSDEC command toggles the feature that divides commanded RA"
PRINT "handpaddle rates by the cosine of the DEC so that the motion of"
PRINT "the object in the eyepiece is constant."
DO
INPUT "COSDEC: Enter a 0 to turn OFF. Enter a 1 to turn ON. .... ", stat%
LOOP UNTIL stat% = 0 OR stat% = 1
INPUT "Press ENTER to send this information. Enter q to cancel. ... ", q$
IF q$ <> "q" AND q$ <> "Q" THEN
CALL XCOSDEC(stat%)
END IF
CASE 19 '=========================================================== ======
PRINT "Command 19: RATECOR"
PRINT "The RATECOR command toggles the track rate correction feature of the"
PRINT "control system. The rate corrections are calculated by differentiating"
PRINT "the pointing model. These corrections may be applied automatically"
PRINT "to the track rates."
DO
INPUT "RATECOR: Enter a 0 to turn OFF. Enter a 1 to turn ON. .... ", stat%
LOOP UNTIL stat% = 0 OR stat% = 1
INPUT "Press ENTER to send this information. Enter q to cancel. ... ", q$
IF q$ <> "q" AND q$ <> "Q" THEN
CALL XRATECOR(stat%)
END IF
CASE 20 '=========================================================== ======
PRINT "Command 20: DOME"
PRINT "The DOME command is used to enable or disable the dome function via"
PRINT "the EXCOM if the dome switch on the panel box is on. If the switch"
PRINT "is on, the command can turn the dome on or off. If the switch is off,"
PRINT "the dome is off and this command is ignored."
DO
INPUT "DOME: Enter a 0 to turn OFF. Enter a 1 to turn ON. ...... ", stat%
LOOP UNTIL stat% = 0 OR stat% = 1
INPUT "Press ENTER to send this information. Enter q to cancel. ... ", q$
IF q$ <> "q" AND q$ <> "Q" THEN
CALL XDOME(stat%)
END IF
CASE 21 '=========================================================== ======
PRINT "Command 21: GUIDER"
PRINT "The GUIDER command is a convenience to the user to set the display"
PRINT "to reflect the guider status. The guider inputs are wire OR'd with"
PRINT "the handpaddle inputs. It may be useful to reduce the guide rate"
PRINT "for high resolution automatic guiding."
DO
INPUT "GUIDER: Enter a 0 to turn OFF. Enter a 1 to turn ON. .... ", stat%
LOOP UNTIL stat% = 0 OR stat% = 1
INPUT "Press ENTER to send this information. Enter q to cancel. ... ", q$
IF q$ <> "q" AND q$ <> "Q" THEN
CALL XGUIDER(stat%)
END IF
CASE 22 '=========================================================== ======
PRINT "Command 22: DOEPOCH"
PRINT "The DOEPOCH command sets the display epoch."
DO
INPUT "Enter the EPOCH ...........", epoch!
LOOP UNTIL epoch! >= 0 AND epoch! < 5000
INPUT "Press ENTER to send this information. Enter q to cancel. ... ", q$
IF q$ <> "q" AND q$ <> "Q" THEN
CALL XDOEPOCH(epoch!)
END IF
CASE 23 '=========================================================== ======
PRINT "Command 23: MARK"
PRINT "The MARK command is the 'set table entry' command. It is used to"
PRINT "set up a list of coordinates which may be slew destinations using"
PRINT "the 'select table entry' (MOVE) command. An entry number and three"
PRINT "zero's are sufficient to mark the present telescope location. There"
PRINT "are 40 entries possible. The table is initialized to zeros."
DO
INPUT "Enter the table entry number (1 to 40) ........... ", tenum%
LOOP UNTIL tenum% > 0 AND tenum% <= 40
PRINT "...... RIGHT ASCENTION ..........."
DO
INPUT "Enter the RA HOURS................", rahours%
LOOP UNTIL rahours% >= 0 AND rahours% < 24
DO
INPUT "Enter the RA MINUTES..............", raminutes%
LOOP UNTIL raminutes% >= 0 AND raminutes% < 60
DO
INPUT "Enter the RA SECONDS..............", raseconds%
LOOP UNTIL raseconds% >= 0 AND raseconds% < 60
ra! = CONXMS!(rahours%, raminutes%, raseconds%)
PRINT "...... DECLINATION ..............."
DO
INPUT "Enter the DEC DEGREES.............", decdeg%
LOOP UNTIL decdeg% >= -90 AND decdeg% <= 90
DO
INPUT "Enter the DEC MINUTES.............", decmin%
LOOP UNTIL decmin% >= 0 AND decmin% < 60
DO
INPUT "Enter the DEC SECONDS.............", decsec%
LOOP UNTIL decsec% >= 0 AND decsec% < 60
dec! = CONXMS!(decdeg%, decmin%, decsec%)
DO
INPUT "Enter the EPOCH ................", epoch!
LOOP UNTIL epoch! > 0 AND epoch! < 5000
INPUT "Press ENTER to send this information. Enter q to cancel. ... ", q$
IF q$ <> "q" AND q$ <> "Q" THEN
CALL XMARK(tenum%, ra!, dec!, epoch!)
END IF
CASE 24 '=========================================================== ======
PRINT "Command 24: COEFFICIENTS"
PRINT "The COEFFICIENTS command sets the model coefficients. It is used for"
PRINT "testing or for updating the coefficients from the external computer."
INPUT "Enter the ME (arc seconds) ..................... ", me!
INPUT "Enter the MA (arc seconds) ..................... ", ma!
INPUT "Enter the CH (seconds of time) ................. ", ch!
INPUT "Enter the NP (seconds of time) ................. ", np!
INPUT "Enter the TBAR (0 to 1) ........................ ", tr!
INPUT "Enter the TFLX (arc seconds) ................... ", tx!
INPUT "Enter the HRATIO (Hours/encoder count) ......... ", hr!
INPUT "Enter the DECRATIO (Degrees/encoder count) ..... ", dr!
INPUT "Press ENTER to send this information. Enter q to cancel. ... ", q$
IF q$ <> "q" AND q$ <> "Q" THEN
CALL XCOEFFICIENTS(me!, ma!, ch!, np!, tr!, tx!, hr!, dr!)
END IF
CASE 25 '=========================================================== ======
PRINT "Command 25: COORDS"
PRINT "The COORDS command requests information from the control computer."
PRINT "The following information is returned via the serial port:"
PRINT "HA, RA, DEC, EPOCH, AIRMASS, SIDEREAL TIME, UNIVERSAL TIME, YEAR."
INPUT "Press ENTER to request the COORDS. Enter q to cancel. ... ", q$
IF q$ <> "q" AND q$ <> "Q" THEN
CALL XXCOORDS(ha!, ra!, dec!, epoch!, airmass!, sidereal!, universe!, year!)
PRINT ha!, ra!, dec!, epoch!
PRINT airmass!, sidereal, universe!, year!
END IF
CASE 26 '=========================================================== ======
PRINT "Command 26: STAT"
PRINT "The STAT command is similar to command 25 (COORDS), except it sends"
PRINT "three status bytes out over the serial port to the external computer."
PRINT "STATL:bit description STATH:bit description STATLH:bit description"
PRINT "=====---------------- =====---------------- ======----------------"
PRINT " 0 Initialized 0 Setting 0 Slew computing "
PRINT " 1 Guide on/off 1 Trailing 1 Dome track/free"
PRINT " 2 Track on/off 2 EXCOM on/off 2 N "
PRINT " 3 Slew enabled 3 Dome ok 3 S "
PRINT " 4 Dome on/off 4 Target Out of Range 4 E "
PRINT " 5 Approaching limit 5 COSDEC on/off 5 W "
PRINT " 6 Final limit 6 RATECOR on/off 6 Next obj. actv."
PRINT " 7 Slewing 7 Drives on/off 7 Aux. track rate"
INPUT "Press ENTER to request three STAT bytes. Enter q to cancel. ... ", q$
IF q$ <> "q" AND q$ <> "Q" THEN
CALL XXSTAT(byteone%, bytetwo%, bytethree%)
PRINT byteone%, bytetwo%, bytethree%
END IF
CASE 27 '=========================================================== ======
PRINT "Command 27: AFOCUS"
PRINT "This command slews the focus ram to an encoded focus position."
INPUT "Enter the desired focus ............... ", focus!
INPUT "Press ENTER to send this information. Enter q to cancel. ... ", q$
IF q$ <> "q" AND q$ <> "Q" THEN
CALL XAFOCUS(focus!)
END IF
CASE 28 '=========================================================== ======
PRINT "Command 28: POINT"
PRINT "The POINT command returns the model data to the EXCOM. This command"
PRINT "is intended for use by the external computer only. It returns the"
PRINT "position of the telescope in the format used by the pointing model"
PRINT "programs: NORA, NODEC, RA, DEC, HA."
INPUT "Press ENTER to request POINT information. Enter q to cancel. ... ", q$
IF q$ <> "q" AND q$ <> "Q" THEN
CALL XXPOINT(nora!, nodec!, ra!, dec!, ha!)
PRINT nora!, nodec!, ra!, dec!, ha!
END IF
'=========================================================== ==============
END SELECT
END SUB
SUB MANUALMENU (comnumber%)
REM This sub gets the command number from the user.
DO
CLS
PRINT "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -=-=-=-=-="
PRINT "| EXCOM SOFTWARE MANUAL MENU |"
PRINT "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -=-=-=-=-="
PRINT " 1. UPDATE 2. ZDOME 3. ZPOINT 4. ZROTAT"
PRINT " 5. ZFOCUS 6. SLEW 7. OFFSET 8. OBJECT"
PRINT " 9. MOVE 10. ZENITH 11. TRAIL 12. GO"
PRINT " 13. STOP 14. TRACK 15. GUIDE 16. SET"
PRINT " 17. TRAILSET 18. COSDEC 19. RATECOR 20. DOME"
PRINT " 21. GUIDER 22. DOEPOCH 23. MARK 24. COEFFICIENTS"
PRINT " 25. COORDS 26. STAT 27. AFOCUS 28. POINT"
PRINT "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -=-=-=-=-="
INPUT "Enter command number (or 0 to quit) ... ", comnumber%
LOOP UNTIL comnumber% >= 0 AND comnumber% <= 28
END SUB
SUB OPERAUTO
REM This sub calls the automatic operation subs.
END SUB
SUB OPERMANUAL
REM This sub calls for the manual operating menu (MANUALMENU), and sends
REM the commands to the control computer (SELECTINFO).
DO
CALL MANUALMENU(comnumber%) 'Requests command number from user
CALL MANSELECT(comnumber%) 'Gets info from user and executes command
LOOP UNTIL comnumber% = 0
END SUB
SUB OPERSEMI
REM This sub calls for the user Semi-Automatic menu (SEMIMENU).
DO
CALL SEMIMENU(choice%)
CALL SEMISELECT(choice%)
LOOP UNTIL choice% = 0
END SUB
SUB SEMIMENU (choice%)
CLS
PRINT "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -=-=-=-=-="
PRINT "| EXCOM SOFTWARE SEMI-AUTOMATIC MENU |"
PRINT "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -=-=-=-=-="
PRINT " 0. Return to the main menu."
PRINT " 1. Open/Close the DOME"
PRINT " 2. Point Telescope to SET STAR"
PRINT " 3. Select TARGETS"
PRINT " 4. Enter OBSERVATION mode"
PRINT "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -=-=-=-=-="
DO
INPUT "Enter selection number (or 0 to quit) ... ", choice%
LOOP UNTIL choice% >= 0 AND choice% <= 4
END SUB
SUB SEMISELECT (choice%)
REM Semi-Automatic operations.
REM This sub calls the appropriate command sub chosen by the user.
REM Note: All subs called from this sub are named with a "U" prefix.
SELECT CASE choice%
CASE 1 '=========================================================== ======
CALL UDOME
CASE 2 '=========================================================== ======
CALL USETSTAR
CASE 3 '=========================================================== ======
CALL UTARGETSET
CASE 4 '=========================================================== ======
CALL UOBSERVE
END SELECT
END SUB
SUB UDOME
REM This sub opens and closed the dome slit doors.
END SUB
SUB UOBSERVE
REM This sub sets the system for semi-automatic observation.
END SUB
SUB USETSTAR
REM This sub allows the user to select a set star from the library.
REM Note: The default star is ARCTURUS, library number 502.
DO
DO
CLS
PRINT "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -=-=-=-=-="
PRINT "| EXCOM SOFTWARE SEMI-AUTOMATIC SET STAR MENU |"
PRINT "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -=-=-=-=-="
PRINT " OBJECT Number Set Star "
PRINT " =============== ---------------"
PRINT " 1 Arcturus "
PRINT " 2 Vega "
PRINT " 3 Deneb "
PRINT " 4 Nu Peg "
PRINT " 5 Beta And "
PRINT " 6 Gamma And "
PRINT " 7 Alpha Per "
PRINT " 8 Aldebaran "
PRINT " 9 Capella "
PRINT " 10 Castor "
PRINT " 11 Gamma Leo "
PRINT "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -=-=-=-=-="
setstar$ = "" 'set default value to null character
PRINT "Enter 0 to exit. Press ENTER to accept the default: 1-Arcturus."
INPUT "Or enter the OBJECT Number of a set star (0-11) ... ", setstar$
IF setstar$ = "" THEN
setstar$ = "1"
END IF 'setstar$
setstar% = VAL(setstar$) 'convert string to integer
LOOP UNTIL (setstar% >= 0 AND setstar% <= 11)
SELECT CASE setstar% 'match the object with library number
CASE 1
libnumber% = 502
CASE 2
libnumber% = 284
CASE 3
libnumber% = 421
CASE 4
libnumber% = 423
CASE 5
libnumber% = 402
CASE 6
libnumber% = 206
CASE 7
libnumber% = 404
CASE 8
libnumber% = 509
CASE 9
libnumber% = 504
CASE 10
libnumber% = 231
CASE 11
libnumber% = 239
END SELECT
q$ = ""
IF setstar% <> 0 THEN
CALL XOBJECT(libnumber%) 'send set star lib# to control computer.
CALL GTARGETCHECK(rangecheck%) 'returns a one if object is in range.
IF rangecheck% = 0 THEN 'if object is out of range, prompt for new
CLS 'star...or allow user to exit subroutine.
PRINT "The object is OUT OF RANGE."
INPUT "Press ENTER to chose a set star, or enter 0 to quit ...", q$
END IF 'rangecheck%
IF rangecheck% = 1 THEN
CALL XGO
CALL GETTINGTHERE(stat%)
IF stat% = 0 THEN
CLS
INPUT "Press ENTER to chose a set star, or enter 0 to quit ... ", q$
END IF 'stat%
END IF 'rangecheck%
END IF 'setstar%
LOOP UNTIL stat% = 1 OR q$ = "0" OR setstar% = 0
END SUB
SUB UTARGETSET
REM This sub allows the user to input targets for semi-automatic operation.
END SUB
SUB XAFOCUS (focus!)
REM This sub sends the AFOCUS command to the control computer.
PRINT #1, "27" + CHR$(13)
PRINT #1, STR$(focus!) + CHR$(13)
END SUB
SUB XCOEFFICIENTS (me!, ma!, ch!, np!, tr!, tx!, hr!, dr!)
PRINT #1, "24" + CHR$(13)
PRINT #1, STR$(me!) + CHR$(13)
PRINT #1, STR$(ma!) + CHR$(13)
PRINT #1, STR$(ch!) + CHR$(13)
PRINT #1, STR$(np!) + CHR$(13)
PRINT #1, STR$(tr!) + CHR$(13)
PRINT #1, STR$(tx!) + CHR$(13)
PRINT #1, STR$(hr!) + CHR$(13)
PRINT #1, STR$(dr!) + CHR$(13)
END SUB
SUB XCOSDEC (stat%)
REM This sub sends the COSDEC command to the control computer.
PRINT #1, "18" + CHR$(13)
PRINT #1, STR$(stat%) + CHR$(13)
END SUB
SUB XDOEPOCH (epoch!)
REM This sub sends the DOEPOCH command to the control computer.
PRINT #1, "22" + CHR$(13)
PRINT #1, STR$(epoch!) + CHR$(13)
END SUB
SUB XDOME (stat%)
REM This sub sends the DOME command to the control computer.
PRINT #1, "20" + CHR$(13)
PRINT #1, STR$(stat%) + CHR$(13)
END SUB
SUB XGO
REM This sub sends the GO command to the control computer.
CLS
INPUT "Press ENTER to send the GO command ... ", q$
PRINT #1, "12" + CHR$(13)
END SUB
SUB XGUIDE (gr!)
REM This sub sends the GUIDE command to the control computer.
PRINT #1, "15" + CHR$(13)
PRINT #1, STR$(gr!) + CHR$(13)
END SUB
SUB XGUIDER (stat%)
REM This sub sends the GUIDER command to the control computer.
PRINT #1, "21" + CHR$(13)
PRINT #1, STR$(stat%) + CHR$(13)
END SUB
SUB XMARK (tenum%, ra!, dec!, epoch!)
REM This sub sends the MARK command to the control computer.
PRINT #1, "23" + CHR$(13)
PRINT #1, STR$(tenum!) + CHR$(13)
PRINT #1, STR$(ra!) + CHR$(13)
PRINT #1, STR$(dec!) + CHR$(13)
PRINT #1, STR$(epoch!) + CHR$(13)
END SUB
SUB XMOVE (tnum%)
REM This sub sends the MOVE command to the control computer.
PRINT #1, "9" + CHR$(13)
PRINT #1, STR$(tnum%) + CHR$(13)
END SUB
SUB XOBJECT (onum%)
REM This sub sends the OBJECT command to the control computer.
PRINT #1, "8" + CHR$(13)
PRINT #1, STR$(onum%) + CHR$(13)
END SUB
SUB XOFFSET (rao!, deco!)
REM This sub sends OFFSET command to the control computer.
PRINT #1, "7" + CHR$(13)
PRINT #1, STR$(rao!) + CHR$(13)
PRINT #1, STR$(deco!) + CHR$(13)
END SUB
SUB XRATECOR (stat%)
REM This sub sends the RATECOR command to the control computer.
PRINT #1, "19" + CHR$(13)
PRINT #1, STR$(stat%) + CHR$(13)
END SUB
SUB XSET (sr!)
REM This sub sends the SET command to the control computer.
PRINT #1, "16" + CHR$(13)
PRINT #1, STR$(sr!) + CHR$(13)
END SUB
SUB XSLEW (ra!, dec!, epoch!)
REM This sub sends the SLEW command to the control computer.
PRINT #1, "6" + CHR$(13)
PRINT #1, STR$(ra!) + CHR$(13)
PRINT #1, STR$(dec!) + CHR$(13)
PRINT #1, STR$(epoch!) + CHR$(13)
END SUB
SUB XSTOP
REM This sub sends the STOP command to the control computer.
PRINT #1, "13" + CHR$(13)
END SUB
SUB XTRACK (rat!, dect!, arat!, adect!)
REM This sub sends the TRACK command to the control computer.
PRINT #1, "14" + CHR$(13)
PRINT #1, STR$(rat!) + CHR$(13)
PRINT #1, STR$(dect!) + CHR$(13)
PRINT #1, STR$(arat!) + CHR$(13)
PRINT #1, STR$(adect!) + CHR$(13)
END SUB
SUB XTRAIL
REM This sub sends the TRAIL command to the control computer.
PRINT #1, "11" + CHR$(13)
END SUB
SUB XTRAILSET (tr!, tl!, pa!)
REM This sub sends the TRAILSET command to the control computer.
PRINT #1, "17" + CHR$(13)
PRINT #1, STR$(tr!) + CHR$(13)
PRINT #1, STR$(tl!) + CHR$(13)
PRINT #1, STR$(pa!) + CHR$(13)
END SUB
SUB XUPDATE (year%, month%, day%, utime!)
REM This sub sends the UPDATE information to the control computer.
PRINT #1, "1" + CHR$(13)
PRINT #1, STR$(year%) + CHR$(13)
PRINT #1, STR$(month%) + CHR$(13)
PRINT #1, STR$(day%) + CHR$(13)
PRINT #1, STR$(utime!) + CHR$(13)
END SUB
SUB XXCOORDS (ha!, ra!, dec!, epoch!, air!, sidereal!, univ!, year!)
REM Sends COORDS command 25 and GETS information FROM control computer.
PRINT #1, "25" + CHR$(13)
INPUT #1, ha$
INPUT #1, ra$
INPUT #1, dec$
INPUT #1, epoch$
INPUT #1, air$
INPUT #1, sidereal$
INPUT #1, univ$
INPUT #1, year$
'This turns the strings into real numbers.
ha! = VAL(ha$)
ra! = VAL(ra$)
dec! = VAL(dec$)
epoch! = VAL(epoch$)
air! = VAL(air$)
sidereal! = VAL(sidereal$)
univ! = VAL(univ$)
year! = VAL(year$)
'These prints and "press ENTER..." are only for testing only.
PRINT ha!
PRINT ra!
PRINT dec!
PRINT epoch!
PRINT air!
PRINT sidereal!
PRINT univ!
PRINT year!
INPUT "Press ENTER to continue ................ ", qq$
END SUB
SUB XXPOINT (nora!, nodec!, ra!, dec!, ha!)
REM Sends POINT command 28 and GETS information FROM the control computer.
PRINT #1, "28" + CHR$(13)
INPUT #1, nora$
INPUT #1, nodec$
INPUT #1, ra$
INPUT #1, dec$
INPUT #1, ha$
'This turns the strings into real numbers.
nora! = VAL(nora$)
nodec! = VAL(nodec$)
ra! = VAL(ra$)
dec! = VAL(dec$)
ha! = VAL(ha$)
'These prints and "press ENTER..." are only for testing only.
PRINT "nora! = ", nora!
PRINT "nodec! = ", nodec!
PRINT "ra! = ", ra!
PRINT "dec! = ", dec!
PRINT "ha! = ", ha!
INPUT "Press ENTER to continue ................ ", qq$
END SUB
SUB XXSTAT (byteone%, bytetwo%, bytethree%)
REM Sends STAT and GETS info FROM control computer.
PRINT #1, "26" + CHR$(13)
INPUT #1, byteone$
INPUT #1, bytetwo$
INPUT #1, bytethree$
'This turns the strings into integers.
byteone% = VAL(byteone$)
bytetwo% = VAL(bytetwo$)
bytethree% = VAL(bytethree$)
END SUB
SUB XZDOME (position!)
REM This sub sends the ZDOME command to the control computer.
PRINT #1, "2" + CHR$(13)
PRINT #1, STR$(position!) + CHR$(13)
END SUB
SUB XZENITH
REM This sub sends the ZENITH command to the control computer.
PRINT #1, "10" + CHR$(13)
END SUB
SUB XZFOCUS (zfocus%)
REM This sub sends the ZFOCUS command to the control computer.
PRINT #1, "5" + CHR$(13)
PRINT #1, STR$(zfocus%) + CHR$(13)
END SUB
SUB XZPOINT (ra!, dec!, epoch!)
REM This sub sends the ZPOINT command to the control computer.
PRINT #1, "3" + CHR$(13)
PRINT #1, STR$(ra!) + CHR$(13)
PRINT #1, STR$(dec!) + CHR$(13)
PRINT #1, STR$(epoch!) + CHR$(13)
END SUB
SUB XZROTAT (zrot%)
REM This sub sends the ZROTAT command to the control computer.
PRINT #1, "4" + CHR$(13)
PRINT #1, STR$(zrot%) + CHR$(13)
END SUB
APPENDIX D
EXAMPLE INPUT AND OUTPUT SOFTWARE
Example Input and Output Software
In this APT project, stored computer data plays an intricate role
in the observing process. Although the following QuickBasic program follows
an incorrect strategy for controlling the telescope, it is included to give
a representation of how QuickBasic handles opening, closing, creating, and
naming files. This computer code can be used as a reference when developing
the software for the automatic operation of the APT. One important logging
technique that could be developed is creating a log file with the observation
date worked into the file name. For example, a log file created on
March 13, 1996 would be named "L_031396.DAT" to represent the Log for the
third month and the 13th day of 1996. The strategy of this program is to
have four files:
1. The main program.
2. The Library file (objects, RA-, and DEC-positions).
3. The Activity file (created by the observer).
4. The Log file (named with the date).
1) The Main Program - TESTAPT.BAS, APT.EXE
DECLARE SUB update (datename$)
DECLARE SUB makelog (datename$)
DECLARE SUB calctime (aobj$(), ara!(), adec!(), acnt%)
DECLARE SUB readlib (aobj$(), acnt%, ara!(), adec!())
DECLARE SUB readact (aobj$(), oct%)
DECLARE SUB calcday (aobj$(), ara!(), adec!(), acnt%)
REM program to test apt strategy.
CONST TIMERA# = .01666667# '+60 seconds per minute
CONST TIMEDEC! = .01 '+.01 degrees per minute
CONST DAILYRA# = .00055556# '+2 seconds per day.
CONST DAILYDEC! = .1 '+.1 degrees per day.
CONST NT% = 10
DIM aobj$(NT%), ara!(NT%), adec!(NT%), lobj$(NT%), lra!(NT%), ldec!(NT%)
REM ============================================================ main program
CLS
CALL readact(aobj$(), acnt%) 'read in activity info.
CALL readlib(aobj$(), acnt%, ara!(), adec!()) 'read in library info.
CALL calcday(aobj$(), ara!(), adec!(), acnt%) 'update ra and dec, day.
CALL calctime(aobj$(), ara!(), adec!(), acnt%) 'update ra and dec, time.
CALL makelog(datename$) 'makes the dated log name.
CALL update(datename$) 'initializes the log file.
PRINT "The information has been stored and updated. Ready to send commands."
REM ============================================================ main program
SUB calcday (aobj$(), ara!(), adec!(), acnt%)
REM This sub takes the activity objects desired and updates their RA and DEC
REM coordinates based on the day of the year. The given RA and DEC are
REM assumed to be given for 6:00 p.m. on January 1st. For this test, the
REM rate of change is assumed to be +0.1 degrees/day DEC and +2 sec/day RA.
REM Note the midnight problem.
month% = VAL(MID$(DATE$, 1, 2))
day% = VAL(MID$(DATE$, 4, 2))
year% = VAL(MID$(DATE$, 7, 4))
PRINT "month "; month%; " day "; day%; " year "; year%
REM This select determines the number of elapsed days by the current month.
SELECT CASE month%
CASE 1
month% = -1
CASE 2
month% = 30
CASE 3
month% = 58
CASE 4
month% = 89
CASE 5
month% = 119
CASE 6
month% = 150
CASE 7
month% = 180
CASE 8
month% = 211
CASE 9
month% = 242
CASE 10
month% = 272
CASE 11
month% = 303
CASE 12
month% = 333
END SELECT
elapseddays% = month% + day%
REM This removes the "extra day" if the reading is after midnight.
hour% = VAL(MID$(TIME$, 1, 2))
IF hour% < 12 THEN elapseddays% = elapseddays% - 1
REM This accounts for an extra day after February during a leap year.
year% = year% MOD 4
IF year% = 0 AND month% >= 59 THEN elapseddays% = elapseddays% + 1
PRINT "Number of days elapsed this year ... "; elapseddays%
REM This loop adds the extra RA and DEC values.
FOR i% = 1 TO acnt%
PRINT "old values: "; ara!(i%), adec!(i%)
ara!(i%) = ara!(i%) + elapseddays% * DAILYRA#
adec!(i%) = adec!(i%) + elapseddays% * DAILYDEC!
PRINT "new values: "; ara!(i%), adec!(i%)
NEXT i%
END SUB
SUB calctime (aobj$(), ara!(), adec!(), acnt%)
REM This subprocedure updates the RA and DEC values with respect to the
REM time of day. Note the midnight problem. the RA is assumed to change
REM at a rate of +60 seconds per minute, and the DEC is assumed to change
REM at a rate of +.01 degrees per minute.
currenttime$ = TIME$
PRINT "Current time is "; currenttime$
hour% = VAL(MID$(TIME$, 1, 2))
minute% = VAL(MID$(TIME$, 4, 2))
PRINT "hour "; hour%; " minute "; minute%
REM This computes the minutes elapsed since 6:00p.m.
IF hour% >= 18 THEN elapsedtime% = (hour% - 18) * 60 + minute%
IF hour% < 18 THEN elapsedtime% = 360 + (hour% * 60) + minute%
PRINT "Minutes elapsed since 6:00 p.m. .......... "; elapsedtime%
REM This loop adds the extra RA and DEC values.
FOR i% = 1 TO acnt%
PRINT "old values: "; ara!(i%), adec!(i%)
ara!(i%) = ara!(i%) + elapsedtime% * TIMERA#
adec!(i%) = adec!(i%) + elapsedtime% * TIMEDEC!
PRINT "new values: "; ara!(i%), adec!(i%)
NEXT i%
END SUB
SUB makelog (datename$)
REM this subprocedure creates a log file named with the current date
month$ = MID$(DATE$, 1, 2)
day$ = MID$(DATE$, 4, 2)
year$ = MID$(DATE$, 9, 2)
datename$ = "L_" + month$ + day$ + year$ + ".DAT"
PRINT datename$
END SUB
SUB readact (atable$(), acnt%)
i% = 0
OPEN "act.txt" FOR INPUT AS #1
DO
i% = i% + 1
INPUT #1, atable$(i%)
PRINT i%, atable$(i%)
LOOP UNTIL EOF(1)
acnt% = i%
PRINT "Number of objects in activity file: "; acnt%
CLOSE #1
END SUB
SUB readlib (aobj$(), acnt%, ara!(), adec!())
REM This procedure sets the RA and DEC values for the items in the activity
REM file from the library file. Note: The entire library is never stored
REM to save computer memory.
FOR item% = 1 TO acnt%
OPEN "aptlib.lfl" FOR INPUT AS #1
DO
INPUT #1, lobj$, lra!, ldec!
IF aobj$(item%) = lobj$ THEN
ara!(item%) = lra!
adec!(item%) = ldec!
PRINT "info for "; item%, aobj$(item%), ara!(item%), adec!(item%)
END IF
LOOP UNTIL lobj$ = "END"
CLOSE #1
NEXT item%
END SUB
SUB update (datename$)
REM this subprocedure creates the first line in the log file.
OPEN datename$ FOR OUTPUT AS #1
PRINT "initialized"
PRINT #1, "initialized"
CLOSE #1
END SUB
2) The Library File - APTLIB.LFL
agnetha, 4, 5
frida, 11, 15
bjorn, 4, 25
benny, 12, 16
roscoe, 2, 5
scott, 3, 21
thomas, 21, 3
caton, 7, 3
clarissa, 4, 18
jade, 6, 1
ashton, 2, 2
celeste, 2, 2
sissy, 1, 12
groucho, 1, 11
chico, 2, 22
harpo, 3, 5
zepo, 9, 15
gummo, 7, 11
holmes, 8, 6
END, 0, 0
3) The Activity File - ACT.TXT
thomas
caton
4) The Log File - L_031396.DAT
initialized
VITA
Scott Anderson Thomas was born in Cocoa Beach, Florida on March 21, 1968. After attending Hardin Park Elementary School, he graduated in 1986 from Watauga High School where he was honored as Rotary Boy and as a member of the National Honor Society. After accumulating general college undergraduate courses from Wake Forest University and Appalachian State University, Mr. Thomas entered the Electrical Engineering program at the University of North Carolina at Charlotte. In May of 1993, he received his BSEE degree.
Instead of immediately entering a graduate program, Mr. Thomas gained some valuable experience with a temporary position in the Traffic Engineering Branch of the North Carolina Department of Transportation. In August of 1994, Mr. Thomas entered the Master of Science, Applied Physics program at Appalachian State University. This degree was awarded in August of 1996.
Mr. Thomas has been a member of Holmes Hall since 1986, the Institute for Electrical and Electronics Engineers since 1991, Tau Beta Pi since 1992, and Sigma Pi Sigma since 1996. He has been a registered Engineer-In-Training with the North Carolina Board of Registration for Engineers and Land Surveyors since 1993.