Advantech PCI-1671UP Startup Manual

Advantech PCI-1671UP Startup Manual

High-performance gpib pci interface card; high-performance gpib usb interface module
Hide thumbs Also See for PCI-1671UP:

Advertisement

Quick Links

PCI-1671UP
USB-4671
Introduction and Installation
Your interface board consists of hardware and soft-
ware that fully implement the IEEE 488 standard,
also known as GPIB. This document enables you to
install, configure, test, and verify your installation.
Other documentation, including the GPIB Program-
ming Reference Manual, is available in the root
directory on your software CD in Adobe Portable
Document Format (PDF). To view these PDF files,
you must have Adobe Acrobat Reader version 4.0 or
later installed on your system. If you do not have
this program, refer to the Adobe Systems Incorpo-
rated Web site, http://www.adobe.com/products/
acrobat/readstep2.html, to download the Acrobat
Reader program. There is no charge for this down-
load.
License Agreement
Program and documentation copyrighted 2005 by
Advantech Co., Ltd. The software interpreter contained in
EPROM/ROM is copyrighted and all rights are reserved by
Advantech Co., Ltd. Copying or duplicating this product is
a violation of law.
Application software libraries provided on disk are copy-
righted by Advantech Co., Ltd. The purchaser is granted the
right to include portions of this software in products which
use one of the IEEE 488 interface boards (including those
sold through resellers). The software may not be distributed
other than for the application just mentioned.
No part of this document may be reproduced or transmitted
in any form or by any means, electronic, optical, or mechan-
ical, including photocopying and recording, or by any infor-
mation storage and retrieval system, without permission in
writing from Advantech Co., Ltd.
Notes
For more information on this and other Advantech
products, please visit our websites at:
http://www.advantech.com
http://www.advantech.com/eAutomation
For technical support and service:
http://www.advantech.com/support/
Part No: 2003167100
1
Startup Manual
High-Performance GPIB PCI Interface Card
High-Performance GPIB USB Interface Module
Step 1. Install the Software
Follow these steps to install the software:
The installer should start automatically when you
insert the CD supplied with the interface card into
the drive. If it does not, explore the CD drive and
double-click setup.exe in the:
CD\Drivers\GPIB\ PCI-1671 directory to start the
installer. You can also start the installer by selecting
Start>Run and choosing setup.exe from the CD
directory.
Please Note that NI-488.2 driver must be
removed before running "setup.exe" to avoid
confliction.
Proceed through the installer screens by clicking the
Next button until you see the Select Features win-
dow, where you can choose the features to install.
Click on each feature for a brief description. All fea-
tures are installed by default, but you can choose not
to install support for the programming feaures you
will not use. After you select your features and com-
plete the installation, all necessary files will be in
the C:\Program Files\GPIB-488 directory.
A dialog box will prompt you to reboot the system
when you finish the installation. Click the Yes button
to reboot.
Step 2. Install the Hardware
USB Devices
Follow these steps to install the hardware:
Remove the unit from its protective packaging. Save
the anti-static bubble wrap.
Before connecting the USB card to your GPIB
instruments, ensure that the instruments and PC are
at the same ground potential. Failure to do so could
damage the instruments, PC, or USB card.
Plug the USB card into an available USB port.
USB devices are plug and play. These devices con-
figure automatically. There is no need to power
cycle your PC.

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the PCI-1671UP and is the answer not in the manual?

Questions and answers

Summary of Contents for Advantech PCI-1671UP

  • Page 1 Application software libraries provided on disk are copy- righted by Advantech Co., Ltd. The purchaser is granted the right to include portions of this software in products which use one of the IEEE 488 interface boards (including those Step 2.
  • Page 2 PCI Devices Writing Custom Programs Follow these steps to install the hardware: To use your interface for custom applications, you need to write specialized software. We have made this easy Handle the board only by the edges. Static electric dis- by providing a simple set of high-level routines you can charge can damage the integrated circuits on the board.
  • Page 3 GPIB-488 GPIB-488 Programming Reference Manual Programming Reference Manual May 2009 371930E-01...
  • Page 4 © 1996–2009 by Quality Instrumentation Solutions, Inc. and its licensors. All rights reserved.
  • Page 5 Conventions The following conventions are used in this manual: Square brackets indicate the key to be pressed. » The » symbol leads you through nested menu items and dialog box options to a final action. The sequence File»Page Setup»Options directs you to pull down the File menu, select the Page Setup item, and select Options from the last dialog box.
  • Page 6 There is always one system controller in a GPIB system. The system controller is designated at system initialization either through the use of hardware switches or by some type of configuration software, and is not changed. The system controller can be the same controller as the one which is the current active controller or an entirely different one.
  • Page 7: Table Of Contents

    Contents Chapter 1 GPIB Software Overview Supported Languages.....................1-1 GPIB Library Utility Programs..................1-2 Support for VISA Calls ...................1-2 GPIB-32.DLL Function Support ..............1-2 GPIB488.DLL Function Support ..............1-2 Unsupported API .....................1-3 Asynchronous API...................1-3 GPIB32 API and GPIB488 API Differences...........1-3 Migrating from the GPIB32 API to the GPIB488 API ........1-3 Chapter 2 Programming with the GPIB Library General Concepts ......................2-1...
  • Page 8 Contents IBGTS..........................3-25 IBIST ..........................3-27 IBLINES........................3-28 IBLN..........................3-30 IBLOC ........................... 3-31 IBONL........................... 3-32 IBPAD ........................... 3-33 IBPCT..........................3-34 IBPPC ..........................3-35 IBRD..........................3-37 IBRDA........................... 3-39 IBRDF ........................... 3-40 IBRPP ..........................3-42 IBRSC..........................3-44 IBRSP ..........................3-45 IBRSV ........................... 3-46 IBSAD ...........................
  • Page 9 Contents ReceiveSetup .........................4-17 ResetSys.........................4-18 Send ..........................4-19 SendCmds ........................4-20 SendDataBytes.......................4-21 SendIFC .........................4-22 SendList .........................4-23 SendLLO........................4-25 SendSetup ........................4-26 SetRWLS ........................4-27 TestSRQ.........................4-28 TestSys...........................4-29 Trigger ...........................4-30 TriggerList ........................4-31 WaitSRQ ........................4-32 Appendix A Multiline Interface Messages Appendix B IBSTA Appendix C IBERR Index GPIB-488 Programming Reference Manual...
  • Page 10: Gpib Software Overview

    GPIB Software Overview The GPIB software includes the 488.1 library, the 488.2 library, and a set of utility programs. The 488.1 library consists of all of the functions and subroutines that begin with the letters “ ”. The 488.1 library routines refer to devices on the GPIB bus by their device names and handles rather than by their GPIB addresses.
  • Page 11: Gpib Library Utility Programs

    Chapter 1 GPIB Software Overview GPIB Library Utility Programs The following utility programs are installed with the GPIB library software. Utility program Description Software and hardware test program GPIBDIAGNOSTIC.EXE Interactive control program CBIC32.EXE Configuration utility program GPIBCONF.EXE Support for VISA Calls VISA (Virtual Instrument Software Architecture) drivers are command drivers that convert company and program-independent VISA calls into company-dependent calls.
  • Page 12: Unsupported Api

    Chapter 1 GPIB Software Overview Unsupported API The GPIB library does not support . Applications that iblck ibnotify utilize these functions will not run properly. Asynchronous API Asynchronous I/O is not explicitly supported and is treated as synchronous. This affects , and ibcmda ibrda...
  • Page 13: Programming With The Gpib Library

    Programming with the GPIB Library The routines are divided into two distinct libraries. All routines which begin with “ ” are part of the “488.1” or “Original GPIB library.” All other routines are part of the “488.2 library.” You only need to use one or the other library.
  • Page 14: Device Vs. Board I/O

    Chapter 2 Programming with the GPIB Library Device vs. Board I/O The most typical GPIB operations are sending commands to a device attached to the bus and reading back responses. To do this, program the GPIB board to execute these steps: Address the selected device as a Listener.
  • Page 15: Board L/O

    Chapter 2 Programming with the GPIB Library Board l/O In comparison, the Board I/O routines are low-level routines. If you use them, you must understand how the GPIB operates in detail. Generally, the only time you need to use Board I/O is if it is impossible to perform the same operation using device I/O, such as passing control from one controller to another.
  • Page 16: Ibsta/Ibsta()-The Status Word

    Chapter 2 Programming with the GPIB Library variables are briefly explained here. For additional information iberr about , refer to Appendix C, IBERR. iberr For additional information about , refer to the routines ibcnt ibcntl that return them. The following global state functions also are available with the interface: gpib488.dll Status Word...
  • Page 17 Chapter 2 Programming with the GPIB Library , and ThreadIbsta() ThreadIberr() ThreadIbcnt() are equivalent to , and ThreadIbcntl() ibsta iberr ibcnt ibcntl respectively, except they represent the current status on a per-thread level. The following thread local variables are available in the gpib488.dll interface: Status Word...
  • Page 18: Gpib 488.1 Library Reference

    GPIB 488.1 Library Reference This chapter describes each of the 488.1 GPIB library routines. A short description of the routine, its syntax, parameters, any values that are returned, any special usage notes, and an example are included for each routine. The routines are listed in alphabetical order. The following table lists all of the 488.1 GPIB library routines.
  • Page 19 Chapter 3 GPIB 488.1 Library Reference Table 3-1. 488.1 Library routines (Continued) Name Description Change Primary address ibpad Pass Control ibpct Parallel Poll Configure ibppc Read data to a string ibrd Read data asynchronously ibrda Read data to file ibrdf Conduct parallel poll ibrpp Request/release system control...
  • Page 20: Ibask

    Chapter 3 GPIB 488.1 Library Reference IBASK Returns software configuration information. Syntax gpib-32.dll ibask (int boarddev, int option, unsigned int *value) gpib488.dll ibask (int boarddev, int option, unsigned int *value) Parameters A board handle or device handle boarddev Specifies which configuration item to return; see Table 3-2. option Current value of specified item returned here value...
  • Page 21 Chapter 3 GPIB 488.1 Library Reference Table 3-2. ibask Options (Continued) Option Valid for Information returned 0 = do not automatically assert REN line when system IbaSRE controller non zero = automatically assert REN line when system controller 0 = ignore EOS char during reads IbaEOSrd non zero = terminate read when EOS char is received 0 = don’t assert EOI line when EOS char is sent...
  • Page 22 Chapter 3 GPIB 488.1 Library Reference Table 3-2. ibask Options (Continued) Option Valid for Information returned 0 = The untalk and unlisten (UNT, UNL) are not sent after IbaUnAddr each device level read/write non zero = The UNT, UNL commands are sent after each device lever read/write The individual status (ist) bit of the interface IbaIst...
  • Page 23: Ibcac

    Chapter 3 GPIB 488.1 Library Reference IBCAC Makes the specified board the Active Controller. Syntax gpib-32.dll ibcac (int board, int sync) gpib488.dll ibcac (int board, int sync) Parameters is an integer containing the board handle board specifies if the GPIB board is to take control synchronously or asynchronously. If sync sync is 0, the GPIB board takes control asynchronously.
  • Page 24: Ibclr

    Chapter 3 GPIB 488.1 Library Reference IBCLR Clears a specified device. Syntax gpib-32.dll ibclr (int device) gpib488.dll ibclr (int device) Parameters is an integer containing the device handle. device Returns will contain a 16-bit status word as described in Appendix B, IBSTA. Ibsta will contain an error code, if an error occurred.
  • Page 25: Ibcmd

    Chapter 3 GPIB 488.1 Library Reference IBCMD Sends GPIB commands. Syntax gpib-32.dll ibcmd (int board, char cmnd[], long bytecount) gpib488.dll ibcmd (int board, const char * cmnd, size_t bytecount) Parameters is an integer containing the board handle. board is the command string to be sent. This string is comprised of GPIB multiline commands. cmnd These commands are listed in Appendix A, Multiline Interface...
  • Page 26 Chapter 3 GPIB 488.1 Library Reference Example This example prepares the board to talk and addresses three devices (at addresses 8, 9, and 10) to listen. char *command; command = "\0x3f\0x5f\0x40\0x28\0x29\0x2a"; ibcmd (board, command, 6); GPIB-488 Programming Reference Manual...
  • Page 27: Ibcmda

    Chapter 3 GPIB 488.1 Library Reference IBCMDA Note Asynchronous I/O is not explicitly supported and will be treated as synchronous. Transfers GPIB commands asynchronously from a string. Syntax gpib-32.dll ibcmda (int board, char cmnd[], long bytecount) gpib488.dll ibcmda (int board, const char * cmnd, size_t bytecount) Parameters is an integer containing the board handle.
  • Page 28 Chapter 3 GPIB 488.1 Library Reference char *command; command = "\0x3f\0x5f\0x40\0x28\0x29\0x2a"; ibcmda (board, command, 6); while ( (Ibsta() & (CMPL+ERR)) == 0) ibwait (board, 0); GPIB-488 3-11 Programming Reference Manual...
  • Page 29: Ibconfig

    Chapter 3 GPIB 488.1 Library Reference IBCONFIG Changes configuration parameters. Syntax gpib-32.dll ibconfig (int boarddev, unsigned int option, unsigned int value) gpib488.dll ibconfig (int boarddev, unsigned int option, unsigned int value) Parameters is an integer containing either a board handle or device handle. boarddev is a number which represents the configuration option to be changed.
  • Page 30 Chapter 3 GPIB 488.1 Library Reference Table 3-3. ibconfig Options (Continued) Option Valid for Description Forced re-addressing. If = 0, forced IbcREADDR value re-addressing is disabled non zero = Forced re-addressing is enabled. Enable/Disable Automatic Serial Polling. If is 0, IbcAUTOPOLL value then Automatic Serial Polling is disabled.
  • Page 31 Chapter 3 GPIB 488.1 Library Reference Table 3-3. ibconfig Options (Continued) Option Valid for Description 7/8-bit Comparison. If is zero, compare the IbcEOScmp value low-order 7 bits of the EOS character. Otherwise, compare 8-bits. End-Of-String (EOS) Character. is the new EOS IbcEOSchar value character.
  • Page 32 Chapter 3 GPIB 488.1 Library Reference Returns will contain a 16-bit status word as described in Appendix B, IBSTA. Ibsta will contain an error code, if an error occurred. If no error occurred, the previous Iberr setting of the configured item is returned in Iberr Usage Notes None.
  • Page 33: Ibdev

    Chapter 3 GPIB 488.1 Library Reference IBDEV Obtains a device handle for a device whose name is unknown. It opens and initializes the device with the configuration given. Syntax gpib-32.dll device = ibdev (int boardindex, int pad, int sad, int timeout, int eot, int eos) gpib488.dll device = ibdev (int boardindex, int pad, int sad, int timeout, int eot, int eos)
  • Page 34 Chapter 3 GPIB 488.1 Library Reference Usage Notes This routine returns the device handle of the first available user-configurable device it finds in the device list. Example This example opens an available device, associates it with GPIB interface board 1, and assigns it the following device configuration parameters.
  • Page 35: Ibdma

    Chapter 3 GPIB 488.1 Library Reference IBDMA Note ibdma() is deprecated. Use with the option instead. ibconfig() IbcDMA Enables/Disables DMA. Syntax gpib-32.dll ibdma (int board, int dma) gpib488.dll ibdma (int board, int dma) Parameters is an integer containing the board handle. board is an integer which indicates whether DMA is to be enabled or disabled for the specified GPIB board.
  • Page 36 Chapter 3 GPIB 488.1 Library Reference Example This example enables DMA transfers for GPIB Interface Board 1. It assumes that the DMA channel was previously selected in your configuration program. int board; board = ibfind ("gpib1"); ibdma (board, 1); GPIB-488 3-19 Programming Reference Manual...
  • Page 37: Ibeos

    Chapter 3 GPIB 488.1 Library Reference IBEOS Note ibeos() is deprecated. Use with the option instead. ibconfig() IbcEOS Changes or disables End-Of-String termination mode. Syntax gpib-32.dll ibeos (int boarddev, int eos) gpib488.dll ibeos (int boarddev, int eos) Parameters is an integer containing the board/device handle. boarddev is an integer that defines which termination mode and what EOS character are to be used, as shown in Table 3-4, Selecting EOS.
  • Page 38 Chapter 3 GPIB 488.1 Library Reference If this call defines an EOS for a device, then the defined EOS is used for all reads and writes involving that device. Likewise, if the call defines an EOS for a board, then all reads and writes involving that board will use that EOS.
  • Page 39: Ibeot

    Chapter 3 GPIB 488.1 Library Reference IBEOT Note ibeot() is deprecated. Use with the option instead. ibconfig() IbcEOT Enables/Disables assertion of EOI on write operations. Syntax gpib-32.dll ibeot (int boarddev, int eot) gpib488.dll ibeot (int boarddev, int eot) Parameters is an integer containing the board or device handle. Here it represents a GPIB boarddev Interface Board or a device.
  • Page 40 Chapter 3 GPIB 488.1 Library Reference Example Assert EOI with last byte of all write operations from GPIB board 1. int device; device = ibfind ("gpib1"); ibeot (device,1); GPIB-488 3-23 Programming Reference Manual...
  • Page 41: Ibfind

    Chapter 3 GPIB 488.1 Library Reference IBFIND Opens a board or device and returns the handle associated with a given name. Syntax gpib-32.dll boarddev = ibfind (char name[]) gpib488.dll boarddev = ibfind (const char * name) Parameters is the string specifying the board or device name. name Returns will contain the device handle associated with the given name.
  • Page 42: Ibgts

    Chapter 3 GPIB 488.1 Library Reference IBGTS Puts an Active Controller in Standby mode. Syntax gpib-32.dll ibgts (int board, int handshake) gpib488.dll ibgts (int board, int handshake) Parameters is an integer containing the board handle. board determines whether or not the shadow handshake option is to be activated. If handshake is non-zero, then the GPIB shadow handshake option is activated.
  • Page 43 Chapter 3 GPIB 488.1 Library Reference Example This example uses the routine to instruct GPIB board 1 to unlisten ibcmd all devices (ASCII ?, hex 3F), and then to address a Talker at MTA26 (ASCII Z, hex 5A) and a Listener at MLA11 (ASCII +, hex 2B). ibgts then called to unassert the ATN line and place the GPIB board in Standby mode.
  • Page 44: Ibist

    Chapter 3 GPIB 488.1 Library Reference IBIST Note ibist() is deprecated. Use with the option instead. ibconfig() IbcIst Sets/Clears the (Individual Status) Bit of the GPIB board for parallel polls. Syntax gpib-32.dll ibist (int board, int statusbit) gpib488.dll ibist (int board, int statusbit) Parameters is an integer containing the board handle.
  • Page 45: Iblines

    Chapter 3 GPIB 488.1 Library Reference IBLINES Returns the status of the GPIB control lines. Syntax gpib-32.dll iblines (int board, short *clines) gpib488.dll iblines (int board, short *clines) Parameters is an integer containing the board handle. board Returns contains a valid mask and GPIB control line state data. Low-order bytes (bits 0 clines through 7) contain the mask indicating the capability of the GPIB interface board to sense the status of each GPIB control line.
  • Page 46 Chapter 3 GPIB 488.1 Library Reference Interface Management: • ATN = Attention • IFC = Interface Clear • REN = Remote Enable • SRQ = Service Request • EOI = End or Identify Usage Notes In order for this call to function properly, all devices attached to the GPIB bus must adhere to IEEE-488 specification.
  • Page 47: Ibln

    Chapter 3 GPIB 488.1 Library Reference IBLN Check that a device is present on the bus. Syntax gpib-32.dll ibln (int board, int pad, int sad, short* listen) gpib488.dll ibln (int board, int pad, int sad, short* listen) Parameters is the board or device handle. board is the primary address of the GPIB device (0-30).
  • Page 48: Ibloc

    Chapter 3 GPIB 488.1 Library Reference IBLOC Forces the specified board/device to go to local program mode. Syntax gpib-32.dll ibloc (int boarddev) gpib488.dll ibloc (int boarddev) Parameters is an integer containing the device or board handle. boarddev Returns will contain a 16-bit status word as described in Appendix B, IBSTA. Ibsta will contain an error code, if an error occurred.
  • Page 49: Ibonl

    Chapter 3 GPIB 488.1 Library Reference IBONL Enables/Disables a device/interface board for operation. Syntax gpib-32.dll ibonl (int boarddev, int online) gpib488.dll ibonl (int boarddev, int online) Parameters is an integer containing the device/board handle. boarddev defines whether the device/board is to be enabled/disabled. If is non-zero, online online...
  • Page 50: Ibpad

    Chapter 3 GPIB 488.1 Library Reference IBPAD Note ibpad() is deprecated. Use with the option instead. ibconfig() IbcPAD Changes the primary address assigned to a device or interface board. Syntax gpib-32.dll ibpad (int boarddev, int address) gpib488.dll ibpad (int boarddev, int address) Parameters is an integer containing the board or device handle.
  • Page 51: Ibpct

    Chapter 3 GPIB 488.1 Library Reference IBPCT Passes control to another device. Syntax gpib-32.dll ibpct (int device) gpib488.dll ibpct (int device) Parameters an integer containing the device handle. device Returns will contain a 16-bit status word as described in Appendix B, IBSTA. Ibsta will contain an error code, if an error occurred.
  • Page 52: Ibppc

    Chapter 3 GPIB 488.1 Library Reference IBPPC Enables/Disables parallel polling of the specified device. Syntax gpib-32.dll ibppc (int boarddev, int command) gpib488.dll ibppc (int boarddev, int command) Parameters is an integer containing the board or device handle. This value is obtained by boarddev calling the routine.
  • Page 53 Chapter 3 GPIB 488.1 Library Reference Table 3-5. Values for P2–P0 (Continued) GPIB Data Line DIO4 DIO3 DIO2 DIO1 For example, if the PPE byte 01101011 (hex 6B) is sent, the device will drive DIO4 true if its IST bit = 1, or false if its IST bit = 0. is 0 or represents a PPD (Parallel Poll Disable) message, the current PPE command (Parallel Poll Enable) configuration is cancelled.
  • Page 54: Ibrd

    Chapter 3 GPIB 488.1 Library Reference IBRD Reads data from a device/interface board into a string. Syntax gpib-32.dll ibrd (int boarddev, char buf[], long bytecount) gpib488.dll ibrd (int boarddev, char * buf, size_t bytecount) Parameters is an integer containing the board or device handle. boarddev is the storage buffer for the data.
  • Page 55 Chapter 3 GPIB 488.1 Library Reference Example This example reads 90 characters of data from a device at PAD 5. int dev5; char rd [90]; dev5 = ibdev (0,5,0,13,1,0); ibrd (dev5, rd, 90); Programming Reference Manual 3-38 GPIB-488...
  • Page 56: Ibrda

    Chapter 3 GPIB 488.1 Library Reference IBRDA Note Asynchronous I/O is not explicitly supported and will be treated as synchronous. Reads data asynchronously from a device/interface board into a string. Syntax gpib-32.dll ibrda (int boarddev, char buf[], long bytecount) gpib488.dll ibrda (int boarddev, char * buf, size_t bytecount) Parameters is an integer containing the device/board handle.
  • Page 57: Ibrdf

    Chapter 3 GPIB 488.1 Library Reference IBRDF Reads data from the GPIB into a file. Syntax gpib-32.dll ibrdf (int boarddev, char filename []) gpib488.dll ibrdf (int boarddev, const char * filename) Parameters is an integer containing the board or device handle. boarddev is the name of the file (up to 250 characters, including drive/path) in which the data filename...
  • Page 58 Chapter 3 GPIB 488.1 Library Reference Example This program sends the command “ ” to a device. The device responds by sending data DUMP back. reads the incoming data and stores it in the file called on the C drive. ibrdf gpib.dat ibwrt (boarddev, "DUMP");...
  • Page 59: Ibrpp

    Chapter 3 GPIB 488.1 Library Reference IBRPP Initiates a parallel poll. Syntax gpib-32.dll ibrpp (int boarddev, char *command) gpib488.dll ibrpp (int boarddev, char *command) Parameters is an integer containing the device or board handle. boarddev will contain the response to the parallel poll. command Returns will contain a 16-bit status word as described in Appendix B, IBSTA.
  • Page 60 Chapter 3 GPIB 488.1 Library Reference ibrpp (board, &pollbyte); if (pollbyte & 1) printf ("Voltmeter is requesting service\n"); if (pollbyte & 2) printf ("Oscilloscope is requesting service/n"); GPIB-488 3-43 Programming Reference Manual...
  • Page 61: Ibrsc

    Chapter 3 GPIB 488.1 Library Reference IBRSC Note ibrsc() is deprecated. Use with the option instead. ibconfig() IbcSC Request/Release System Control. Syntax gpib-32.dll ibrsc (int board, int control) gpib488.dll ibrsc (int board, int control) Parameters is an integer containing the board handle. board indicates whether the GPIB Interface Board is to become the system controller or control...
  • Page 62: Ibrsp

    Chapter 3 GPIB 488.1 Library Reference IBRSP Serial polls a device. Syntax gpib-32.dll ibrsp (int device, char *serialpollbyte) gpib488.dll ibrsp (int device, char *serialpollbyte) Parameters is an integer containing the device handle. device will contain the serial poll response byte of the device. The serial poll serialpollbyte response byte is device-specific with the exception of bit 6.
  • Page 63: Ibrsv

    Chapter 3 GPIB 488.1 Library Reference IBRSV Note ibrsv() is deprecated. Use with the option instead. ibconfig() IbcRsv Changes the serial poll response byte. Syntax gpib-32.dll ibrsv (int board, int statusbyte) gpib488.dll ibrsv (int board, int statusbyte) Parameters is an integer containing the board handle. board represents the serial poll response byte of the GPIB Interface Board.
  • Page 64: Ibsad

    Chapter 3 GPIB 488.1 Library Reference IBSAD Note ibsad() is deprecated. Use with the option instead. ibconfig() IbcSAD Assigns/unassigns a secondary address to a board or device. Syntax gpib-32.dll ibsad (int boarddev, int address) gpib488.dll ibsad (int boarddev, int address) Parameters is an integer containing device or board handle.
  • Page 65: Ibsic

    Chapter 3 GPIB 488.1 Library Reference IBSIC Asserts IFC (Interface Clear) signal. This re-initializes the GPIB system. Syntax gpib-32.dll ibsic (int board) gpib488.dll ibsic (int board) Parameters is an integer containing the board handle. board Returns will contain a 16-bit status word as described in Appendix B, IBSTA. Ibsta will contain an error code, if an error occurred.
  • Page 66: Ibsre

    Chapter 3 GPIB 488.1 Library Reference IBSRE Note ibsre() is deprecated. Use with the option instead. ibconfig() IbcSRE Asserts/Unasserts the REN (Remote Enable) line. Syntax gpib-32.dll ibsre (int board, int ren) gpib488.dll ibsre (int board, int ren) Parameters is an integer containing the board handle. board specifies whether the line is to be asserted or unasserted.
  • Page 67: Ibstop

    Chapter 3 GPIB 488.1 Library Reference IBSTOP Note Asynchronous I/O is not explicitly supported and is treated as synchronous. Terminate an asynchronous operation. Syntax gpib-32.dll ibstop (int boarddev) gpib488.dll ibstop (int boarddev) Parameters is an integer containing the device or board handle. boarddev Returns will contain a 16-bit status word as described in Appendix B, IBSTA.
  • Page 68: Ibtmo

    Chapter 3 GPIB 488.1 Library Reference IBTMO Note ibtmo() is deprecated. Use with the option instead. ibconfig() IbcTMO Changes timeout value. Syntax gpib-32.dll int ibtmo (int boarddev, int timeout) gpib488.dll int ibtmo (int boarddev, int timeout) Parameters is an integer containing the board or device handle. boarddev specifies the timeout.
  • Page 69 Chapter 3 GPIB 488.1 Library Reference Usage Notes This routine is used to temporarily change the default timeout value assigned to the device/GPIB Interface board. The new timeout is used until it is redefined (by calling again) the device/board is ibtmo re-initialized (by calling );...
  • Page 70: Ibtrg

    Chapter 3 GPIB 488.1 Library Reference IBTRG Triggers the specified device. Syntax gpib-32.dll ibtrg (int device) gpib488.dll ibtrg (int device) Parameters is an integer containing device handle. device Returns will contain a 16-bit status word as described in Appendix B, IBSTA. Ibsta will contain an error code, if an error occurred.
  • Page 71: Ibwait

    Chapter 3 GPIB 488.1 Library Reference IBWAIT Forces application program to wait for a specified event(s) to occur. Syntax gpib-32.dll ibwait (int boarddev, int mask) gpib488.dll ibwait (int boarddev, int mask) Parameters is an integer containing the board or device handle. boarddev specifies the events that will wait for.
  • Page 72 Chapter 3 GPIB 488.1 Library Reference Example This example forces your program to wait indefinitely for the specified device to request service. int plotter; plotter = ibdev (0,1,0,13,1,0); ibwait (plotter, RQS); GPIB-488 3-55 Programming Reference Manual...
  • Page 73: Ibwrt

    Chapter 3 GPIB 488.1 Library Reference IBWRT Writes data from a string to the specified device or GPIB Interface Board. Syntax gpib-32.dll ibwrt (int boarddev, char buf[], long bytecount) gpib488.dll ibwrt (int boarddev, const char * buf, size_t bytecount) Parameters is an integer containing the board or device handle.
  • Page 74 Chapter 3 GPIB 488.1 Library Reference talker. If the board is the Active Controller, it unasserts ATN in order to send data. This routine leaves the board in that state. If you want to send an EOS character at the end of the data string, you must include it in the string.
  • Page 75: Ibwrta

    Chapter 3 GPIB 488.1 Library Reference IBWRTA Note Asynchronous I/O is not explicitly supported and will be treated as synchronous. Writes data asynchronously from a string to the specified device or GPIB interface board. Syntax gpib-32.dll ibwrta (int boarddev, char buf[], long bytecount) gpib488.dll ibwrta (int boarddev, const char * buf, size_t bytecount)
  • Page 76: Ibwrtf

    Chapter 3 GPIB 488.1 Library Reference IBWRTF Writes data from a file to the specified device or GPIB Interface Board. Syntax gpib-32.dll ibwrtf (int boarddev, char filename []) gpib488.dll ibwrtf (int boarddev, const char * filename) Parameters is an integer containing the board or device handle. boarddev is the name of the file (up to 260 characters, including drive/path) to store the data.
  • Page 77: Gpib 488.2 Library Reference

    GPIB 488.2 Library Reference This chapter describes each of the 488.2 GPIB library routines. A short description of the routine, its syntax, parameters, any values that are returned, any special usage notes, and an example are included for each routine. The routines are listed in alphabetical order. The following table lists all of the 488.2 GPIB library routines.
  • Page 78: Allspoll

    Chapter 4 GPIB 488.2 Library Reference AllSpoll Performs a serial poll on specified devices. Syntax gpib-32.dll AllSpoll (int board, short addresslist[], short resultlist[]) gpib488.dll AllSpoll (int board, const short * addresslist, short * resultlist) Parameters is an integer which identifies the GPIB board to be used for this operation. In most board applications, this value is 0.
  • Page 79: Devclear

    Chapter 4 GPIB 488.2 Library Reference DevClear Clears one device. Syntax gpib-32.dll DevClear (int board, short address) gpib488.dll DevClear (int board, short address) Parameters is an integer which identifies the GPIB board to be used for this operation. In most board applications, this value is 0.
  • Page 80: Devclearlist

    Chapter 4 GPIB 488.2 Library Reference DevClearList Clears specified devices. Syntax gpib-32.dll DevClearList (int board, short addresslist[]) gpib488.dll DevClearList (int board, const short * addresslist) Parameters is an integer which identifies the GPIB board to be used for this operation. In most board applications, this value is 0.
  • Page 81: Enablelocal

    Chapter 4 GPIB 488.2 Library Reference EnableLocal Places specified devices in local mode (Can be “programmed” from front panel controls.). Syntax gpib-32.dll EnableLocal (int board, short addresslist[]) gpib488.dll EnableLocal (int board, const short * addresslist) Parameters is an integer which identifies the GPIB board to be used for this operation. In most board applications, this value is 0.
  • Page 82: Enableremote

    Chapter 4 GPIB 488.2 Library Reference EnableRemote Allow remote programming (by sending messages over the GPIB line) of a device. Syntax gpib-32.dll EnableRemote (int board, short addresslist[]) gpib488.dll EnableRemote (int board, const short * addresslist) Parameters is an integer which identifies the GPIB board to be used for this operation. In most board applications, this value is 0.
  • Page 83: Findlstn

    Chapter 4 GPIB 488.2 Library Reference FindLstn Finds all listeners on the GPIB. Syntax gpib-32.dll FindLstn (int board, short addresslist[], short resultlist[], int limit) gpib488.dll FindLstn (int board, const short * addresslist, short * resultlist, size_t limit) Parameters is an integer which identifies the GPIB board to be used for this operation. In most board applications, this value is 0.
  • Page 84 Chapter 4 GPIB 488.2 Library Reference Example This example verifies if listening devices are present at GPIB primary addresses 6 and 7 on Board 0. short addresslist[3] = {6,7,NOADDR}; short resultlist[4]; FindLstn(0, addresslist, resultlist, 4); Programming Reference Manual GPIB-488...
  • Page 85: Findrqs

    Chapter 4 GPIB 488.2 Library Reference FindRQS Identify the device requesting service. Syntax gpib-32.dll FindRQS (int board, short addresslist[], short *result) gpib488.dll FindRQS (int board, const short * addresslist, short *result) Parameters is an integer which identifies the GPIB board to be used for this operation. In most board applications, this value is 0.
  • Page 86: Passcontrol

    Chapter 4 GPIB 488.2 Library Reference PassControl Makes another device the Active Controller. Syntax gpib-32.dll PassControl (int board, short address) gpib488.dll PassControl (int board, short address) Parameters is an integer which identifies the GPIB board to be used for this operation. In most board applications, this value is 0.
  • Page 87: Ppoll

    Chapter 4 GPIB 488.2 Library Reference PPoll Performs a parallel poll. Syntax gpib-32.dll PPoll (int board, short *result) gpib488.dll PPoll (int board, short *result) Parameters is an integer which identifies the GPIB board to be used for this operation. In most board applications, this value is 0.
  • Page 88: Ppollconfig

    Chapter 4 GPIB 488.2 Library Reference PPollConfig Configures a device for parallel polls. Syntax gpib-32.dll PPollConfig (int board, short address, int dataline, int sense) gpib488.dll PPollConfig (int board, short address, int dataline, int sense) Parameters is an integer which identifies the GPIB board to be used for this operation. In most board applications, this value is 0.
  • Page 89: Ppollunconfig

    Chapter 4 GPIB 488.2 Library Reference PPollUnconfig Unconfigures devices for parallel polls. Syntax gpib-32.dll PPollUnconfig (int board, short addresslist[]) gpib488.dll PPollUnconfig (int board, const short * addresslist) Parameters is an integer which identifies the GPIB board to be used for this operation. In most board applications, this value is 0.
  • Page 90: Rcvrespmsg

    Chapter 4 GPIB 488.2 Library Reference RcvRespMsg Reads data from a previously addressed device. Syntax gpib-32.dll RcvRespMsg (int board, char data[], long count, int termination) gpib488.dll RcvRespMsg (int board, const char * data, size_t count, int termination) Parameters is an integer which identifies the GPIB board to be used for this operation. In most board applications, this value is 0.
  • Page 91: Readstatusbyte

    Chapter 4 GPIB 488.2 Library Reference ReadStatusByte Serial poll a single device and read its status byte. Syntax gpib-32.dll ReadStatusByte (int board, short address, short *result) gpib488.dll ReadStatusByte (int board, short address, short *result) Parameters is an integer which identifies the GPIB board to be used for this operation. In most board applications, this value is 0.
  • Page 92: Receive

    Chapter 4 GPIB 488.2 Library Reference Receive Reads data from a GPIB device. Syntax gpib-32.dll Receive (int board, short address,char data[], long count, int termination) gpib488.dll Receive (int board, short address, char * data, size_t count, int termination) Parameters is an integer which identifies the GPIB board to be used for this operation. In most board applications, this value is 0.
  • Page 93: Receivesetup

    Chapter 4 GPIB 488.2 Library Reference ReceiveSetup Address a GPIB Interface Board as a Listener and a GPIB device as a Talker, in preparation for data transmission. Syntax gpib-32.dll ReceiveSetup (int board, short address) gpib488.dll ReceiveSetup (int board, short address) Parameters is an integer which identifies the GPIB board to be used for this operation.
  • Page 94: Resetsys

    Chapter 4 GPIB 488.2 Library Reference ResetSys Initializes GPIB System. Syntax gpib-32.dll ResetSys (int board, short addresslist[]) gpib488.dll ResetSys (int board, const short * addresslist) Parameters is an integer which identifies the GPIB board to be used for this operation. In most board applications, this value is 0.
  • Page 95: Send

    Chapter 4 GPIB 488.2 Library Reference Send Sends data to one GPIB device. Syntax gpib-32.dll Send (int board, short address,char data[], long count, int eotmode) gpib488.dll Send (int board, short address, const char * data, size_t count, int eotmode) Parameters is an integer which identifies the GPIB board to be used for this operation.
  • Page 96: Sendcmds

    Chapter 4 GPIB 488.2 Library Reference SendCmds Send GPIB commands. Syntax gpib-32.dll SendCmds (int board, char commands[], long count) gpib488.dll SendCmds (int board, const char * commands, size_t count) Parameters is an integer which identifies the GPIB board to be used for this operation. In most board applications, this value is 0.
  • Page 97: Senddatabytes

    Chapter 4 GPIB 488.2 Library Reference SendDataBytes Sends data to previously addressed devices. Syntax gpib-32.dll SendDataBytes (int board, char data[], long count, int eotmode) gpib488.dll SendDataBytes (int board, const char * data, size_t count, int eotmode) Parameters is an integer which identifies the GPIB board to be used for this operation. In most board applications, this value is 0.
  • Page 98: Sendifc

    Chapter 4 GPIB 488.2 Library Reference SendIFC Clears the GPIB bus by asserting the IFC (Interface Clear) line. Syntax gpib-32.dll SendIFC (int board) gpib488.dll SendIFC (int board) Parameters is an integer which identifies the GPIB board to be used for this operation. In most board applications, this value is 0.
  • Page 99: Sendlist

    Chapter 4 GPIB 488.2 Library Reference SendList Sends data to multiple GPIB devices. Syntax gpib-32.dll SendList (int board, short addresslist[], char data[], long count, int eotmode) gpib488.dll SendList (int board, const short * addresslist, const char * data, size_t count, int eotmode) Parameters is an integer which identifies the GPIB board to use for this operation.
  • Page 100 Chapter 4 GPIB 488.2 Library Reference Example In this example, GPIB board 0 sends an identification query to the GPIB devices at addresses 6 and 7. End of data is signalled by an EOI. short addresslist[3] = {6, 7, NOADDR}; SendList (0, addresslist, "*IDN?", 5, DABend);...
  • Page 101: Sendllo

    Chapter 4 GPIB 488.2 Library Reference SendLLO Sends Local Lockout (LLO) message to all GPIB devices. Syntax gpib-32.dll SendLLO (int board) gpib488.dll SendLLO (int board) Parameters is an integer which identifies the GPIB board to be used for this operation. In most board applications, this value is 0.
  • Page 102: Sendsetup

    Chapter 4 GPIB 488.2 Library Reference SendSetup Addresses a GPIB board as a Talker and the specified GPIB devices as Listeners. Syntax gpib-32.dll SendSetup (int board, short addresslist[]) gpib488.dll SendSetup (int board, const short * addresslist) Parameters is an integer which identifies the GPIB board to be used for this operation. In most board applications, this value is 0.
  • Page 103: Setrwls

    Chapter 4 GPIB 488.2 Library Reference SetRWLS Puts all devices in Remote state with Local Lockout and addresses specified devices as Listeners. Syntax gpib-32.dll SetRWLS (int board, short addresslist[]) gpib488.dll SetRWLS (int board, const short * addresslist) Parameters is an integer which identifies the GPIB board to be used for this operation. In most board applications, this value is 0.
  • Page 104: Testsrq

    Chapter 4 GPIB 488.2 Library Reference TestSRQ Evaluate state of SRQ line. Syntax gpib-32.dll TestSRQ (int board, short *result) gpib488.dll TestSRQ (int board, short *result) Parameters is an integer which identifies the GPIB board to be used for this operation. In most board applications, this value is 0.
  • Page 105: Testsys

    Chapter 4 GPIB 488.2 Library Reference TestSys Activate self-test procedures of specified devices. Syntax gpib-32.dll TestSys (int board, short addresslist [], short resultlist[]) gpib488.dll TestSys (int board, const short * addresslist, short * resultlist) Parameters is an integer which identifies the GPIB board to use for this operation. In most board applications, this value is 0.
  • Page 106: Trigger

    Chapter 4 GPIB 488.2 Library Reference Trigger Triggers one device. Syntax gpib-32.dll Trigger (int board, short address) gpib488.dll Trigger (int board, short address) Parameters is an integer which identifies the GPIB board to used for this operation. In most board applications, this value is 0.
  • Page 107: Triggerlist

    Chapter 4 GPIB 488.2 Library Reference TriggerList Triggers multiple GPIB devices Syntax gpib-32.dll TriggerList (int board, short addresslist[]) gpib488.dll TriggerList (int board, const short * addresslist) Parameters is an integer which identifies the GPIB board to be used for this operation. In most board applications, this value is 0.
  • Page 108: Waitsrq

    Chapter 4 GPIB 488.2 Library Reference WaitSRQ Wait until a device asserts SRQ. Syntax gpib-32.dll WaitSRQ (int board, short *result) gpib488.dll WaitSRQ (int board, short *result) Parameters is an integer which identifies the GPIB board to use for this operation. In most board applications, this value is 0.
  • Page 109: Multiline Interface Messages

    Multiline Interface Messages Table A-1. Multiline Interface Messages (Hex 00-3F) ASCII ASCII MLA0 MLA1 “ MLA2 MLA3 MLA4 MLA5 & MLA6 ‘ MLA7 MLA8 MLA9 MLA10 MLA11 ‘ MLA12 MLA13 > MLA14 MLA15 MLA16 MLA17 MLA18 MLA19 MLA20 GPIB-488 Programming Reference Manual...
  • Page 110 Appendix A Multiline Interface Messages Table A-1. Multiline Interface Messages (Hex 00-3F) (Continued) ASCII ASCII MLA21 MLA22 MLA23 MLA24 SPD39 MLA25 MLA26 MLA27 < MLA28 MLA29 > MLA30 Table A-2. Multiline Interface Messages (Hex 40-7F) ASCII ASCII MTA0 ‘ MSA0,P MTA1 MSA1,P MTA2...
  • Page 111 Appendix A Multiline Interface Messages Table A-2. Multiline Interface Messages (Hex 40-7F) (Continued) ASCII ASCII MTA7 MSA7,P MTA8 MSA8,P MTA9 MSA9,P MTA10 MSA10, MTA11 MSA11, MTA12 MSA12, MTA13 MSA13, MTA14 MSA14, MTA15 MSA15, MTA16 MSA16, MTA17 MSA17, MTA18 MSA18, MTA19 MSA19, MTA20 MSA20,...
  • Page 112 Appendix A Multiline Interface Messages Table A-2. Multiline Interface Messages (Hex 40-7F) (Continued) ASCII ASCII MTA23 MSA23, MTA24 MSA24, MTA25 MSA25, MTA26 MSA26, MTA27 MSA27, MTA28 MSA28, MTA29 MSA29, MTA30 MSA30 MSA0 Table A-3. Message definitions (MSG column) Device Clear My Talk Address Serial Poll Disable Group Execute...
  • Page 113 IBSTA Every GPIB library routine returns a 16-bit status word to the variable ) or ). This status word ibsta gpib-32.dll Ibsta() gpib488.dll describes the current condition of the GPIB bus lines and the GPIB Interface Board. By examining the status word, the programmer may determine what path the application program is to take.
  • Page 114: Appendix Bibsta

    Appendix B IBSTA Table B-1. Bit Definitions Description GPIB Error. If this bit = 1, an error has occurred during the call. An error code describing the exact error is returned to the variable. See Iberr Appendix C, IBERR for more information. ERR is cleared following any call that does not result in an error.
  • Page 115 Appendix B IBSTA Table B-1. Bit Definitions (Continued) Description Device Requesting Service. If this bit = 1, a device is requesting service. RQS is set in the status word whenever the hex 40 bit is asserted in the serial poll status byte of the device.
  • Page 116: Appendix Ciberr

    Appendix B IBSTA Table B-1. Bit Definitions (Continued) Description TACS Talker. If this bit = 1, the GPIB Interface Board has been addressed as a talker. This bit is cleared when one of the following occurs: • The UNT command is sent. •...
  • Page 117 IBERR If the ERR bit in the status word ( ) has been set (= 1), an ibsta Ibsta() error code describing the exact error is returned to the iberr ) or ) variable. Table C-1 lists the gpib-32.dll Iberr() gpib488.dll possible GPIB error codes, the corresponding mnemonic, and a brief explanation.
  • Page 118 Appendix C IBERR Table C-1. Error codes (Continued) Error Code Decimal Mnemonic Description ECAP No capability for intended operation EFSO File system operation error EBUS Command error during device call ESTB Serial poll status byte lost ESRQ SRQ remains asserted ETAB The return buffer is full.
  • Page 119 Appendix C IBERR ENOL—No listening device(s) Cause: The routine detected no listeners. Solution: Verify the following: • Make sure that a device has been addressed properly. • Check that at least two-thirds of the devices on the GPIB bus are turned on, including the specified device. •...
  • Page 120 Appendix C IBERR EABO—I/O operation aborted Cause: I/O operation aborted. (time-out) Solution: Check that the device is powered on. Verify proper cable connections. ENEB—Non-existent GPIB board Cause: GPIB board is not recognized. Solution: Make sure that GPIB board settings and configuration setup parameters agree.
  • Page 121 Appendix C IBERR EFSO—File system error Cause: A problem was encountered while performing a file operation. Solution: Verify the following: • Make sure that you specified the correct filename. • Check the spelling and the path. • If you need more room on the disk, delete some files. •...
  • Page 122 Appendix C IBERR ESRQ—SRQ in “ON” position Cause: A wait for an RQS can not occur because the GPIB SRQ line is ON. Solution: Verify the following: • Ignore the ESRQ until all devices are found. • Make sure is called to open all devices on the bus ibdev capable of asserting SRQ.
  • Page 123: Index

    Index Numerics IBSRE, 3-49 IBSTOP, 3-50 488.1 IBTMO, 3-51 library reference (table), 3-1 timeout codes (table), 3-51 library routines IBTRG, 3-53 IBASK, 3-3 IBWAIT, 3-54 options (table), 3-3 IBWRT, 3-56 IBCAC, 3-6 IBWRTA, 3-58 IBCLR, 3-7 IBWRTF, 3-59 IBCMD, 3-8 488.2 IBCMDA, 3-10 library reference (table), 4-1...
  • Page 124 Index TestSys, 4-29 Trigger, 4-30 global variables, 2-3 TriggerList, 4-31 GPIB WaitSRQ, 4-32 488.1 library reference (table), 3-1 488.2 library reference (table), 4-1 differences between GPIB32 API and GPIB488 API, 1-3 AllSpoll, 4-2 library utility programs, 1-2 asynchronous API, 1-3 support for VISA calls, 1-2 unsupported API, 1-3 bit definitions (table), B-2...
  • Page 125 Index IBEOT, 3-22 support for VISA calls, 1-2 iberr/Iberr(), 2-4 IBFIND, 3-24 IBGTS, 3-25 multiline interface messages IBIST, 3-27 hex 00-3F (table), A-1 IBLINES, 3-28 hex 40-7F (table), A-2 IBLN, 3-30 message definitions (MSG column), IBLOC, 3-31 (table), A-4 IBONL, 3-32 IBPAD, 3-33 IBPCT, 3-34 IBPPC, 3-35...
  • Page 126 Index Send, 4-19 SendCmds, 4-20 SendDataBytes, 4-21 SendIFC, 4-22 SendList, 4-23 SendLLO, 4-25 SendSetup, 4-26 SetRWLS, 4-27 software GPIB-32.DLL function support, 1-2 GPIB488.DLL function support, 1-2 overview, 1-1 supported languages (table), 1-1 status word (ibsta/Ibsta()), 2-4 support for VISA calls, 1-2 supported languages (table), 1-1 TestSRQ, 4-28 TestSys, 4-29...

This manual is also suitable for:

Usb-4671

Table of Contents