T A B L E O F C O N T E N T S 1 INTRODUCTION 11 1.1 PURPOSE 11 1.2 SCOPE 11 1.3 APPLICABLE DOCUMENTS 11 1.4 REFERENCE DOCUMENTS 11 1.5 ABBREVIATIONS AND ACRONYMS 12 1.6 GLOSSARY 13 1.7 STYLISTIC CONVENTIONS 13 1.7.1 Data Flow and Processor Model Diagrams 13 1.7.2 Class Diagrams 14 1.8 NAMING CONVENTIONS 14 1.9 PROBLEM REPORTING/CHANGE REQUEST 14 2 OVERVIEW 15 2.1 INTRODUCTION 15 2.2 NAMING CONVENTIONS 15 2.3 ARCHITECTURE 15 2.3.1 Workstation 17 2.3.2 LCU 17 2.4 SOFTWARE MODULES 18 3 GETTING STARTED 19 3.1 DOCUMENTATION 19 3.2 A DEMO SESSION 19 4 USER'S GUIDE 21 4.1 OPERATIONAL STATES 21 4.2 SIMULATION 22 4.3 ICS SOFTWARE DEVICES 22 4.3.1 Software Device States 23 4.3.2 Software Device Modes 23 4.4 PANELS 24 4.5 COMMANDS 24 4.6 ICS SELF-TEST 25 5 TUTORIAL: IMPLEMENTING ICS FROM SCRATCH 27 5.1 ROADMAP 27 5.2 INSTRUMENT IDENTIFIER AND SOFTWARE MODULE PREFIX 27 5.3 CREATING FROM SCRATCH A NEW INSTRUMENTATION APPLICATION 27 5.4 PREPARING THE USER MANUAL 27 5.5 DEFINING A BASIC ICS CONFIGURATION 27 5.5.1 General Instrument Configuration 28 5.5.2 Workstation and LCU Environments 28 5.5.3 List of ICS Software Devices 28 5.6 ADAPTING THE TEMPLATE MODULES TO A NEW INSTRUMENT 31 5.6.1 Module dicNNNN 31 5.6.2 Module nni (ICS/nni) 31 5.6.3 Module nnidev (ICS/nnidev) 32 5.6.4 Module nnins 32 5.6.5 Module nnmcfg (MS/nnmcfg) 33 5.7 INSTALLING AND TESTING ICS 34 5.7.1 Installation 34 5.7.2 Testing ICS 34 5.7.3 Restrictions while only the Basic ICS Configuration is defined 34 5.7.4 Processes 35 5.8 IMPLEMENTING THE ICS STAND-ALONE PANEL 35 5.9 CONFIGURING INDIVIDUAL ICS SOFTWARE DEVICES 35 5.10 WRITING SPECIAL ICS SOFTWARE DEVICES (if needed). 35 5.11 FINAL REMARKS 35 6 TUTORIAL: CREATING A SPECIAL DEVICE 37 6.1 ROADMAP 37 6.2 RETRIEVING THE SPECIAL DEVICE TEMPLATE 37 6.3 UPDATING THE ICS MANUAL 37 6.4 BASIC SPECIAL DEVICE CONFIGURATION 37 6.5 INTEGRATING THE SPECIAL DEVICE INTO ICS 38 6.6 ADAPTING THE TEMPLATE SOFTWARE 39 6.6.1 On-line database 39 6.6.2 Command Hooks 39 6.6.3 Implementing a Control and/or Monitoring Task 40 6.6.4 FITS Logs 40 6.7 INSTALLING AND TESTING THE SPECIAL DEVICE 40 6.8 FINAL REMARKS 40 7 PROGRAMMER'S GUIDE 41 7.1 OPERATIONAL STATES 41 7.1.1 Change Operational State 41 7.1.2 Operational Sub-state 41 7.2 SIMULATION 42 7.2.1 Set or Change Simulation Level 42 7.3 DEBUG LEVELS 42 7.3.1 Set or Change Debug Level 42 7.4 ICS SOFTWARE DEVICES 42 7.4.1 Software Device States 42 7.4.2 Software Device Substate 43 7.4.3 Software Device Error Flag 43 7.4.4 Software Device Status 43 7.5 ICS WORKSTATION PART 44 7.5.1 Modify the callback for a specific command/reply 46 7.5.2 Attach a dedicated callback to OLDB events. 46 7.5.3 Attach a dedicated callback to a Timer 46 7.5.4 Execute a special action associated to a particular keyword 47 7.5.5 Assemblies 47 7.6 COMMANDS 50 7.7 PUBLIC ONLINE DATABASE ATTRIBUTES 50 7.8 CONFIGURATION AND OPERATIONAL LOGS 50 7.9 INTERFACES 51 7.9.1 Human interfaces 51 7.9.2 Hardware interfaces 51 7.9.3 Software interfaces 51 7.10 ERROR DEFINITIONS 51 8 CONFIGURATION GUIDE 53 8.1 INTRODUCTION 53 8.2 ICS CONFIGURATION FILES 53 8.3 FROM THE CONFIGURATION FILES TO THE RUNNING SYSTEM 53 8.4 DESIGN CONFIG. PARAMETERS VS. NORMAL CONFIG. PARAMETERS 54 8.4.1 Design Config. Parameters 54 8.4.2 Normal Config. Parameters 54 8.5 UPDATING AND TESTING THE ICS CONFIGURATION 54 8.5.1 Updating Design Config. Parameters 54 8.5.2 Hardware control 55 8.5.3 Updating Normal Config. Parameters 55 8.6 CONFIGURATION PARAMETERS 56 8.7 GENERAL INSTRUMENT CONFIGURATION 57 8.7.1 Instrument Identifier 57 8.7.2 Software Module Prefix 57 8.7.3 Instrument OLDB Root Point 57 8.8 WORKSTATION AND LCU ENVIRONMENTS 58 8.8.1 Instrument Workstation Environment 58 8.8.2 Instrument LCU Environments 58 8.9 ICS GENERAL CONFIGURATION 59 8.9.1 Simulation Mode 59 8.9.2 Place Sensors Online When The LCU Boots 59 8.10 ICS SOFTWARE DEVICES 60 8.10.1 List of ICS Software Devices 60 8.10.2 Notes Regarding the Description of Individual ICS Software Devices 61 8.10.3 Common Config. Keywords 62 8.11 LAMPS AND SHUTTERS 63 8.11.1 Lamp (icbLAMP) 63 8.11.2 Shutter (icbSHUTTER) 66 8.12 MOTORIZED FUNCTIONS 68 8.12.1 ADC (icbMOT_ADC) 69 8.12.2 Depolarizer (icbMOT_DPOR) 71 8.12.3 Derotator (icbMOT_DROT) 72 8.12.4 Filter Wheel (icbMOT_FILTER) 74 8.12.5 Grating Wheel (icbMOT_GRATING2) 76 8.12.6 Mirror Wheel (icbMOT_MIRROR) 79 8.12.7 Optical Function with Discrete Positions (icbMOT_OPTI) 80 8.12.8 Optical Function with Continuous Positions (icbMOT_POS) 82 8.12.9 Length Slit or Dekker (icbMOT_SLIT2_LEN) 84 8.12.10 Width Slit (icbMOT_SLIT2_WID) 87 8.12.11 Slit Wheel (icb_MOT_SLITS) 90 8.12.12 Camera Tilt (icbMOT_TILT) 92 8.13 SENSORS 93 8.13.1 Common Sensor Software Device Config. Keywords 93 8.13.2 ADAM Analog Sensors (icbSEN_ADAM) 95 8.13.3 Barometer Sensor (icbSEN_BAROMETER) 97 8.13.4 OMEGA CN76000 Temperature Controllers (icbSEN_CN76000) 98 8.13.5 ESO Cabinet Cooling Controller (icbSEN_COOLING) 99 8.13.6 Digital Sensors (icbSEN_DIGITAL) 101 8.13.7 Humidity Sensor (icbSEN_HUMIDITY) 103 8.13.8 HERAEUS QUAT10 Temperature Sensors (icbSEN_QUAT10) 104 8.14 FINE TUNING 105 8.14.1 Timeout Values 105 8.14.2 Software Device Monitoring Task 106 8.14.3 Moving Software Devices In Parallel 106 8.15 ICS ASSEMBLIES 107 8.15.1 Assembly Name 107 8.15.2 Assembly Value 107 8.15.3 Conversion string 107 8.15.4 FITS header flag 107 8.15.5 Example 107 8.16 ICS SELF-TEST 109 8.16.1 Command 109 8.16.2 Parameters 109 8.16.3 Example 109 9 FAQ AND TROUBLESHOOTING 111 9.1 STARTUP AND SHUTDOWN 111 9.1.1 Some of the common errors encountered during start-up 111 9.2 STANDARD DEVICES 111 9.2.1 How do I retrieve the status of an individual FITS keyword ? 111 9.3 SPECIAL DEVICES 111 9.3.1 May I base a special device on modules ic0* ? 111 10 INSTALLATION GUIDE 113 10.1 INSTALLATION OF ICB 113 10.2 INSTALLATION OF AN ICS BASED ON ICB 113 10.2.1 Installation in a Development Host 113 10.2.2 Environment Variables 113 11 REFERENCE 115 11.1 Scripts 115 11.1.1 icbConfigGet 115 11.1.2 icbConfigSet 117 11.1.3 icbInstallHook 118 11.2 Programs 119 11.2.1 ic0Control 119 11.2.2 ic0SimControl 120 11.2.3 ic0devServer 121 11.2.4 ic0lcuServer 122 11.2.5 ic0SelfTest 123 11.3 WS classes 124 11.3.1 ic0SERVER 124 11.4 Database 129 11.4.1 icb.class 129 11.4.2 icbOLDB 130 12 APPENDIX A: PORTING INSTRUMENTS TO MAR2001 133