SINTRAN III/CAMAC communication

The CAMAC system is a general purpose modular electronic instrumentation, standard for data handling, intended for applications requiring numerous and fast transfers of information (data, control) between various instruments and the computer. A CAMAC system contains one or more crates (CAMAC chassis) and each crate is separated into 24 stations where various kinds of CAMAC modules may be placed. For further documentation, refer to the CAMAC-CC/Nord-10 Manual (ND.12.007).

SINTRAN III is able to handle 16 crates. Each crate may handle 16 graded LAM interrupts (1 - 16), plus one RT interrupt on level 13 which is identified and assigned as LAM number 0.

By means of the monitor call (CONCT), different RT programs may be connected to different LAM interrupts on levels 10, 11, 12 and 13.

Monitor Calls
The following seven monitor calls are implemented in SINTRAN III in connection with CAMAC (MON 146 - 154). MON 146                  INIT CALL INIT Initialize a crate for the appropriate level, ie. clears data away and masks and writes COST (enables RT, ERROR and L for actual level). Return: = 0, OK                                  = 24, NOT OK

MON 147                  CAMAC CALL CAMAC (, , , , &lt;sub address>, ) Operates the CAMAC (executes NAF). If is clear, the contents of COST are returned in. If is read, data is returned in. For clear and read functions, must be >= 0 on entry. If function is write, data must be in and must be > 0 before the call. Return: = 0, OK                                  = 24, NOT OK                           If bit 15 in is set equal to one, is treaded as integer instead of floating.

MON 150                  GL                           CALL GL Reads graded LAM status. The status is returned in. If = 1 on the entry, the last IDENT code is returned as an integer in. Return: = 0, OK                                  = 24, NOT OK

MON 151                  LMASK CALL LMASK Reads and writes MASK. If >= 0, the mask is read and returned in. If < 0, the contents of are written to the mask. Return: = 0, OK                                  = 24, NOT OK

MON 152                  CONTR CALL CONTR Reads and writes COST (control / status register). If >= 0, the COST is read and returned in. If < 0, the contents of are written to COST. Return: = 0, OK                                  = 24, NOT OK

MON 153                  IOXN CALL IOXN Issues direct IOX commands. If >= 0, an input transfer is executed and the information is returned in. If < 0, an output transfer is executed, and the output information must be in before the call. Return: = 0, OK                                  = 24, NOT OK

MON 154                  ASSIG CALL ASSIG (, , ) Assigns a graded LAM in the CAMAC ident table to a logical number in the logical number table. Note that LAM 0 ( = 0) is used for high priority interrupts on level 13.

The calls CAMAC, GL, LMASK and CONTR handle their parameter as an integer if bit 15 in the parameter is set, otherwise, is treated as a real number.

Note: for use with MAC, standard FORTRAN parameter communication is applied.

CAMAC Library
The following routines are available in the CAMAC BRF Library: CALL INIT (, ) Initializes a crate for interrupts from an appropriate level, i.e, clears DATAWAY and masks and enables RT, ERROR and L for the actual level.  = actual level (must be 10, 11 or 12)  = crate number

CALL CAMAC (, , , , , ) Executes a single NAF.  = data to be written from or read into  = the interface status is returned here  = crate number  = station number <IA> = subaddress <IF> = function

CALL GL   (<IVAL>, <IC>) Reads the GL register or the last ident from the CAMAC <IVAL> = return information is placed here <IC> = if -1 read last ident; if <> -1 red GL register and <IC> = crate number

CALL LMASK (<IVAL>, <IDIR>, <IC>) Reads or writes the mask register <IVAL> = the value to be read from or written into the mask register <IDIR> = 0 means read from the mask register; < 0 means write to the mask register <IC> = crate number

CALL CONTR (<IVAL>, <IDIR>, <IC>) Does the same thing as the LMASK call with the COST register <IC> = crate number

CALL IOXN (<ID>, <IC>) Executes a single IOX instruction <ID> = data <IC> = IOC code (2000 octal < IC < 4000 octal)

CALL ASSIG (<ILN>, <IGL>, <IC>) Assigns a graded LAM in the CAMAC ident table to a logical number in the logical number table. Note that LAM = 0 is used for high priority interrupts on level 13 <ILN> = logical unit number <IGL> = graded LAM number <IC> = crate number