Front End Support for 377/379 Timing Cards

December 8, 1992
Michael Glass

There are two devices per 377 channel: one for the delay time, Drivers code 80 decimal, and one for the trigger events, code 81. Right now, this document does NOT include the trigger events device. It looks just like the corresponding device for 177 cards.

379 channels use code 89 for the delay time; they share code 81 for the trigger events.

The delay times for 377 cards are 4 byte integers, the units are microseconds.

377 SSDN (All Properties):

00 00
0 OID = 50 (hex)
crate slot
50 (hex) mode/channel

379 SSDN (All Properties):

00 00
0 OID = 59 (hex)
crate slot
59 (hex) mode/channel

Where mode can be 1 for sync mode and 0 for normal mode, and channel can be (0 - 7). The sync mode bit is used only in the Setting property. Mode is in ms nibble, and channel is in ls nibble. Channel may also be referred to as sub-address.

EMCs:

02 xx
slot crate
00 sub-address
00 00

05 xx
slot crate
00 sub-address
00 00

The 02xx EMC is necessary for digital alarms and for page D20. It should always be included in your database entry. The 05xx EMC is needed for analog alarms, and is optional.

Possible properties are Reading, Setting, Basic Status, Basic Control, Analog Alarm, and Digital Alarm.

Time Delay Device (codes 80 and 89) Setting Property

For 377 cards the setting is a 2 word time. The primary units are microseconds. Valid values range from 2 all the way to 32 bits full scale. If we get a setting of either 0 or 1 then the card clamps it at 2.

For 379 cards the units are RF buckets. The hardware actually recognizes 70 RF buckets per LSB, but the front end scales by 70 so that the "primary units" at the application level is 1 bucket per LSB.

The 377/379 actually maintains two delay times for each channel: 'running' value and the 'last written' value. Whenever we write a new setting it is stored in the 'last written' value. In the fullness of time the 'running' value gets updated.

There are two ways of writing this setting to the module. We normally use F(16) and F(17) writes. In this mode the 377 will update the 'running' value as soon as it can. In practice this is usually immediately, *except* if the channel is in the middle of a timing cycle (after the trigger event, but before the delay has expired). In such case, the 377/379 will wait until the end of the timing cycle before it updates the 'running' value.

The other way of writing the setting is called sync mode. The front end invokes it by using F(20) and F(21) writes. In this mode, the 377/379 hangs on to the 'last written' value for a while, until the end of the next timing cycle. It never updates the 'running' value immediately.

The front end uses normal updates by default. If you want it to use sync mode by default, then byte 5 of the Setting SSDN should be set to 1. Since a sync mode setting might get stuck waiting forever to take effect, waiting for the next trigger, there is also a basic control override for sync mode (see below).

Sync mode is not very popular.

Time Delay Device (codes 80 and 89) Reading and Reading the Setting

Reading-the-Setting will return the 'last written' value with F(2) and F(3) commands. For 379 timers we have to multiply this number by 70 to scale back to unit RF buckets.

Reading will return the 'running' value retrieved with F(0) and F(1) commands. For 379 timers we again scale by 70.

During the time that the 'last written' value is hanging around, before the 'running' value is actually updated, these two numbers will be different.

Time Delay Device (codes 80 and 89) Basic Status

Basic status returns a single word read with an F(7) command. This word is formatted thusly:

        0000/0000/0000/SPTE

		E -- ENABLED (1) OR DISABLED (0)
		T -- CLOCK PRESENT (1)
		P -- SETTING PENDING (1)
		S -- SYNC MODE ACTIVE (1)

These bits are conventionally mapped by PDB BASTAT as follows:

	E = On/Off		(mask = 1, not inverted)
	T = Ready		(mask = 2, not inverted)
	P = Remote/Local	(mask = 4, inverted)
	S = Sync mode active	(mask = 8, not-inverted)

Time Delay Device (codes 80 and 89) Basic Control

Basic control codes are at least a single word, containg a simple code as follows:

	Code 1	Off	Disable channel
	     2  On	Enable channel
	     3  Reset	Reset the card with F(9)A(0)
	     4  Unused
	     5  Pol-  	Override Sync Mode

Override Sync Mode is used in case the data base entry specifies sync mode, and you are tired of waiting for the 'last written' value to be transferred to the 'running' value. In this case, the parameter page shows a basic status of POL + (instead of the normal POL -). Doing a POL - basic control will cause the front end to re-write your setting in normal (non-sync) mode, in the hopes that the card will update it immediately.

Time Delay Device (codes 80 and 89) Alarm Properties

Analog and Digital alarms work in the manner you would expect. Analog alarm limits are in min/max form. They checked are checked by reading back the 'running' value of the time delay.

Sample Dabbel Entry for a 377 Channel Time Delay Device

Alarm properties are not shown.

ADD T:DEVICE (....
EMX (0218/01A1/0005/0000, 0518/01A1/0005/0000) ! Crate A1, slot 1, subaddr 5
SSDNHX SETTNG (50FF/01A1/0005/0000)	! Note sync mode not selected
PRO SETTNG (4, 4, 60, 0)
SSDNHX READNG (50FF/01A1/0005/0000)
PRO READNG (4, 4, 60)
SSDNHX BASTAT (50FF/01A1/0005/0000)
PRO BASTAT (2, 2, 60)
SSDNHX BCNTRL (50FF/01A1/0005/0000)
PRO BCNTRL (4, 4, 60)			! Two or four bytes both OK

PDB SETTNG ('USEC', 'SECS', 46, 4, 4, 0, 1, 0, 0.0, 1.0E+06) ! Note long-form
PDB READNG ('USEC', 'SECS', 46, 4, 4, 0, 1, 0, 0.0, 1.0E+06) !   display

PDB BASTAT (0F, 04, 0001, 0002, 0004, 0008, 2)
PDB BCNTRL (17, 3, 2, 1, 4, 5)

PRO EXTEXT (1,   0, 4, 'DISABLD' , 2, 'ENABLED', 'Channel Status..........',
            1,   1, 4, ' NO CLK' , 2, ' CLK OK', 'Clock Present...........',
            1,   2, 2, '   NONE' , 4, '    YES', 'Setting Pending.........',
            1,   3, 2, '     NO' , 4, '    YES', 'Sync Mode Wait..........')

Security, Privacy, Legal