The use of Programmable Logic Controllers (PLCs) in the control of large physics experiments is ubiquitous1, 2, 3. The programming of these controllers is normally the domain of engineers with a background in electronics, this paper introduces PLC program development from the software engineer's perspective. PLC programs provide the link between control software running on PC architecture systems and physical hardware controlled and monitored by digital and analog signals. The higher-level software running on the PC is typically responsible for accepting operator input and from this deciding when and how hardware connected to the PLC is controlled. The PLC accepts demands from the PC, considers the current state of its connected hardware and if correct to do so (based upon interlocks or other constraints) adjusts its hardware output signals appropriately for the PC's demands. A published ICD (Interface Control Document) defines the PLC memory locations available to be written and read by the PC to control and monitor the hardware. Historically the method of programming PLCs has been ladder diagrams that closely resemble circuit diagrams, however, PLC manufacturers nowadays also provide, and promote, the use of higher-level programming languages4. Based on techniques used in the development of high-level PC software to control PLCs for multiple telescopes, this paper examines the development of PLC programs to operate the hardware of a medical cyclotron beamline controlled from a PC using the Experimental Physics and Industrial Control System (EPICS), which is also widely used in telescope control5, 6, 7. The PLC used is the new generation Siemens S7-1200 programmed using Siemens Pascal based Structured Control Language (SCL), which is their implementation of Structured Text (ST). The approach described is that from a software engineer's perspective, utilising Siemens Totally Integrated Automation (TIA) Portal integrated development environment (IDE) to create modular PLC programs based upon reusable functions capable of being unit tested without the PLC connected to hardware. Emphasis has been placed on designing an interface between EPICS and SCL that enforces correct operation of hardware through stringent separation of PC accessible PLC memory and hardware I/O addresses used only by the PLC. The paper also introduces the method used to automate the creation, from the same source document, the PLC memory structure (tag) definitions (defining memory used to access hardware I/O and that accessed by the PC) and creation of the PC program data structures (EPICS database records) used to access the permitted PLC addresses. From direct experience this paper demonstrates the advantages of PLC program development being shared between electronic and software engineers, to enable use of the most appropriate processes from both the perspective of the hardware and the higher-level software used to control it.
Proc. SPIE. 8451, Software and Cyberinfrastructure for Astronomy II
KEYWORDS: Observatories, Solar telescopes, Control systems, Telecommunications, Java, Photonic integrated circuits, Data communications, Commercial off the shelf technology, Device simulation, Data analysis
As PLCs evolve from simple logic controllers into more capable Programmable Automation Controllers (PACs),
observatories are increasingly using such devices to control complex mechanisms1, 2. This paper describes use of COTS
software to control such hardware using the Advanced Technology Solar Telescope (ATST) Common Services
Framework (CSF). We present the Enclosure Control System (ECS) under development in Spain and the UK.
The paper details selection of the commercial PLC communication library PLCIO. Implemented in C and delivered with
source code, the library separates the programmer from communication details through a simple API. Capable of
communicating with many types of PLCs (including Allen-Bradley and Siemens) the API remains the same irrespective
of PLC in use.
The ECS is implemented in Java using the observatory's framework that provides common services for software
components. We present a design following a connection-based approach where all components access the PLC through
a single connection class. The link between Java and PLCIO C library is provided by a thin Java Native Interface (JNI)
layer. Also presented is a software simulator of the PLC based upon the PLCIO Virtual PLC. This creates a simulator
operating below the library's API and thus requires no change to ECS software. It also provides enhanced software
testing capabilities prior to hardware becoming available.
Results are presented in the form of communication timing test data, showing that the use of CSF, JNI and PLCIO
provide a control system capable of controlling enclosure tracking mechanisms, that would be equally valid for telescope
UIST is a facility class near-infrared instrument recently commissioned at the UK Infrared Telescope (UKIRT). UIST provides a comprehensive imaging and spectroscopic facility with spatial resolution limited only by the delivered tip-tilt corrected seeing. In addition to long slit spectroscopic modes, UIST includes the first deployable cryogenic integral field unit in a common user instrument. We will present results obtained during the commissioning period in late 2002. These include measurements of the image quality and the sensitivities of the different observing modes of the instrument. We also discuss the use of an instrument-specific telescope pointing-model developed for UIST to allow the instrument to meet the stringent flexure requirements arising from the choice of 0.06arcsec/pixel and 0.12arcsec/pixel plate scales. We pay particular attention to the performance of the image slicing integral field unit (IFU). We will present astronomical results from the first year of UIST operations, during which time UIST carried out diverse programmes, from mineralogical studies of Mars to measuring the mass of the black hole at the centre of the most distant quasar.
The VISTA wide field survey telescope will be operated and maintained from 2006 by ESO at their Cerro Paranal Observatory. To minimise both development costs and operational costs, the telescope's software will reuse software from the VLT wherever feasible. Some software modules will be reused without modification, others will include modifications or enhancements and yet others will be complete rewrites or completely new. This paper examines the methods used in the software development process to integrate existing and new software in a transparent and maintainable manner. On the basis of the work so far performed, some lessons are presented for the reuse of VLT software for a new telescope by an organisation without previous knowledge of VLT software.