background image

Chapter 3

Install the NI-488.2 Software for MS-DOS

© National Instruments Corp.

3-7

GPIB-232CT-A for MS-DOS/Windows

If you have performed these steps and there is still a problem, refer to
Appendix C,  Troubleshooting,  for more information on installing or using
the NI-488.2 software.

If no errors occurred, you can proceed to learn how to use the software and
how to develop your application program.

Step 4. Developing Your Application Program

There are two tools that are useful for developing your application program:

IBIC.EXE

 and 

APPMON.EXE

.

Interactive Control Program (IBIC)

The easiest way to learn to communicate with your instrument is by
controlling it interactively.  Located in your GPIB directory is the Interface
Bus Interactive Control program called 

IBIC.EXE

.  You can use this

program to communicate with your instrument; the program displays the
status and any error after each NI-488.2 call.

With 

IBIC

, you can program your instruments interactively from the

keyboard rather than from an application program.  Using 

IBIC

 helps you

quickly understand how the instruments and the NI-488.2 software work.

IBIC

 is fully described in Chapter 6, IBIC, of the  NI-488.2 Software

Reference Manual for MS-DOS.

While running 

IBIC

, you should study the descriptions of each function

given to fully understand their purpose or you can use the online help
available if you have questions.

To use 

IBIC.EXE

, connect your instrument to the bus and enter the

following commands:

cd \

dir

where 

dir

 is the name of the directory to which 

INSTALL

 copied the

NI -488.2 software.  By default, 

dir

 is 

c:\GPIB-CT

.

IBIC

You are now ready to begin developing applications.  Refer to Chapter 6,
IBIC, of the  NI -488.2 Software Reference Manual for MS-DOS to get
started.

Summary of Contents for GPIB-232CT-A IBCL EPROM

Page 1: ...Copyright 1992 1995 National Instruments Corporation All Rights Reserved Getting Started with Your GPIB 232CT A and the NI 488 2 Software for MS DOS Windows March 1995 Edition Part Number 320555B 01...

Page 2: ...ria 0662 435986 Belgium 02 757 00 20 Canada Ontario 519 622 9310 Canada Qu bec 514 694 8521 Denmark 45 76 26 00 Finland 90 527 2321 France 1 48 14 24 24 Germany 089 741 31 30 Italy 02 48301892 Japan 0...

Page 3: ...e shipping costs of returning to the owner parts which are covered by warranty National Instruments believes that the information in this manual is accurate The document has been carefully reviewed fo...

Page 4: ...rporation Product and company names listed are trademarks or trade names of their respective companies Warning Regarding Medical and Clinical Use of National Instruments Products National Instruments...

Page 5: ...luding interference that may cause undesired operation Canadian Department of Communications This device complies with the limits for radio noise emissions from digital apparatus set out in the Radio...

Page 6: ...y from the receiver with which it is interfering Reorient or relocate the receiver s antenna Be sure that the equipment is plugged into a grounded outlet and that the grounding has not been defeated w...

Page 7: ...Your Hardware 2 1 Step 1 Verify the Voltage Requirement 2 1 Step 2 Shut Down Your System 2 1 Step 3 Connect the Cables 2 2 Step 4 Power On Your System and Switch On the GPIB 232CT A 2 2 Chapter 3 Inst...

Page 8: ...e Software Installation 4 5 Using WIBIC 4 6 Writing Windows Programs That Use the GPIB 4 7 The WINSAMP Sample 4 7 General Rules for Using GPIB LIB with Windows 4 8 Chapter 5 Configure Your Software wi...

Page 9: ...Polling Board Characteristic Only 5 12 Enable CIC Protocol Board Characteristic Only 5 13 Bus Timing Board Characteristic Only 5 13 Enable Repeat Addressing Device Characteristic Only 5 13 Use This I...

Page 10: ...Standard E 1 Description of the RS 232 Port E 1 Interfacing Serial Devices to the RS 232 Serial Port E 3 Interfacing the GPIB 232CT A to a DCE with Handshaking E 3 Interfacing the GPIB 232CT A to a DC...

Page 11: ...to 9 pin DCE with Handshaking E 4 Figure E 3 Cable Configuration for 9 pin DTE to 25 pin DCE with Handshaking E 5 Figure E 4 Minimum Configuration for 9 pin DTE to 9 pin DCE E 6 Figure E 5 Minimum Co...

Page 12: ...ersion B 1 Table B 3 Environmental Characteristics AC Version B 2 Table B 4 Environmental Characteristics DC Version B 2 Table B 5 Physical Characteristics AC Version B 2 Table B 6 Physical Characteri...

Page 13: ...description of the programs and files included with the NI 488 2 software for MS DOS This chapter also contains instructions for installing configuring and verifying your software as well as programmi...

Page 14: ...s the GPIB DLL file Following the examples are tables that list all NI 488 2 routines and NI 488 functions including their calling syntax and ordinal entry values Appendix E Interfacing to a Serial De...

Page 15: ...Italic text in this font denotes that you must supply the appropriate words or values in the place of these items Angle brackets enclose the name of a key on the keyboard for example PageDown Enter K...

Page 16: ...rumentation ANSI IEEE Standard 488 2 1987 IEEE Standard Codes Formats Protocols and Common Commands Microsoft MS DOS User s Guide Microsoft Corporation Microsoft Windows User s Guide Microsoft Corpora...

Page 17: ...also capable of interfacing RS 232 instruments and peripherals to the GPIB The GPIB 232CT A has all the software and logic required to implement the physical and electrical specifications of the IEEE...

Page 18: ...ower cord Universal European power cord North American power cord U K power cord If you have the GPIB 232CT A DC version you need one of the following DC power supplies 100 120 VAC 9 V 1 A wall mount...

Page 19: ...s for this device you must use a shielded Type X1 or X2 GPIB cable Operating this equipment with a non shielded cable may cause interference to radio and television reception Inspection Before you ope...

Page 20: ...ts has developed three other software applications you can use with the GPIB 232CT A and PC compatibles LabVIEW for Windows LabWindows for DOS and LabWindows CVI LabVIEW for Windows is a software syst...

Page 21: ...ment The GPIB 232CT A AC version is shipped from the factory with a 100 120 V or 220 240 V internal power supply The GPIB 232CT A DC version is shipped with a 100 120 V or 220 240 V wall mount or desk...

Page 22: ...e If you have a DC version connect the DC power plug of the DC power supply to the power jack on the serial end of the GPIB 232CT A then plug the supply into an AC outlet of the correct voltage Step 4...

Page 23: ...88 2 driver that is loaded at system startup by MS DOS IBTEST EXE is a program that you can use to test the NI 488 2 software IBCONF EXE is a software configuration program It can be used to change th...

Page 24: ...ft Professional BASIC version 7 0 or higher access to the NI 488 2 software QBIB OBJ is a binary language interface file that gives an application program written in QuickBASIC version 4 0 or higher a...

Page 25: ...488 2 distribution disk The term destination directory refers to the location on your hard disk or disk where the software will be installed usually C GPIB CT The term boot drive refers to the drive t...

Page 26: ...or MS DOS Interactive Installation If you choose to interactively install the NI 488 2 software complete the following instructions After starting your computer run the INSTALL program on the distribu...

Page 27: ...ware Before you can run the software diagnostics tests the NI 488 2 software must be loaded If you have just completed the installation procedure and have not restarted your computer the software is n...

Page 28: ...Note Before running IBTEST make sure that the GPIB 232CT A is not connected to any GPIB devices If an error occurs check the following Is the GPIB 232CT A connected to a GPIB device IBTEST requires t...

Page 29: ...E You can use this program to communicate with your instrument the program displays the status and any error after each NI 488 2 call With IBIC you can program your instruments interactively from the...

Page 30: ...lar bit for example ERR is set in ibsta The Applications Monitor stores up to 255 previous GPIB calls and is invaluable for debugging your application The Applications Monitor is fully described in Ch...

Page 31: ...nd the files that will be copied from the distribution disk s and the purpose of each file The following section describes the files contained on the distribution disk s NI 488 2 Files for the Windows...

Page 32: ...that the software configuration is consistent with the GPIB hardware configuration settings WIBIC EXE a Windows application is the Windows Interface Bus Interactive Control program that executes NI 4...

Page 33: ...file containing definitions and declarations required by WINSAMP C WINSAMP RC is the resource script file that defines the menus and the dialog box template for the About dialog box WINSAMP DEF is the...

Page 34: ...ram on the distribution disk by entering the following command X install where X is the name of the drive containing the distribution disk this is usually A This is the interactive version of the INST...

Page 35: ...BCONF If the default configuration of the hardware and software is acceptable skip to Step 4 You can however run WIBCONF just to examine the software configuration Refer to Chapter 5 Configure Your So...

Page 36: ...ment is by controlling it interactively Located in your GPIB directory is the Interface Bus Interactive Control program called WIBIC EXE You can use this program to communicate with your instrument th...

Page 37: ...rface to link with your application Refer to Appendix D DLL Direct Entry NI 488 Functions and NI 488 2 Routines for more information The remainder of this chapter describes the WINSAMP sample program...

Page 38: ...e All NI 488 2 GPIB DLL files for Windows share the same LIB file therefore you do not have to relink applications to switch between GPIB boxes Ensure that the correct GPIB DLL is in the directory in...

Page 39: ...Overview of IBCONF IBCONF is a screen oriented interactive program that is used to modify the configuration parameters for your GPIB 232CT A and the GPIB devices connected to it When used interactivel...

Page 40: ...h gpib com that GPIB COM file is configured 3 If a GPIB COM file exists in the current directory that file is configured In Windows changes made using WIBCONF EXE are recorded in the GPIB INI file The...

Page 41: ...ual board and devices that make up the system Upper Level Device Map Figure 5 1 shows the upper level of IBCONF Figure 5 1 Upper Level of IBCONF As shown in Figure 5 1 the upper level screen of IBCONF...

Page 42: ...ferred to as an access board by IBCONF The maps show which devices are assigned to each box The default settings attach 16 devices to GPIB0 and 16 devices to GPIB1 Help Use F1 to access the comprehens...

Page 43: ...one these names you must rename them The string representing a device or access board name is the first variable argument of the function ibfind called at the beginning of your application program Ref...

Page 44: ...nected It also adjusts the primary and secondary address fields of the devices to match the addresses that responded as Listeners The entire operation only takes a few seconds You may want to rename t...

Page 45: ...re 5 2 You access these screens from the upper level of IBCONF by selecting a board or device and pressing F8 or Enter The configuration settings selected for each device and each board are a means of...

Page 46: ...directly from the keyboard Instructions on the right side of the screen inform you which method is appropriate for the selected characteristic Change Board or Device Use Control PageUp and Control Pa...

Page 47: ...the NI 488 2 software There are 32 devices with symbolic names DEV1 through DEV32 There are four access boards with symbolic names GPIB0 GPIB1 GPIB2 and GPIB3 You cannot change access board names Acce...

Page 48: ...s indicated only apply to boards Primary GPIB Address All devices and boards must be assigned unique primary addresses in the range from hex 00 to hex 1E 0 to 30 decimal Secondary GPIB Address Any dev...

Page 49: ...ld causes the GPIB board to assert the EOI line when the EOS byte is detected on a write operation The default option for this characteristic is no See also the EOS Byte section Type of Compare on EOS...

Page 50: ...tem is the device that maintains ultimate control over the bus There should only be one device designated as System Controller in any GPIB system The default option for this characteristic is yes Asse...

Page 51: ...time after the data is placed on the bus that the board may assert DAV during a write or command operation If the total length of the GPIB cable length in the system is less than 15 m then the value o...

Page 52: ...dress of the serial communications port and should only be used if you have a non standard serial communications port The GPIB 232CT A software assumes that the serial controller hardware is compatibl...

Page 53: ...default is 8 If you change these software settings you must change your hardware settings to match Refer to Appendix A Hardware Configuration for more information on changing these settings Exiting I...

Page 54: ...S mode the computer attached to the RS 232 port of the GPIB 232CT A is the controlling device The RS 232 serial port is configured at 9600 baud 1 stop bit no parity and 8 data bits To change the param...

Page 55: ...erating at 9600 baud Switches 4 and 5 are both OFF which indicates that parity is disabled Switch 6 is OFF indicating 1 stop bit character Switch 7 is ON indicating that the GPIB 232CT A is using 8 bi...

Page 56: ...n Parameters for Switches 4 through 8 Switch Position Indication 4 OFF odd parity ON even parity 5 OFF parity generation checking disabled ON parity generation checking enabled 6 OFF 1 stop bit charac...

Page 57: ...pecification Power Supply Unit 100 120 VAC 10 50 60 Hz or 220 240 VAC 10 50 60 Hz Current 100 120 VAC 23 mA or 220 240 VAC 20 mA Fuse Rating and Type 100 120 VAC 300 mA UL CSA approved or 220 240 VAC...

Page 58: ...oncondensing conditions EMI FCC Class A Verified Table B 4 Environmental Characteristics DC Version Characteristic Specification Operating Temperature 10 to 40 C Storage Temperature 0 to 70 C Relative...

Page 59: ...truments Corp B 3 GPIB 232CT A for MS DOS Windows Table B 6 Physical Characteristics DC Version Characteristic Specification Case Size 4 65 in by 3 0 in by 1 11 in 118 1 mm by 76 2 mm by 28 2 mm Case...

Page 60: ...rcuitry that operates with hazardous voltages Do NOT open the unit unless so instructed by National Instruments Be sure to remove the power cord before opening the unit All cables must be securely con...

Page 61: ...e your GPIB 232CT A and software to verify that the settings match If ibcntl is 2DEAD the software is encountering serial overrun errors when it attempts to access the GPIB 232CT A box Serial overrun...

Page 62: ...ng these entry points follow Tables D 1 and D 2 contain a complete list of all of the entry points For specific information on the variables ibsta iberr and ibcntl refer to Chapter 3 Understanding the...

Page 63: ...l or DLLSendIFC 0 ibsta iberr ibcntl Example 2 accessing the GPIB DLL file from Microsoft Visual Basic First declare the DLL functions you plan to use Declare function DLLibfind Lib gpib dll ByVal udn...

Page 64: ...unsigned long _far ibcntl DevClearList 102 DLLDevClearList short board short _far addresslist short _far ibsta short _far iberr unsigned long _far ibcntl EnableLocal 103 DLLEnableLocal short board sho...

Page 65: ...ddress short dataline short sense short _far ibsta short _far iberr unsigned long _far ibcntl PPollUnconfig 110 DLLPPollUnconfig short board short _far addresslist short _far ibsta short _far iberr un...

Page 66: ...hort address char _far data long count short eotmode short _far ibsta short _far iberr unsigned long _far ibcntl SendCmds 117 DLLSendCmds short board char _far commands unsigned long count short eotmo...

Page 67: ...dresslist short _far ibsta short _far iberr unsigned long _far ibcntl TestSRQ 124 DLLTestSRQ short board short _far result short _far ibsta short _far iberr unsigned long _far ibcntl TestSys 125 DLLTe...

Page 68: ...12 DLLibclr short ud short _far ibsta short _far iberr unsigned long _far ibcntl ibcmd 13 DLLibcmd short ud char _far cmd long cnt short _far ibsta short _far iberr unsigned long _far ibcntl ibcmda 14...

Page 69: ...DLLibgts short ud short v short _far ibsta short _far iberr unsigned long _far ibcntl ibist 24 DLLibist short ud short v short _far ibsta short _far iberr unsigned long _far ibcntl iblines 25 DLLibli...

Page 70: ...rda 34 DLLibrda short ud char _far rd unsigned long cnt short _far ibsta short _far iberr unsigned long _far ibcntl ibrdf 35 DLLibrdf short ud char _far flname short _far ibsta short _far iberr unsign...

Page 71: ...nsigned long _far ibcntl ibtmo 45 DLLibtmo short ud short v short _far ibsta short _far iberr unsigned long _far ibcntl ibtrg 46 DLLibtrg short ud short _far ibsta short _far iberr unsigned long _far...

Page 72: ...V 24 was formulated in 1969 largely from the efforts of the Electronic Industries Association EIA and Bell Laboratories The standard describes the electrical specifications and arrangement of control...

Page 73: ...d by the GPIB 232CT A to signal that it has been powered on and is ready to operate 5 GND Ground AB This signal establishes a reference point for all interface voltages 7 RTS Request to Send CA This s...

Page 74: ...sed and whether they must be driven for the serial port to operate Note The GPIB 232CT A serial port is configured to be a DTE Figure E 1 shows the location of the RS 232 connector P O W E R R E A D Y...

Page 75: ...to GND 5 to 5 5 to 7 RTS to RTS 7 to 7 7 to 4 CTS to CTS 8 to 8 8 to 5 Note Connections in bold italics must be implemented Figure E 2 shows a properly configured 9 pin DTE to 9 pin DCE cable includi...

Page 76: ...to a DCE without Handshaking If your serial device does not require or use the hardware handshaking protocol used by the GPIB 232CT A you have two options Use a minimum configuration cable which does...

Page 77: ...mum configuration for a DTE 9 pin to DCE 9 pin cable is shown in Figure E 4 Figure E 5 shows an equivalent 9 pin to 25 pin cable 1 5 6 7 8 9 GPIB 232CT A 9 pin DTE 5 1 9 8 7 6 Serial Device 9 pin DCE...

Page 78: ...evice conforms to the RS 232 protocol Caution Although handshaking might not be required it is best to use some form of handshaking to prevent loss of data Interfacing the GPIB 232CT A to a DTE with H...

Page 79: ...in Figure E 6 allows you to connect to the 9 pin serial port of a personal computer The cable in Figure E 7 shows how to connect to the 25 pin serial port of a personal computer 1 5 6 7 8 9 GPIB 232C...

Page 80: ...create a minimum configuration cable connect the signals shown in bold italics in Table E 3 Wire a custom cable that properly interfaces the GPIB 232CT A hardware handshaking protocol to the handshak...

Page 81: ...onstruct one if you have a thorough knowledge of the handshaking protocols involved Review the RS 232 characteristics of your serial device and build the cable to properly connect the handshake lines...

Page 82: ...p m central time In other countries contact the nearest branch office You may fax questions to us at any time Corporate Headquarters 512 795 8248 Technical support fax 800 328 2203 512 794 5678 Branc...

Page 83: ...if necessary Name Company Address Fax Phone Computer brand Model Processor Operating system Speed MHz RAM MB Display adapter Mouse yes no Other adapters installed Hard disk capacity MB Brand Instrume...

Page 84: ...The problem is List any error messages The following steps will reproduce the problem...

Page 85: ...are configuration and use this form as a reference for your current configuration National Instruments Products GPIB 232CT A Model and Revision NI 488 2 Software Version Number on Disk RS 232 Port Con...

Page 86: ...th our products This information helps us provide quality products to meet your needs Title Getting Started with Your GPIB 232CT A and the NI 488 2 Software for MS DOS Windows Edition Date March 1995...

Page 87: ...e the errors Thank you for your help Name Title Company Address Phone Mail to Technical Publications National Instruments Corporation 6504 Bridge Point Parkway MS 53 02 Austin TX 78730 5039 Fax to Tec...

Page 88: ...he drive your computer reads when you power on or restart your computer C Celsius CIC Controller in Charge CSA Canadian Standards Association CTS Clear to Send DAV Data Valid destination directory Ref...

Page 89: ...ut IRQ Interrupt Request ISO International Standards Organization LED light emitting diode m meters MB megabytes of memory oz ounces PC personal computer RAM random access memory REN Remote Enable RTS...

Reviews: