							07/23/97
							02/11/03 (rev)


	    C460 Card Front End Support

             R. Neswold / B. Hendricks


     THE ENTIRE SET OF DATABASE DEVICES FOR ONE CARD FOLLOWS.

     There are presently 13 required devices in the set:

	1)  Parameter page device (reading, setting, status,
	    control, alarms) (SSDN subtype code 1)
	2)  F(t) tables (SSDN subtype code 2)
	3)  G(i) tables (SSDN subtype code 3)
	4)  H(i) tables (SSDN subtype code 4)
	5)  Ramp table map data, MDAT multiplier map, Scale
	    factor map  (SSDN subtype code 5)
	6)  Scale factors (SSDN subtype code 6)
	7)  Version number, misc information, and current conditions
	    (SSDN subtype code 7)
	8)  Reference device (SSDN subtype code 8)
        9)  G(i) abscissa values (SSDN subtype code 9)
       10)  H(i) abscissa values (SSDN subtype code 10)
       11)  Clock events (setting, status, control)
            (SSDN subtype code 11)
       12)  MDAT selections (SSDN subtypecode 12)
       13)  Family

	    There are also optional devices to address individual
	    scale factors (SSDN subtype code 6) and knobbable or
	    ganged devices (SSDN subtype code 15).


-----Parameter page device:

	Example name for this device: T:HA11 (7 characters, no suffix).

	SSDN:	SSDNHX READNG (0000/0042/mmcc/0000)
			"mm" = madc # in high (left) byte
			"cc" = channel # in low (right) byte

		SSDNHX {other properties} (0000/0099/ccss/0010) !code = 1
			"cc" = crate
			"ss" = slot

		The '1' in the 2nd nibble of the 4th word is
		the code that the special application page
		can key off of to identify this device.

	Reading: MADC channel.

	Setting: G(i) table as an array device.  There are 15
	         tables per 460 channel, each 64 words long.
		 thus the maximum length parameter is either 128
		 bytes (one table) or some multiple thereof.

		 The parameter page picks an individual number
		 out of this array for display.  The default,
		 of course, is to display the first slot.  An
		 individual table entry is 1 word (2 bytes).

		 PRO SETTNG (2, 128, 60)	! for 1 table
		 PDB SETTNG ('VOLT', 'UNIT', 2, 6, 2, 0, 0, 0,
			12.8, 1.0)		! -128 to +127

	Status:	 Power supply status.
|
|		 Low word:    F(1)A(0) status
|
|		 The 460 module has only a single word
|		 of PS status.
|
|		 PRO BASTAT (2, 2, 60)

	Control: Basic control codes are two words long.  In
		 general the upper word is zero.  The codes can
		 be placed in the basic control PDB with upper
		 word zero to achieve normal basic control.

		 The codes are as follows:

		   Code  Meaning	 PDB Slot  Camac Function
		   ----  -------         --------  --------------
		     1   PS Off		 OFF	   F24A1
		     2   PS On		 ON	   F26A1
		     3   PS Reset	 RESET	   F26A7
		     4   unused		 POL +     
|		     5   unused          POL -
		     6   Continue	 none	   F18A6 (FFFF)
		     7   Stop		 none	   F18A6 (0000)
		     8   Special configuration word follows.
|		     9   unused
		    10	 Reset module		   F9A0
|		    11	 unused
|		    12   unused
		    13   Restore G table	   F26A10
		    14   Trigger waveform	   F17A10
|		    15   Restore H table	   F26A11

		 PRO BCNTRL (4, 4, 60)
|		 PDB BCNTRL (7, 3, 2, 1, 0, 0)

		 Some basic control codes are for use by the application
		 page, and are not included in the parameter page PDB BCNTRL
		 shown above.

		 By sending basic control codes 6 and 7 in the low order
		 word, the application page can manipulate the stop /
		 continue flag.

		 Code 8 in the lower word of the basic control setting
		 value means that the upper word contains special
		 configuration to be written with F18A5.

		 Code 14 in the lower word of the basic control setting
		 value means the upper word contains an interrupt level
		 (0 to 31).

	Alarms:  We are supporting digital alarms only.  There is
		 presently no way to have meaningful analog alarms
		 on a ramped device.  If it should be desirable
		 to support an analog alarm on event (e.g. reset)
		 then it is possible to use the existing
		 facilities.

		 The alarm mask, nominal, and reset will follow
		 the entire basic status, i.e. 1 word.

		 PRO DGALBL (2, 20, 60, zzzz, zzzz,
			     2, 1, 1, 0, 0, 0, 0,	<- NOTE SIZE
			     0, 0, 0)

		 PRO DGALTX (0, 0, 5, '')


-----F(t) Tables:

	SSDN:	SSDNHX SETTNG (0000/0099/ccss/0020) !code = 2

	Setting: There are 128 words per table, which have 64
		 pairs of (f(t), t).  Thus the data base entry
		 will be either 256 bytes long (for one table)
		 or some multiple thereof.  The default length
		 is four bytes, a single entry.

		 PRO (4, 256, 60)	! No PDB necessary?

	Device name suffix:  "T", as in T:HA11T


-----G(i) and H(i) tables:

	SSDNs:	SSDNHX SETTNG (0000/0099/ccss/0030) !G(i) code = 3
		SSDNHX SETTNG (0000/0099/ccss/0040) !H(i) code = 4

	Setting: There are 64 words per table, which have 64
		 single g(i) or h(i) ordinate values.  The
		 corresponding abscissa values are supported
		 through other devices, which are paired with
		 the ordinates here to produce (i,g(i)) and 
		 (i,h(i)) tuples.

		 If we are supporting only one table these
		 devices are 128 bytes long in the database;
		 they will be some multiple of that if more
		 tables are supported.  The default length,
		 for the first entry, is 2 bytes.

		 For both devices we have:
		 PRO (2, 128, 60)	! No PDB necessary?

	Device name suffixes:  "G" and "H", as in T:HA11G
		 and T:HA11H


-----Knobbable or ganged devices:

 	These are wholly optional.  You can create these devices, if
	you wish, for the purpose of knobbing groups of slots in a
	table all at the same time.  They are NOT included in the
	family device.  The reading property is typically set up the
	same as the parameter page device.

	SSDN:	SSDNHX READNG (0000/0042/mmcc/0000)
			"mm" = madc # in high (left) byte
			"cc" = channel # in low (right) byte

		SDNHX SETTNG (dtii/0099/ccss/kkF0) !code = 15
			"d"  = starting delta slot (0-15)
			"t"  = total slots affected (1-15)
			"ii" = initial slot (0-63)
			"cc" = crate
			"ss" = slot (1-24)
			"kk" = combination of table number and type
			       (table || (type << 6))
			       (table number is the lower 6 bits (1-15))
			       (types: 1 -> f(t), 2 -> g(i), 3 -> h(i))

	Reading: This device reads an MADC channel

	Setting: Writing to the setting property of this device
		 will set a range of slots starting at the
		 starting slot minus the delta slot.

		 If the table number ("kk" & 0x3f) is zero, then we use
		 the request offset to index into the slots. Otherwise
		 we use "ii".  The "controlling" slot is determined by
		 the offset or "ii", whichever is active for the request.
		 The setting value is subtracted from the controlling
		 slot. The difference is applied to "t" slots, starting
		 with the slot number "ii" - "d".

	Device name suffix:  "K", as in T:HA11K


-----Maps device:

	SSDN:	SSDNHX SETTNG (0000/0099/ccss/0050) !code = 5

	Setting: 224 words, separated into 3 sections.

		 1)  Ramp table map data (one word for each
		     of 32 interrupt levels) = 32 words
		 2)  MDAT multiplier map = 96 words
                     First  32 words: f(t) multipliers (1 per interrupt lev)
                     Second "    "  : g(i)
                     Third  "    "  : h(i)
		 3)  Scale factor map = 96 words
                     Organized like the MDAT multiplier map, above.

		 PRO SETTNG (2, 448, 60)
		 No PDB necessary.

	Device name suffix:  "M", as in T:HA11M


-----Scale factors device:

	Setting: 15 words of scale factors.

	SSDN:	SSDNHX SETTNG (0000/0099/ccss/0060) !code = 6
		PRO SETTNG(2, 30, 60)

	If you want to put this device on a parameter page,
	you will need to include a PDB.

	Device name suffix:  "S", as in T:HA11S


----Individual scale factors devices:

 	These are wholly optional.  You can create these devices, if
	you wish, for the purpose of knobbing individual scale factors
	on parameter pages.  They are NOT included in the family device.

	Setting: 1 word scale factor.

	SSDN:	SSDNHX SETTNG (0000/0099/ccss/nn60) !code = 6
		PRO SETTNG(2, 2, 60)

		nn = scale factor number (01 to 0F hex)

	If you want to put this devices on parameter pages,
	you will need to include PDBs.

	Device names: you pick 'em


-----Version number and operating conditions device:

	SSDN:	SSDNHX SETTNG/READNG (0000/0099/ccss/0070) !code = 7

	Reading:  Thirteen words of general status, followed by
		  twenty two words of calculation archive buffer
		  followed by one word of the current interrupt level,
		  followed by two tables, thusly:

		Word 1:  F(6)A(1) Version Number
		     2:  F(2)A(2) Current Ramp Tables
		     3:  F(2)A(3) Current Scale Factors
		     4:  F(2)A(4) Current MDAT Selections
		     5:     "       (second word)
		     6:     "       (third word)
		     7:  F(0)A(10) F(t) End of Table Flag
		     8:  F(0)A(11) F(t) Segment Number
		     9:  F(0)A(12) G(i) Segment Number
		    10:  F(0)A(13) H(i) Segment Number
		    11:  F(2)A(5) Special Configuration Word
		    12:  F(4)A(3) Tracking Tolerance
		    13:  F(6)A(0) Card Type
		 14-34:  F(3)A(3) Calculation Archive
		    35:  F(4)A(2) Current Interrupt Level
		    36:  F(1)A(14) Last TCLK Event
		 37-42:  F(4)A(4) Copy Table Info
		 43-48:  F(5)A(4) Add Table Info
		49-112:  F(4)A(5) Clock Event Timestamps

		PRO SETTNG/READNG (2, 224, 60)

	We are supporting BOTH setting and reading properties
	for this device.  Only the the special configuration word
	and the tracking tolerance and the "copy table information"
	are actually settable (The other words are just ignored on 
	setting.), but the whole structure can be read via the
	setting property as a convenience to the application page.

|		  Word 11:  F(18)A(5)  special config word
|		       12:  F(20)A(3)  tracking
|		    37-48:  F(17)A(12) set pointer
|			    F(20)A(4)  set data

	Device name suffix:  "U", as in T:HA11U


-----Reference device:

	The reference device is primarily for reading and setting
	the module's DAC and reading the power supply output via
	an MADC channel.  Since it appears on parameter pages, it
	is also a convenient place to attach miscellaneous status
	and control.

	SSDN:	SSDNHX READNG (0000/0042/mmcc/0000)
			"mm" = madc # in high (left) byte
			"cc" = channel # in low (right) byte

		SSDNHX {other properties} (0000/0099/ccss/0080) !code = 8
			"cc" = crate
			"ss" = slot

	Reading: This device reads an MADC channel

	Setting: Writing to the setting property of this device
		 will write directly to the DAC with an F(17)A(2)
		 command.  Reading-the-setting will return the
		 "most recent DAC setting" with an F(1)A(2)
		 command.  This gives you some way to manually
		 control the DAC output, although if the card is
		 ramping its output won't stay where you put it.

	Status:	 A single word containing the F(4)A(12) LAM status:

			Bit 15:  1=Invalid Camac function
			    14:  1=Calculation error
			    13:  1=MDAT missing
			    12:  1=TCLK missing
			    11:  1=PS status error
|			    10:  1=unused
|			     9:  1=PS tracking error
			     8:  1=MDAT table search error
			     2:  1=Ramp not enabled
			     0:  1=Ramp enabled

		 PRO BASTAT(2, 2, 60)
		 PDB BASTAT(1, 0, 1, 0, 0, 0, 2) ! ON/OFF status

	Control: The basic control for the reference device enables
		 and disables the ramp.

		 Basic control codes are only one word long.  The
		 front end ignores the upper word, but I recommend
		 that you keep it zero in case we want to support
		 other basic control options.

		 The codes are as follows:

		   Code  Meaning	 PDB Slot  Camac Function
		   ----  -------         --------  --------------
		     1   Ramp disable	 OFF	   F24A2
		     2   Ramp enable	 ON	   F26A2
                     3   Reset counters  RESET     F26A13
		     4   unused		 POL +     
		     5   unused		 POL -

		 PRO BCNTRL (4, 4, 60)
		 PDB BCNTRL (6, 3, 2, 1, 0, 0)

	Alarm:	 We support a digital alarm for this device.  The
		 alarm mask, nominal, and reset will follow the basic
?		 basic status, except that bits 9 and 11 are under
?		 control of the front end and never cause alarms.

		 You can make the data size should be 2 bytes, to
		 match the basic status.

		 PRO DGALBL (2, 20, 60, zzzz, zzzz,
			     2, 1, 1, 0, 0, 0, 0,
			     0, 0, 0)
		 PRO DGALTX (0, 0, 5, '')

	Device name suffix:  "F", as in T:HA11F


-----G(i) and H(i) abscissa values:

	SSDN:	 SSDNHX SETTNG (0000/0099/ccss/0090) ! G(i) code = 9
		 SSDNHX SETTNG (0000/0099/ccss/00A0) ! H(i) code = 10

	Setting: There are 64 words in each of these devices,
		 containing MDAT values for the waveform function
		 abscissas.

		 PRO SETTNG (2, 128, 60) ! no PDB needed

	Device name suffixes:  "X" and "Y" for the G and H
		 abscissas respectively, as in T:HA11X and T:HA11Y


-----Clock events:

	SSDN:	 SSDNHX SETTNG (0000/0099/ccss/00B0) !code = 11

	Setting: 256 words long, containing 8 word blocks
		 (= 8 clock events) for each of 32 interrupt
		 levels.

		 PRO SETTNG (2, 512, 60)

	Status:	 A single word containing the F(4)A(15) clock event enable
		 flag

			Bit  0:  1=clock event interrupts disabled (OFF)

		 PRO BASTAT(2, 2, 60)
		 PDB BASTAT(1, 0, 1, 0, 0, 0, 2) ! ON/OFF status

	Control: The basic control for the reference device enables
		 and disables the clock event interrupts.

		 Basic control codes are only one word long.  The
		 front end ignores the upper word, but I recommend
		 that you keep it zero in case we want to support
		 other basic control options.

		 The codes are as follows:

		   Code  Meaning	    PDB Slot  Camac Function
		   ----  -------            --------  --------------
		     1   Disable interrupts   OFF	 F24A5
		     2   Enable interrupts    ON	 F26A5
		     3   unused		      RESET
		     4   unused		      POL +     
		     5   unused		      POL -

		 PRO BCNTRL (4, 4, 60)
		 PDB BCNTRL (6, 0, 2, 1, 0, 0)

	Device name suffix:  "C", as in T:HA11C


-----MDAT Selections:

	SSDN:	 SSDNHX SETTNG (0000/0099/ccss/00C0) !code = 12

	Setting: One word long.  Contains the sources of MDAT
		 for the G(i) function (high byte) and H(i)
		 function (low byte).

		 PRO SETTNG (2, 2, 60)

	Device name suffix:  "D", as in T:HA11D


-----Family device:

	Family:	 This device supports only a "family" property,
		 which is a version of a subsystems device
		 record.  Eleven of the devices above MUST be
		 included in this family for the application 
		 page to work; we are recommending that you
		 include the reference device also just in case
		 the application program ever wants to use it.

		 PRO FAMILY (T:HA11, T:HA11T, T:HA11G,
			     T:HA11H, T:HA11M, T:HA11S, T:HA11U,
			     T:HA11X, T:HA11Y, T:HA11C, T:HA11D,
			     T:HA11F)

	Device name suffix:  "Z", as in T:HA11Z

	(Note that this the "Z" suffix is not optional.
	 The application page is looking for it.)

