Go to bottom of page
15.1 INTRODUCTION . . . . . . . . . . . . . . . . . . 15-1
15.2 DEVICE TYPES CURRENTLY USED . . . . . . . . . . 15-1
15.2.1 Summary . . . . . . . . . . . . . . . . . . . 15-2
15.3 A DATA ORGANISATION TO DESCRIBE THE VARIOUS CHAPTER 15 A DEVICE DESCRIPTOR FOR CERTAIN APPLICATION PROGRAMS. Document dated: 13th. June 1985 Author: Julian Kupiec
15.1 INTRODUCTION Some application programs (e.g. The Correlation Plots and Knob Utility) access very different kinds of devices in the control system. The combined set includes database variables, triggered devices, BPM's, Toroids, Analog Status, and the Emittance Measurement software. It is extremely likely that in the future there will be further inclusions. This note suggests a naming method and simple data organisation that will describe all the current devices being used, and hopefully will cater for future additions. Several useful utility routines are also suggested, (most to be extracted from the existing software). When a new device is to be included in one or more applications this will facilitate a minimal number of code additions rather than major code editions. The new code would be added to unique sources (a set of utility routines) rather than to several 'similar but not quite the same' code copies. It will also help in the development of future applications.
15.2 DEVICE TYPES CURRENTLY USED The following is a list of the currently used device types. In the following, all primary names are coded as hollerith data in integer*4 words :- 1. Database devices. 4 Integer*4 words for Prim, Micro, Unit, Secn. Each contains hollerith information, except the Unit, which is coded as a true integer. (The type of database
A DEVICE DESCRIPTOR FOR CERTAIN APPLICATION PROGRAMS. Page 15-2 device is restricted to that which yields a single REAL*4 data type). 2. Triggered devices. 5 Integer*4 words for Prim, Micro, Unit, Secn(=TDES), Beam no. All are holleriths except for Unit and Beam which are true integers. 3. Analog Status devices. 5 Integer*4 words for Prim, Micro, Unit, Secn, Secn2. Unit is a true integer. Secn, Secn2 contain hollerith info. that represents an eight character channel name. 4. Sampled/Step Variables (Correlation Plot only). In addition to all of the above, there are some 'special' primaries for sampled variables. These are ZERO, SAMP and TIME. These are completely defined by their primary name. The primary DTIZ specifies Emittance Measurements using the Video Digitiser EMittance software (VDEM). This sampled variable requires a secondary name that may be up to eight characters long, and coded as holleriths in Secn, Secn2. No Micro or Unit no. is required. There are also sampled variables for BPM's and Toroids:- BPMS, Micro, Unit, Secn (Secn = X, Y or TMIT). TORO, Micro, Unit. (Secn = TMIT). Unit is true integer. There is a step variable which is defined by the Primary KNOB, which indicates that stepping is going to be done with a Multi-device knob file.
15.2.1 Summary The following list summarises how the different device types are named:- Database Devices Prim, Micro, Unit, Secn Triggered Devices Prim, Micro, Unit, Secn(=TDES), Beam Analog Status Devices Prim(=ASTS), Micro, Unit, Secn, Secn2 Special Sampled/Step Variables:- ZERO, TIME, SAMP, KNOB Prim DTIZ Prim(=DTIZ), Secn, Secn2 BPM Prim(=BPMS), Micro, Unit, Secn TORO Prim(=TORO), Micro, Unit, Secn(=TMIT)
A DEVICE DESCRIPTOR FOR CERTAIN APPLICATION PROGRAMS. Page 15-3
15.3 A DATA ORGANISATION TO DESCRIBE THE VARIOUS DEVICE TYPES Unfortunately FORTRAN does not support data structures or records containing mixed data types, only arrays of a given type. The choice of integer*4 as data type is obvious, considering the existing software. Different data types can be accessed by equivalence. The last paragraph indicates a sufficient the length of the array as 5 integer*4 words. Should this increase, the appropriate parameter (AP_DESCSIZE) should be altered, and all software would have to be re-compiled. (This would not happen often). A future problem may be that one large device type requires much more space than any other, resulting in inefficient use of storage. An application could maintain efficient storage by a trade-off. This would involve extra handling and require some form of additional descriptor (perhaps supplied to the utility routines as an optional argument). Considering the current situation and anticipated future needs it seems appropriate to adopt a device descriptor of 5 integer*4 words. The prefix AP_ (Application Program) is conveniently terse. Thus to define a descriptor:- INTEGER*4 AP_DESCSIZE PARAMETER (AP_DESCSIZE = 5) INTEGER*4 AP_DESC(AP_DESCSIZE) The various access indices that are necessary are:- INTEGER*4 (AP_PRIM, AP_MICR, AP_SECN, AP_UNIT, AP_SECN2, AP_BEAM) PARAMETER ( AP_PRIM = 1, AP_MICR = 2, AP_UNIT = 3, AP_SECN = 4, AP_SECN2 = 5, AP_BEAM = 5) Some primaries (ASTS, DTIZ) have 'secondary' names that can be up to eight characters long. The second 4 characters of the secondary name can share the space occupied by a Beam no., as the use is mutually exclusive.