background image

Chapter 3

Developing Your Application

© National Instruments Corp.

3-19

NI-488.2M UM for Windows NT

   }

Your Win32 application dereferences the pointer to access either the status variables or
function.  The following code demonstrates how to call a function and access the status
variable from within your application:

dvm = (*Pibdev) (0, 1, 0, T10s, 1, 0);
if (*Pibsta & ERR) {
   printf("Call failed");
}

Before exiting your application, you must free 

gpib-32.dll

 with the following

command:

FreeLibrary(Gpib32Lib);

For more information on direct entry, refer to the Win32 SDK (Software
Development Kit) documentation.

Microsoft Visual C/C++

After you have written your Win32 application, you must compile the application using
Microsoft Visual C/C++ (version 2.0 or higher).  To compile and link a Win32 console
application named 

cprog

 in a DOS shell, type the following on the command line:

cl cprog.c

To run your application from the Windows environment, select the Run...  option from
the  Start  menu.  Enter the path and name of the compiled program in the dialog box that
appears.  To run your application from a DOS shell, type the name of your compiled
program on the DOS command line.

Borland C/C++

After you have written your Win32 Borland C/C++ (version 4.0 or higher) application,
compile it using the 

-w32

 option to create a console application.  From the command

line in a DOS shell, type the following command to compile and link a Win32 application
named 

cprog

:

bcc32 -w32 cprog.c

To run your application from the Windows environment, select the Run...  option from
the  Start  menu.  Enter the name of the compiled program in the dialog box that appears.
To run your application from a DOS shell, type the name of your compiled program on
the DOS command line.

Summary of Contents for NI-488.2M

Page 1: ...Copyright 1994 1996 National Instruments Corporation All Rights Reserved NI 488 2M User Manual for Windows NT January 1996 Edition Part Number 320646B 01...

Page 2: ...elgium 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 Hong Kong 2645 3186 Italy 02 48301892 Japa...

Page 3: ...ts if errors are suspected In no event shall National Instruments be liable for any damages arising out of or related to this document or the information contained in it EXCEPT AS SPECIFIED HEREIN NAT...

Page 4: ...ty suitable for use in treatment and diagnosis of humans Applications of National Instruments products involving medical or clinical treatment can create a potential for accidental injury caused by pr...

Page 5: ...tion Requirements 1 5 The NI 488 2M Software Elements 1 6 NI 488 2M Driver and Driver Utilities 1 6 DOS and 16 bit Windows Support Files 1 7 C Language Files 1 7 Sample Application Files 1 7 How the N...

Page 6: ...the Device 3 9 Step 4 Trigger the Device 3 9 Step 5 Wait for the Measurement 3 9 Step 6 Read the Measurement 3 10 Step 7 Process the Data 3 10 Step 8 Place the Device Offline 3 10 Writing Your NI 488...

Page 7: ...dressing 4 5 Termination Method 4 6 Common Questions 4 6 Chapter 5 ibic Interface Bus Interactive Control Utility 5 1 Overview 5 1 Example Using NI 488 Functions 5 1 ibic Syntax 5 4 Number Syntax 5 4...

Page 8: ...evices 6 5 Service Requests from IEEE 488 2 Devices 6 5 Automatic Serial Polling 6 6 Stuck SRQ State 6 6 Autopolling and Interrupts 6 7 SRQ and Serial Polling with NI 488 Device Functions 6 7 SRQ and...

Page 9: ...7 7 Enable Auto Serial Polling 7 7 Enable CIC Protocol 7 8 Assert REN When SC 7 8 Device Template Configuration 7 8 Name 7 9 Access Board 7 9 GPIB Primary Address 7 9 GPIB Secondary Address 7 9 Termi...

Page 10: ...le 8 2 19 Figure 2 9 Program Flowchart for Example 9 2 21 Figure 3 1 General Program Shell Using NI 488 Device Functions 3 7 Figure 3 2 General Program Shell Using NI 488 2 Routines 3 12 Figure 7 1 Ma...

Page 11: ...Application Development and Examples Getting Started Manual Novice Users Installation and Configuration NI 488 2M Function Reference Manual for Windows NT Experienced Users Function and Routine Descri...

Page 12: ...control program that you can use to communicate with GPIB devices interactively Chapter 6 GPIB Programming Techniques describes techniques for using some NI 488 functions and NI 488 2 routines in your...

Page 13: ...vice names variables and for statements taken from program code bold monospace Bold text in this font denotes the messages and responses that the computer automatically prints to the screen italic mon...

Page 14: ...ts Protocols and Common Commands Microsoft Windows NT System Guide Microsoft Win 32 Software Development Kit for Windows NT Tools Customer Communication National Instruments wants to receive your comm...

Page 15: ...generic set of common device commands Talkers Listeners and Controllers GPIB devices can be Talkers Listeners or Controllers A Talker sends out data messages Listeners receive data messages The Contr...

Page 16: ...r Because the Controller is usually at primary address 0 it sends hex 20 address 0 with bit 5 set to make itself a Listener Figure 1 1 shows the configuration of the GPIB address bits Bit Position 7 6...

Page 17: ...age byte DAV data valid Talking device indicates signals on data lines are stable valid data Interface Management Lines Five GPIB hardware lines manage the flow of information across the bus Table 1 2...

Page 18: ...ded 24 conductor cable with both a plug and receptacle connector at each end With this design you can link devices in a linear configuration a star configuration or a combination of the two Figure 1 2...

Page 19: ...respective boards Printer Plotter Digital Voltmeter gpib0 gpib1 One GPIB Another GPIB Figure 1 3 Example of Multiboard System Setup Configuration Requirements To achieve the high data transfer rate t...

Page 20: ...ins the following driver and utility files readme txt is a documentation file that contains important information about the NI 488 2M software and a description of any new features Before you use the...

Page 21: ...2M software gpib nt com is the DOS device driver When you run an existing NI 488 2 application for DOS in the Windows NT environment this file replaces the gpib com driver that you used in the DOS env...

Page 22: ...GPIB hardware The top two layers of the layered NT device driver are accessed from user mode by gpib 32 dll a 32 bit Windows NT dynamic link library GPIB applications access the NI 488 2M software th...

Page 23: ...4 How the NI 488 2M Software Works with Windows NT Unloading and Reloading the NI 488 2M Driver You can unload and restart the NI 488 2M driver using the ibconf utility The icon for ibconf is located...

Page 24: ...lish communication between a host computer and a GPIB device clr_trg c is the source code file for Example 2 It illustrates how you can clear and trigger GPIB devices asynch c is the source code file...

Page 25: ...he multimeter to take measurements and record each measurement as it occurs To do this he has written an application that uses some simple high level GPIB commands The following steps correspond to th...

Page 26: ...NT Computer Multimeter INIT Read Measurement from Multimeter Finished Getting Measurements CLEAN UP Yes No ibwrt ibrd VOLTS Tell Multimeter to Take Measurement 5 volts 1 2 3 5 Set Up Multimeter to Tak...

Page 27: ...mmand to the oscilloscope This command clears the internal registers of the oscilloscope reinitializing it to default values and settings 3 The application sends a command to the oscilloscope telling...

Page 28: ...oscope to Get Reading Finished Reading CLEAN UP Yes No ibclr ibtrg Clear Command Request Data from Oscilloscope CURV Clear Oscilloscope ibwrt Define Task to Be Done When Oscilloscope is Triggered Trig...

Page 29: ...urer She acquires and prints images with the aid of an application program she wrote using high level GPIB commands The following steps correspond to the program flowchart in Figure 2 3 1 The applicat...

Page 30: ...NT Computer INIT Print Image Asynchronously CLEAN UP Non GPIB Activity Save to Disk Color Printer Print Image Image Scan Non GPIB Activity Compute Statistics More Images Yes No Yes No ibwrta 1 2 3 4 5...

Page 31: ...d In this case the scanner expects the commands to be terminated with CR LF carriage return r and linefeed n The application sets its end of string EOS byte to LF The linefeed code indicates to the sc...

Page 32: ...dows NT Read Status Computer Scanner INIT Set EOS Mode CLEAN UP ibclr ibeos Change Scan Resolution Reset Internal State RES 3 r n ibwrt Read Data ibwrt ibrd Start Scan OK scan r n Scanned Data ibrd 1...

Page 33: ...designer has previously established that the default values for the film recorder are appropriate for the type of film she is using 3 The application advances the new roll of film into position so th...

Page 34: ...recorder asserts the SRQ line to signal it is done advancing the film 9 As soon as the application s wait for RQS completes the application serial polls the film recorder to see if it requested servi...

Page 35: ...for the Film Recorder to Request Service Finished Loading Film ibclr ibwait FRM Read Response from the Film Recorder Response Advance Film Clear Film Recorder Clear Command ibrsp 1 2 4 3 5 No ibwrt Y...

Page 36: ...ecorder to Request Service Advance Film Read Response From Film Recorder 6 6a 6b 6c 7 8 9 10 Yes ibwait These steps are repeated 3 times once for each color pass ibwrt ibwait Reached End of Film No Co...

Page 37: ...e purposes of his future work with these tensile testers he needs to determine what GPIB addresses they have been set to He can do so with the aid of a simple application he has written The following...

Page 38: ...r 3 Who s Listening Get a List of Devices Present on GPIB Device 1 is Here Device 2 is Here Device 3 is Here MUTT 10426 MUTT 10528 1 2 3 4 5 MUTT 10383 GPIB Cable GPIB Cable GPIB Cable Receive Receive...

Page 39: ...ond to the program flowchart in Figure 2 7 1 The application initializes the GPIB by bringing the interface board in the computer online 2 The application configures the strain gauges to request servi...

Page 40: ...Wait for 1 or More Strain Gauges to Request Service 3 No Did You Request Service Did You Request Service Yes Serial Poll Each Strain Gauge Until One Requesting Service is Located 4 Response Get a Rea...

Page 41: ...ard in the computer online 2 The application configures the temperature transducer in the first monitoring unit by choosing which of the eight GPIB data lines the transducer uses to respond when a par...

Page 42: ...llel Polls Non GPIB Activity Parallel Poll Enable Start Power Supplies No Temp Transducer Yes 1 2 3 4 5 6 7 9 PPollConfig PPollConfig PPoll Unconfigure 8 PPoll MIX ON SendList PPollUnconfig Power Supp...

Page 43: ...llowing steps correspond to the program flowchart in Figure 2 9 1 The application brings the device online 2 The application waits for any of three events to occur the device to become listen addresse...

Page 44: ...ce Controller INIT Wait to be Talk Addressed Listen Addressed or Cleared Write Out New Data No ibwait fffffffffff Is This the Clear Event Is This the Talk Addressed Event Reset Internal State Yes Yes...

Page 45: ...s to all of the NI 488 and NI 488 2 calls For example it exports a pointer to the NI 488 ibwrt function For a detailed example showing how to use direct access refer to the sample program dlldev c tha...

Page 46: ...han NI 488 2 routines The following sections describe these different function types NI 488 Device Functions Device functions are high level functions that automatically execute commands that handle b...

Page 47: ...h NI 488 function and NI 488 2 routine updates four global variables to reflect the status of the device or board that you are using The status word ibsta the error variable iberr and the count variab...

Page 48: ...brd GPIB error TIMO 14 4000 dev brd Time limit exceeded END 13 2000 dev brd END or EOS detected SRQI 12 1000 brd SRQ interrupt received RQS 11 800 dev Device requesting service SPOLL 10 400 brd Board...

Page 49: ...is set in ibsta indicating that an error has occurred For more information on error codes and solutions refer to Chapter 4 Debugging Your Application or Appendix B Error Codes and Solutions Count Vari...

Page 50: ...Utility Writing Your NI 488 Application This section discusses items you should include in your application program general program steps and an NI 488 example In this manual the example code is pres...

Page 51: ...ing NI 488 functions The flowchart is for device level calls No Yes No No Closed All Devices Yes START Make a Device Level Call Send Data to Device Receive Data from Device Clear Device Serial Poll De...

Page 52: ...R gpiberr ibdev error The input arguments of the ibdev function are as follows 0 board index for GPIB0 1 primary GPIB address of the device 0 no secondary GPIB address for the device T10s I O timeout...

Page 53: ...a measurement TRIGGER 2 and to assert the SRQ line when the measurement completes and the multimeter is ready to send the result SRE 16 Step 4 Trigger the Device If you configure the device to wait f...

Page 54: ...Status Byte 0x x n StatusByte Step 6 Read the Measurement If the data is valid read the measurement from the instrument AsciiToFloat is a function that takes a null terminated string as input and out...

Page 55: ...ritten to use direct entry to access the gpib 32 dll dll4882 c The NI 488 2M software also includes the source code for nine application examples which are described in Chapter 2 Application Examples...

Page 56: ...e Receive Clear Device DevClear Serial Poll Device ReadStatusByte and so on Address Devices to Listen SendSetup Send Data to Addressed Listener SendDataBytes Address Device to Talk ReceiveSetup Receiv...

Page 57: ...ment is the list of instruments that was created the third argument is a list of instrument addresses that the procedure actually found and the last argument is the maximum number of devices that the...

Page 58: ...Did not find the Fluke n ibonl 0 0 exit 1 The constant NLend signals that the new line character with EOI is automatically appended to the data to be sent The constant STOPend indicates that the read...

Page 59: ...to the multimeter Send 0 fluke VAC AUTO TRIGGER 2 SRE 16 29L NLend if ibsta ERR gpiberr Send setup error Step 6 Trigger the Instrument In the previous step the multimeter was instructed to wait for a...

Page 60: ...us Byte printf Status Byte 0x x n statusByte Step 8 Read the Measurement Use the Receive function to read the measurement over the GPIB The first argument is the GPIB interface board number and the se...

Page 61: ...n program you must compile the application program using Microsoft Visual C C version 2 0 or higher Next link the application with the C language interface gpib 32 obj To compile and link a Win32 cons...

Page 62: ...entry refer to the Win32 SDK Software Development Kit documentation In your Win32 application you first need to load gpib 32 dll The following code fragment demonstrates how to call the LoadLibrary fu...

Page 63: ...a Win32 console application named cprog in a DOS shell type the following on the command line cl cprog c To run your application from the Windows environment select the Run option from the Start menu...

Page 64: ...nfig nt file to load gpib nt com whenever a DOS application is executed The config nt file is located in your winnt system32 directory where winnt is your Windows NT directory for example c windows To...

Page 65: ...ware is configured correctly See your Getting Started manual for more information There are several reasons why ibtest might be unable to access the NI 488 2M driver If the software is not properly in...

Page 66: ...ies in the system log explaining why it failed to start You can examine the system log by running the Event Viewer utility in the Administrative Tools window of the Program Manager Events that might a...

Page 67: ...pical GPIBInfo output is as follows GPIBInfo Sep 29 1993 Copyright 1993 National Instruments Corp All rights reserved Software Information The NI 488 2M Software for Windows NT is loaded You are runni...

Page 68: ...and Solutions These appendixes can help you interpret the state of the driver GPIB Error Codes Table 4 1 lists the GPIB error codes Remember that the error variable is meaningful only when the ERR bi...

Page 69: ...gram as described in your getting started manual Timing Errors If your application fails but the same calls issued in ibic are successful your program might be issuing the NI 488 2 calls too quickly f...

Page 70: ...of this manual or the section about ibdiag in the getting started manual for specific information about what might cause these tests to fail How do I communicate with my instrument over the GPIB Refer...

Page 71: ...refer to Chapter 5 ibic Interface Bus Interactive Control Utility How can I determine which type of GPIB board I have installed Run the GPIBInfo utility It returns information about the GPIB boards c...

Page 72: ...oot problems and develop your application program One way ibic helps you to learn about your instrument and to troubleshoot problems is by displaying the following information on your screen whenever...

Page 73: ...help for help or q to quit 2 Use ibdev to find the device name which is assigned to your device in the ibconf program The following example shows how you could use ibdev to open a device assign it to...

Page 74: ...F3R7T3 0100 cmpl count 6 or ud0 ibwrt F3R7T3 0100 cmpl count 6 5 Trigger the device as follows ud0 ibtrg 0100 cmpl 6 Wait for a timeout or for your device to request service If the current timeout lim...

Page 75: ...4 7 E 0 0a 0a 9 Place the device offline as follows ud0 ibonl enter value 0 0100 cmpl or ud0 ibonl 0 0100 cmpl 10 Terminate the ibic program by entering q at the prompt ibic Syntax When you enter com...

Page 76: ...and n r represents a carriage return character and n represents a linefeed character You can use these special characters to insert the carriage return and linefeed characters into a string as in F3R...

Page 77: ...EOS message ibeot v Enable disable END message ibln v v Check for presence of device on the GPIB at pad sad ibloc Go to local ibonl v Place device online or offline ibpad v Change primary address ibp...

Page 78: ...ontroller to standby ibist v Set clear ist iblines Read the state of all GPIB control lines ibln v v Check for presence of device on the GPIB at pad sad ibloc Go to local ibonl v Place device online o...

Page 79: ...st addrlist Clear multiple devices EnableLocal addrlist Enable local control EnableRemote addrlist Enable remote control FindLstn addrlist v Find all Listeners FindRQS addrlist Find device asserting S...

Page 80: ...tatus word ibsta in two forms a hex value in square brackets and a list of mnemonics in parentheses In the following example the status word is on the second line It shows that the device function wri...

Page 81: ...2 routine is called Refer to the function descriptions in the NI 488 2M Function Reference Manual for Windows NT for the correct interpretation of the count return Common NI 488 Functions ibfind Use t...

Page 82: ...as shown in the following example ibdev enter board index 0 enter primary address 6 enter secondary address 0x67 enter timeout 13 enter EOI on last byte flag 1 enter end of string mode byte 0 id 32256...

Page 83: ...ta from one GPIB device to another For example to send the six character data string F3R5T1 from the computer to a device called dev1 you enter the following string at the dev1 prompt as shown in the...

Page 84: ...17 To do this enter the SendList command at the 488 2 0 prompt as shown in the following example 488 2 0 SendList 2 17 IDN NLend 0128 cmpl cic tacs count 6 The returned status word contains the cmpl...

Page 85: ...If you do not enter an option a menu of options appears Repeat previous function Turn OFF display Turn ON display n function Execute function n times where function represents the correct ibic functio...

Page 86: ...rt Help describes the function syntax for all NI 488 functions and NI 488 2 routines Repeat Previous Function The function repeats the most recent function executed The following example issues an ibs...

Page 87: ...sent 5 times 20 times and then 10 more times ud0 5 ibwrt Hello ud0 20 ud0 10 Notice that the multiplier does not become part of the function name that is ibwrt Hello is repeated 20 times not 5 ibwrt H...

Page 88: ...use the print function to echo a string to the screen The following example shows how you can use ASCII or hex with the print command dev1 print hello hello dev1 print and r n x67 x6f x6f x64 x62 x79...

Page 89: ...s function to enable disable or configure the EOS modes EOS mode configuration includes the following information A 7 bit or 8 bit EOS byte EOS comparison method This indicates whether the EOS byte ha...

Page 90: ...e ibconfig function option IbcHSCableLength The value passed to ibconfig should specify the number of meters of cable in your GPIB configuration If you specify a cable length that is much smaller than...

Page 91: ...connected by four meters of cable Waiting for GPIB Conditions You can use the ibwait function to obtain the current ibsta value or to suspend your application until a specified condition occurs on th...

Page 92: ...following paragraphs describe some programming techniques for Talker Listener applications Waiting for Messages from the Controller A Talker Listener application typically uses ibwait with a mask of 0...

Page 93: ...PIB devices when they request service When the GPIB SRQ line is asserted it signals the Controller that a service request is pending The Controller must then determine which device asserted the SRQ li...

Page 94: ...sp function ibrsp returns the first queued response Other responses are read in first in first out FIFO fashion If the RQS bit of the status word is not set when ibrsp is called a serial poll is condu...

Page 95: ...properly if interrupts are disabled SRQ and Serial Polling with NI 488 Device Functions You can use the device level NI 488 function ibrsp to conduct a serial poll ibrsp conducts a single serial poll...

Page 96: ...til it finds a device that is requesting service or until it has polled all of the devices on the list The routine returns the index and status byte value of the device requesting service TestSRQ dete...

Page 97: ...d n FindRQS 0 AddrList SerialPollResponse if ibsta ERR printf Device at pad x returned byte x n AddrList ibcnt int SerialPollResponse DevicePad AddrList ibcnt DeviceResponse SerialPollResponse return...

Page 98: ...ler and must configure itself for a parallel poll and set its own individual status bit ist Parallel Polling with NI 488 Functions Follow these steps to implement parallel polling using NI 488 functio...

Page 99: ...ng example the GPIB board is to configure itself to participate in a parallel poll It asserts DIO5 when ist 1 if a parallel poll is conducted ibppc 0 0x6C ibist 0 1 2 Conduct the parallel poll using i...

Page 100: ...m checks bit 4 hex 10 in the response to determine the value of ist PPoll 0 response If response has bit 4 hex 10 set the ist bit of the device at that time is equal to 1 If it does not appear the ist...

Page 101: ...config function in your application program If your application program uses ibconfig whenever it needs to modify a configuration option it is able to run on any computer with the appropriate NI 488 2...

Page 102: ...ur new settings If ibconf cannot unload the software because it is being used by another application it instructs you either to exit all GPIB related applications and click Restart again or to shut do...

Page 103: ...B you must use the Micro Channel configuration program that came with your computer to modify many of the hardware settings for your board Figure 7 2 shows the board configuration dialog box for the A...

Page 104: ...scard any configuration changes made to the board and return to the main dialog box Help Use this button or the F1 key to bring up help for this dialog box Software Use this button to expand the board...

Page 105: ...r to the getting started manual that came with your GPIB interface board Use Demand Use this item to select the DMA transfer mode that the NI 488 2M Mode DMA software uses When this item is selected t...

Page 106: ...boards must be assigned a unique primary address This Address address a number in the range 0 to 30 decimal is used by the NI 488 2M software to compute the talk and listen addresses of the board The...

Page 107: ...en the NI 488 2M software is being used to control a GPIB system the GPIB interface board should normally be the System Controller Some situations such as a network of computers require that the inter...

Page 108: ...his option is not selected Assert REN When this option is selected and the interface board is the System When SC Controller the GPIB Remote Enable REN line is automatically asserted any time a device...

Page 109: ...nded addressing is needed the device should be assigned a Secondary unique secondary address This number must be in the range 96 to 126 Address decimal If extended addressing is not required select No...

Page 110: ...ction waits for an event before returning The default timeout period is 10 s Serial Poll Use this option to select the length of time the NI 488 2M software Timeout waits for a serial poll response fr...

Page 111: ...board calls brd or both dev brd The following table shows the status word layout Table A 1 Status Word Bits Mnemonic Bit Pos Hex Value Type Description ERR 15 8000 dev brd GPIB error TIMO 14 4000 dev...

Page 112: ...byte has been received if the software is configured to terminate a read on an EOS byte If the GPIB board is performing a shadow handshake as a result of the ibgts function any other function can ret...

Page 113: ...r immediately following a call to ibrsv EVENT brd Use EVENT in Talker Listener applications applications in which the GPIB interface is not the Controller to monitor the order of GPIB device clear gro...

Page 114: ...stem Controller or when the GPIB board passes control to another device ATN brd ATN indicates the state of the GPIB Attention ATN line ATN is set whenever the GPIB ATN line is asserted and it is clear...

Page 115: ...wait call if the DTAS bit is set in the ibwait mask parameter DCAS brd DCAS indicates whether the GPIB board has detected a device clear command DCAS is set whenever the GPIB board detects that the De...

Page 116: ...not System Controller as required EABO 6 I O operation aborted timeout ENEB 7 Nonexistent GPIB board EOIP 10 Asynchronous I O in progress ECAP 11 No capability for operation EFSO 12 File system error...

Page 117: ...more information Use the unit descriptor returned from ibdev or ibfind as the first parameter in subsequent NI 488 functions Examine the variable before the failing function to make sure the function...

Page 118: ...priate hex code in ibcmd to address your device Check your cable connections and make sure at least two thirds of your devices are powered on Call ibpad or ibsad if necessary to match the configured a...

Page 119: ...NI 488 2 routine called with an invalid address PPollConfig called with an invalid data line or sense bit Solutions Make sure that the parameters passed to the NI 488 function or NI 488 2 routine are...

Page 120: ...plugged into the system the I O address specified during configuration does not match the actual board setting or there is a system conflict with the base I O address Solutions Make sure there is a GP...

Page 121: ...ded capability EFSO 12 EFSO results when an ibrdf or ibwrtf call encounters a problem performing a file operation Specifically this error indicates that the function is unable to open create seek writ...

Page 122: ...Disable autopolling with the ibconfig function or the ibconf utility ESRQ 16 ESRQ occurs only during the ibwait function or the WaitSRQ routine ESRQ indicates that a wait for RQS is not possible beca...

Page 123: ...old all the addresses of the Listeners found In the case of FindRQS ETAB means that none of the devices in the given table were requesting service In the case of ibevent ETAB means the event queue ove...

Page 124: ...fax questions to us at any time Corporate Headquarters 512 795 8248 Technical support fax 800 328 2203 512 794 5678 Branch Offices Phone Number Fax Number Australia 03 9 879 9422 03 9 879 9179 Austria...

Page 125: ...s engineers answer your questions more efficiently If you are using any National Instruments hardware or software products related to this problem include the configuration forms from their user manua...

Page 126: ...National Instruments software product Version Configuration The problem is List any error messages The following steps will reproduce the problem...

Page 127: ...umentation supplied with our products This information helps us provide quality products to meet your needs Title NI 488 2M User Manual for Windows NT Edition Date January 1996 Part Number 320646B 01...

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

Page 129: ...devices on the bus that are attached to it ANSI American National Standards Institute ASCII American Standard Code for Information Interchange asynchronous An action or event that occurs at an unpred...

Page 130: ...sed to reset the device or internal Device Clear functions of all devices See SDC device level function A function that combines several rudimentary board operations into one function so that the user...

Page 131: ...in ANSI IEEE Standard 488 1 1987 and ANSI IEEE Standard 488 2 1987 GPIB address The address of a device on the GPIB composed of a primary address MLA and MTA and perhaps a secondary address MSA The G...

Page 132: ...B devices troubleshoot problems and develop your application ibsta At the end of each function call this global variable status word contains status information IEEE Institute of Electrical and Electr...

Page 133: ...V The Message Available bit is part of the IEEE 488 2 defined status byte which is received from a device responding to a serial poll MB Megabytes of memory memory resident Resident in RAM MLA A GPIB...

Page 134: ...sed Parallel Poll Disable to disable a configured device from participating in polls There are 16 PPD commands PPE Parallel Poll Enable is the GPIB command used Parallel Poll Enable to enable a config...

Page 135: ...Serial Poll Disable SPE The GPIB command used to enable a specific device to be Serial Poll Enable polled That device must also be addressed to talk See SPD SRQ Service Request The GPIB line that a de...

Page 136: ...prevents I O functions from hanging indefinitely when there is a problem on the GPIB TLC An integrated circuit that implements most of the GPIB Talker Listener and Controller functions in hardware U u...

Page 137: ...ring mode 2 8 to 2 9 non controller example 2 20 to 2 21 parallel polls 2 18 to 2 19 serial polls using NI 488 2 routines 2 16 to 2 17 service requests 2 10 to 2 13 source code files 2 1 choosing betw...

Page 138: ...processing of data 3 16 program shell illustration 3 12 reading measurements 3 16 triggering instruments 3 15 waiting for measurements 3 15 to 3 16 NI 488 2 routines choosing between NI 488 functions...

Page 139: ...ondition bit position hex value and type table 3 4 description A 4 clearing and triggering devices example 2 4 to 2 5 CMPL status word condition bit position hex value and type table 3 4 description A...

Page 140: ...table 1 3 DCAS status word condition bit position hex value and type table 3 4 description A 5 using event queue 6 4 to 6 5 waiting for messages from Controller 6 4 debugging common questions 4 6 to 4...

Page 141: ...applications programming Devices applet Windows NT 4 1 direct access to NI 488 2 dynamic link library compiling linking and running applications 3 17 to 3 19 requirements 3 1 DMA configuring with ibc...

Page 142: ...EDVR error code definition table 4 4 description B 1 to B 2 ibic example 5 11 EFSO error code definition table 4 4 description B 6 end of string character See EOS END status word condition bit positi...

Page 143: ...and type table 3 4 description A 2 error codes and solutions EABO B 4 to B 5 EADR B 3 EARG 5 12 B 4 EBUS B 6 to B 7 ECAP B 6 ECIC B 2 EDVR 5 11 B 2 EFSO B 6 ENEB 5 10 B 5 ENOL B 3 EOIP B 5 to B 6 ESAC...

Page 144: ...9 functions See auxiliary functions ibic NI 488 functions G General Purpose Interface Bus See GPIB global variables 3 3 to 3 6 count variables ibcnt and ibcntl 3 5 to 3 6 debugging applications 4 3 e...

Page 145: ...nfiguration effects 6 3 parallel polling 6 10 to 6 12 implementing 6 10 to 6 12 using NI 488 functions 6 10 to 6 11 using NI 488 2 routines 6 11 to 6 12 serial polling 6 5 to 6 9 automatic serial poll...

Page 146: ...ion 7 9 Assert REN When SC option 7 8 Base I O Address option 7 4 board configuration dialog box illustration 7 3 Bus Timing option 7 4 Cable Length for High Speed option 7 4 Cancel button 7 4 device...

Page 147: ...PIB driver 4 5 determining assertion of EOI line 6 2 enabling autopolling 6 6 enabling EVENT bit 6 4 to 6 5 enabling high speed data transfers 6 2 to 6 3 ibdev function conducting parallel polls 6 11...

Page 148: ...nctions 5 5 to 5 7 NI 488 2 routines 5 8 to 5 9 numbers 5 4 strings 5 5 ibonl function placing board offline 3 17 placing device offline 3 10 using in ibic example 5 4 ibppc function conducting parall...

Page 149: ...ic utility interface management lines 1 3 Interrupt Level option ibconf utility 7 5 interrupts and autopolling 6 7 L LACS status word condition bit position hex value and type table 3 4 description A...

Page 150: ...y functions ibic parallel polling 6 10 to 6 11 programming considerations advantages of using 3 2 board functions 3 2 to 3 3 choosing between functions and routines 3 1 to 3 3 device functions 3 2 whe...

Page 151: ...8 2 routines C language files 1 7 DOS and 16 bit Windows support files 1 7 driver and driver utility files 1 6 to 1 7 interaction with Windows NT 1 8 reloading NI 488 2M driver 1 9 unloading NI 488 2M...

Page 152: ...at function n times n function ibic 5 16 repeat previous function function ibic 5 15 requesting service See service requests routines See NI 488 2 routines RQS status word condition bit position hex v...

Page 153: ...5 14 to 5 15 setting up your system See configuration software See NI 488 2M software SPOLL bit 6 5 SPOLL status word condition bit position hex value and type table 3 4 description A 3 SRQ service r...

Page 154: ...4 to 6 5 requesting service 6 5 waiting for messages from Controller 6 4 Talkers 1 1 technical support C 1 Terminate read on EOS option ibconf utility 7 9 termination methods errors caused by 4 6 term...

Page 155: ...ction WaitSRQ routine conducting serial polls 6 8 waiting for measurement 3 15 to 3 16 Windows 16 bit GPIB applications 3 20 Windows 16 bit support files 1 7 Windows NT examining NT devices to verify...

Reviews: