display.waitkey()
The display.waitkey() function captures the key code value for the next key press:
key = display.waitkey()
After sending the display.waitkey() function, the script pauses and waits for the operator to
press a front-panel key. For example, if the MENU key is pressed, the function returns the value 68,
which is the key code for that key. The key code values are the same as listed in display.getlastkey()
(on page 9-68).
The following programming example illustrates how to prompt the user to press the EXIT (LOCAL)
key to abort the script, or any other key to continue it:
display.clear()
display.setcursor(1, 1)
display.settext("Press EXIT to Abort")
display.setcursor(2, 1)
display.settext("or any key to continue")
key = display.waitkey()
display.clear()
display.setcursor(1, 1)
if key == 75 then
display.settext("Test Aborted")
exit()
else
display.settext("Test Continuing")
end
The above code captures the key that is pressed by the operator. The key code value for the EXIT
(LOCAL) key is 75. If the EXIT (LOCAL) key is pressed, the script aborts. If any other key is pressed,
the script continues.
Remote communications interfaces
You can choose from one of several communication interfaces to send commands to and receive
responses from the 2600B.
You can control the 2600B from only one communications interface at a time. The first interface on
which the instrument receives a message takes control of the instrument. If another interface sends a
message, that interface can take control of the instrument. You may need to enter a password to
change the interface, depending on the setting of interface access.
The 2600B automatically detects the type of communications interface (LAN, USB, GPIB, or RS-232)
when you connect to the respective port on the rear panel of the instrument. In most cases, you do
not need to configure anything on the instrument. In addition, you do not need to reboot if you change
the type of interface that is connected.