7. Interlock Tables

Interlocks are used to provide conditional actions on data points. They are usually used to provide software equivalents of hardware interlocks. An example might be to prevent a Faraday cup from moving out of the beamline unless the next beamline valve is open. The beamline valve cannot be opened unless there is good pressure on either side of it. Icon colors are also determined by entries in this table.

Interlocks are defined by first choosing a data point to be acted on. The point chosen is entered into a record in the ChkList table.

An interlock chain is created by defining records in the ChkPoint table. The ChkPoint table defines what data points will affect the action. The way in which the data point is evaluated is determined by the CPtype field.

The ChkAct table looks at the word formed by the entries in ChkPoint to determine what will happen to the data point in ChkList. If the word matches the checked criteria, a new value is returned for the ChkList data point.

The ChkAlarm table is processed in a similar way that ChkAct is processed, but returns an error message to the user, instead of a value to the data point.

7.1. ChkList Table

This table defines the data point to be acted on. When a request is made to modify a data point listed in this table, the chain is started. A timer is started lasting the timeout value (in seconds) of TMOvalue. If the interlock does not match an entry in ChkAct by the end of the timer, the default value (Value) is entered into the data point.

RecId

A serial number used to identify the record.

CLdskey_Label, CLdskey_DRefNme

Data point to be acted on.

Value

Value to write into the data point if there is no match in ChkAct table.

TMOvalue

Amount of time to wait before writing the default value.

Comments

Comments field.

7.2. ChkPoint Table

This table defines the data points from which to collect data for interlock evaluation. The records in this table are used to build an evaluation word. An evaluation word is the composite of each record's result specified for the interlock chain. Each record defines an offset (bit) position in the evaluation word to store the result.

MrecId

RecId of the Chklist entry that this record is associated with.

Validated by ChkList.RecId.

RecId

A serial number used to identify the record.

CPdesc_Label, CPdesc_DRefNme

Data point to obtain information from.

CPtype

Type of evaluation to be performed.

Validated by CPTkeys.CPTnme.

Offset

Offset in the evaluation word to write the evaluation into.

LimLo

Set lower limit for evaluation in certain values of CPtype.

LimHi

Set upper limit for evaluation in certain values of CPtype.

Comments

Comments field.

7.3. ChkAct Table

The value of the evaluation word is filtered and compared using Mask and Mask2 in this table. The Mask field defines which bits of the evaluation word to look at. The Mask2 is compared to the bits of the evaluation word defined by Mask. If there is a match, Value is written to the data point described in ChkList.DSkey.

MrecId

RecId of the ChkList entry that this record is associated with.

Validated by ChkList.RecId.

RecId

A serial number used to identify the record.

Mask

Bits in the evaluation word to be checked. A bitwise 'AND' operation is performed on this field and the evalution word to generate a check word.

Mask2

Bit pattern to be matched. This is compared to the previously generated check word.

Value

Value written to the data point described in ChkList.DSkey if Mask2 is identical to the check word.

Comments

Comments field.

7.4. ChkAlarm Table

This table contains information needed to select an alarm message if the interlock evaluation fails. The same method of processing Mask and Mask2 in ChkAct is used to process ChkAlarm. Instead of a value being written into the data point, a message is displayed to the user.

MrecId

RecId of the ChkList entry that this record is associated with.

Validated by ChkList.RecId.

RecId

A serial number used to identify the record.

Mask

Bits in the evaluation word to be checked. A bitwise 'AND' operation is performed on this field and the evalution word to generate a check word.

Mask2

Bit pattern to be matched. This is compared to the previously generated check word.

Message

Error message.

7.5. CPtype Field Usage

See cp_type(7) in the AccelNET manual pages for a list of valid CPtypes.