SINTRAN III/CAMAC communication: Difference between revisions

From NDWiki
Jump to navigation Jump to search
m (→‎Monitor Calls: formatting for MON 146)
m (added Glossary category)
 
(9 intermediate revisions by the same user not shown)
Line 14: Line 14:


  MON 147                  CAMAC
  MON 147                  CAMAC
T = data if write        Operates the CAMAC (executes NAF)
                          CALL CAMAC (<value>, <flag>, <crate no>, <station>, &lt;sub address>, <function>)
A = NAF
                          Operates the CAMAC (executes NAF). If <function> is clear, the contents of COST are returned in <value>.
  (bit 0-4 = function)
                          If <function> is read, data is returned in <value>.
  (bit 5-8 = subaddress)
                          For clear and read functions, <flag> must be >= 0 on entry.
  (bit 9-13 = station)
                          If function is write, data must be in <value> and <flag> must be > 0 before the call.
D = crate no. in bit positions 6-9
                          Return: <flag> = 0, OK
Return:
                                  <flag> = 24, NOT OK
T = data if read
                          If bit 15 in <crate no> is set equal to one, <value> is treaded as integer instead of floating.
X = status


  MON 150                  GL
  MON 150                  GL
A = -1 read last ident    Reads the GL register or the last CAMAC ident number
                          CALL GL (<value>, <flag>, <crate no>)
A <> -1 read GL register
                          Reads graded LAM status. The status is returned in <value>.
  D = crate no. in bit position 6-9
                          If <crate no> = 1 on the entry, the last IDENT code is returned as an integer in <value>.
Return:
                          Return: <flag> = 0, OK
A = last ident if A = -1 on entry
                                  <flag> = 24, NOT OK
  A = GL reg. if A <> -1 on entry
 
  MON 151                  LMASK
                          CALL LMASK (<value>, <flag>, <crate no>)
                          Reads and writes MASK.
                          If <flag> >= 0, the mask is read and returned in <value>.
                          If <flag> < 0, the contents of <value> are written to the mask.
                          Return: <flag> = 0, OK
                                  <flag> = 24, NOT OK
 
  MON 152                  CONTR
                          CALL CONTR(<value>, <flag>, <crate no>)
                          Reads and writes COST (control / status register).
                          If <flag> >= 0, the COST is read and returned in <value>.
                          If <flag> < 0, the contents of <value> are written to COST.
                          Return: <flag> = 0, OK
                                  <flag> = 24, NOT OK


  MON 153                  IOXN
  MON 153                  IOXN
A = data if write        Executes a signle IOX instruction
                          CALL IOXN (<value>, <flag>, <device no>)
D = IOX code (2000 octal < D < 4000 octal)
                          Issues direct IOX commands.
Return:
                          If <flag> >= 0, an input transfer is executed and the information is returned in <value>.
A = data if read
                          If <flag> < 0, an output transfer is executed, and the output information must be in <value> before the call.
                          Return: <flag> = 0, OK
                                  <flag> = 24, NOT OK


  MON 154                  ASSIG
  MON 154                  ASSIG
T = graded LAM           Assigns a graded LAM in the CAMAC ident table to a logical number in the logical number table
                          CALL ASSIG (<logical no>, <grated LAM>, <crate no>)
A = logical unit no.
                          Assigns a graded LAM in the CAMAC ident table to a logical number in the logical number table.
  (A = 0 is used for high
                          Note that LAM 0 (<grated LAM> = 0) is used for high priority interrupts on level 13.
    priority on level 13)
 
D = crate no.
The calls CAMAC, GL, LMASK and CONTR handle their <value> parameter as an integer if bit 15 in the <crate no> parameter is set, otherwise, <value> is treated as a real number.
Return:
 
A = -1 means wrong parameter
Note: for use with [[MAC]], standard [[FORTRAN]] parameter communication is applied.


== CAMAC Library ==
== CAMAC Library ==
Line 92: Line 108:
== References ==
== References ==
{{ND-doc|060.050.06}}, section 9.5
{{ND-doc|060.050.06}}, section 9.5
[[Category:Glossary]]

Latest revision as of 21:50, 23 July 2014

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
                          CALL CAMAC (<value>, <flag>, <crate no>, <station>, <sub address>, <function>)
                          Operates the CAMAC (executes NAF). If <function> is clear, the contents of COST are returned in <value>.
                          If <function> is read, data is returned in <value>.
                          For clear and read functions, <flag> must be >= 0 on entry.
                          If function is write, data must be in <value> and <flag> must be > 0 before the call.
                          Return: <flag> = 0, OK
                                  <flag> = 24, NOT OK
                          If bit 15 in <crate no> is set equal to one, <value> is treaded as integer instead of floating.
MON 150                   GL
                          CALL GL (<value>, <flag>, <crate no>)
                          Reads graded LAM status. The status is returned in <value>.
                          If <crate no> = 1 on the entry, the last IDENT code is returned as an integer in <value>.
                          Return: <flag> = 0, OK
                                  <flag> = 24, NOT OK
MON 151                   LMASK
                          CALL LMASK (<value>, <flag>, <crate no>)
                          Reads and writes MASK.
                          If <flag> >= 0, the mask is read and returned in <value>.
                          If <flag> < 0, the contents of <value> are written to the mask.
                          Return: <flag> = 0, OK
                                  <flag> = 24, NOT OK
MON 152                   CONTR
                          CALL CONTR(<value>, <flag>, <crate no>)
                          Reads and writes COST (control / status register).
                          If <flag> >= 0, the COST is read and returned in <value>.
                          If <flag> < 0, the contents of <value> are written to COST.
                          Return: <flag> = 0, OK
                                  <flag> = 24, NOT OK
MON 153                   IOXN
                          CALL IOXN (<value>, <flag>, <device no>)
                          Issues direct IOX commands.
                          If <flag> >= 0, an input transfer is executed and the information is returned in <value>.
                          If <flag> < 0, an output transfer is executed, and the output information must be in <value> before the call.
                          Return: <flag> = 0, OK
                                  <flag> = 24, NOT OK
MON 154                   ASSIG
                          CALL ASSIG (<logical no>, <grated LAM>, <crate no>)
                          Assigns a graded LAM in the CAMAC ident table to a logical number in the logical number table.
                          Note that LAM 0 (<grated LAM> = 0) is used for high priority interrupts on level 13.

The calls CAMAC, GL, LMASK and CONTR handle their <value> parameter as an integer if bit 15 in the <crate no> parameter is set, otherwise, <value> 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  (<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