IEEE-488 Device Image Grabber
This applet obtains and displays screen images from IEEE-488 (GPIB)
devices. Scroll to the bottom of this page to see a description of the
controls and error messages.
Controls
The control elements, from left to right, are:
- Reboot Button
- The Ethernet/GPIB controller occaisionally gets confused and needs to
be rebooted. Pressing this button will pop up a panel requesting
confirmation of the reboot operation. Confirming the operation will
result in the controller currently selected by the Controller Selection
Menu item being rebooted.
Warning: Rebooting a controller severs the connection
to all devices currently in use on that controller. This includes
devices in use by others, so take care that you don't interfere with
others using the controller.
- Controller Selection Menu
- With this menu you select the Ethernet/GPIB controller to which your
device is connected.
- Device Selection Menu
- With this menu you select the number (0 to 30) of the device from
which you want to grab an image.
- Shutter Button
- Pressing this button takes a snapshot of the screen of the
currently-selected device. If the screen image is successfuly captured
it will be displayed below the row of control elements and the print
button will be enabled. Failure to capture an image will produce an
error message.
Note: It can take 20 seconds or more to obtain a
screen image from some devices.
- Print Button
- Pressing this button will print the currently-displayed image.
- Save Button
- Pressing this button will bring up a file-save panel. The image will
be saved in Portable Network Graphics (.png) format.
Error Messsages
There are several places where communications can break down. Some of the
more common error messages, and the error conditions they describe are:
- IEEE-488 ONC/RPC Exception: ONC/RPC portmap
failure
- This usually indicates the the applet is unable to connect to the
Ethernet/GPIB controller. Verify that the controller is connected to
the network and that its Receive indicator flashes as packets
arrive from the network.
- IEEE-488 I/O Exception: VXI-11: I/O timeout
- The applet was able to communicate with the Ethernet/GPIB controller,
but can not communicate with the specified device. Check that the cable
between the device and the controller is properly connected and that the
device's IEEE-488 address (0-30) is as expected.
- IEEE-488 I/O Exception: VXI-11: I/O error
- This message usually indicates that the IEEE-488 address of the
selected device (0-30) is actually the address of the IEEE-488
controller.
- access denied (java.net.SocketPermission xxxx.xxx.xxx
connect,accept,resolve)
- Applets must be given permission to connect to Internet hosts other
than the host from which they were loaded. This error message indicates
that the applet has not been granted permission to connect to the
specified Ethernet/GPIB controller. Contact your system administrator
or add the permissions to your personal java security policy file.
- Print Permission Error
- This error message indicates that the applet has not been granted
permission to queue printer jobs. Contact your system administrator or
add the permissions to your personal java security policy file.
- PropertyPermission user.home read
- FilePermission xxxx read
- RuntimePermission modifyThread
- This error message indicates that the applet has not been granted
permission to perform the file I/O operations required to save image
files. Contact your system administrator or add the permissions to your
personal java security policy file.
Security Policy Configuration
You must grant special security privileges to the scope camera applet to
allow it to perform properly. These permissions can be granted from the
system-wide java security policy file or from your own personal security
policy file.
On Unix (Linux, Mac OS X) machines your personal security policy file is
~/.java.policy and
on Windows machines your security policy file is
C:\Windows\Profiles\username\.java.policy.
Unfortunately the Engineering laboratory computers now clear
this file each time you log out so the security configuration on these
machines has been extended to use H:\java\java.policy as well.
To grant all required privileges to the scope camera applet add an entry
like the following to your security policy file:
grant codeBase "http://www.engr.usask.ca/classes/EE/scopecam/-" {
permission java.net.SocketPermission "eegpib01.usask.ca", "connect,accept";
permission java.net.SocketPermission "eegpib02.usask.ca", "connect,accept";
permission java.net.SocketPermission "eegpib03.usask.ca", "connect,accept";
permission java.net.SocketPermission "eegpib04.usask.ca", "connect,accept";
permission java.lang.RuntimePermission "queuePrintJob";
permission java.util.PropertyPermission "user.home", "read";
permission java.lang.RuntimePermission "modifyThread";
permission java.io.FilePermission "<<ALL FILES>>", "read, write";
};
- You'll need to replace the
http://www.engr.usask.ca/classes/EE/scopecam/- with the URL
from which you're loading the applet.
- You need the the queuePrintJob entry only if you want to
be able to use the applet Print button.
- You need the the final three entries only if you want to
be able to use the applet Save button. If you want to
restrict the locations to which the applet can save files, change the
<<ALL FILES>> entry. For example, if you replace
<<ALL FILES>> with C:\TMP\- the
applet will be restricted to to saving files in the Windows temporary directory.
Configuration
The java applet uses the values of three parameters to form the domain name
of the GPIB/LAN adapters. The parameters and their values, if not
specified in the HTML which invokes the applet are:
| Applet Parameters |
| Name | Value |
| lanAdapterBasename | eegpib |
| lanAdapterCount | 2 |
| lanAdapterDomain | .usask.ca |
The parameter values are used to form the name of the GPIB/LAN adapter
as lanAdapterBasename##lanAdapterDomain where ## begins at 01 and continues upwards until the lanAdapterCount has been reached.