[SLAC Controls Software Group [SLAC Controls Department] [SLAC Home Page]

Go to bottom of page



10.1 INTRODUCTION . . . . . . . . . . . . . . . . . . 10-1

10.1.1 Digital Input Devices . . . . . . . . . . . . 10-2

10.1.2 Severity Levels . . . . . . . . . . . . . . . 10-2

10.1.3 Modes . . . . . . . . . . . . . . . . . . . . 10-2

10.2 DATA BASE STRUCTURE . . . . . . . . . . . . . . 10-2

10.2.1 DIDD - Digital Input Device Definition . . . . 10-3

10.2.1.1 DEVP - Device Primaries . . . . . . . . . . 10-4

10.2.2 DIDN - Digital Input Device Names . . . . . . 10-4

10.2.2.1 NIB = # Input Bits. . . . . . . . . . . . . 10-4

10.2.2.2 NM = # Modes. . . . . . . . . . . . . . . . 10-4

10.2.2.3 DNAM = Device Type Name . . . . . . . . . . 10-4

10.2.2.4 DEVP = Primary . . . . . . . . . . . . 10-5

10.2.2.5 DIDP = Device Primary Number . . . . . . . . 10-5

10.2.2.6 INAM = Input Bit Names. . . . . . . . . . . 10-5

10.2.2.7 ILBL = Input Bit State Labels . . . . . . . 10-5

10.2.2.8 MNAM = Mode Names . . . . . . . . . . . . . 10-6

10.2.2.9 ESCR = User Escape Routine . . . . . . . . . 10-6

10.2.3 - Digital Input Device . . . . . . . . . 10-6

10.2.3.1 ALNM = Alias Name . . . . . . . . . . . . . 10-6

10.2.3.2 DIDN = DIDN Unit Number. . . . . . . . . . . 10-7

10.2.3.3 IBIT = DIM Unit And Input Bit Numbers . . . 10-7

10.2.3.4 SEVM = Severity Level Masks . . . . . . . . 10-7

10.2.3.5 CNTL = Control Word. . . . . . . . . . . . . 10-8

10.2.3.6 STAT = Status . . . . . . . . . . . . . . . 10-8

10.2.4 DIM - Digital Input Module . . . . . . . . . . 10-9

10.2.4.1 CTLW = CAMAC Control Word . . . . . . . . . 10-9

10.2.4.2 DATA = Input Data . . . . . . . . . . . . . 10-9

10.2.4.3 STAT = CAMAC Status . . . . . . . . . . . . 10-9

10.2.5 Example: . . . . . . . . . . . . . . . . . . . 10-9

10.3 SEMI-CUSTOM USER PANELS . . . . . . . . . . . . 10-10

10.3.1 Example . . . . . . . . . . . . . . . . . . . 10-11

10.3.2 Panel Subroutines . . . . . . . . . . . . . . 10-12

10.3.3 DIDUPNL Panel Variables . . . . . . . . . . . 10-12

10.3.4 DSTATDSP Variables . . . . . . . . . . . . . . 10-14 CHAPTER 10 DIGITAL STATUS INPUT SYSTEM

10.1 INTRODUCTION This document describes a software system for monitoring logical devices which consist only of status bits which are read through SLC Isolated Digital Input Modules (IDIMs, see SLC Hardware Manual). A similar but somewhat more complicated system for devices which have digital control as well as status information is described in the chapter "Digital Status Control System". The goal of the system is to provide complete software to allow one to monitor devices which consist solely of read-only status bits. Such devices can be added to the system by additions to the data base, without the need for software tailored to the specific device. Digital Status "devices" are logical constructions and place no restrictions on the IDIM units or channels from which the data are read. Monitoring of the devices is done through the micro-clusters, while display and error reporting functions remain in the VAX. Communication between the VAX and micros will be done primarily through through the SLCNET message facility and secondarily through the database.


DIGITAL STATUS INPUT SYSTEM Page 10-2

10.1.1 Digital Input Devices The collection of all digital input signals are logically divided into generic DIGITAL INPUT DEVICES (DIDs). A given DID may have up to 8 input bits, which may originate from more than one input module.

10.1.2 Severity Levels In order to provide flexibility in error reporting, several severity levels are defined on a bit by bit basis: In a normal state, no action is taken. For bits in an abnormal state the DISPLAY severity level color codes these bits on displays, but issues no error messages. The WARNING level will issue error messages, and the ESCAPE level will call a tailored software routine to handle truly exceptional conditions for which special action is required. Additionally, a TOGGLE level exists for which a warning message is issued any time the status bit changes, independent of its final state. A LOG level is also available to allow states to be logged in the message file without issuing warning messages.

10.1.3 Modes The severity levels associated with different states may be dynamically redefined through the use of DID MODEs. Separate severity levels are defined for each mode of the device.

10.2 DATA BASE STRUCTURE The digital input system uses four primary data types:


DIGITAL STATUS INPUT SYSTEM Page 10-3 o DIDD = Digital Input Device Definition. This data type, of which there is only one unit per micro, simply provides a list of (see below) primary data types o DIDN = Digital Input Device Names. This data type contains information (primarily names) which needs to be accesed only by the VAX (not micros). This information is independent of the micro or unit of devices to which it applies and is therefore stored only in micro-cluster VX00. o = Digital Input Device, where is any four-character name defining the DID. This data type contains information unique to a single unit of a DID. o DIM = Digital Input Module. This data type defines the physical digital input modules, independent of the nature of the data they read.

10.2.1 DIDD - Digital Input Device Definition Secondary Supertype Conversion Usage _________ _________ __________ _____ DEVP 1 VI2 Device primaries


DIGITAL STATUS INPUT SYSTEM Page 10-4

10.2.1.1 DEVP - Device Primaries - DEVP is a variable length array giving the primary category numbers of all s for this micro.

10.2.2 DIDN - Digital Input Device Names Secondary Supertype Conversion Usage _________ _________ __________ _____ NIB 4 1I2 # input bits NM 4 1I2 # modes DNAM 4 1A8 Device Type Name DEVP 4 1A4 Device primary name DIDP 4 1I2 Device primary number INAM 4 NIB*A8 (VS4) Input bit names ILBL 4 2*NIB*A8(VS4) Input bit state labels MNAM 4 NM*A8 (VS4) Mode names. ESCR 4 1A8 (VS4) User escape routine

10.2.2.1 NIB = # Input Bits. - NIB specifies the number of input bits associated with the DID. RESTRICTION: NIB .LE. 8

10.2.2.2 NM = # Modes. - NM specifies the number of modes of the DID. RESTRICTION: NM .LE. 8

10.2.2.3 DNAM = Device Type Name -


DIGITAL STATUS INPUT SYSTEM Page 10-5 DNAM is an 8-character name associated with this device. DNAM must be unique across all DIDNs. In addition to simply being an informative name, this variable is used to distinguish between devices of the same primary, but somewhat different logical structure.

10.2.2.4 DEVP = Primary - DEVP is the 4 character primary data type name associated with this device.

10.2.2.5 DIDP = Device Primary Number - DIDP is the primary catalog number of the associated .

10.2.2.6 INAM = Input Bit Names. - INAM is an array of NIB 8 character input bit names. The order of INAM entries should correspond to that of the corresponding IBIT entries (see below), and to the least to most significant bit order of the associated DIDD SEVMs.

10.2.2.7 ILBL = Input Bit State Labels - ILBL is a (2,NIB)*A8 array of input bit state labels (eg. ON/OFF, OPEN/CLOSE). The index 1 is used for the set (1) state, the index 2 for the reset (0) state.


DIGITAL STATUS INPUT SYSTEM Page 10-6

10.2.2.8 MNAM = Mode Names - MNAM is an array of NM 8 character mode names.

10.2.2.9 ESCR = User Escape Routine - ESCR is an 8 character name which specifies the name of a user routine to be called to handle tailored applications. If this parameter is left unspecified, no user routine will be called. If specified, the name must be associated with a subroutine using the SLC logical name services. The routine will be called if a state is detected with severity level ESCAPE

10.2.3 - Digital Input Device Secondary Supertype Conversion Usage _________ _________ __________ _____ ALNM 1 A12 (VS4) Alias Name DIDN 1 I2 DIDN unit number IBIT 1 2*NIB*I2 DIM Units and bit #s SEVM 1 (5,NM)*Z2 Severity Level Masks CNTL 2 1Z2 Control word STAT 3 3Z2 Device Status

10.2.3.1 ALNM = Alias Name - ALNM is a 12 character alias name (label) which may be used to give the device an alternate, more English-like, name. Note, however, this will work in one direction only: Given a name and unit, programs will be capable of displaying the alias, but input to programs must still be name/unit, not alias.


DIGITAL STATUS INPUT SYSTEM Page 10-7

10.2.3.2 DIDN = DIDN Unit Number. - DIDN specifies the DIDN unit number (see above) associated with this unit.

10.2.3.3 IBIT = DIM Unit And Input Bit Numbers - IBIT is a (2,NIB)*I2 array giving the DIM module unit number and the bit number (0-31) within the physical input module of each of the input bits. Numbers are entered as unit, bit, unit, bit ... The order of entries should match that of the coressponding DIDN INAM entries.

10.2.3.4 SEVM = Severity Level Masks - SEVM is a (5,NM)*Z2 array of masks used to define the severity level of different states and modes. The first index specifies the severity level in the order DISPLAY, WARNING, ESCAPE, LOG, TOGGLE. For each mask, the most significant byte selects the bits of interest, and the least significant byte specifies the state of those bits required to match the NORMAL state. i.e. the specified severity level will be true iff (data .and. hi-byte) .ne. lo-byte. The TOGGLE level operates somewhat differently than the other levels. Only the most significant byte is used. If a bit which is set in the TOGGLE mask is also set in the most significant byte of the WARNING, ESCAPE, or LOG masks, then the WARNING, ESCAPE, or LOG level is invoked any time that bit changes state, independent of the direction of change.


DIGITAL STATUS INPUT SYSTEM Page 10-8 DISPLAY = Bits failing the DISPLAY will be color coded yellow on all displays, but no error messages will be issued. This level is overridden by the WARNING or ESCAPE levels, but may be used in parallel with the LOG level. WARNING = Warning messages will be issued for bits failing the WARNING mask, and these bits will be color coded BLUE in displays. This level can be used in parallel with the LOG and TOGGLE levels. ESCAPE = For bits failing the ESCAPE mask, the user-specified escape routine (see above) will be called, and these bits will be color coded cyan in displays. This level can be used in parallel with the LOG and TOGGLE levels. LOG = For bits failing the LOG mask, information will be logged in the Message file. This level can be used in parallel with any of the other levels TOGGLE = As described above, this level is used to set the WARNING, ESCAPE, or LOG levels any time the bit changes state.

10.2.3.5 CNTL = Control Word. - CNTL is an Z2 word allowing some control functions through the data base: bit 0: If set, allows unit to be disabled from touch panel. 1: If set, allows mode to be set from touch panel.

10.2.3.6 STAT = Status - STAT is a word array reflecting the state of the DID Unit. Word 1 : Least significant byte: Input bits as read Most significant byte: CAMAC read errors Word 2: bits 0-2: Mode 9: Error messages supressed by VAX command 12: Error messages supressed by error timer Word 3 : Used internally by the program for storage of disable timer. Not used by normal applications.


DIGITAL STATUS INPUT SYSTEM Page 10-9

10.2.4 DIM - Digital Input Module Secondary Supertype Conversion Usage _________ _________ __________ _____ CTLW 1 Z4 CAMAC control word DATA 3 Z4 Data STAT 3 Z4 CAMAC Status

10.2.4.1 CTLW = CAMAC Control Word - CTLW is the standard CAMAC Control Word (F0,A0) for the input module.

10.2.4.2 DATA = Input Data - DATA contains the 32 bits of data read.

10.2.4.3 STAT = CAMAC Status - STAT contains the CAMAC status returned by the MBCD interface.

10.2.5 Example: The following shows the data base for a hypothetical device BOX. Box has four input bits: TEMP has states HOT and COLD. The normal state is COLD. If the device becomes HOT, an escape routine is triggered. POWER has states ON and OFF. The normal state is ON. If the device is turned OFF, the bit is color coded in displays but no warning messages are issued. DOOR has states OPEN and CLOSED. Any time this state changes


DIGITAL STATUS INPUT SYSTEM Page 10-10 a warning message is issued and logged. DOG has states BARKING and QUIET, either of which is considered normal. <:DIDD:LI00,1; !Dig. Output Device Definition :DIDU:=35,36; ! (primary,unit)s > <:DIDN:VX00,1; !Digital Output Device Name Definition :NIB :=4; !4 input bits :NM :=1; !1 mode :DNAM:="BLACKBOX"; !device name :DEVP:=BOX ; ! primary (name) :DIDP:=35; ! primary (number) :INAM:="TEMP ", !Bit names "POWER ", "DOOR ", "DOG "; :ILBL:="HOT ", !Bit labels - TEMP "COLD ", "ON ", ! POWER "OFF ", "OPEN ", ! DOOR "CLOSED ", "BARKING ", ! DOG "QUIET "; :MNAM:=" "; !Default Mode :ESCR:="BOX_TRIP"; !Escape routine > <:BOX :LI00,1; !Digital input device :ALNM:="BLUEBOX "; !Device Alias Name :DIDN:=1; !DIDN,DIDD units :IBIT:=1,0, !TEMP in bit 0 of input module 1 1,1, !POWER in bit 1 of input module 1 1,2, !DOOR in bit 2 of input module 1 1,29; !DOG in bit 29 of input module 1 :SEVM:=0202, !DISPLAY on POWER OFF 0400, !WARN on DOOR toggle 0100, !ESCAPE on TEMP HOT 0400, !LOG on DOOR toggle 0400; !TOGGLE mode for DOOR :CNTL:=%SETDIS+%SETMODE;!Allow disabling and mode chng from TP. > <:DIM:LI00,1; !Digital Input Module :CTLW:=%CR1+%M2; !CTLW :STAT:=0; !module status :DATA:=0; !current module data >

10.3 SEMI-CUSTOM USER PANELS Touch panel facilities exist to allow the "user" to construct panels


DIGITAL STATUS INPUT SYSTEM Page 10-11 for the display of Digital Status devices. The typical panel o Selects a group of micros and primaries to be displayed o Selects a single micro primary and unit to be displayed o Displays the status of all devices in the group o Displays the status of the single selected device In addition to Digital Status functions, the panel may mix other related functions, e.g. DAOCS, Digital Control devices.

10.3.1 Example The following example shows the code for a sample panel containing both digital status and digital control devices: SHADOW: 0,7, ,DODCLEAR,DOD_SEL ,DODUPNL , ,* SCRIPT: 0,5, ,DIGITAL CONTROL SWITCH: 0,4,TST_DV_1 ,PRFV 1,DODDEVU ,DODUPNL , > CL01 ,DODMICRO, ,* SWITCH: 1,4,TST_DV_2 ,PRFV 2,DODDEVU ,DODUPNL , > CL01 ,DODMICRO, BUTTON: 0,2,SCREEN IN ,TARGET ,DODCOMP ,DODUPNL , > IN ,DODSTATE, BUTTON: 0,1,SCREEN OUT ,TARGET ,DODCOMP ,DODUPNL , > OUT ,DODSTATE, BUTTON: 1,2,IRIS OPEN ,IRIS ,DODCOMP ,DODUPNL , > OPEN ,DODSTATE, BUTTON: 1,1,IRIS CLOSE ,IRIS ,DODCOMP ,DODUPNL , > CLOSE ,DODSTATE, ! ! SHADOW: 3,7, ,DIDCLEAR,DID_SEL ,DIDUPNL , ,* SCRIPT: 5,5, ,DIGITAL STATUS SWITCH: 5,4,TEST DEVICE ,DIG1 1,DIDDEVU ,DIDUPNL , > CL01 ,DIDMICRO, ,* ! SWITCH: 0,6,DISPLY SINGL UNITS,DOD_SING,DST_DISP,DEXEC ,DSTATDSP, SWITCH: 3,6,DISPLY MULT UNITS,DSP_DODI,DST_DISP,DEXEC ,DSTATDSP, SWITCH: 5,6,DISPLY SINGL UNITS,DID_SING,DST_DISP,DEXEC ,DSTATDSP,


DIGITAL STATUS INPUT SYSTEM Page 10-12

10.3.2 Panel Subroutines Three subroutines (apart from DEXEC) are referenced: o DODUPNL is the routine for handling user-custom digital control functions (see Digital Output System). o DIDUPNL is the routine for handling user-custom digital status functions. o DSTATDSP is the routine for generating all digital status and control displays.

10.3.3 DIDUPNL Panel Variables The following variables are associated with subroutine DIDUPNL: o DID_SEL - Initialization variable. For purposes of this discussion, this variable is always filled with the value 'DIDCLEAR'. It is associated with a SHADOW button and the initialization flag '*'. This function instructs DIDUPNL to clear the list of micros and device primaries which will be included in the multiple device display. Hence it should precede the later statements which will fill the list (see below). The shadow button is also used as the button on which the micro, primary, and unit of the singly selected device are displayed, so space for 14 characters should be reserved.


DIGITAL STATUS INPUT SYSTEM Page 10-13 o DIDMICRO - When used with the initialization flag '*', the value specified for this variable is added to the list of micros to be included in the multiple unit display. When activiated by a button push, the value is used to specify the single micro to be displayed in the single unit display. o DIDDEVU - The four leftmost characters of the value of this variable specify a DID device primary, and the four rightmost characters specify the unit. When used with the initialization flag '*', the primary is added to the list of primaries to be displayed in the multiple unit display. When activated by a button push, the primary and unit number specify the single device to be displayed in the single unit display. o DIDSWTCH - is a dummy variable. One frequently wishes to associate the variables DIDMICRO and DIDDEVU with a switch button specify the device currently being displayed. The value of the switch variable must be unique across all buttons comprising the switch. If DIDMICRO or DIDDEVU were used as the switch variable (as in the example above) the values used might not be unique; e.g. if (LI01,PRFV0001), (LI01,PRFV0002), and (LI02,PRFV0001) are used for the three buttons comprising the switch, then neither DIDMICRO nor DIDDEVU is unique across all three buttons. Hence the DIDSWTCH variable is defined so that it may used as the switch variable and given unique, but otherwise arbitrary, values.
DIGITAL STATUS INPUT SYSTEM Page 10-14

10.3.4 DSTATDSP Variables The following variables are associated with subroutine DSTATDSP: o DID_SING - Displays all the gory details of the current singly selected device. o DID_MULT - Displays minimal information for all units of all multiply selected devices in all multiply selected micros. o DID_DODI - Same as DID_MULT except that Digital Control devices (see Digital Output System) as well as Digital Control devices are displayed. o DID_BAD - Displays all Digital Status devices (independent of selection variables) with severity levels of DISPLAY or worse. o DID_DEVS - Displays list of all DID primaries and types, with multiply selected primaries color coded. o DID_MICR - Displays list of all micros containing DID devices, with multiply selected and offline micros color coded. o DID_UNIT - Displays list of all units for current multiply selected micros and DID primaries. o DID_DIMS - Displays CAMAC addresses for all DIMs associated with currently selected devices.


DIGITAL STATUS INPUT SYSTEM Page 10-15 The following variables are associated with subroutine DOSELECT and are used to control paging of displays: o PAGE_1: Horizontal and vertical pages are both set to 1. Values of the current page number are written to this button. Hence this button must be included (whether shadow or otherwise) on any panels which use the paging variables. o PAGE_DWN - Vertical page number is increased by one. If vertical page number is greater than the number of pages in the current display, the page number is reset to 1. o PAGE_UP - Vertical page number is decreased by 1 (if currently >1) o PAGE_RT - Horizontal page number is increased by 1. If greater than the total number of pages, then last page will be displayed. o PAGE_LFT - Horizontal page number is decreased by 1 (if <1).
 
Go to top of page
Contact (until Aug. 15, 1996): Jeffrey Miller
Owner: Bob Sass

Converted from VAX Runoff output using doc2webset.pl