Download PGEN:CH - Artisan Technology Group

Transcript
Programming Examples
Example 3: Interacting With a User
Example 3 demonstrates using the HFS 9000 in an automated test system, where
the front panel is locked out. During automated operation, the testing process
may need to pause while you perform some manual setup. You then indicate that
the setup is complete by pressing the HFS 9000 SRQ button. This program
detects the SRQ button press and responds by unlocking the front panel and
continuing the program.
NOTE. If you interrupt this program before it completes, the HFS 9000 may be
left in local lockout mode, where front panel button presses are ignored. Execute
program lines 550 through 570 to restore normal operation.
3–144
H
Lines 100 – 140 print the title of the program.
H
Lines 150 – 320 are standard GURU card initializations.
H
Lines 330 – 370 initialize the HFS 9000.
H
Lines 380 – 390 enable event generation. The *SRE 32 command enables the
ESB bit but not the MAV bit.
H
Lines 400 – 440 lock out the front panel. (The hex 11 value in line 430 is
used for the Local Lock Out command.)
H
Lines 450 – 460 display a message on the HFS 9000 screen.
H
Lines 470 – 520 wait for the HFS 9000 SRQ button to be pressed. The SBR
register is polled until the RQS bit is set. RQS is set from the URQ bit in the
DESER register and the ESB bit in the SBR register.
H
Lines 530 – 540 erase the front panel message.
H
Line 550 sends a GTL (Go To Local) command to enable the front panel.
Local Lock Out is still active after this command is sent.
H
Lines 560 – 570 release REN, which clears Local Lock Out.
HFS 9000 User Manual