! Template file for the CAMAC 1032 SWIC Scanner Interface
! which is supported by the MOOC-based New-New Front End (NNFE)
! Prepared by Glenn C. Johnson
!
! The C1032 is a single-width CAMAC module which is used as an
! interface between the control system, one SWIC Scanner, and its
! associated motor drive.  This template assumes that the user
! has access to the various SWIC Scanner documents written by
! Terry Kiper.
!
!    The following ACNET properties are supported:
!
!	READING		An array device containing 88 bytes,
!			or 44 16-bit words, as follows:
!
!		Word No.	Description (lb = low byte, hb = hi byte)
!		--------	-----------
!		    1		(lb) ScanMode=6, or DisplayMode=5
!				(hb) Vertical gain in range (0x10-0x1B)
!				    (Refer to Kiper's C1032 document)
!		    2		(lb) Horizontal gain (0x20-0x2B)
!				(hb) Charge time (0x40-0x4C)
!		    3		(lb) Hold time (0x30-0x3C)
!				(hb) Polarity (0x50=pos, 0x51=neg)
!		    4		(lb) Number of scans (0x61-0x6A)
!				(hb) Bar graph mode (0x0A=on, 0x0B=off)
!		  5-29		ASCII text name array; two characters
!				per word; must start with beginning
!				mark 0x01 and terminate with end
!				mark 0x02
!		   30		Mask of scan numbers to display;
!				lsb = scan 1; maximum of 10 scans
!		 31-33		Vertical markers 1-48; word 31 lsb =
!				marker 1; word 33 msb = marker 48;
!				Maximum of five markers may be given
!		 34-36		Horizontal markers 1-48; word 34 lsb =
!				marker 1; word 36 msb = marker 48;
!				Maximum of five markers may be given
!		   37		(lb) Start pulse event number
!				(hb) must be zero
!		   38		(lb) Clear pulse event number
!				(hb) must be zero
!		   39		(lb) Arcnet node number
!				(hb) must be zero
!		-------------------- Begin Read-Only ---------------
!		   40		Module ID -- F(6)A(0)
!		   41		Firmware version number -- F(6)A(1)
!		   42		Arcnet reconfiguration counter
!		   43		Module serial number -- F(6)A(5)
!		   44		Arcnet status -- F(6)A(7)
!
!		NOTE:	Non-zero offsets are supported for all
!			array properties of this device, so it
!			is possible to read or set a subset of
!			words in the middle of the array (with
!			some obvious exceptions).
!
!	SETTING		An array device containing 78 bytes,
!			or 39 16-bit words, as shown above for
!			the READING property.  Reading-the-Setting
!			is also supported for these 39 words.
!
!	BASIC STATUS	Four-byte status as returned by F(1)A(0);
!			Only the low-order 24 bits contain status
!			as described in Kiper's C1032 document
!
!	BASIC CONTROL	A two-byte control word is used to execute
!			the following control functions:
!
!			0	Hardware reset -- F(9)A(0)
!			1	Reboot -- F(16)A(0) and DX07 command
!			2	Clear F(16) data FIFO -- F(9)A(1)
!			3	Clear F(0) data FIFO  -- F(9)A(2)
!
!			Note that a Reboot command is automatically
!			issued just prior to any setting which sets
!			ALL of the first 36 words of the above array.
!
! The Sub-Systems Device Number for every property has the same
! format, as shown below:
!
! SSDNHX prop (ttnn/00AF/ccnn/2900)
!              \/\/   \/ \/\/ \/\/
!               | |    |  | |  | Channel must be zero
!               | |    |  | |  class (type) assigned to C1032
!               | |    |  | slot number
!               | |    |  crate number
!               | |    oid assigned to C1032
!               | Acnet node number
!               Acnet trunk number
!
! Database Entry Template:
!
 ADD X:XXXXXX ( '                        ' , node  ,          , 7FFFFFE )
!    \/           \/                         \/      \/          \/
!    device name   24 character description   node     sibling    con. mask 
!
 SSDNHX BCNTRL (ttnn/00AF/ccnn/2900)
 PRO BCNTRL ( 2 ,     2 ,    ftd , xx, xx)
!             \/      \/     \/    \/  \/
!              |       |      |     2-byte setting record (optional)
!              |       |      FTD
!              |       Max data size 
!              default data size 
!
 PDB BCNTRL ( 0F , 00000000 , 00000001 , 00000002 , 00000003 , 00000000)
!             \/         \/         \/         \/         \/         \/
!              |          |          |          |          |       neg command
!              |          |          |          |          pos command
!              |          |          |          |          Clear F0 FIFO
!              |          |          |          off command
!              |          |          |          Clear F16 FIFO
!              |          |          on command
!              |          |          reboot module
!              |          reset command
!              attribute definition
!
 SSDNHX BASTAT (ttnn/00AF/ccnn/2900)
 PRO BASTAT ( 4 ,     4 ,    ftd )
!             \/      \/     \/
!              |       |      FTD
!              |       Max data size
!              default data size
!
 SSDNHX READNG (ttnn/00AF/ccnn/2900)
 PRO BASTAT ( 2 ,     88 ,    ftd )
!             \/      \/     \/
!              |       |      FTD
!              |       Max data size
!              default data size
!
 SSDNHX SETTNG (ttnn/00AF/ccnn/2900)
 PRO BASTAT ( 2 ,     78 ,    ftd )
!             \/      \/     \/
!              |       |      FTD
!              |       Max data size
!              default data size
!