T. Ingerson
17sept97
A CTIO "Smart" Motor Controller, usually called an SMC, is a self-contained, standalone microcomputer contained in a box approximately 200 mm on a side. The hardware is essentially a self-contained, off the shelf STD BUS backplane containing appropriate commercially available STD BUS control cards. An SMC controls a number of instrument peripherals, such as motors, encoders, solenoids, etc..., using English language commands entered over a serial channel connected to the rest of the observing environment.
Multiple SMCs can be controlled simultaneously via the same serial channel. The number of peripherals controlled by a single box is normally no more than 10. When more things need to be controlled, multiple SMCs are used, keeping individual SMCs from becoming overly complex.
An SMC is a "set and forget" device, i.e. once an SMC has been told to perform an action, it takes care of the details and handles emergency situations. At any time, any uncompleted action may be aborted and/or the SMC may be asked for the status of any peripheral under its command.
An SMC is expected to hide hardware details from the external environment. Thus, a command like "focus move 1000" moves a focus adjustment to a value of 1000, but the outside observer does not know if the focus is actually changed by means of a servo, a DC motor or a stepper or some other kind of mechanism. If any kind of unexpected problem is encountered while performing the action, such as running into limits, the SMC will deal with the situation and report its nature when asked. An SMC never generates unsolicited messages.
SMCs are stand-alone computers. They use a variant of DOS called STD DOS, which is permanently contained in ROM inside the SMC. An application program is contained in non-volatile memory and starts automatically after reset. This program receives external commands and acts on them. Under normal circumstances, STD DOS is invisible to the user and no console or external disks are required.
Every SMC has two serial lines. One of these lines is the "command channel" through which instructions are sent to the SMC. The other channel permits direct access to the internal SMC computer via STD DOS. An external computer is connected to this channel and a program called Virtual Serial Console (VSC) is started. VSC uses this serial line not merely as a terminal, but as an transparent interface which connects the resources of the laptop to the operating system of the SMC. If the application program is aborted, the SMC becomes a full-fledged DOS computer, using the console, keyboard and disks of the external computer through VSC and the communication line. A single keystroke permits the user to toggle the laptop between working normally and functioning as the console for the SMC.
The laptop's disk can be accessed by both the laptop and the SMC, permitting programs to be transferred easily between them. Source code is edited and recompiled on the laptop. The executable application program is transferred to an internal non-volatile RAM disk in the SMC via the shared disk system. This program starts up automatically on reset so that the laptop is not normally necessary.