beautypg.com

External devices, Configuration parameters – Measurement Computing Personal488 rev.3.0 User Manual

Page 56

background image

5-2 Using IEEE 488

04-09-01

Personal488 for Windows 95/98/Me/NT/2000

External Devices

Within your IEEE 488.2 application program, a handle accesses devices on the bus. Accessing named
devices
creates these handles. For example, the following function call:
handle = OpenName(“Wave”)
returns a handle for a device named Wave.

Each device handle is a means of maintaining a record of the following three configurable parameters:

IEEE 488 address

IEEE 488 bus terminators (EOS characters)

associated time-out period

To easily create named devices, you can use the IEEE 488 configuration utility. An alternative is to use
API function calls to configure devices within an application itself. Using the API function calls to make
and configure external devices eliminates the need to run the IEEE 488 configuration utility every time the
application program is installed onto a different PC.

The IEEE 488 program is located in the
Windows Control Panel. IEEE 488
control buttons consist of the following:

Properties: launches the properties
panel for the selected device.

Add Device: Adds a new generic
device.

Remove: Removes any external devices.
IEEE interfaces cannot be removed.

Rename: Allows renaming of external
devices. Typically, external devices are
named after their manufacture, model, or
function.

Configuration Parameters

Name: External device names are used to convey the configuration information about each device. The
name is used to obtain a handle to that device which will be used by all the API function calls. External
device names can consist of 1 to 32 characters, and the first character must be a letter. The remaining
characters may be letters, numbers, or underscores ( _ ). External device names are NOT case sensitive.
IEEE Bus Address: This is the setting for the IEEE 488 bus address of the board. The IEEE 488 address
consists of a primary address from 00 to 30, and an optional secondary address from 00 to 31.

When a device has multiple secondary addresses, it may be useful to have several different
external device names defined for such a device. In this case, an array of handles could be
maintained for easy access to different IEEE 488 addresses throughout the application.

Timeout (ms): The time out period is the amount of time data transfers wait before reporting a time out
error. If the time out period elapses while waiting for data to be transferred or while transferring data, an
error is generated. The default value for the time out period is 10 seconds (10000 milliseconds).

Bus Terminators: The IEEE 488 bus terminators specify the characters and/or End-or-Identify (EOI)
signal that is to be appended to data that is sent to the external device, or mark the end of data that is
received from the external device.

Incorrectly configured bus terminators often cause many subtle problems. Many newer
IEEE 488.2 instruments have standardized on the Line Feed character, however
older instruments were free to use any character or character combination. When in
doubt, refer to the instrument’s programming manual or contact the manufacturer.

This manual is related to the following products: