background image

© National Instruments Corp.

A-1

AT-GPIB for SCO UNIX

Appendix A
New NI-488M Functions

                                                                                                                             

This appendix describes three new NI-488M functions included in the
NI-488M software.

Summary of Contents for AT-GPIB

Page 1: ... Copyright 1991 1995 National Instruments Corporation All Rights Reserved Getting Started with Your AT GPIB and the NI 488M Software for SCO UNIX System V 386 October 1993 Edition Part Number 320374 01 ...

Page 2: ...tria 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 03 3788 1921 Mexico 95 800 010 0793 Netherlands 03480 33466 Norway 32 84 84 00 Singapore 2265886 Spain 91 640 0085 Sweden 08 730 49 70 Switzerland 056 20 51 51 Taiwan 02 377 1200 U K 0635 523545 ...

Page 3: ... 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 for technical accuracy In the event that technical or typographical errors exist National Instruments reserves the right to make changes to subsequent editions of this document without prior notice to ho...

Page 4: ...e product owner s abuse misuse or negligent acts and power failure or surges fire flood accident actions of third parties or other events outside reasonable control Copyright Under the copyright laws this publication may not be reproduced or transmitted in any form electronic or mechanical including photocopying recording storing in an information retrieval system or translating in whole or in par...

Page 5: ...r or application designer Any use or application of National Instruments products for or involving medical or clinical treatment must be performed by properly trained and qualified medical personnel and all traditional medical safeguards equipment and procedures that are appropriate in the particular situation to prevent serious injury or death should always continue to be used when National Instr...

Page 6: ... Communications This device complies with the limits for radio noise emissions from digital apparatus set out in the Radio Interference Regulations of the Canadian Department of Communications DOC Le présent appareil numérique n émet pas de bruits radioélectriques dépassant les limites applicables aux appareils numériques de classe B prescrites dans le règlement sur le brouillage radioélectrique é...

Page 7: ...not expressly approved by National Instruments could void the user s authority to operate the equipment under the FCC Rules If necessary consult National Instruments or an experienced radio television technician for additional suggestions The following booklet prepared by the FCC may also be helpful How to Identify and Resolve Radio TV Interference Problems This booklet is available from the U S G...

Page 8: ...ss Selection 2 3 Possible Conflicts 2 6 Interrupt Selection 2 8 Possible Conflicts 2 11 DMA Channel Selection 2 13 Shield Ground Configuration 2 18 Step 2 Install the Hardware 2 19 Chapter 3 Software Installation and Configuration 3 1 Step 1 Prepare for Software Installation 3 1 Step 2 Install the NI 488M Software 3 2 A Set Up a Working Directory 3 2 B Install the Utility Files 3 3 C Install the C...

Page 9: ...g the Driver 3 9 Developing Your Application 3 10 Appendix A New NI 488M Functions A 1 IBDEV 3 A 2 IBLINES 3 A 4 IBLN 3 A 6 Appendix B Special Instructions for Changing the Software Settings B 1 Using a Base I O Address Different from the Software Default Setting B 1 Using Interrupt Vector Number 11 or DMA Channel 5 B 2 Appendix C Hardware Specifications C 1 Appendix D Customer Communication D 1 G...

Page 10: ...ble Hardware Configurations 2 2 Table 2 2 Software Default AT GPIB Base I O Addresses 2 3 Table 2 3 Possible Base I O Address Switch Settings for the AT GPIB 2 5 Table 2 4 PC AT I O Address Map 2 7 Table 2 5 Software Default AT GPIB Interrupt Request Line 2 9 Table 2 6 PC AT Interrupt Assignment Map 2 11 Table 2 7 Software Default AT GPIB DMA Channel 2 13 Table 2 8 DMA Channels for the AT GPIB 2 1...

Page 11: ...allation contains step by step instructions for configuring and installing the AT GPIB board in a PC AT Chapter 3 Software Installation and Configuration lists all the programs and files located on the distribution diskette and contains the steps for installing and configuring the NI 488M software This chapter also contains a description of the software configuration utility ibconf and information...

Page 12: ...in this font denotes text or characters that are to be literally input from the keyboard sections of code programming examples and syntax examples This font is also used for the proper names of disk drives paths directories programs subprograms subroutines device names functions variables filenames and extensions and for statements and comments taken from program code italic monospace Italic text ...

Page 13: ...is manual Getting Started with Your AT GPIB TNT and NI 488 2 Software for DOS UNIX System V 386 Release 3 2 Integrated Software Development Guide IBM Personal Computer AT Technical Reference Customer Communication National Instruments wants to receive your comments on our products and manuals We are interested in the applications you develop with our products and we want to help if you have proble...

Page 14: ...elded GPIB cables which you can purchase from National Instruments Type X1 single shielded cables 1 m 2 m or 4 m Type X2 double shielded cables 1 m 2 m or 4 m To meet FCC emission limits for this Class B 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 in residential areas Software De...

Page 15: ...ation and Installation This chapter contains step by step instructions for configuring and installing the AT GPIB board in a PC AT Step 1 Configure the Hardware Figure 2 1 shows the location of the AT GPIB configuration jumpers and switches Figure 2 1 AT GPIB Parts Locator Diagram ...

Page 16: ...ardware jumper settings to match the default software configuration settings given in Table 2 1 Switch and Jumper Settings Table 2 1 shows the software and hardware default settings and available hardware configurations for the AT GPIB board Table 2 1 Software and Hardware Default Settings and Available Hardware Configurations AT GPIB Software Default Settings Hardware Default Settings Available H...

Page 17: ... computer If any equipment in your computer uses this I O address space change the base I O address of either the AT GPIB board or the other device See Table 2 3 later in this chapter for other possible AT GPIB board base I O address settings Each switch in U25 corresponds to one of the PC AT bus address lines A9 through A5 The top switch 1 corresponds to address line A9 the next switch from the t...

Page 18: ...h positions Push this side down OFF for logic 1 Push this side down ON for logic 0 Switch Set to Hardware Default Setting Base I O Address 2C0 hex Switch Set to Match Software Default Setting Base I O Address 260 hex 9 8 7 6 5 U25 ADDRESS Binary Hex 0 C 2 9 8 7 6 5 Binary Hex 0 6 2 1 0 1 1 0 0 0 0 0 0 1 0 0 1 1 0 0 0 0 0 U25 ADDRESS 1 0 1 0 1 2 3 4 5 OFF 1 2 3 4 5 OFF Figure 2 2 Base I O Address S...

Page 19: ... the AT GPIB Switch Setting A9 A8 A7 A6 A5 Base I O Address hex I O Address Space Used hex 0 1 0 0 0 100 100 to 11F 0 1 0 0 1 120 120 to 13F 0 1 0 1 0 140 140 to 15F 0 1 0 1 1 160 160 to 17F 0 1 1 0 0 180 180 to 19F 0 1 1 0 1 1A0 1A0 to 1BF 0 1 1 1 0 1C0 1C0 to 1DF 0 1 1 1 1 1E0 1E0 to 1FF 1 0 0 0 0 200 200 to 21F 1 0 0 0 1 220 220 to 23F 1 0 0 1 0 240 240 to 25F 1 0 0 1 1 260 260 to 27F 1 0 1 0 0...

Page 20: ...and Software Configuration Form in Appendix D Customer Communication Possible Conflicts Table 2 4 lists some of the I O addresses used by other PC AT plug in interface boards and adapters This is not a complete list but it may help in determining possible address conflicts Symptoms of I O address conflicts vary widely At one extreme conflicts can prevent the computer from booting At the other extr...

Page 21: ...269 to 277 278 to 27F LIM Expanded Memory Card Reserved AT GPIB board 1 software default LIM Expanded Memory Card LIM Expanded Memory Card AT GPIB board 0 software default LIM Expanded Memory Card AT Parallel Printer Port 2 280 to 29F 2A0 to 2A7 2A8 2A9 to 2AF 2B0 to 2DF 2B8 2B9 to 2BF 2C0 to 2C7 2C8 to 2E0 2E1 2E2 to 2E3 2E4 to 2E7 2E8 2E9 to 2F7 2F8 to 2FF WD EtherCard default LIM Expanded Memor...

Page 22: ...Communications Bisynchronous BSC Communications alternate Cluster Adapter 0 Bisynchronous BSC Communications primary Monochrome Display Parallel Printer Adapter 0 Enhanced Graphics Adapter VGA Color Graphics Monitor Adapter VGA Diskette Controller Serial Port 1 COM1 Interrupt Selection The AT GPIB board can use one of eleven interrupt lines on the PC AT I O channel The interrupt line is selected b...

Page 23: ...est Line Board Default IRQ Line First AT GPIB gpib0 5 Second AT GPIB gpib1 10 Note Do NOT use interrupt line 6 or interrupt line 14 Interrupt line 6 is used by the diskette drive controller and interrupt line 14 is used by the hard disk drive controller on most PC ATs Once you have selected an interrupt line place the jumper on the appropriate pins to enable the interrupt line refer to Figure 2 1 ...

Page 24: ...6 7 9 IRQ9 Figure 2 3 Interrupt Jumper Settings To change to another interrupt line remove the jumper from its stored position and place it on the new posts If you change the hardware interrupt line to something other than IRQ5 make sure that you make a corresponding change to the software interrupt setting as described in Chapter 3 Software Installation and Configuration Also make sure that you r...

Page 25: ... that do not surface until a considerable amount of time has elapsed When they do surface the problems can exhibit themselves simply as strange behavior National Instruments has made every effort to select a software default interrupt level that will work However because of the numerous different interface boards available for use in the PC AT it is not possible to select an interrupt level that i...

Page 26: ...fault 8 Real Time Clock 7 Parallel Port 1 6 Diskette Controller Fixed Disk and Diskette Drive 5 Parallel Port 2 AT GPIB board 0 software default 4 Serial Port 1 BSC BSC Alternate SDLC 3 Serial Port 2 BSC BSC Alternate Cluster Primary PC Network default PC Network Alternate default SDLC WD EtherCard default 3Com EtherLink default 2 IRQ8 15 Chain from interrupt Controller 2 1 Keyboard Controller Out...

Page 27: ...e are shown in Table 2 7 You must change the DMA channel setting on the hardware to match the software DMA channel setting Table 2 7 Software Default AT GPIB DMA Channel Board Default DMA Channel First AT GPIB gpib0 7 Second AT GPIB gpib1 6 Check to determine that the software default DMA channel setting is not already used by other equipment in your computer If any equipment in your computer uses...

Page 28: ...e AT GPIB Signal Lines DMA Channel DMA Acknowledge DMA Request 5 DACK5 DRQ5 6 DACK6 DRQ6 7 DACK7 DRQ7 You must position two jumpers to select a DMA channel One jumper selects the DMA Request line and the other selects the DMA Acknowledge line You must move these two jumpers as a pair and the DMA Acknowledge and DMA Request lines that you select must have the same numeric suffix for proper operatio...

Page 29: ...5 and the setting to which you must change your hardware to match the software default DMA channel setting DMA channel 7 DRQ5 DRQ7 DACK7 DRQ6 DACK6 DACK5 IRQ 15 14 12 11 10 DRQ5 DRQ7 DACK7 DRQ6 DACK6 DACK5 IRQ 15 14 12 11 10 Jumper Set to Hardware Default Setting DMA Channel 5 Jumper Set to Match Software Default Setting DMA Channel 7 Figure 2 4 DMA Channel Jumper Setting ...

Page 30: ...the AT GPIB board to assert a DRQ line on the PC AT I O channel Make sure that you make a corresponding change to the software DMA channel setting during the software installation discussed in Chapter 3 Software Installation and Configuration DRQ5 DRQ7 DACK7 DRQ6 DACK6 DACK5 IRQ 15 14 12 11 10 Figure 2 5 DMA Jumper Setting for No DMA Channel Logically disconnect the AT GPIB board from the DMA line...

Page 31: ... determining possible DMA channel conflicts Symptoms of DMA channel conflicts vary widely At one extreme conflicts can prevent the computer from booting At the other extreme DMA channel conflicts can sometimes be detected quite easily because any data transfer operation ibrd ibwrt will time out with no bytes transferred National Instruments has made every effort to select a software default DMA ch...

Page 32: ... it across only one of the jumper pins Jumper settings for logic ground connected and disconnected from shield ground are shown in Figure 2 6 Logic Ground Connected to Shield Ground Default Logic Ground Disconnected from Shield Ground W1 W1 Figure 2 6 Ground Configuration Jumper Settings Note The AT GPIB was tested for compliance with FCC standards with the shield ground connected to logic ground ...

Page 33: ...Install the AT GPIB board by completing the following steps 1 Turn off your computer 2 Unplug the power cord 3 Remove the cover 4 Plug the AT GPIB board into an unused 16 bit slot you may have to remove a blank expansion slot cover bracket 5 Screw the AT GPIB board mounting bracket to the back panel rail 6 Replace the cover 7 Plug the power cord into the wall outlet 8 Turn your computer back on Th...

Page 34: ...Install the Link Kit now if you have not already done so The AT GPIB board must already be installed before you install the device driver software If you have not installed your AT GPIB board refer to Chapter 2 Hardware Configuration and Installation for instructions on how to configure and install your hardware The NI 488M Distribution Disk AT GPIB SCO UNIX System V 386 Handler and C Interface is...

Page 35: ...Remove script for the handler ibrmnod Utility to remove GPIB device nodes Step 2 Install the NI 488M Software Follow these procedures to install the NI 488M software A Set Up a Working Directory 1 Log on as root 2 Create a working directory for example usr gpib and change to that directory by entering the following commands mkdir usr cd usr mkdir gpib cd gpib 3 Copy the files from the NI 488M dist...

Page 36: ...r bin C Install the C Library Compile and convert the file cib c to a C library file This procedure is necessary because the NI 488M Software Reference Manual assumes that a library has already been created for the C language interface To compile the file cib c and create a C language library enter the following commands cc c cib c ar rv usr lib libgpib a cib o Alternatively you can add cib o to a...

Page 37: ...also configure the software to match your new setting s therefore proceed to the next section A Change the Software Settings If you configured your hardware to match the software default settings skip the next section A Change the Software Settings and go to B Install the Driver A Change the Software Settings Change the base I O address interrupt vector number or DMA channel according to the instr...

Page 38: ...ighth field is the ending I O address in hex of the board The seventh and eighth fields must be in the range between 0 and 3FF for the AT GPIB board The value of the eighth field is obtained by adding 31 decimal or 1F hex to the value of the seventh field If you changed the base I O address interrupt vector number or DMA channel refer to Appendix B Special Instructions for Changing the Software Se...

Page 39: ...are settings Refer to the beginning of this step Step 3 Load the NI 488M Driver for information on changing the software settings Manual Installation To install the driver manually complete the following steps 1 Copy the Driver o Master System and Node files to the root directory by entering the following commands cp Driver o cp Master cp System cp Node 2 Change to the root directory by entering t...

Page 40: ...ry with help screens to explain all commands and options The synopsis of the command is as follows ibconf file where file can be any UNIX file with the NI 488M driver installed The default UNIX kernel file is unix Running ibconf To create the device nodes and or change the GPIB parameters simply type ibconf at the command prompt If you have given your UNIX kernel file a name other than unix use th...

Page 41: ... number is displayed in octal So if you selected interrupt vector 10 it is displayed as 12 in octal A message is also printed along with the configuration information about whether the NI 488M driver was successful in finding the board and installing the driver If a board is not found at the base I O address printed make sure that the base I O address hardware setting matches the base I O address ...

Page 42: ...emoving the Driver You may want to remove the NI 488M software at some time Remove the NI 488M software according to the following steps 1 Remove the driver from the kernel automatically or manually For automatic removal go to the working directory that you created earlier in this chapter under the A Set Up a Working Directory section and enter the following command ibremove ibremove uses ibrmnod ...

Page 43: ...M driver To use the NI 488M functions you must either compile cib c and include the resulting object file during the link phase each time you compile your application or you can link the GPIB library at compile time The following examples show both options cc dcsamp c cib o or cc dcsamp c lgpib Your application program must also include the following header file sys ugpib h For more information on...

Page 44: ... National Instruments Corp A 1 AT GPIB for SCO UNIX Appendix A New NI 488M Functions This appendix describes three new NI 488M functions included in the NI 488M software ...

Page 45: ...tring mode and byte respectively Refer to IBPAD IBSAD IBTMO IBEOT and IBEOS in the NI 488M Software Reference Manual for more information on each argument The ibdev command selects an unopened device opens it and initializes it You can use this function in place of ibfind ibdev returns a device descriptor of the first unopened user configurable device that it finds For this reason it is very impor...

Page 46: ...DVR error If one of the last five parameters is an illegal value it returns with a good device descriptor and the EARG error Example ibdev opens an available device and assigns it to access gpib0 boardindex 0 with a primary address of 6 pad 6 a secondary address of hex 67 sad 0x67 a timeout of 10 msec tmo 7 the END message enabled eot 1 and the EOS mode disabled eos 0 if ud ibdev 0 6 0x67 7 1 0 0 ...

Page 47: ...hrough 15 contains the GPIB control line state information Bits 16 through 31 are undefined The pattern of the defined bytes is as follows 7 6 5 4 3 2 1 0 EOI ATN SRQ REN IFC NRFD NDAC DAV To determine if a GPIB control line is asserted first check the appropriate bit in the lower byte to determine if the line can be monitored If the bit can be monitored indicated by a 1 in the appropriate bit pos...

Page 48: ...O UNIX IBLINES 3 continued IBLINES 3 Example Test for Remote Enable REN int clines if brd0 ibfind gpib0 0 error if ibsta iblines brd0 clines ERR error if clines 0x10 printf GPIB board cannot monitor REN exit if clines 0x1000 printf REN is asserted exit printf REN is not asserted ...

Page 49: ...d parameter can be a value in hex 60 to 7E or one of the constants NO_SAD or ALL_SAD You can test for a Listener using only GPIB primary addressing by making sad NO_SAD or you can test all secondary addresses associated with a single primary address a total of 31 device addresses when you set sad ALL_SAD In this case ibln sends the primary address and all secondary addresses before waiting for NDA...

Page 50: ...w NI 488M Functions National Instruments Corp A 7 AT GPIB for SCO UNIX IBLN 3 continued IBLN 3 Example Test for a GPIB Listener at pad 2 and sad 0x60 ibln ud 2 0x60 listen if listen No Listener found at this address ...

Page 51: ...hex you must complete the following steps before installing the NI 488M driver 1 Decipher the address range of the AT GPIB board by adding 31 decimal or 1F hex to the base I O address of the AT GPIB board 2 Make a backup copy of the file etc conf pack d sio space c 3 Examine the structure sio brds in the file etc conf pack d sio space c The address range of serial boards is defined on the sixth an...

Page 52: ...ector number 11 and DMA channel 5 If you are not using an Adaptec SCSI driver you can remove the Adaptec SCSI driver from the SCO UNIX kernel and use interrupt vector number 11 and DMA channel 5 for the AT GPIB board To remove the Adaptec SCSI driver from the SCO UNIX kernel complete the following steps 1 Bring the system up in single user mode and log in as root 2 Make a backup copy of the follow...

Page 53: ...nt out all the entries in the file etc conf cf d mscsi by making the first character of each line an asterisk 8 Examine the file etc conf pack d Sdsk stubs c It must contain the following lines struct iobuf Sdsktab Sdskopen Sdskclose Sdskread Sdskwrite Sdskioctl Sdskstrategy Sdskpres return 0 If the file does not contain these lines edit the file to contain them 9 Relink the kernel by changing to ...

Page 54: ... I O channel 5 VDC 0 66 A Typical 1 5 A Maximum Actual speed may vary considerably from speed shown because of system and instrumentation capabilities Table C 2 Environmental Characteristics Characteristic Specification Operating Environment Component Temperature Relative Humidity 0 to 40 C 10 to 90 noncondensing Storage Environment Temperature Relative Humidity 20 to 70 C 5 to 90 noncondensing EM...

Page 55: ...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 Branch Offices Phone Number Fax Number Australia 03 879 9422 03 879 9179 Austria 0662 435986 0662 437010 19 Belgium 02 757 00 20 02 757 03 11 Denmark 45 76 26 00 45 76 71 11 Finland 90 527 2321 90 502 2930 Fran...

Page 56: ...ns 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 manuals Include additional pages 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 dis...

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

Page 58: ...is form as a reference for your current configuration National Instruments Products Hardware AT GPIB Revision Hardware Settings Base I O Address Interrupt Line DMA Channel 1st AT GPIB 2nd AT GPIB Software NI 488M Software Version Number on Distribution Disk Disk Label NI 488M Distribution Disk AT GPIB SCO UNIX System V 386 Handler and C Interface Software Settings Base I O Address Interrupt Vector...

Page 59: ...tem V 386 Version Computer Make and Model Microprocessor Clock Frequency Type of Video Board Installed Type of other boards installed and their respective hardware settings Board Type Base I O Address Interrupt Level DMA Channel ...

Page 60: ...th our products This information helps us provide quality products to meet your needs Title Getting Started with Your AT GPIB and the NI 488M Software for SCO UNIX System V 386 Edition Date October 1993 Part Number 320374 01 Please comment on the completeness clarity and organization of the manual continues ...

Page 61: ...be 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 Technical Publications National Instruments Corporation MS 53 02 512 794 5678 ...

Page 62: ...ce EOI End or Identify EOS End of String FCC Federal Communications Commission GPIB General Purpose Interface Bus hex hexadecimal Hz hertz IEEE Institute of Electrical and Electronic Engineers IFC Interface Clear in inches I O input output IRQ Interrupt Request m meters MB megabytes of memory NDAC Not Data Accepted Bit NRFD Not Ready For Data Bit REN Remote Enable SCSI Small Computer System Interf...

Reviews: