								8/2/90a
		Support for CDF Mukherjee PCs

		   M. Glass / B. Lublinsky

	(Premliminary version - to get David started)


     The following topics are NOT yet covered:

	Basic Control property in its entirety
	Flow control between the 3344 and the PC
	Basic Status PDBs

     The hardware interface is a Kinetic Systems Camac 3344 four
channel RS-232 I/O module.  We are supporting full duplex operation.

     There is one database device for each device name accepted by
the PC.  The aggregate devices will look the same, to us, as the
individual devices.

     The front end supports the following properties: reading,
setting, basic status, and analog alarms.  We can also support basic
control and digital alarms if desired.


          +----------------------------------------------+            
          |      75 (hex)        |       FF (hex)        |            
          +----------------------------------------------+            
          | subadr |   slot      |  'C' crate            |            
          +----------------------------------------------+            
          | Parameter name (3 leftmost chars) in Rad50   |            
          +----------------------------------------------+            
          | Parameter name (3 rightmost chars) in Rad50  |            
          +----------------------------------------------+            
                                                                      
          Where the subadress uses 2 bits and the slot 6 bits              
                                                                      

     For the purposes of constructing a data base entry, you must first
convert the parameter name into Radix 50.  This enables us to pack six
ASCII characters into the four available bytes (with severe reduction
of the character set).  The Vax Fortran library routine to convert
ASCII to Radix 50 is called RAD50.

     The reading, setting, and basic status properties are all two
bytes long, as is the data length in the analog alarm block.

     Since we are returning small binay integers (from 0 to 100) as
raw data, representing analog values of 0-100%, the analog PDBs should
look like this:

	PDB READNG ('PCT',  '?', 10, ?, 2, ...)
                       ^          ^     ^
                       |          |     |
                       |          |     +--- data length = 2 bytes
                       |          +--------- primary transform = float(x)
                       +-------------------- primary units = volts

     The EMC is just like the SSDNs except that the first word is 0532 (hex).


     From the point of view of the PC, two operations are possible: reading
and setting.  The ASCII strings transmitted between the PC and the front
end are as follows:
	
	1. Reading.

     A single "reading" command to the PC is used to return the setting,
reading, and basic status properties to the console.  The front end sends
the following string to the PC:

	NAME<CR>

     Where:  NAME is one to six ASCII characters.

     The PC replies as follows (the blanks are white space):

	ENAME SETTING READING STATUS ...other stuff...<CR> 
        
     Where:  E is an error code:
		"blank" - everything is okay.
		"?"   - PC didn't understand the request.  In this case
			the front end will retry it.
		"!"   - forbidden operation.  In this case the front end
			will report an error to the console.
	     NAME is the name in the request echoed back
	     SETTING is the current setpoint (0-100), as decimal digits
	     READING is the current reading (0-100), also in decimal
	     STATUS is several status bits combined into a number, and
		reported as decimal digits.

	     The "other stuff" is ignored by the front end.
    

	2. Setting.

     The front end sends to the PC a "setting" string as follows:

	NAME SETTING<CR>

     Where:  NAME as above
	     SETTING decimal number 0-100

    The reply format from PC in this case is:

	ENAME SETTING<CR> 

    Where ERROR and NAME are treated in the same fashion as for a reading
request.  The SETTING must correspond numerically to what we've sent to
the PC via the setting command.
