Specifications

3 GPIB I/O Support
3-6
Using GPIB Drivers
xPC Target uses a combination of Simulink blocks and MATLAB structures to
support GPIB communication from your target application and target PC.
This section includes the following topics:
Adding GPIB Driver Blocks — Add the setup and send/receive blocks you
need to add to your Simulink model for GPIB communication.
Creating GPIB Message Structures — Create the initialize, send/receive,
and termination message structures you need in the MATLAB workspace.
For example in this section, assume you have a multimeter attached to a GPIB
bus with an address of 16. This multimeter needs the initialization command
:conf:volt:dc
to set the device to read DC voltages, and needs the command
:read?
during each sample interval
to read one voltage value
Adding GPIB Driver Blocks
The GPIB driver blocks initialize and communicate directly with the GPIB
controller. The GPIB controller then communicates with the GPIB devices on
the instrument bus.
After you create a Simulink model, you can add GPIB driver blocks and define
the initialization, send/receive, and termination message structures.
1 In the MATLAB command window, type
xpclib
The xPC Target driver block library opens.
2 Double-click the GPIB group block.
A manufactures window opens. Currently xPC target only supports GPIB
communication with a National Instruments controller.