Hobby - Eberly Telescope MARS Software Design Review November 2002 Michael H. Ward Systems Analyst McDonald Observatory MHW 04-November- 2002
OUTLINE Goals Software System Design MARS Server PMAC Interface PMC Interface Graphical User Interface Future Changes/Additions Outstanding Issues MHW Page 2
Goals Allow TOs to focus and stack the HET mirror segments in the shortest amount of time possible. Incorporate as much intelligence and automation into the process as possible. Ultimately "two clicks" to stack the mirror (one for each side). Support of various engineering tasks. Software Tcl/Tk & C Use modular style techniques (allows for ease of software changes when hardware needs to be changed) MHW Page 3
Communications Block Diagram MHW Page 4 GUI TCS PMC Pulnix Lamp PS Agilent 363 Black Box Pow-R-Switch SPS Segment Actuators (271) MARS Computer PMACMARS Software frame grabber HET Shutter (pneumatic) REF Shutter (pneumatic) Knife Edge (pneumatic) Knife Edge (voice coil) Motors & Encoders plug strip(s) E-Net Hub E-Net to Fiber Converter Laptop Terminal Server E-Net to Fiber Converter GUI Control Room CCAS Tower Video Display Video to Fiber Converter Video to Fiber Converter RS-170 RS-232 RS-644 RS-232 fiber
MARS Software System Design MHW Page 5 Shared Memory MARS ServerPMAC Comm Lamp Ctrl Power Ctrl PMC Client TCS Comm Time Stamp Watchdog AOA Camera Ctrl GUI PMAC Motors Shutters Voice coil TCS PMC Pulnix Agilent 363 MARS Computer Black Box Pow-R-Switch Frame Grabber RS232 connection via terminal sever 2 - Direct ethernet connection 3 - RS644 Manual command entry via TELNET 2
MARS Server Allows for a distributed software system. TCP/IP socket server process. Accepts client sockets from allowed computers. GUIs, loggers, manual commands... Accepts, parses and executes MARS commands. e.g. stack, lamp on/off, move motor,... Passes commands to various MARS processes via shared memory interface for implementation (lamp_ctrl, PMAC_comm, stacker, camera_ctrl,...) All commands are simply ASCII text (allows for manual command entry via a telnet session). Forks for each approved connection Results in a dedicated server for each connection. MHW Page 6
PMAC Interface Dedicated module (PMAC_comm.c) interfaces between the MARS system and the PMAC. Retrieves commands from shared memory interface (most likely placed there by the MARS server). Calls appropriate function from the PMAC interface software (supplied by PSO). Automatically interrogates the PMAC for status of various items and places the results into shared memory locations. MHW Page 7
PMC Interface Dedicated module (pmc.c) interfaces between the MARS system and the HET Primary Mirror Control system. Maintains a TCP/IP socket connection with the PMC system. Retrieves commands from shared memory interface (most likely placed there by the MARS server). Dumps tip/tilt corrections to the PMC as they become available. (POC system currently uses polling by the SPS system which results in quite a bit of wasted time). MHW Page 8
MARS Graphical User Interface Tcl/Tk program Currently ~5,000 lines of code ~1,000 lines of additional code when finished Talks to the MARS system via TCP/IP socket to the MARS server. Allows for more than one GUI to be run at a time. Allows for GUI to run on the native system rather than porting the display across the network (minimizes network traffic). Same design as currently implemented in the POC system. MHW Page 9
MARS GUI Layout MHW Page 10 MARS GUI (main) Default s Load/Save Display Reload Factory Stage Control Status Update FocusCamera Control Image Sequence Set Exp Time Save Image MenusDisplay Tip/Tilt Main GUI routine includes: Initializing default parameters Displaying of main GUI Establishing communications to MARS server Updating system status Updating display
Future Auto focus SPS integration Auto alignment of MARS instrument MHW Page 17
Outstanding Issues AOA Analysis Software Currently left as a “black box” that the software will ship images to and retrieve tip/tilt corrections for each segment. Video Display Display on GUI Time to implement (programming & learning curve) Network lag Feed to video monitor in control room Requires an additional fiber convert set + fiber pair Quick implementation time Need a camera to work with. SenSys Camera Control MHW Page 18