164 Ramp Card Front End Support

19 June 1986
26 June 1986 (rev)
30 July 2008 (rev)

We support 3 distinct sub-types of device for each 164 card, arranged as follows:

Subtype 1: Knobable scale factors. There are 8 of these devices (one for each ramp). They appear on the parameter pages. The basic control property turns the power supply on/off.
Subtype 2: A buffer containing all the current clock events, ramp assignments, scale factors, and miscellaneous junk. This device is for Linda's page. The basic control property turns the power supply on/off.
Subtype 3: A buffer containing the current ramp memory. This device is for Linda's page. The basic control property enables/disables the 164 card itself.

All SSDNs have the same first 4 bytes, and a code in the seventh byte, to wit:

SSDN:
0 0
0 OID = 49 (hex)
crate slot
scale factors subtype

The "scale factors" byte is only valid for subtype 1 (individual scale factors). It may contain two scale factors: a starting scale factor (0-7) in the ls nibble, and an ending scale factor (0-7) in the ms nibble. If the ending scale factor is less than the starting scale factor, then only the starting scale factor is used.

SUBTYPE 1 -- SCALE FACTORS

The Setting property (exactly 1 word long) causes a write into the proper slot (from slots 16-23) of the 'configuration table'. This uses the F(17)A(14) and F(16)A(6) commands. You can read-the-setting (F(17)A(14), F(0)A(14)) to retrieve this value.

The Basic Status property (at least 1 word long) retrieves the power supply status with an F(0)A(0) command in the first word. If the user specifies 2 words then the F(0)A(6) LAM status is returned in the second word.

The Basic Control property runs the power supply using the following codes, which are written to the front end:

Code Function Meaning
1 F(24)A(1) P.S. OFF
2 F(26)A(1) P.S. ON
3 F(26)A(7) P.S. RESET
4 F(26)A(3) P.S. POL +
5 F(24)A(3) P.S. POL -
6 F(16)A(1) Force the DAC to 0 Volts.

SUBTYPE 2 -- CONFIGURATION TABLE AND MISCELLANEOUS STUFF

The Setting property is a buffer which can be both set and read back (read-the-setting), although not all the words are actually writable. The first word of this buffer is the current DAC value, so that it should be possible to put it on a parameter page or plot. In general though, Linda will be using this device in its full glory for module configuration.

The buffer is 27 words long. It looks like this (the offsets are in bytes starting from 0):

         +-----------------------+
      +0 | Current DAC Value     |  Read: F(0)A(1)   Set: ignored
         +-----------------------+
      +2 | Active ramp number    |  Read: F(1)A(5)   Set: ignored
         +-----------------------+
      +4 | Software version no.  |  Read: F(6)A(1)   Set: ignored
         +-----------------------+
 +6 - 20 | Eight                 |  Read: F(17)A(14) followed by
         ~    Clock Event        ~        eight F(0)A(14) commands
         |    Assignments        |  Set:  F(17)A(14) followed by
         +-----------------------+        eight F(16)A(6) commands
+22 - 36 | Eight                 |  
         ~    Ramp               ~  Read: eight more F(0)A(14)
         |    Assignments        |  Set:  eight more F(16)A(6)
         +-----------------------+
+38 - 52 | Eight                 |
         ~    Scale              ~  Read: eight more F(0)A(14)
         |    Factors            |  Set:  eight more F(16)A(6)
         +-----------------------+

It is possible to use the 'length' and 'offset' parameters on the DP routines to read/write any slice out of this buffer.

The Basic Control property controls the power supply. It is the same as the basic control for subtype 1 (above).

The Basic Status property reads the power supply status with the F(0)A(0) command.

SUBTYPE 3 -- RAMP TABLES

The Setting property for this device is a simple 2k byte array, consisting of 8 consecutive 256 byte ramps. You can set or read-the- setting for any slice out of this array. Settings use the F(16)A(7) and F(16)A(0) commands, reading back uses the F(16)A(7) and F(1)A(0) commands.

The Basic Status property reads the power supply status with the F(0)A(0) command.

The Basic Control property is used for on-card functions as follows:

Code Function Meaning
1 F(24)A(2) Disable ramp output
2 F(26)A(2) Enable ramp output
3 F(9)A(0) Reset 164 card
4 F(26)A(4) Enable MDAT energy scaling
5 F(24)A(4) Disable MDAT energy scaling

DIGITAL ALARMS

The digital alarm property can be attached to any one of the above devices. The practice, I believe, is to attach it to the subtype 2 (miscellaneous parameters) device. The SSDN for the digital alarm property is identical to the SSDN described above. The 'subtype' byte is actually ignored by the front end.

In order to understand how the digital alarm property works it is helpful to refer to the following diagram:

		     High order word	      Low order word
 
		+-----------------------+-----------------------+
		|  LAM SOURCE REGISTER	|  P.S. STATUS REGISTER	|
		+-----------------------+-----------------------+

     READ DATA	   F(0)A(6)		   F(0)A(0)
  READ NOMINAL	   ALWAYS ZERO		   F(0)A(2)
 WRITE NOMINAL	   N/A			   F(16)A(2)
     READ MASK	   F(0)A(4)		   F(0)A(3)
    WRITE MASK	   F(16)A(4)		   F(16)A(3)
  ALARM STATUS	   F(0)A(6)		   F(0)A(5)

The basic model is that the card alarms on a 2 word quantity: the low order word is the power supply status and the high order word is an on-card "Lam source register." Alarm checking is actually done by hardware on the card. The two words are checked in a somewhat different manner. The arrangement depicted above, where we visualize a 32 bit digital quantity, is a software fiction.

Another way of looking at this is to picture the nominal and mask fields within the digital alarm property. You have to specify in your database entry that these are each 2 words long as follows:

		+-----------------------+
     NOM + 0	|  P.S. STATUS NOMINAL	|  READ: F(0)A(2)  SET: F(16)A(2)
		+-----------------------+
	 + 2	|  LAM SOURCE NOMINAL	|  ALWAYS ZERO
		+-----------------------+

		+-----------------------+
    MASK + 0	|  P.S. STATUS MASK	|  READ: F(0)A(3)  SET: F(16)A(3)
		+-----------------------+
         + 2	|  LAM SOURCE MASK	|  READ: F(0)A(4)  SET: F(16)A(4)
		+-----------------------+

The low order word, corresponding to the power supply status, works in the conventional fashion. The status is compared to the nominal and the result is 'anded' with the mask. If any bits are bad (after masking) then alarm is raised. It is possible to read a 'which bits are bad' word from the card so a meaningful alarm can be posted. This is all very ordinary.

The the high order word, the Lam source register, is a curious beast. The first thing to know is that the nominal is always zero. This is a hardware restriction. The hardware is built so that if any of these bits becomes '1' then the module generates Lam (an alarm). The front end, as part of the software fiction, thus always forces the nominal to be zeroes.

The bit positions in the Lam source register are assigned by the people who built the card. These bits are available from the module writeup. For some cards built to date these are as follows:

Bit Meaning Which Cards
15 Illegal Camac write value 164, 165, 265
14 Attempt to modify active ramp 165
13 Missing MDAT (updated at 1 Hz) 165, 265
12 Missing TCLK (updated at 1 Hz) 165, 265
0 Status error 164, 165, 265

Remember that all these bit positions refer to the high order word, so that the "Illegal Camac write value" bit is really bit 2**31 of the two-word-long mask.

In general all these have been masked off except the "status error" bit. The "status error" bit effectively controls whether the power supply alarm checking is working or not. The front end will always force a '1' into this bit. Even if you try to mask everything off you will see that the front end patches the mask word to '00010000' (hex).

The front end implements the alarm bypass function by enabling and disabling Lam on the card.

The EMC for the digital alarm property is extremely simple:

EMC:
2 logical node
slot crate
0 0
0 0

Security, Privacy, Legal