SINTRAN III/CAMAC communication: Difference between revisions

From NDWiki
Jump to navigation Jump to search
(created SINTRAN III/CAMAC communication page)
 
(→‎Monitor Calls: added MON 146)
Line 5: Line 5:
By means of the monitor call ([[CONCT]]), different RT programs may be connected to different LAM interrupts on levels 10, 11, 12 and 13.
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 ==
== Monitor Calls ==
The following four monitor calls are implemented in [[SINTRAN III]] in connection with [[CAMAC]].
The following seven monitor calls are implemented in [[SINTRAN III]] in connection with [[CAMAC]] (MON 146 - 154).
MON 146                  INIT
                          CALL INIT (<flag>, <crate no>, <level>)
                          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: <flag> = 0, OK
                                  <flag> = 24, NOT OK
 
  MON 147                  CAMAC
  MON 147                  CAMAC
  T = data if write        Operates the CAMAC (executes NAF)
  T = data if write        Operates the CAMAC (executes NAF)

Revision as of 12:10, 17 July 2012

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 (<flag>, <crate no>, <level>)
                          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: <flag> = 0, OK
                                  <flag> = 24, NOT OK
MON 147                   CAMAC
T = data if write         Operates the CAMAC (executes NAF)
A = NAF
  (bit 0-4 = function)
  (bit 5-8 = subaddress)
  (bit 9-13 = station)
D = crate no. in bit positions 6-9
Return:
T = data if read
X = status
MON 150                   GL
A = -1 read last ident    Reads the GL register or the last CAMAC ident number
A <> -1 read GL register
D = crate no. in bit position 6-9
Return:
A = last ident if A = -1 on entry
A = GL reg. if A <> -1 on entry
MON 153                   IOXN
A = data if write         Executes a signle IOX instruction
D = IOX code (2000 octal < D < 4000 octal)
Return:
A = data if read
MON 154                   ASSIG
T = graded LAM            Assigns a graded LAM in the CAMAC ident table to a logical number in the logical number table
A = logical unit no.
  (A = 0 is used for high
   priority on level 13)
D = crate no.
Return:
A = -1 means wrong parameter

CAMAC Library

The following routines are available in the CAMAC BRF Library:

CALL INIT  (<ILEV>, <IC>)
           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.
           <ILEV> = actual level (must be 10, 11 or 12)
           <IC> = crate number
CALL CAMAC (<IDATA>, <ISTAT>, <IC>, <IN>, <IA>, <IF>)
           Executes a single NAF.
           <IDATA> = data to be written from or read into
           <ISTAT> = the interface status is returned here
           <IC> = crate number
           <IN> = 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

References

Norsk Data Document ND–060.050.06 SINTRAN III USERS GUIDE , section 9.5